本文介绍了在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图表中显示工具提示?
发布评论