Skip to content

Commit

Permalink
Make Chart.platform importable (chartjs#4509)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrunel authored and yofreke committed Dec 30, 2017
1 parent eda7266 commit 56a63f4
Show file tree
Hide file tree
Showing 4 changed files with 356 additions and 353 deletions.
3 changes: 2 additions & 1 deletion src/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Chart.helpers = require('./helpers/index');
// @todo dispatch these helpers into appropriated helpers/helpers.* file and write unit tests!
require('./core/core.helpers')(Chart);

require('./platforms/platform')(Chart);
Chart.platform = require('./platforms/platform');

require('./core/core.element')(Chart);
require('./core/core.plugin')(Chart);
require('./core/core.animation')(Chart);
Expand Down
2 changes: 1 addition & 1 deletion src/core/core.controller.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

var helpers = require('../helpers/index');
var platform = require('../platforms/platform');

module.exports = function(Chart) {
var plugins = Chart.plugins;
var platform = Chart.platform;

// Create a dictionary of chart types, to allow for extension of existing types
Chart.types = {};
Expand Down
Loading

0 comments on commit 56a63f4

Please # to comment.