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- Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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'] Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
c172cpt Posted September 13, 2007 Author Share Posted September 13, 2007 thank you -scott Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.