In the drawing of my scatter chart I was wondering if there was a way to show a line across the graph that represents a min, max or set point value without having to create a series that would represent this?
Hello wltaylor,
I think that you could use the following code sample in order to achieve the desired look and feel:
private void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e) { Line l = new Line(new Point(50, 50), new Point(1000, 50)); l.PE.Stroke = Color.Red; e.SceneGraph.Add(l); }
Please feel free to let me know if I misunderstood you or if you have any other questions.
My series is a time series where the Y Axis is a date ,how does that become a point? Also is there a way to do this while I am adding data so that I do not have to Add Handlers for every graph utilizing the FillSceneGraph event?
wltaylor said: In the drawing of my scatter chart I was wondering if there was a way to show a line across the graph that represents a min, max or set point value without having to create a series that would represent this?
To achieve deisred behavior you have two possible options. The first one is to use composite chart, where you should have additional series that will represent your Min and Max lines. The other possible approach is described from my colleague Boris in the previous post. You should handle fillSceneGraphe event and add a new Line primitive that will represent Min and Max lines.
wltaylor said: My series is a time series where the Y Axis is a date ,how does that become a point?
My series is a time series where the Y Axis is a date ,how does that become a point?
Your scatter chart contains PointSet primitives where is stored all your visible points in the chart. So if you handle FillSceneGraph event, you are able to get these points from your PointSet primitive and you are able to find your Min and Max decimal value or Min and Max DateTime value. Also you could use X and Y coordinates of these points. You are able to access it via:
PointSet ps = pr as PointSet;
ps.points[0].point.X
ps.points[0].point.Y
wltaylor said: Also is there a way to do this while I am adding data so that I do not have to Add Handlers for every graph utilizing the FillSceneGraph event?
Also is there a way to do this while I am adding data so that I do not have to Add Handlers for every graph utilizing the FillSceneGraph event?
Yes, if you are using my first suggestion with composite chart.
Let me know if you have any further questions.