Jump to content

[SOLVED] baachart help


c172cpt

Recommended Posts

i am having problems using the baachart class i cant figure out how to get it to display the variables (defined before the following code)

$chart = new baaChart(600);

$chart->setTitle('Orangepeel Connection Stats','for $value');

$chart->setXLabels($day1['name'],$day2['name'],$day3['name'],$day4['name'],$day5['name'],$day6['name'],$day7['name']);

$chart->setXAxis("Past 7 Days");

$chart->setYAxis("Connections",0,100,10,1);

$chart->setSeriesColor(1,0,204,255);//successfull color

$chart->setSeriesColor(2,0,204,153);//failed color

$chart->addDataSeries('C',0,$day1['good'],$day2['good'],$day3['good'],$day4['good'],$day5['good'],$day6['good'],$day7['good'], "Successfull Connections");

$chart->addDataSeries('C',0,$day1['bad'],$day2['bad'],$day3['bad'],$day4['bad'],$day5['bad'],$day6['bad'],$day7['bad'],"Failed Connections");

$chart->drawGraph();

 

the output is at

www.orangepeelsoft.com/orange/reports.php

 

any ideas??

 

-scott-

Link to comment
https://forums.phpfreaks.com/topic/69112-solved-baachart-help/
Share on other sites

try

<?php
$days = array(
       $day1['name'],
       $day2['name'],
       $day3['name'],
       $day4['name'],
       $day5['name'],
       $day6['name'],
       $day7['name']
       );


$chart->setXLabels($days);

 

and similar for the series values.

Link to comment
https://forums.phpfreaks.com/topic/69112-solved-baachart-help/#findComment-347414
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.