图表上的工具提示未显示 [英] Tooltips on Charts not displaying

查看:81
本文介绍了图表上的工具提示未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我无法在我的图表上显示任何工具提示。 以下是我正在尝试添加工具提示的柱形图的代码。 每个系列上的标签显示正确,但工具提示根本不显示。 我需要打开一些其他
属性来显示工具提示吗?





'将标签放在非零数据点上


i = 0




对于
每个 bar
As
仪表板
utilizationCollection


myIndex = collMonth.IndexOf(bar.MonthNumber.ToString())




Dim rankLabel
As
String




Dim tooltipLabel
As
String




选择
案例 bar.Rank < span style ="font-size:small">




Case 0




'如果此类型的计数为0,则无标签




Case Else


rankLabel = bar.Rank.ToString()


Chart1.Series(



" Series" & myIndex.ToString).Points( i
Mod 7).Label = rankLabel


Chart1.Series(



" Series" & myIndex .ToString())。Points(i
Mod 7).LabelBackColor =
颜色 。白色


Chart1.Series(



"系列" & myIndex.ToString())。积分(i
Mod 7).LabelForeColor =
颜色 。红色


tooltipLabel =



" herbert" & myIndex .ToString()&
i.ToString()


Chart1.Series(



" Series" & myIndex.ToString())。Points(i
Mod 7).ToolTip = tooltipLabel




结束
选择


i + = 1




下一步 谢谢。






























解决方案

您好,


请在使用数据绑定图表时尝试此操作



Char1.Series(0).ToolTip = Char1.Legends(0).CustomItems(0).Name&":is #VAL"


或 


Char1.Series(0).ToolTip =" #VAL"



Hi,

I haven't been able to get any tooltips to display on my charts.  Here is the code for a Column chart where I'm trying to add tooltips.  The Labels on each Series display correctly, but the Tooltips don't display at all.  Is there some other property that I need to turn on to make Tooltips display?

'Put labels on the non-zero datapoints

i = 0

For Each bar As Dashboard In utilizationCollection

myIndex = collMonth.IndexOf(bar.MonthNumber.ToString())

Dim rankLabel As String

Dim tooltipLabel As String

Select Case bar.Rank

Case 0

'No label if the count is 0 for this type

Case Else

rankLabel = bar.Rank.ToString()

Chart1.Series(

"Series" & myIndex.ToString).Points(i Mod 7).Label = rankLabel

Chart1.Series(

"Series" & myIndex.ToString()).Points(i Mod 7).LabelBackColor = Color.White

Chart1.Series(

"Series" & myIndex.ToString()).Points(i Mod 7).LabelForeColor = Color.Red

tooltipLabel =

"herbert" & myIndex.ToString() & i.ToString()

Chart1.Series(

"Series" & myIndex.ToString()).Points(i Mod 7).ToolTip = tooltipLabel

End Select

i += 1

NextThanks.

解决方案

Hi,

Please try this while you bind the chart with data

Char1.Series(0).ToolTip = Char1.Legends(0).CustomItems(0).Name & " : is #VAL "

OR 

Char1.Series(0).ToolTip = "#VAL "


这篇关于图表上的工具提示未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆