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. Image for the cookie policy date

Line chart, adding 2nd line with less points but to scale of first?

I have a line graph with some data behind that looks like this

6:00 AM, 24

6:05 AM, 24.2

6:10 AM, 24.5

6:15 AM, 23

6:20 AM, 25

6:25 AM, 25.2

6:30 AM, 25.1

Plotting this as a line chart works fine with the times as the X-Axis and the values as Data points.

Now lets say I wish to add another line to this chart but only with the following values

6:02 AM, 27

6:011 AM, 27.5

6:28 AM, 26

How do I get it so that the 3 points from above plot on the chart in the positions relative to the first set of data? or is this not an easy task?


2 Replies

KV Karthikeyan V Syncfusion Team March 8, 2013 11:59 AM UTC

Hi Gareth,

Thanks for using Syncfusion products.

We have analyzed the reported query. You can achieve your requirement by applying IsIndexed as false in each series.

Code Snippet[XAML]:

<syncfusion:ChartSeries  IsIndexed="False"  BindingPathX="Time" BindingPathsY="Value" Type="Line" DataSource="{Binding Datas}" />

<syncfusion:ChartSeries  IsIndexed="False" BindingPathX="Time" BindingPathsY="Value" Type="Line" DataSource="{Binding Datas1}" />

We have prepared the sample based on this and this sample can be downloaded from the following location.

Please get back to us if you require any further assistance on this.

Regards,

Karthikeyan V.



TwoLineChart_807aacaf.zip


GD Gareth Day March 11, 2013 10:40 AM UTC

That worked great!


Loader.
Up arrow icon