在LineSeries WinForms图表中显示工具提示?

编程入门 行业动态 更新时间:2024-10-27 08:26:30
本文介绍了在LineSeries WinForms图表中显示工具提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用WinForms中的折线图的仪表板系统.我需要在每一行上显示tooptip.我已经尝试过了

I am working on a Dashboard System where i am using Line Chart in WinForms. I need to show the tooptip on each line. I have tried this

var series = new Series { Name = chartPoint.SetName, Color = chartPoint.ChartColor, ChartType = SeriesChartType.Line, BorderDashStyle = chartPoint.ChartDashStyle, BorderWidth = chartPoint.BorderWidth, IsVisibleInLegend = !chartPoint.HideLegend, ToolTip = "Hello World" };

但对我不起作用

推荐答案

一些RnD之后,我得到了Line Series的工具提示,但仍然感到困惑,为什么它不适用于此解决方案. 这是解决方案

After some RnD i got tooltips on Line Series, but still confused why its not working with this solution. Here is the solution

series.ToolTip = string.Format("Name '{0}' : X - {1} , Y - {2}", chartPoint.SetName, "#VALX{F2}", "#VALY{F2}"); mainChartControl.GetToolTipText += ChartControlGetToolTipText; private void ChartControlGetToolTipText(object sender, ToolTipEventArgs e) { }

更多推荐

在LineSeries WinForms图表中显示工具提示?

本文发布于:2023-11-10 22:59:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1576697.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图表   提示   工具   LineSeries   WinForms

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!