solo
Medlem
Prøver meg på dette scriptet: https://github.com/sombra2eternity/inc.graph.php
Noen som vet hvordan man legger data inn i scriptet?
Har f.eks. en array "$weight" som ser slik ut med print_r:
Noen som vet hvordan man legger data inn i scriptet?
Har f.eks. en array "$weight" som ser slik ut med print_r:
Kode:
Array ( [0] => 87.4 [1] => 87.4 [2] => 87.4 )
Kode:
include_once('_pages/inc.graph.php');
$svg = graph_lines(array(
'graph.height'=>240,
'cell.width'=>40,
'cell.marginx'=>8,
'cell.marginy'=>12,
'bar.indicator'=>true,
'graph.background'=>'ccc',
'graph'=>array(
'first'=>array(1,2,3,4,5,6,7,8,9,10),
'second'=>array(6,7,7,13,10,11,15,7,14,15),
'third'=>array(21,22,22,28,25,26,30,22,29,30)
),
'graph.colors'=>array(
array('8cc277','6fa85b'),
'00f',
array('2980b9','216896'),
),
'header.even.background'=>'eee',
'header.odd.background'=>'aaa',
'header'=>array(
'enr','feb','mar','abr','may','jun','jul','ago','sep','oct'
),
'graph.legend.width'=>100,
'graph.legend.count'=>4,
'graph.legend.line.color'=>'aaa',
'table'=>true,
'table.even.background'=>'eee',
'table.odd.background'=>'ccc'
));
echo $svg;