ChartDirector setPlotArea() not working on MS charts

(4 posts) (2 voices)

Tags:

No tags yet.

  1. phil1308, Blocked

    Hello again,
    I'm using ChartDirector to design my charts.
    Generally, it works fine.
    But I have a little problem using setPlotArea() option in some chart : it works ok for XY charts, not for any MS charts.

    Code working :
    ...
    select 'dbr.chart', 'Column', '', 900, 400;
    select 'dbr.chart.options', 'chartdirector', '$c->setRoundedFrame(); $c-setDropShadow(); $c->setPlotArea(80, 50, 750, 250, 0xFFFFFF);';
    ...

    Code not working :
    ...
    select 'dbr.chart', 'StackedBar', '', 900, 300;
    select 'dbr.chart.options', 'chartdirector', '$c->setRoundedFrame(); $c-setDropShadow(); $c->setPlotArea(60, 40, 600, 200, 0xffffff);';
    ...

    There is no error, just that ploting doesn't "move" where it supposed to be...
    Do you know why ? (I don't see any restriction in ChartDirector documentation)

    Thank you

  2. myDBR Team, Key Master

    The reason it does not work is that myDBR itself is calculating the positions of the elements (chart + legend) on multiseries chart (in single series XY charts uses the default positioning as there is no need to recalculate the chart position).

    Is there a specific reason you want to manually position the chart inside the plot area? Usually this is not needed and you can just let myDBR to handle the positioning.

    --
    myDBR Team

  3. phil1308, Blocked

    It's because i'd like to customize some parts of the chart : title font size, legend background and border, ...

    For that, until now, I supposed the only way to do it was to obtain legend object or create title by ChartDirector options :
    ...
    select 'dbr.chart.options', 'chartdirector', ' $c->addTitle("Délais par régions anatomiques", "bold", 14, 0x000000); ';
    select 'dbr.chart.options', 'chartdirector', '$legendBox = $c->addLegend(450, 290, 0); $legendBox->setBackground(0xFFFFFF, 0x000000);';
    ...

    Problem : when I add the title this way for exemple, it is overlayed by the plot area and I can't move it !

    But maybe I can access these parameters in a different way ?...

  4. myDBR Team, Key Master

    You can override the myDBR's defaults found in mydbr/defaults.php in mydbr/user/defaults.php.

    If you want to customize more detailed aspects of the chart you can either obtain the individual objects through the chart-object or use all customizable charts via an myDBR extension.

    --
    myDBR Team


Reply

You must log in to post.