Подтвердить что ты не робот

JPGraph 4 и 3.5 - Когда линия появляется на графике штрих-кода, она отображается дважды в несколько разных положениях. Зачем?

Кажется, что проблема связана с JPGraph версии 4 и 3.5 при создании графика Bar Plot с линией сверху. Кажется, что линия отображается дважды в несколько иной позиции. Если я верну библиотеку обратно к версии 3, она решает проблему. В настоящее время я изучаю этот вопрос в своей службе поддержки.

Вот код, который создает граф

$graph = new Graph($w, $h, 'auto');

$graph->SetScale("textint", 0,10);
$graph->SetMargin(0,0,0,0); // left, right, top, bottom.
$graph->SetMarginColor('white');
$graph->SetBox(false);
$graph->SetFrame(false);
$graph->SetY2OrderBack(false);
$graph->img->SetAntiAliasing(false);

$graph->yaxis->SetTickPositions([0,2,4,6,8,10]);
$graph->yaxis->HideLabels();
$graph->xaxis->HideLabels();
$graph->xaxis->SetTickLabels( ['2012', '2013', '2014', '2015'] );
$graph->xaxis->SetLabelAlign('center','center');

$graph->ygrid->SetFill(true,'#f3f3f4','#ffffff');
$graph->ygrid->Show();

$colour_one = $this->colors['blue_dark'];
$colour_two = $this->colors['blue'];
$line = $this->colors['line'];

$barplot = new BarPlot($bars);
$graph->Add($barplot);

$barplot->SetFillColor(array($colour_one, $colour_one, $colour_one, $colour_two));
$graph->SetColor($this->colors['text']);

$graph->yaxis->HideZeroLabel();
$graph->yaxis->HideLine(false);
$graph->yaxis->HideTicks(false,false);

$group_standard = new LinePlot($lines[0]);
$group_standard->SetBarCenter();

$graph->Add($group_standard);
$group_standard->SetStyle('dashed');
$group_standard->SetColor($line);

$twenty_fifteen_target = new LinePlot($lines[1]);
$twenty_fifteen_target->SetBarCenter();
$twenty_fifteen_target->SetStyle('solid');
$twenty_fifteen_target->SetColor($line);

$graph->Add($twenty_fifteen_target);

$graph->Stroke(storage_path().'/audit-generator/images/graphs/' . $name . '.png');

Чтобы получить доступ к демо, перейдите здесь.

Версия 3 (работает по назначению):

Версия 3

Версия 4 (двойная рендеринг в разных положениях):

Версия 4

4b9b3361