如何使用UIElement [] NumericLabelProviderBase类中的CreateLabels方法在绘图仪内部的点中插入标签或文本 [英] How to use UIElement[] CreateLabels method in NumericLabelProviderBase class to insert label or text in a point inside plotter
问题描述
我试图重写CreateLabels在绘图仪图表中的特定点插入标签或文本,但我需要帮助:
1.参数( ITicksInfo< double> ticksInfo
)意味着什么应该发送给它
2.如何使用返回值添加标签到已经定义的Axis像_stringaxis.LabelProvider
或如果有更简单的方式在一个点添加文本,请告诉
非常感谢。
解决方案 CenteredTextMarker label = new CenteredTextMarker();
label.Text = text;
//只是在一个高度相同的位置上画一条线,你想要的标签是
plotter.AddLineGraph(compositeDataSource1,
dptLine,
label,
new PenDescription(ComponentName));
我隐藏传说并通过做
plotter.LegendVisible = false;
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.
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;
这篇关于如何使用UIElement [] NumericLabelProviderBase类中的CreateLabels方法在绘图仪内部的点中插入标签或文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!