Hi ,
I want to plot a splinechart like dotted-plain line- plotted. I found in an a previous discussion something like :
private void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e) { List<Polyline> originals = new List<Polyline>(); List<Polyline> fisrtStageLsit = new List<Polyline>(); foreach (Primitive pr in e.SceneGraph) { if (pr.GetType() == typeof(Polyline)) { DataPoint[] dtpFirstStage = new DataPoint[((Polyline)pr).points.Count()]; int k = 0; foreach (DataPoint dp in ((Polyline)pr).points) { originals.Add((Polyline)pr); if (k < 4) dtpFirstStage[k] = dp; k++; } ((Polyline)pr).lineStyle.DrawStyle = LineDrawStyle.Dot; ((Polyline)pr).PE.Fill = Color.Yellow; ((Polyline)pr).PE.StrokeWidth = 3; Polyline fisrtStage = new Polyline(dtpFirstStage); fisrtStage.PE.Fill = Color.LightBlue; fisrtStage.PE.StrokeWidth = 4; fisrtStage.lineStyle.DrawStyle = LineDrawStyle.Solid; fisrtStageLsit.Add(fisrtStage); } } if (fisrtStageLsit.Count > 0) { foreach (Primitive item in fisrtStageLsit) e.SceneGraph.Add(item); } }
This works but only for line dotted , how can i do dotted-line-dotted ?
Thanks
OK. I misunderstand your requirements. In that case, you should use the mentioned approach form another forum thread. I already try this and everything works properly. Just change the DrawStyle. If you still have a problems with that, pleaseupload your sample and I`ll be glad to research it for you.
Let me know if you have any questions.
Regards
What I can to do is to have on the same plot , a part in dotted then plain line then again dotted Your solution make only a dotted graph.
Hello Eltorfuerte,
I suppose that you refer my previous forum thread: http://ko.infragistics.com/community/forums/t/74479.aspx . If so, I think that your scenario is different, and mentioned approach from that forum thread is not suitable.
My suggestion is to use LineAppearance and SplineChartAppearance to modify your lines in the chart. For example:
LineAppearance la = new LineAppearance();
la.LineStyle.DrawStyle = LineDrawStyle.Dot;
la.Thickness = 5;
SplineChartAppearance sca = new SplineChartAppearance();
sca.LineAppearances.Add(la);
myColumnLayer.ChartTypeAppearance = sca;