I am trying to display daily production data on a line chart in pounds of product produced per hour. We have 2 departments that appear on this chart however, some days 1 of the 2 departments may not be scheduled for production. On these days in my chart, I don't want to show a zero value for pounds per hour because it shows as a sharp dip in productivity. I need the line chart to skip that day for the zero value.Can anyone shed some light on how I can accomplish this?My datasource is a datatable with decimal values for the points on the line.Thanks in advance for your help,Trevor BraunThe Stirling Creamery Ltd.
***That should read: what is the syntax to set the point directly to 5 as in pl.points[x+1].SetValue(5)
Took me awhile to figure out that None above is actually a boolean value so I changed that to false in order to test that. That works well for setting that value for a line that has nulls within a range of values that includes a non-null value on either end of it.
I've managed to implement the ILayer interface and I'm working in the FillSceneGraph method. I'll post my code when I get it to work.
I'm stuck trying to set the value of the null point to some average.
In other words, if pl is my polyline and I have three points and pl.points[x].Value is for example 4...and pl.points[x+2].Value is 6 and pl.points[x+1] is null then I need to set the value of pl.points[x+1] to 5 but I'm not sure how to access that. It seems to be read-only at the level I find it.
I can modify the value of the x and y coordinates (assigning them the average of the x and y coordinates above and below) but this doesn't let me get close enough for the line to be accurate when trying to produce the average or point to plot for all permutations of values and number of points that are initially null values. I can set pl.points[x].point.X=whatever int and pl.points[x].point.Y=whatever int but...
what is the syntax to set the point directly to 5 as in pl.points[x=1].SetValue(5)?
Thanks.
Allen
to remove all the dots, you can set LineChart.MidPointAnchors = None. you can also utilize the Data.EmptyStyle properties to enable custom line styling for segments surrounding null values.
if the property settings are insufficient, more customization is possible using the FillSceneGraph event to actually modify the Polyline primitives inside the SceneGraph.
in 7.1 i think the FillSceneGraph event is unavailable... in which case you'd have to implement ILayer (see the documentation topics on custom layers for more info).
...and I haven't explored removing the dots for the "faked" data points, although it should be possible since if you hover your mouse over the fake ones, no value is displayed. This would indicate that there is some way of detecting these points and removing the dots.
I have since my post made changes to correct the "bug" that didn't post null values at the beginning and ending of the data correctly. I am going to attach the code since either I don't know how to post code properly or posting code is just a pain in these forums...