惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
PCI Perspectives
PCI Perspectives
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V2EX - 技术
V2EX - 技术
Google DeepMind News
Google DeepMind News
量子位
博客园_首页
S
SegmentFault 最新的问题
S
Secure Thoughts
F
Full Disclosure
H
Hacker News: Front Page
博客园 - 三生石上(FineUI控件)
U
Unit 42
H
Heimdal Security Blog
N
News and Events Feed by Topic
A
About on SuperTechFans
C
CERT Recently Published Vulnerability Notes
Cyberwarzone
Cyberwarzone
Help Net Security
Help Net Security
The Hacker News
The Hacker News
L
LINUX DO - 最新话题
Application and Cybersecurity Blog
Application and Cybersecurity Blog
罗磊的独立博客
N
News | PayPal Newsroom
Spread Privacy
Spread Privacy
C
Cisco Blogs
C
CXSECURITY Database RSS Feed - CXSecurity.com
云风的 BLOG
云风的 BLOG
A
Arctic Wolf
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
B
Blog
人人都是产品经理
人人都是产品经理
TaoSecurity Blog
TaoSecurity Blog
博客园 - 【当耐特】
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
Hugging Face - Blog
Hugging Face - Blog
I
InfoQ
D
DataBreaches.Net
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
L
LINUX DO - 热门话题
Google Online Security Blog
Google Online Security Blog
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
Know Your Adversary
Know Your Adversary
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
B
Blog RSS Feed

博客园 - 李计刚

SQL学习笔记之ANSI_NULLS 要生就生双胞胎~ 如何手写代码以生成Composite图表? 在重庆访古~ Infragistics控件在VS.net 2005中使用的注意事项 UltraChart中如何自定义标签? 关于ColumnLine Chart 重庆印象! 用图表向导生成ColumnLineChart 在VS2005中调试JavaScript 那些逝去的美好日子! 关于SELECT执行顺序的问题! Infragistics中Custom Layer的实现(翻译) UltraChart绑定数据的问题(翻译) 韩剧已不再风光! 用颜色矩阵实现的图象反转效果 关于:GDI+FAQ的好去处! 我做的数字图象处理 我的Blog开通了!
怎样定制图表提示?
李计刚 · 2009-06-08 · via 博客园 - 李计刚
 

原文参考:How to customize the tooltips displayed in the chart

图表提示信息可以定制在鼠标悬停在图表上或者点击图表时显示,也可以设置成不显示提示内容,具体代码参考下列设置。

点击图表显示提示信息:

this.UltraChart1.Tooltips.Display= Infragistics.UltraChart.Shared.Styles.TooltipDisplay.MouseClick;

悬停时显示提示信息:

this.UltraChart1.Tooltips.Display= Infragistics.UltraChart.Shared.Styles.TooltipDisplay.MouseMove;

不显示提示信息:

this.UltraChart1.Tooltips.Display= Infragistics.UltraChart.Shared.Styles.TooltipDisplay.Never;

当设置鼠标在图表上悬停时以显示信息提示时,提示内容可以是轴标签值与数据值,或者是设置成行列号与数据值,也可以自定义提示内容。参考以下代码:

显示轴标签值与数据值:

this.UltraChart1.Tooltips.Format = Infragistics.UltraChart.Shared.Styles.TooltipStyle.LabelPlusDataValue;

显示行列号与数据值:

this.UltraChart1.Tooltips.Format = Infragistics.UltraChart.Shared.Styles.TooltipStyle.RowColumnPlusDataValue;

自定义图表提示内容:

this.UltraChart1.Tooltips.Format=Infragistics.UltraChart.Shared.Styles.TooltipStyle.Custom;

this.UltraChart1.Tooltips.FormatString="tooltip";

以上我们提到了自定义图表提示信息的若干设置,实际上我们还可以控制提示信息的外观,包括背景色、字体大小、文字颜色等,参考以下代码:

this.UltraChart1.Tooltips.BackColor=System.Drawing.Color.Yellow;

this.UltraChart1.Tooltips.FontColor=System.Drawing.Color.Blue;

this.UltraChart1.Tooltips.BorderColor=System.Drawing.Color.Red;

this.UltraChart1.Tooltips.BorderThickness=3;

最终生成效果参见图1

图1   自定义图表提示演示效果