工具提示不起作用 [英] ToolTips not working

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

问题描述

我在后面的代码中构建了一个包含多个系列的图表,下面是该系列的代码。  我还需要其他一些房产吗?  如果我在标记页面上定义图表,似乎工作正常吗?

I am building a chart with multiple series in the code behind, code for the series below.  Is there some other property I need?  Seems to work fine if I define the chart on the page in the markup??

for (int a = 0; a < SourceData.Rows.Count; a++)
    {
	DataRow dr = SourceData.Rows[a];
	if (dr[0].ToString() == "O")
	{
	//Each row will be a separate series
		Series s = new Series();
		s.BorderWidth = 2;
		s.ChartType = SeriesChtType;
		s.YAxisType = AxisType.Primary;
		s.Name = dr[1].ToString() + "-" + dr[3].ToString();
		//s.ToolTip = dr[3].ToString();
		s.ToolTip = "#SERIESNAME - #VAL";
		s.MapAreaAttributes = "#LABEL";

		for (int i = 4; i < SourceData.Columns.Count; i++)
		{
	
		string columnName = SourceData.Columns[i].ColumnName;
		string YVal = dr[columnName].ToString();
		s.Points.AddXY(columnName, YVal);
    }
    seriesList.Add(s);
}

推荐答案

在s.ToolTip之前添加以下代码

Add below code before s.ToolTip

s.SmartLabelStyle.Enabled = true;








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

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