Nicholi3 Posted September 28, 2012 Share Posted September 28, 2012 I have been creating several customized reports with good success. I have also begun adding charts as part of the reports to make recognizing trends easy. I have been using the handful of chart examples coded into the default reports in v5.1.2 to study the various parameters and chart types available. I have adapted the charts and used them successfully, but find there are things I want to do, but do not know how. I could not find any WHMCS documentation on the charting capability in the Reports area - other than the report examples. Is there any Chart documentation available? Does WHMCS's charting use a 3rd party charting library that would have documentation available elsewhere? Specifically, one thing I'm trying to do is force the y-axis scale on a column chart to start at 0 and possibly also set a maximum instead of defaulting to a min/max based on the data in the chart. It would seem this might be possible using the $args array, but it's not clear how to do so without documentation on what parameters the $args will accept. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
exarv Posted February 4, 2013 Share Posted February 4, 2013 Hi Nicholi3, WHMCS is using the Google Visualization API. Unfortunatly the WHMCSChart object does not support every feature (yet?), because I tried to add a "vAxis: { minValue: 0 }" to the options. But I found a (bit dirty) workaround: At the end of your report file, add the following line: $reportdata["headertext"] = strtr($reportdata["headertext"], array("var options = {"=>"var options = { vAxis: {minValue: 0},")); That will include the vAxis minValue=0 to the options, after the WHMCSChart has created the javascript code that will calling the Google Visualization API from the browser. 0 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.