My first very simple chart not showing labels

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

    My first very simple pie chart is

    SELECT 'dbr.chart', 'Pie';
    SELECT `bfv_re_loan`.`lateness_category`, COUNT(`bfv_re_loan`.`lateness_category`)
    FROM `vf-shem`.bfv_re_loan
    GROUP BY `bfv_re_loan`.`lateness_category`;

    It is showing tooltip (from hovering) data correctly, but no labels.
    It is drawing the lines leading from the pie slices but no labels at the end of the lines.

    Similarly, my first very simple bar chart is showing the bars and the tooltips but no labels

    SELECT 'dbr.chart', 'Column', '2D Column';
    SELECT COUNT(`bfv_re_loan`.`lateness_category`), `bfv_re_loan`.`lateness_category`
    FROM `vf-shem`.bfv_re_loan
    GROUP BY `bfv_re_loan`.`lateness_category`;

  2. myDBR Team, Key Master

    Most common cause for this is that you are using PNG charts (see Environment settings → Modules → Default chart format) and you are missing ChartDirector fonts in the server. The server generates the PNG charts and needs the fonts for the labels. See ChartDirector installation instructions.

    --
    myDBR Team

  3. shem, Member

    Thank you.
    Actually when I go to Environment Settings -> Modules it lists Charts (ChartDirector 7.0) under Installed modules.
    So does that mean it is installed, and if so what would I do next to troubleshoot the missing labels?

    Anyway, for now I have changed the setting to chart.js (and SVG).
    So now the labels do show.

    But A follow up question, is how can I get the Pie Chart to show percentages in addition to count by group (or instead of count)?
    This questions asks what myDBR statements do I need, and also do I have to change the MySQL above?

  4. myDBR Team, Key Master

    Actually when I go to Environment Settings -> Modules it lists Charts (ChartDirector 7.0) under Installed modules.
    So does that mean it is installed, and if so what would I do next to troubleshoot the missing labels?

    As said, you have probably not installed the fonts from the ChartDirector installation. See the ChartDirector docs. SVG charts are drawn in the browser, so they use local fonts.

    But A follow up question, is how can I get the Pie Chart to show percentages in addition to count by group (or instead of count)?
    This questions asks what myDBR statements do I need, and also do I have to change the MySQL above?

    myDBR supports ChartDirector parameter substitution and formatting, so you can add a columnstyle for the value column:

    SELECT 'dbr.chart', 'Pie';
    SELECT 'dbr.colstyle', 'value', '{percent|1}% {value}'; SELECT `bfv_re_loan`.`lateness_category`, COUNT(`bfv_re_loan`.`lateness_category`) as 'value'
    FROM `vf-shem`.bfv_re_loan
    GROUP BY `bfv_re_loan`.`lateness_category`;

    --
    myDBR Team


Reply

You must log in to post.