Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Sorting WeekDay stored in datatable wtih WPF chart toolkit

$
0
0

Hello Everyone,

I am working with WPF Chart toolkit.

I have to x values as DayofWeek . I have bind the values DataTable Columns.

It is working fine, but it is not displaying in order. Please find the Image.

I tried column soritng, but it is not working.

My DataTable structure is

public DataTable getTable()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("OpId", typeof(Int32));
            dt.Columns.Add("WeekDay", typeof(string));// Also tried with type as DayofWeek
            dt.Columns.Add("Length", typeof(double));
            dt.Columns.Add("AnotherLength", typeo(double));
return dt;
}

in XAML

<charting:ScatterSeries Title="AbsentList" x:Name="myChart"  ItemsSource="{Binding}" IndependentValuePath ="WeekDay" IsSelectionEnabled="True" DependentValuePath="OpId" Margin="0,0,0,1" />

Could any one know how to achieve this?

Thanks in advance.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>