Browse Source

Restore the timing to store the d3 reference (#2066)

* fix: restore the timing to store the d3 reference, fix #2060

* chore: modify .jshintrc
pull/1415/merge
Yoshiya Hinosawa 7 years ago committed by Ændrew Rininsland
parent
commit
3aa40e56f8
  1. 3
      .jshintrc
  2. 3
      src/core.js

3
.jshintrc

@ -19,6 +19,7 @@
"jasmine": true,
"globals": {
"d3": false
"d3": false,
"require": false
}
}

3
src/core.js

@ -1,4 +1,3 @@
import * as d3 from 'd3';
import Axis from './axis';
import CLASS from './class';
import { isValue, isFunction, isString, isUndefined, isDefined, ceil10, asHalfPixel, diffDomain, isEmpty, notEmpty, getOption, hasValue, sanitise, getPathBox } from './util';
@ -49,7 +48,7 @@ function Chart(config) {
function ChartInternal(api) {
var $$ = this;
$$.d3 = d3;
$$.d3 = window.d3 ? window.d3 : typeof require !== 'undefined' ? require("d3") : undefined;
$$.api = api;
$$.config = $$.getDefaultConfig();
$$.data = {};

Loading…
Cancel
Save