php - jpgraph x-axis scale in date(Gi) max 2359 not showing data -


when using jpgrap , set x-axis scale 2400

$graph->setscale('intint',0,$max,0,2400); 

then insert data format key date('gi'),hour minute

$ydata = array(1820=>5000,1955=>1000,2315=>7500); $lineplot=new lineplot($ydata); 

i not line drawn. when use swatch time (000 ~999) shows line.

$ydata = array(154=>5000,587=>1000,768=>7500); 

am missing something?

okey found answer myself,

$graph->setscale('intint',0,$max,0,2400); $lineplot=new lineplot($ydata); 

needs be:

$graph->setscale('intint'); $graph->xaxis->setticklabels(array_keys($ydata)); $lineplot=new lineplot(array_values($ydata)); 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -