php - PHPGraphLib scientific notation Issue


I am using this graphing library to generate a few basic graphs. The issue I am having is that is cases where the values for the Y axis are over a million, The graph renders the numbers in scientific notation.

I'm not sure if this is a PHP issue or something within the library. I have looked through the source code but haven't been able to resolve the issue.

Here is a code example:

$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->setBarColor('#0066CC', '#669999', '#66CCCC'); 
$graph->setLegendTitle('Popularity', 'Cost', 'Speed'); 

Here is the source of this library:


People are also looking for solutions to the problem: Prevent auto increment on MySQL duplicate insert


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.