How to customize chart prompts?

Source: Internet
Author: User

Reference: How to mimize the tooltips displayed in the chart

The chart prompt information can be customized and displayed when you hover your mouse over the chart or click a chart. You can also set it to not display the prompt content. For specific code, refer to the following settings.

Click the chart to display the prompt information:

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

The following message is displayed when hovering:

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

No prompt is displayed:

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

 

When you set the cursor to appear when the chart is suspended, the prompt content can be the axis label value and data value, or set it to the row and column number and data value, or customize the prompt content. Refer to the following code:

Show axis label value and data value:

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

Show row and column numbers and data values:

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

Custom chart prompt content:

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

This. ultrachart1.tooltips. formatstring = "tooltip ";

 

We have mentioned several settings for customizing the prompt information in the chart. In fact, we can also control the appearance of the prompt information, including the background color, font size, and text color. refer to the following code:

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;

 

For the final result, see Figure 1.

 

Figure 1 user-defined chart prompt demonstration effect

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.