Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php JpGraph:使用AccBarPlot时,如何在v3.5.0b1中控制x/y偏移、边距和颜色? 一点背景_Php_Graph_Gd_Jpgraph_Symfony 1.2 - Fatal编程技术网

Php JpGraph:使用AccBarPlot时,如何在v3.5.0b1中控制x/y偏移、边距和颜色? 一点背景

Php JpGraph:使用AccBarPlot时,如何在v3.5.0b1中控制x/y偏移、边距和颜色? 一点背景,php,graph,gd,jpgraph,symfony-1.2,Php,Graph,Gd,Jpgraph,Symfony 1.2,我正在尝试将使用Symfony 1.2构建的项目从一台服务器迁移到另一台服务器。该项目的功能之一是构建一个图形(最初使用JpGraph 2.3.5完成) 如果没有对代码进行修改,图形将无法按预期显示,我希望了解我可能忽略的内容。由于没有足够的点来发布,因此链接了图像 下图是由下面的代码块生成的 解决方案: 删除默认主题$graph->graph\u主题=null将恢复颜色和边距,而无需重写任何代码 # initialize the graph $graph = new Grap

我正在尝试将使用Symfony 1.2构建的项目从一台服务器迁移到另一台服务器。该项目的功能之一是构建一个图形(最初使用JpGraph 2.3.5完成)

如果没有对代码进行修改,图形将无法按预期显示,我希望了解我可能忽略的内容。由于没有足够的点来发布,因此链接了图像

下图是由下面的代码块生成的

解决方案: 删除默认主题<代码>$graph->graph\u主题=nullGraph()后,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;
    # 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;

资源: -SetTheme()的顺序和更改设置 -更改直线/条形图的显示设置

    # 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;