Add text to a dbr.chart label

(4 posts) (2 voices)

Tags:

  1. situ, Member

    Hi

    I'm using dbr.chart, 'MSBar' is it possible to have add some text to the the label on the x axis.

    If my query returns a values of "15" then can I get the label to to say "15 Items"

    In other words add a suffix to the the X label in the chart.

    Simon

  2. myDBR Team, Key Master

    Hi,
    you can do this with by using a native ChartDirector command:

    select 'dbr.chart.options', 'chartdirector', '$c->yAxis->setLabelFormat("{value} items");';

    (The axis specified is Y-axis because in ChartDirector the bar chart is just reversed column chart)

    --
    myDBR Team

  3. situ, Member

    Ahh, I see this works but maybe I wasn't clear in my question.

    I don't want to change the label text on the x axis but the text that is displayed at the end of each bar when it is drawn. (This is a repeat of the x axis value)

  4. myDBR Team, Key Master

    Chart labels can be formatted using normal dbr.colstyle-command.

    select 'dbr.colstyle', 3, '%d items';

    --
    myDBR Team


Reply

You must log in to post.