Well I think I’ve gone as far as I want with the svg charts now. I’ve changed the co-ordinates from using margins to position a plot (it can handle multiple plots of different types in a chart as well as multiple charts per html page) to X1,Y1,X2, Y2 areas as I found the former difficult to handle as a user. I’ve sorted out (particularly with the pie labels) text alignment/positioning and made things a bit more user friendly. This would create a basic pie chart. require('pie.php'); //include file needed for pie charts $chart = new ChartBase(350, 300); //create new chart 350w, 300h $chart->setBackground(220, 255, 255); //chart bacground color rgb $pie = new Pie(); //create new pie plot $pie->setValues(array(50,10,40,25)); //add values for slices $pie->setLegend(array("Red","Green","Blue","Orange")); //add legend $pie->setTitle("Testing pie chart"); //add title $chart->addPlot($pie); //add pie plot to chart echo $chart->plot(); //draw chart, output to browser I’m not sure what I’ll try next. I suppose I could see how I get on with a Javascript/ canvas version of the charts but maybe it’s time to try to think of something else. Dad has taken well to his return to spending his daytime out of bed. He’s just come through on his wheelchair to say good morning to me. I don’t think we’ve any extra visitors today but it can get confusing just with the regulars. Cavel (care company) see me 4 times a day, mum twice a day and I think it’s 3 times for dad. They may send one or two person teams out. They always combine visits for mum with one for me but may or may not make a separate visit for dad. Then there are the district nurses who change a dressing on my back.
|