lundi 30 mars 2015

Add Text to Chart Series

I have a WinForms DataVisualization Chart that I'd like to add text to in the actual chart data. I am wondering if this is possible, since there is no SeriesChartType which is text.

I am constantly writing new data to the graph during a test sequence and a single test sequence consists of several tests. In my attached image, you will see that I use a red circle to indicate the beginning of a new test in the test sequence. I would like to change the circle, or append to it, a description (such as a single letter) to help differentiate each test when reviewing the data.



Series newSeries = new Series("currentValues"); // graphs black line
newSeries.ChartType = SeriesChartType.Line;
newSeries.BorderWidth = 1;
newSeries.Color = Color.Black;
newSeries.XValueType = ChartValueType.DateTime;
chtCurrent.Series.Add(newSeries);

Series newSeries2 = new Series("newTestIndicator"); // graphs red circle
newSeries2.ChartType = SeriesChartType.Point;
newSeries2.BorderWidth = 1;
newSeries2.Color = Color.Red;
newSeries2.XValueType = ChartValueType.DateTime;
chtCurrent.Series.Add(newSeries2);


current_time_chart please ignore the placement of the bottom +/- buttons


Aucun commentaire:

Enregistrer un commentaire