Libchart Help re: Axis Boundaries and Labels [message #170435] |
Mon, 01 November 2010 14:54 |
Steve
Messages: 1 Registered: November 2010
Karma:
|
Junior Member |
|
|
Hi. I have searched extensively online but not having much luck - but
apologies if I have overlooked something.or the answer to my question
is blindingly obvious...
I am creating line graphs with libchart but I want to edit the upper
and lower boundaries of the Y Axis as the results seldom are less than
80% and seldom greater than 120%. I would also like the values to be
displayed on the graph (as occurs with the Bar Charts on Libchart).
This is the code:
$chart=new LineChart(585,400);
$serie1=new XYDataSet();
$serie2=new XYDataSet();
$serie3=new XYDataSet();
$serie4=new XYDataSet();
$serie5=new XYDataSet();
$serie6=new XYDataSet();
// There are 6 series which are populated from a MySQL database using -
> addpoint()
$dataSet=new XYSeriesDataSet();
$dataSet->addSerie("WYPT",$serie1);
$dataSet->addSerie("Bradford",$serie2);
$dataSet->addSerie("Calderdale",$serie3);
$dataSet->addSerie("Kirklees",$serie4);
$dataSet->addSerie("Leeds",$serie5);
$dataSet->addSerie("Wakefield",$serie6);
$chart->setDataSet($dataSet);
$chart->getPlot()->setGraphCaptionRatio(0.7);
$chart->setTitle("West Yorkshire Figures");
$chart->render();
Very grateful for any help...
Steve
|
|
|