Need more information on how to use highcharts-meteor

I couldn’t get the maazalik:highcharts package to work in my application (kept getting “Exception from Tracker afterFlush function” and undefined errors) but I found what says is the “Official wrapper for Highcharts, Highstock and Highmaps charting libraries.” so I tried it instead. While I can get a simple pie chart to show up, I can’t seem to format it (like changing the chart title for example) nor can I get other chart types to work such as a “gauge”.

I thought from looking at the actual documentation at that I could just add a parameter of ‘title:’ to my json properties and it would work, but that doesn’t seem to do anything:

  createChart: function() {
    // Gather data:
    var allSites = Sites.find().count(),
          problemSites = Sites.find({siteStatus: {$ne: '2'}}).count(),
          siteData = [{
              y: problemSites,
              name: "Incomplete"
           }, {
               y: allSites - problemSites,
               name: "Complete"
           console.log("All Sites: " + allSites);
           console.log("Issues: " + problemSites);

     // Use Meteor.defer() to craete chart after DOM is ready:
    Meteor.defer(function() {
      // Create standard Highcharts chart with options:
      Highcharts.chart('cumulativeCheckIn', {
        series: [{
          type: 'pie',
          title: 'hello',
          data: siteData

I also tried changing the chart type to “gauge”, but then nothing displays at all. Is there any better documentation or working examples? I’m really needing to use something that looks like this:

Personally, I’ve never had good luck with the ‘official’ highcharts package. I’ve used the maazalik package in a few projects and have always been happy. If I were you, I’d work on sorting out the maazalik issues and use that package.

I threw together a meteorpad if it helps…

Finally got it working! Thought I’d post here in case anyone else has a similar issue. What I finally figured out was that I didn’t install one of the helper packages maazalik:highcharts-gauge. :sunglasses:

1 Like

@snakehead did you use it with react and meteor, or with meteor alone ?

I use it with meteor and react but did not get it to work, if you can help

Meteor alone, still working my way through learning React. Still, it’s mostly just JS and works. Are you getting some sort of error?

Thank’s, I got it working; one another question: How did yo do to import config data from server to client??

I’m not sure your question, but everything is client based with data coming from the server via session or reactive variables. Hope that helps!