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
Post a Comment