FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Libchart Help re: Axis Boundaries and Labels
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Libchart Help re: Axis Boundaries and Labels [message #170435] Mon, 01 November 2010 14:54 Go to next message
Steve is currently offline  Steve
Messages: 1
Registered: November 2010
Karma: 0
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
Re: Libchart Help re: Axis Boundaries and Labels [message #170439 is a reply to message #170435] Mon, 01 November 2010 15:13 Go to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 11/1/2010 10:54 AM, Steve wrote:
> 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
>
>

Did you try contacting the author of libchart? When dealing with a
package, that would be the best place to start (since he doesn't seem to
have a support page for it).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: hi to all
Next Topic: PHP (PHP Hypertext Preprocessor) Programming is Similar to C ...
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 23:02:53 GMT 2024

Total time taken to generate the page: 0.01801 seconds