Hi,
I am trying to create a LineSeries by using the code below:
LineSeries lineseries = new LineSeries();
lineseries.Thickness = 3;
lineseries.MarkerType = MarkerType.None;
lineseries.Resolution = 1.5;
lineseries.ItemsSource = data1;
lineseries.XAxis = xmLineXAxis;
lineseries.XAxis.ItemsSource = data2;
Scenario 1:
LineSerie plotted data1 contains values other than null. e.g. 1.0,2.5,3.5 ......
data2 contains continuous values. e.g. 1,2,3,4,5.......
Scenario 2:
LineSerie not plotted data1 contains some null values. e.g. 1.0,2.5,null,3.5,null,null ......
Count of data1 and data2 are always equal.
How can i plot the line series ?
Thank you
Best Regards,
Varun
Hello Varun,
I am just checking if you have any further questions on this matter. Please do not hesitate to let me know if you do.
I have been looking into your issue. I you want the not null values - 1,3,4,5 to be connected with a line you can set the UnknownValuePlotting property as I have in the sample application I have added in my previous post. I have commented the lines. Please refer to the sample application in the previous post and feel free to let me know if you have any further questions on this matter.
Hi Gergana,
Your suggestion did help.
But i need some more help. I want the not null values to be available as dots or connected with line.
e.g. if a have a sequesnce say: 1,null,3,null,4,null,5...
Then i would like to have the dots plotted for 1, 3, 4, 5
I have been looking into your issue and have modified the sample application for you. In the modified sample I have set the UnknownValuePlotting property of the LineSeries. This property is used to plot the values, that are null. More about this functionality you can find on the following link from our documentation: http://help.infragistics.com/Help/Doc/WPF/2014.1/CLR4.0/html/xamSparkline_Interpolating_Unknown_Values.html.
Please find the attached sample application and feel free to let me know if you have any further questions on this matter.
Thank you for the sample.
But my problem of plotting null values is not resolved.
The application that i am developing in some case plots the null values but in others it plots nothing.
Unfortunately cannot provide code fragments.
Could you list possible reasons for the values (containing some null values) not getting plotted.