How to use UIElement[] CreateLabels method in NumericLabelProviderBase class to insert label or text in a point inside plotter

StackOverflow https://stackoverflow.com/questions/14335790

Question

I'm tring to override CreateLabels to insert labels or text in specific points in plotter chart but I need a help in: 1. what does the parameter (ITicksInfo<double> ticksInfo) mean and what should I send to it 2. how to use the return value to add labels to already defined Axis like _stringaxis.LabelProvider

or if there is simpler way to add text in a point please tell,

Many thanks.

Was it helpful?

Solution

Just found the easiest way to add a nice label inside the chart.

CenteredTextMarker label = new CenteredTextMarker();
        label.Text = text;
//just dawing a line with one dot tall in the same position you want the label to be 

plotter.AddLineGraph(compositeDataSource1, 
                                 dptLine,
                                 label,
                                 new PenDescription(ComponentName));

and I'm Hiding the legend and build a customized one my self by doing

plotter.LegendVisible = false;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top