We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Chart is displaying the same data twice.

Thread ID:





105979 Dec 2,2012 01:11 AM UTC Dec 12,2012 11:27 AM UTC WPF 1
Tags: Chart
It Kunj
Asked On December 2, 2012 01:11 AM UTC

We have a very involved data collection system.  Our main data source is an object that holds 2 kinds of data.  The first is an ObservableCollection of raw data objects.  The second is an array of ObservableCollections each holding filtered data objects. Some striped down code should help explain.

ObservableCollection<rawData> _rawData = new ObservableCollection<rawData>();

TsDataSourceFltrd [] _fltrdDataAry = new fltrdData [10];


Our main data source object has properties to expose both the raw data and each of the filtered data objects.  We are trying to figure out how to chart this data using the XDateTime value from the rawData object as the X value and some other value from the filtered data as the Y value.  For testing everything is held inside of a Tab control with its data context set. DataContext="{StaticResource MainDS}"


This is what we have so far.  Below is the code and a screen shot (see ListBox.jpg file) of our data bound into list boxes and is used as a reference and for verification.

<DockPanel Margin="0" Name="dockPanel1" >

    <ListBox Name="listBox1" ItemsSource="{Binding Path=RawData}" DockPanel.Dock="Left" Width="200" HorizontalAlignment="Left">



                <StackPanel Orientation="Horizontal">

                    <TextBlock Text="{Binding Path=XDateTime}" />

                    <TextBlock Text="   " />

                    <TextBlock Text="{Binding Path=Value1}" />





    <ListBox Name="listBox2" ItemsSource="{Binding Path=FltrdData01}" DockPanel.Dock="Left" Width="100" HorizontalAlignment="Left">



                <StackPanel Orientation="Horizontal">

                    <TextBlock Text="{Binding Path= Value2}" />







You can see in the ListBox.jpg image that everything looks good here.  Our data processing engine is working and we are getting the correct raw and filtered data.

Now the chart.

 <sf:Chart Name="chart1" >

    <sf:ChartArea ZoomInCoefficient="0.5" ZoomOutCoefficient="2" Foreground="White" Background="Gray" EnableMouseDragZooming="True">

        <!--Primary Axis(X)-->


            <sf:ChartAxis Name="Xaxis" EdgeLabelsDrawingMode="Shift" LabelFontSize="11" Header="Time" IsAutoSetRange="True" LabelDateTimeFormat="HH:mm" ValueType="DateTime" />


        <!--Secondary Axis(Y)-->


            <sf:ChartAxis Name="Yaxis" LabelFontSize="11" Header="Middle Price" Interval="1" MinimumInterval="0.25" OpposedPosition="True" />



        <sf:ChartSeries Name="Value1" Label="Value 1" Type="Line" BindingPathX="XDateTime" BindingPathsY="Value1"

                        DataSource="{Binding RawData, diagnostics:PresentationTraceSources.TraceLevel=High}" Interior="BurlyWood" StrokeThickness="4"/>


        <sf:ChartSeries Name=" Value2" Label=" Value 2" Type="Line" BindingPathX="XDateTime" BindingPathsY=" Value2"

                        DataSource="{Binding FltrdData01, diagnostics:PresentationTraceSources.TraceLevel=High}" Interior="Blue" />





When run we have both plots on top of each other, but when we are in VS2010 design mode the series plot correctly (sometimes).  See the Chart Bad and Chart Good .jpg images.

We believe that the issue is with our attempt to use the BindingPathX="XDataTime" value from the RawData object when plotting the filtered data from one of the FltrdDataXX sources.  See the red highlight in the above code.

Any assistance in getting this working will be greatly appreciated.

it kunj

Screen Shots_321633a7.rar

Karthikeyan V [Syncfusion]
Replied On December 12, 2012 11:27 AM UTC

Dear Customer,


Thanks for using Syncfusion products.

We are analyzed the reported issue. We are unable to access the one series data source object to another series. Because each series have a separate data source. For your verification see your list box example. It gives the two separate item source of each list boxes and accessing the object of each separate collection. So as the same behavior of the chart series. We are created a sample based on this. Please find the sample in the following link below.


Please let us know, if you have any concerns



Karthikeyan V.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon