If I have a Composite Chart with two NumericTimeSeries, but don't have values on all dates for both series, why can't I just graph the values from one point to the next.
E.g. if I have the following datatable:
It seems the only options I have for Null handling are Zero, InterpolatedSimple, DontPlot or Custom. I just want to graph directly from one value to the next. It seems the only way I can do this is to copy my values onto the dates on my other series, like so:
But this then displays dots on the graph, when there is no change on those dates.
Is there a way to do this?
Thanks,Campbell
Hello Campbell,
Thank you for contacting Infragistics. Are you looking for LinearInterpolate where the line continues to the next point? Please refer to the following topic. Which chart type are using?
www.infragistics.com/.../sparkline-interpolating-unknown-values
Thanks Michael. I can't see LinearInterpolate as an option. I'm using a Composite chart type with layer chart type of Line Chart. However, I've managed to resolve my issue by creating an additional data point on each date, setting NullHandling to InterpolateSimple, and setting MidPointAnchors to false.
Perform the following to exclude markers
stepLineSeries.AssigningCategoryMarkerStyle += StepLineSeries_AssigningCategoryMarkerStyle; stepLineSeries.IsCustomCategoryMarkerStyleAllowed = true; private void StepLineSeries_AssigningCategoryMarkerStyle(object sender, AssigningCategoryMarkerStyleEventArgs args) { var excludePoint = new DateTime(2021, 1, 6); if (args.EndDate == excludePoint) { args.Fill = Color.Transparent; args.Stroke = Color.Transparent; } }
Ok, that was the conclusion I'd come to also. I just wanted to avoid having Markers on those entries should I add them, but I think it's a small price to pay. Thanks for all your help.
I would try creating a new datasource by iterating your real data that has nulls or no values and insert values based on the previous item. That way it interpolates the way you want. If that doesn't work out for you and you have a valid solution with UltraChart then you can continue to use it.
dt1.Rows.Add(new object[] { new DateTime(2021, 1, 1), 1, 4 }); dt1.Rows.Add(new object[] { new DateTime(2021, 1, 2), 2, 4 }); dt1.Rows.Add(new object[] { new DateTime(2021, 1, 6), 3, 2 }); dt1.Rows.Add(new object[] { new DateTime(2021, 1, 15), 4, 2 }); dt1.Rows.Add(new object[] { new DateTime(2021, 2, 1), 5, 3 }); dt1.Rows.Add(new object[] { new DateTime(2021, 2, 3), 4, 4 });
Ok, thanks. It's strange that it doesn't default to not displaying blanks, particularly on a Time Axis, as effectively every date that is missing is a null value, so actual null values shouldn't be treated any differently.
I will add this to the above product ideas.
Is there a way I should be able to get the above to work without the duplicated axis, or am I better just reverting to WInCharts?
StepLineSeries does not support UnknownValuePlotting.
You can suggest new product ideas for future versions (or vote for existing ones) at <https://es.infragistics.com/community/ideas>. Submitting your idea will allow you to communicate directly with our product management team, track the progress of your idea at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you. Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it.
Let me know if you have any questions.
Michael DiFilippoSoftware DeveloperInfragistics, Inc.