I want to create something like above
The Xaxis is dateTime and the YAxis is numberic.
For the line I am using
LineAppearance line = new LineAppearance();
line.LineStyle.EndStyle = LineCapStyle.NoAnchor;
line.IconAppearance.Icon = SymbolIcon.None;
line.Thickness = 1;
line.LineStyle.DrawStyle = LineDrawStyle.Dash;
LineChartAppearance lineAppearance = new LineChartAppearance();
lineAppearance.LineAppearances.Add(line);
NumericTimeSeries serieLocalRxvalues = new NumericTimeSeries();
values.Data.DataSource = dt;
values.Data.LabelColumn = "DateValue";
values.Data.TimeValueColumn = "DateValue";
values.Data.ValueColumn = "YValue";
values.PEs.Add(new PaintElement(System.Drawing.Color.Red)); this.webchartData.CompositeChart.Series.Add(values);
I am not sure how I create the text next to the line. I did try ChartTextAppearance and BoxAnnotation and Infragistics.UltraChart.Core.Primitives.Text, but none of them are working right.
Is someone can help?
Thanks
You can use the FillSceneGraph Method to add your own Elements to the SceneGraph. So you can add objects of type "Infragistics.UltraChart.Core.Primitives.Primitive" to the scenegraph to customize it.
Also you can change existing scenegraph elements, which are created by the chart itself. To write your texts, you must check the scenegraph for your line-primitives. Then you can get the points of the line and use this to set the position for your new Text-Primitive Object. Finally add this new Text Primitive to the scenegraph and it will be drawn.
public override void FillSceneGraph(SceneGraph scene){ foreach (Primitive prim in scene) { Line myLine = prim as Line; if (myLine != null) { // TODO: Check if it is one of yours Text t = new Text(); t.bounds = new Rectangle(myLine.p1.X, myLine.p1.Y, ... ); t.SetTextString("Helllo World"); t.SetLabelStyle(... ); scene.Add(t); } }}