em0ney / meteor-amcharts

AmCharts free, a responsive js chart framework, packaged for meteor
3 stars 8 forks source link

Update AmCharts to version 3.17.3 (October 15, 2015) #8

Closed charpeni closed 9 years ago

charpeni commented 9 years ago

Hi.

I updated AmCharts to version 3.17.3 (October 15, 2015).

Package images are now loaded as assets instead of files. They can be accessed via the Assets API from the server, or at the URL /packages/username_package-name/file-name from the client. See Meteor Docs

Tested on Meteor 1.2.0.2.

You need to add this to chart config :

"pathToImages": "/packages/em0ney_amcharts/lib/images/",
"export": {
  "enabled": true,
  "path": "/packages/em0ney_amcharts/lib/plugins/export/",
  "libs": {
    "autoLoad": false
  }
},

There seems to be an issue with release 3.17.3, I fixed it in this pull. Without fix, AmCharts can't be loaded.

amcharts.js Line 7630-7640

AmCharts.AmDSet = AmCharts.Class({
  construct: function(d) {
      this.create("g")
  },
  attr: function(d) {
      this.R.attr(this.node, d)
  },
  move: function(d, a) {
      this.R.move(this.node, d, a)
  }
});

Should look like this :

(function() {
  var d = window.AmCharts;
  d.AmDSet = d.Class({
      construct: function(d) {
          this.create("g")
      },
      attr: function(d) {
          this.R.attr(this.node, d)
      },
      move: function(d, a) {
          this.R.move(this.node, d, a)
      }
  });
})();
stivaugoin commented 9 years ago

+1

em0ney commented 9 years ago

Thanks @Charpeni for the PR!

Merged and published to atmosphere