Introducing HighRoller: a PHP wrapper for Highcharts

I’ve been using Highcharts for over a year now on numerous projects and realized that a PHP-based wrapper would really make life easier. So, like a few others before me, I went ahead and made one. And today, I released my 1.0 effort as a free, open source project called HighRoller.

HighRoller is licensed by Gravity.com under the Apache 2.0 license and is endorsed by Highcharts. And it makes implementing Highcharts JS much easier.

The project has a billboard page http://highroller.io and the source can be found on github here https://github.com/jmaclabs/HighRoller

I also spent time making the project developer friendly (I hope) by giving it a build script and a built-in test site to confirm that a build is working and compatible with jQuery or MooTools.

I am aware that it’s not the only PHP wrapper in the wild but I have reviewed and tried the other offerings and I’m confident that HighRoller may end up being one of the more helpful ones.

It’s been successfully used in my company’s (yet to be released) Zend-based applications and it’s been successfully used in a few other smaller PHP frameworks by some comrades. I think someone actual said “it was a pleasure to use”.

I had some help from two solid dudes: @jimplush and @Bluu. They both got me over some hurdles that I think really make a difference.

So, if you have some time and this is something you’re curious about, I’d love to hear feedback about HighRoller’s usefulness and usability.

12 Comments on "Introducing HighRoller: a PHP wrapper for Highcharts"

  1. Hi ,

    how to produce a stacked bar chart ?

    by doing the following i am successfully getting a cluster bar chart..

    $barchart1 = new HighRollerBarChart();
    $barchart1->plotOptions=new HighRollerPlotOptions(‘bar’);
    $barchart1->plotOptions->dataLabels=new HighRollerDataLabels();
    $barchart1->plotOptions->column->dataLabels->enabled=0;
    $barchart1->plotOptions->dataLabels->formatter=new HighRollerFormatter;

    $barchart1->chart->width=900;
    $barchart1->chart->height = 400;
    $series5_a = new HighRollerSeriesData();
    $series5_a->addName(‘series a’)->addData($chartData5_a);

    $series5_b = new HighRollerSeriesData();
    $series5_b->addName(‘series b’)->addData($chartData5_b);

    $barchart1->addSeries($series5_a);
    $barchart1->addSeries($series5_b);

    is this the correct method ?
    $barchart1->PlotOptions->bar->stacking=’normal’; i tried this,but got no results. (still it is showing a cluster bar chart)

    Thanks

    • Greetings! Thanks for using HighRoller.

      Well, I had some time and figured this one out (apologies to those who worked through their problems on their own and were gracious enough to post the solutions here!).

      Using your example above, and adding a few lines of my own (I had to figure this one out) here’s what I got working in my local environment:

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      $barchart1 = new HighRollerBarChart();
      $barchart1->plotOptions=new HighRollerPlotOptions(‘bar’);
      $barchart1->plotOptions->dataLabels=new HighRollerDataLabels();
      $barchart1->plotOptions->column->dataLabels->enabled=0;
      $barchart1->plotOptions->dataLabels->formatter=new HighRollerFormatter;

      // NEW LINES BELOW
      $barchart1->plotOptions->series->stacking = 'normal';
      $barchart1->plotOptions->bar->states = new stdClass();
      // NEW LINES ABOVE

      $barchart1->chart->width=900;
      $barchart1->chart->height = 400;
      $series5_a = new HighRollerSeriesData();
      $series5_a->addName(‘series a’)->addData($chartData5_a);

      $series5_b = new HighRollerSeriesData();
      $series5_b->addName(‘series b’)->addData($chartData5_b);

      $barchart1->addSeries($series5_a);
      $barchart1->addSeries($series5_b);

      The ‘states’ property is something that arrived after my wrapper was created.

      There are SO MANY new and awesome features in HighCharts now (and my day job has been so busy) that I haven’t had a chance to update the wrapper properly.

      Thanks for giving it a go and I hope this bit of help keeps you happy with HighRoller!

      Sincerely,

      -jmac

  2. Can you provide an example of how to use Dual or Multi Axes with Highroller?

  3. Hi, I’m getting my array from MySQL like:

    while($row = mysql_fetch_array($result))
    {
    $chartData[] = $row[‘value’];
    }

    But although the array appears identical in format to your example array, it won’t work, it just displays blank. Could you provide an example on how to use highroller with MySQL/PHP.

  4. Hi,
    I saw that there is a new section in haghchart demo website wicth provide more chart types. Infortunatly, this section is not covered by your wrapper. Is it possible to update your wrapper in order to include this additionnal charts?
    Thanks a lot
    Dany

  5. Hi,

    I’m highly interested in using HighRoller in a Symfony2 project I’m currently working on, but I keep getting frustrating error messages that don’t make a lot of sense.

    Are you aware of any ‘HowTo’ regarding how to use your wrapper in a Symfony2 project ? Have you tried it yourself ?

    Thanks for your great work.

  6. Daniel Gomez | May 2, 2012 at 10:03 pm |

    Hi Ben, I am a PHP developer too in Tijuana, Mexico, I just start OOP with PHP, I am in a project that use Highcharts and I google your wrapper, I am seen your examples but I don’t find more examples on google, do u have some documentation to make pie charts or can you recommend me a page or book so I can learn to implementing better.

    Thanks a lot, and GREAT TOOL!!!

    • Hi Daniel, there is a pie chart example in the test section of HighRoller. If you are familiar with setting up virtual hosts in apache, you can setup highroller as a vhost and use the examples in the /test folder. The /test folder is actually a work area. It helps anyone who wants to modify highroller to suit their own needs to verify that it will still work after they create a new build. I had hoped to setup more live examples on highroller.io but I just haven’t had the time yet.

Comments are closed.

%d bloggers like this: