gionkunz / chartist-plugin-threshold

Threshold Plugin for Chartist.js
Do What The F*ck You Want To Public License
29 stars 38 forks source link

Importing into angular app #23

Open mbeckenbach opened 4 years ago

mbeckenbach commented 4 years ago

Hi,

i tried to import your plugin to an angular app that is using ng-chartist. https://www.npmjs.com/package/ng-chartist

In order to make this work, the lines 1 to 16 have to be changed, Not sure if this would break someone. Maybe you can review it and add it to the package if possible?

(function (root, factory) { if (root === undefined && window !== undefined) root = window; if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module unless amdModuleId is set define(["chartist"], function (a0) { return (root['Chartist.plugins.ctThreshold'] = factory(a0)); }); } else if (typeof module === 'object' && module.exports) { // Node. Does not work with strict CommonJS, but // only CommonJS-like environments that support module.exports, // like Node. module.exports = factory(require("chartist")); } else { root['Chartist.plugins.ctThreshold'] = factory(root["Chartist"]); } }(this, function (Chartist) {