JpGraph: How to control x/y offset, margins and color in v3.5.0b1 when using AccBarPlot?

那年仲夏 提交于 2019-12-06 11:32:22

Solution:

Remove default theme. $graph->graph_theme = null; after initalizing Graph() will restore both colour & margins without requiring to rewrite any code.

    # initialize the graph
    $graph = new Graph($width, $height, 'auto');
    $graph->SetScale('textlin', 0, $max_y, 0, $this->bar_count);
    $graph->Set90AndMargin($left, $right, $top, $bottom);
    $graph->SetMarginColor('white');
    $graph->SetFrame(false);
    $graph->graph_theme = null;

Resources:

/docs/chunkhtml/ch29.html#id2619634 - The order of SetTheme() and changing settings /docs/chunkhtml/ch29s02.html - Changing the display settings of line/bar graphs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!