Custom Tooltip Style

  • Last update:March 05, 2025
  • Overview

    Version

    Report Server Version
    11.0

    Expected Effect

    The following figure shows the expected effect, where the category, series, and series values are displayed in a table. Such a format is suitable for displaying the tooltip for a single series.

    Implementation Method

    Select Custom for the prompt content, enter HTML codes, and select Use HTML to Parse Text Content, as shown in the following figure.

    Example

    Data Preparation

    Choose File > New General Report in the upper left corner of the designer, and select Refresh Technology as the template theme.

    Create a database query ds1 with the SQL query statement SELECT * FROM Sales_Volume, as shown in the following figure.

    Report Design

    Chart Insertion

    Merge required cells, click the Insert Chart icon, and select Column Chart, as shown in the following figure.

    Data Binding

    Select the chart, choose Cell Element > Data on the right property panel, and bind the dataset data to the chart. Select Region from the drop-down list of Category, Field Value for Series Name, Product from the drop-down list of Series, and Sales_Volume from the drop-down list of Value, as shown in the following figure.

    Chart Style Setting

    1. Title Setting

    Select the chart, choose Cell Element > Style > Title, and enter Product Sales Per Region, as shown in the following figure.

    2. Prompt Setting

    Select the chart, choose Cell Element > Style > Prompt, select Custom for Content, and enter the following code:

    function() {
    return '<h3>'
    +this.category +
    '</h3><table border="1" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF"><tr><td style="color:white;"> Product </td><td style="color:white;">'
    + this.seriesName +
    '</td></tr><tr><td style="color:white;"> Sales </td><td style="color:white;">'
    + this.value +
    '</td></tr></table>';
    }

    After entering the code, you need to select Use HTML to Parse Text Content, as shown in the following figure.

    Effect Display

    Save the template and click Pagination Preview. The following figure shows the effect.

    iconNote:
    The effect cannot be previewed on mobile terminals.

    Template Download

    For details, you can download the template: Custom Tooltips for Column Charts.cpt.

    Attachment List


    Theme: Chart
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy