简体   繁体   English

显示标签并在ZedGraph中显示曲线的长度(不只是通过工具提示)

[英]Showing labels and length the of curves in ZedGraph (not just by tooltip)

I have to show the name and length of the curves not just by hovering in a ZedGraph. 我不仅要在ZedGraph上悬停,还必须显示曲线的名称和长度。 I saw a solution here to show the label and the points of a curve but I do not know how to make it show without hovering. 我在这里看到了一种显示标签和曲线点的解决方案,但是我不知道如何在不悬停的情况下显示它。

My program is to compute first the MST of the graphs and remove the long legs. 我的程序是首先计算图形的MST并消除长边。 And I want to show to the user the step by step process. 我想向用户展示逐步过程。 I have finished the code but I want it to be more user-friendly so that he/she will not hover to the points anymore just to show the length, the points and the label of the curve. 我已经完成了代码,但是我希望它更加用户友好,以便他/她不再将鼠标悬停在点上,仅显示曲线的长度,点和标签。

Here is an example of how to attach text labels to each point: 这是一个如何将文本标签附加到每个点的示例:

http://zedgraph.dariowiz.com/index9769.html?title=Point_Label_Demo http://zedgraph.dariowiz.com/index9769.html?title=Point_Label_Demo

Depending on how you implement it it can be convenient to set the Tag property of each PairPoint and then just print that Tag like in the example. 根据实现方式的不同,可以方便地设置每个PairPoint的Tag属性,然后像示例中一样打印该Tag。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM