c172cpt Posted September 12, 2007 Share Posted September 12, 2007 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 More sharing options...
c172cpt Posted September 12, 2007 Author Share Posted September 12, 2007 sorry the output is located at http://orangepeelsoft.com/orange/reports.php?t=username&v=superuser Link to comment https://forums.phpfreaks.com/topic/69112-solved-baachart-help/#findComment-347400 Share on other sites More sharing options...
Barand Posted September 13, 2007 Share Posted September 13, 2007 Values passed to setXLabels() and addDataSeries() should be arrays or comma-delimited strings Link to comment https://forums.phpfreaks.com/topic/69112-solved-baachart-help/#findComment-347410 Share on other sites More sharing options...
c172cpt Posted September 13, 2007 Author Share Posted September 13, 2007 so could i use $day1,$day2,$day3...etc..without the ['name'] Link to comment https://forums.phpfreaks.com/topic/69112-solved-baachart-help/#findComment-347411 Share on other sites More sharing options...
Barand Posted September 13, 2007 Share Posted September 13, 2007 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 More sharing options...
c172cpt Posted September 13, 2007 Author Share Posted September 13, 2007 thank you -scott Link to comment https://forums.phpfreaks.com/topic/69112-solved-baachart-help/#findComment-347517 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.