I am writing this application in C# where I have a data table as the data source. I would like to create a disconnected line chart where if the value is zero, the point is not plotted and the line ends and then begins again when the value is not zero. Is this possible, and if so, what's the best way to do it. I figure I could probably just break it down into separate lines, but then I'd end up with double items in the legend.
This won't work with zeroes, but if you had null values in your data, then you could set chart.LineChart.NullHandling to DontPlot to get the behavior you're describing.
Here's a link to an online sample on NullHandling with code:https://ko.infragistics.com/samples/aspnet/chart/null-data-handling
The issue with this code as I see it is that you are left either not plotting the last value (which is a significant value) or plotting the null value as a point on the line.
As far as I'm concerned, both of those solutions is incorrect. It seems to me the line should continue from the last non-null value to the next non-null value but there should be no point plotted for the null-valued column.
I posted code for doing that accurately here:
http://community.infragistics.com/forums/p/29427/171516.aspx#171516
Max, I wonder if you have any ideas how to address the issue I present there?
Thanks,
Allen
The default behavior of the line chart is to display a line between 2 non-null points Other special cases would have to be resolved by using custom logic, such as adding a SymbolIcon in a layer, etc. I believe your question has been answered on the other thread.