Chart Tooltip dollar format

(4 posts) (2 voices)
  1. Dev, Member

    Hi,

    I am trying to display the tooltip for one of our reports in dollar format ($). Below are the settings I have configured:

    SELECT 'dbr.chart', 'MSBar', 'Comparison';
    SELECT 'dbr.chart.options', 'showValues', 1;
    SELECT 'dbr.chart.options', 'Total Payments', '$ %.2f';
    SELECT 'dbr.colstyle', 'Total Payments', '$ %.2f';
    SELECT 'dbr.chart.color', '#F4CE14', '#379777';
    SELECT 'dbr.chart.options', 'legend', 1;
    SELECT 'dbr.chart.options', 'rotateNames', 0;
    SELECT 'dbr.chart.options', 'legend.position', 'bottom';
    SELECT 'dbr.chart.options', 'tooltip', '$ %.2f';

    I am trying to format the "Total Payments" value in the tooltip as a dollar amount. Is there something I might be missing?

    Any help would be appreciated.

  2. myDBR Team, Key Master

    You can use a ColumnReference in the tooltip-option. As you already have the colstyle defined for the value, you can use:

    SELECT 'dbr.chart.options', 'tooltip', '[Total Payments]';

    The command:

    SELECT 'dbr.chart.options', 'Total Payments', '$ %.2f';

    you can remove as there is no option called "Total Payments".

    --
    myDBR Team

  3. Dev, Member

    Removing the $ tooltip command and adding the total payments in tooltip command is not working either.

    SELECT 'dbr.parameters.show';
    SELECT 'dbr.search', 1;
    SELECT 'dbr.export.options','header.title',concat('Trends: ', DATE_FORMAT(inStartDate, '%m/%d/%Y'), ' - ', DATE_FORMAT(inEndDate, '%m/%d/%Y') );
    SELECT 'dbr.chart', 'Column', 'Trend';
    SELECT 'dbr.chart.options','showvalues', 1;
    SELECT 'dbr.colstyle', 'Total Payments', '$ %.2f';
    SELECT 'dbr.chart.options', 'tooltip', '[Total Payments]';
    SELECT 'dbr.chart.color', '#4169E1';
    SELECT 'dbr.chart.options', 'chartjs';

  4. myDBR Team, Key Master

    Support for this in Chart.js charts has been added to the latest build.

    --
    myDBR Team


Reply

You must log in to post.