我正在使用此图表库生成一些基本图表。我遇到的问题是Y轴的值超过一百万的情况,图表以科学记数法表示数字。
我不确定这是PHP问题还是库内的问题。我查看了源代码,但无法解决问题。
这是一个代码示例:
<?php
include('phpgraphlib.php');
include('phpgraphlib_stacked.php');
$graph = new PHPGraphLibStacked(500,300);
$popularity = array('Windows 7'=>8000000, 'Mac OS 10'=>3500000, 'Fedora'=>900000);
$cost = array('Windows 7'=>1000000, 'Mac OS 10'=>3000000, 'Fedora'=>9000000);
$speed = array('Windows 7'=>5000000,'Mac OS 10'=>5000000,'Fedora'=>8000000);
$graph->addData($popularity, $cost, $speed);
$graph->setTitle('Operating System Scores');
$graph->setTitleLocation('left');
$graph->setXValuesHorizontal(TRUE);
$graph->setTextColor('blue');
$graph->setBarColor('#0066CC', '#669999', '#66CCCC');
$graph->setLegend(TRUE);
$graph->setLegendTitle('Popularity', 'Cost', 'Speed');
$graph->setDataFormat('comma');
$graph->setupYAxis(20);
$graph->createGraph();
?>
以下是此库的来源:
http://www.ebrueggeman.com/phpgraphlib
由于