问题
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.
回答1:
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;
来源:https://stackoverflow.com/questions/14335790/how-to-use-uielement-createlabels-method-in-numericlabelproviderbase-class-to