echarts 3.7.1 → 3.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/echarts-en.js +77756 -0
- package/dist/echarts-en.min.js +38 -0
- package/dist/echarts.common-en.js +50169 -0
- package/dist/echarts.common-en.min.js +30 -0
- package/dist/echarts.common.js +1408 -1186
- package/dist/echarts.common.min.js +14 -14
- package/dist/echarts.js +1572 -1278
- package/dist/echarts.min.js +22 -22
- package/dist/echarts.simple-en.js +34988 -0
- package/dist/echarts.simple-en.min.js +27 -0
- package/dist/echarts.simple.js +1152 -994
- package/dist/echarts.simple.min.js +11 -11
- package/index.blank.js +4 -0
- package/lib/chart/bar/BaseBarSeries.js +3 -3
- package/lib/chart/candlestick/candlestickLayout.js +26 -1
- package/lib/chart/graph/forceHelper.js +5 -0
- package/lib/chart/graph/forceLayout.js +0 -1
- package/lib/chart/helper/whiskerBoxCommon.js +6 -1
- package/lib/chart/line/LineView.js +14 -2
- package/lib/chart/lines/LinesView.js +22 -7
- package/lib/chart/pie/PieSeries.js +3 -1
- package/lib/chart/pie/PieView.js +1 -1
- package/lib/chart/treemap/TreemapView.js +5 -28
- package/lib/component/axis/AxisBuilder.js +249 -178
- package/lib/component/axis/CartesianAxisView.js +15 -3
- package/lib/component/axis/ParallelAxisView.js +1 -1
- package/lib/component/axis/RadiusAxisView.js +1 -1
- package/lib/component/axis/SingleAxisView.js +8 -2
- package/lib/component/helper/RoamController.js +12 -11
- package/lib/component/marker/MarkAreaView.js +1 -1
- package/lib/component/radar/RadarView.js +1 -1
- package/lib/component/toolbox/feature/Brush.js +3 -8
- package/lib/component/toolbox/feature/DataView.js +3 -3
- package/lib/component/toolbox/feature/DataZoom.js +3 -4
- package/lib/component/toolbox/feature/MagicType.js +3 -6
- package/lib/component/toolbox/feature/Restore.js +2 -1
- package/lib/component/toolbox/feature/SaveAsImage.js +23 -9
- package/lib/component/visualMap/ContinuousModel.js +2 -2
- package/lib/component/visualMap/ContinuousView.js +3 -3
- package/lib/component/visualMap/PiecewiseModel.js +0 -1
- package/lib/component/visualMap/VisualMapModel.js +17 -11
- package/lib/coord/calendar/Calendar.js +64 -20
- package/lib/echarts.js +5 -4
- package/lib/lang/cn.js +4 -0
- package/lib/lang/default.js +42 -0
- package/lib/lang/en.js +42 -0
- package/lib/lang.js +42 -0
- package/lib/langEN.js +42 -0
- package/lib/preprocessor/helper/compatStyle.js +24 -23
- package/lib/scale/Time.js +4 -4
- package/lib/util/graphic.js +5 -5
- package/lib/util/number.js +42 -21
- package/lib/visual/VisualMapping.js +3 -3
- package/package.json +3 -3
- package/rollup.config.js +49 -0
- package/src/chart/bar/BaseBarSeries.js +3 -3
- package/src/chart/candlestick/candlestickLayout.js +26 -1
- package/src/chart/graph/forceHelper.js +5 -0
- package/src/chart/graph/forceLayout.js +0 -1
- package/src/chart/helper/whiskerBoxCommon.js +6 -2
- package/src/chart/line/LineView.js +14 -2
- package/src/chart/lines/LinesView.js +22 -7
- package/src/chart/pie/PieSeries.js +3 -1
- package/src/chart/pie/PieView.js +1 -1
- package/src/chart/treemap/TreemapView.js +5 -28
- package/src/component/axis/AxisBuilder.js +249 -178
- package/src/component/axis/CartesianAxisView.js +15 -3
- package/src/component/axis/ParallelAxisView.js +1 -1
- package/src/component/axis/RadiusAxisView.js +1 -1
- package/src/component/axis/SingleAxisView.js +8 -2
- package/src/component/helper/RoamController.js +12 -11
- package/src/component/marker/MarkAreaView.js +1 -1
- package/src/component/radar/RadarView.js +1 -1
- package/src/component/toolbox/feature/Brush.js +3 -8
- package/src/component/toolbox/feature/DataView.js +3 -3
- package/src/component/toolbox/feature/DataZoom.js +3 -4
- package/src/component/toolbox/feature/MagicType.js +3 -6
- package/src/component/toolbox/feature/Restore.js +2 -1
- package/src/component/toolbox/feature/SaveAsImage.js +23 -10
- package/src/component/visualMap/ContinuousModel.js +2 -2
- package/src/component/visualMap/ContinuousView.js +3 -3
- package/src/component/visualMap/PiecewiseModel.js +0 -1
- package/src/component/visualMap/VisualMapModel.js +17 -11
- package/src/coord/calendar/Calendar.js +64 -20
- package/src/echarts.js +5 -4
- package/src/lang.js +43 -0
- package/src/langEN.js +43 -0
- package/src/preprocessor/helper/compatStyle.js +24 -23
- package/src/scale/Time.js +4 -4
- package/src/util/graphic.js +5 -5
- package/src/util/number.js +42 -21
- package/src/visual/VisualMapping.js +3 -3
- package/webpack.config.js +21 -7
- package/.npmignore +0 -10
package/src/util/graphic.js
CHANGED
|
@@ -551,7 +551,7 @@ define(function(require) {
|
|
|
551
551
|
* for textFill, textStroke, textBackgroundColor, and textBorderColor.
|
|
552
552
|
* If autoColor specified, it is used as default textFill.
|
|
553
553
|
* useInsideStyle:
|
|
554
|
-
* `true`: Use inside style (textFill, textStroke,
|
|
554
|
+
* `true`: Use inside style (textFill, textStroke, textStrokeWidth)
|
|
555
555
|
* if `textFill` is not specified.
|
|
556
556
|
* `false`: Do not use inside style.
|
|
557
557
|
* `null/undefined`: use inside style if `isRectText` is true and
|
|
@@ -664,7 +664,7 @@ define(function(require) {
|
|
|
664
664
|
|| globalTextStyle.color;
|
|
665
665
|
textStyle.textStroke = getAutoColor(textStyleModel.getShallow('textBorderColor'), opt)
|
|
666
666
|
|| globalTextStyle.textBorderColor;
|
|
667
|
-
textStyle.
|
|
667
|
+
textStyle.textStrokeWidth = zrUtil.retrieve2(
|
|
668
668
|
textStyleModel.getShallow('textBorderWidth'),
|
|
669
669
|
globalTextStyle.textBorderWidth
|
|
670
670
|
);
|
|
@@ -748,13 +748,13 @@ define(function(require) {
|
|
|
748
748
|
insideRollback = {
|
|
749
749
|
textFill: null,
|
|
750
750
|
textStroke: textStyle.textStroke,
|
|
751
|
-
|
|
751
|
+
textStrokeWidth: textStyle.textStrokeWidth
|
|
752
752
|
};
|
|
753
753
|
textStyle.textFill = '#fff';
|
|
754
754
|
// Consider text with #fff overflow its container.
|
|
755
755
|
if (textStyle.textStroke == null) {
|
|
756
756
|
textStyle.textStroke = opt.autoColor;
|
|
757
|
-
textStyle.
|
|
757
|
+
textStyle.textStrokeWidth == null && (textStyle.textStrokeWidth = 2);
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
760
|
|
|
@@ -766,7 +766,7 @@ define(function(require) {
|
|
|
766
766
|
if (insideRollback) {
|
|
767
767
|
style.textFill = insideRollback.textFill;
|
|
768
768
|
style.textStroke = insideRollback.textStroke;
|
|
769
|
-
style.
|
|
769
|
+
style.textStrokeWidth = insideRollback.textStrokeWidth;
|
|
770
770
|
}
|
|
771
771
|
}
|
|
772
772
|
|
package/src/util/number.js
CHANGED
|
@@ -273,11 +273,14 @@ define(function (require) {
|
|
|
273
273
|
var TIME_REG = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/; // jshint ignore:line
|
|
274
274
|
|
|
275
275
|
/**
|
|
276
|
+
* Consider DST, it is incorrect to provide a method `getTimezoneOffset`
|
|
277
|
+
* without time specified. So this method is removed.
|
|
278
|
+
*
|
|
276
279
|
* @return {number} in minutes
|
|
277
280
|
*/
|
|
278
|
-
number.getTimezoneOffset = function () {
|
|
279
|
-
|
|
280
|
-
};
|
|
281
|
+
// number.getTimezoneOffset = function () {
|
|
282
|
+
// return (new Date()).getTimezoneOffset();
|
|
283
|
+
// };
|
|
281
284
|
|
|
282
285
|
/**
|
|
283
286
|
* @param {string|Date|number} value These values can be accepted:
|
|
@@ -311,24 +314,42 @@ define(function (require) {
|
|
|
311
314
|
return new Date(NaN);
|
|
312
315
|
}
|
|
313
316
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
317
|
+
// Use local time when no timezone offset specifed.
|
|
318
|
+
if (!match[8]) {
|
|
319
|
+
// match[n] can only be string or undefined.
|
|
320
|
+
// But take care of '12' + 1 => '121'.
|
|
321
|
+
return new Date(
|
|
322
|
+
+match[1],
|
|
323
|
+
+(match[2] || 1) - 1,
|
|
324
|
+
+match[3] || 1,
|
|
325
|
+
+match[4] || 0,
|
|
326
|
+
+(match[5] || 0),
|
|
327
|
+
+match[6] || 0,
|
|
328
|
+
+match[7] || 0
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
// Timezoneoffset of Javascript Date has considered DST (Daylight Saving Time,
|
|
332
|
+
// https://tc39.github.io/ecma262/#sec-daylight-saving-time-adjustment).
|
|
333
|
+
// For example, system timezone is set as "Time Zone: America/Toronto",
|
|
334
|
+
// then these code will get different result:
|
|
335
|
+
// `new Date(1478411999999).getTimezoneOffset(); // get 240`
|
|
336
|
+
// `new Date(1478412000000).getTimezoneOffset(); // get 300`
|
|
337
|
+
// So we should not use `new Date`, but use `Date.UTC`.
|
|
338
|
+
else {
|
|
339
|
+
var hour = +match[4] || 0;
|
|
340
|
+
if (match[8].toUpperCase() !== 'Z') {
|
|
341
|
+
hour -= match[8].slice(0, 3);
|
|
342
|
+
}
|
|
343
|
+
return new Date(Date.UTC(
|
|
344
|
+
+match[1],
|
|
345
|
+
+(match[2] || 1) - 1,
|
|
346
|
+
+match[3] || 1,
|
|
347
|
+
hour,
|
|
348
|
+
+(match[5] || 0),
|
|
349
|
+
+match[6] || 0,
|
|
350
|
+
+match[7] || 0
|
|
351
|
+
));
|
|
352
|
+
}
|
|
332
353
|
}
|
|
333
354
|
else if (value == null) {
|
|
334
355
|
return new Date(NaN);
|
|
@@ -142,7 +142,7 @@ define(function (require) {
|
|
|
142
142
|
// which will be much faster and useful in pixel manipulation
|
|
143
143
|
var returnRGBArray = !!out;
|
|
144
144
|
!isNormalized && (value = this._normalizeData(value));
|
|
145
|
-
out = zrColor.
|
|
145
|
+
out = zrColor.fastLerp(value, thisOption.parsedVisual, out);
|
|
146
146
|
return returnRGBArray ? out : zrColor.stringify(out, 'rgba');
|
|
147
147
|
},
|
|
148
148
|
this
|
|
@@ -152,7 +152,7 @@ define(function (require) {
|
|
|
152
152
|
_doMap: {
|
|
153
153
|
linear: function (normalized) {
|
|
154
154
|
return zrColor.stringify(
|
|
155
|
-
zrColor.
|
|
155
|
+
zrColor.fastLerp(normalized, this.option.parsedVisual),
|
|
156
156
|
'rgba'
|
|
157
157
|
);
|
|
158
158
|
},
|
|
@@ -161,7 +161,7 @@ define(function (require) {
|
|
|
161
161
|
var result = getSpecifiedVisual.call(this, value);
|
|
162
162
|
if (result == null) {
|
|
163
163
|
result = zrColor.stringify(
|
|
164
|
-
zrColor.
|
|
164
|
+
zrColor.fastLerp(normalized, this.option.parsedVisual),
|
|
165
165
|
'rgba'
|
|
166
166
|
);
|
|
167
167
|
}
|
package/webpack.config.js
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
var PROD = process.argv.indexOf('-p') >= 0;
|
|
2
2
|
var webpack = require('webpack');
|
|
3
3
|
|
|
4
|
+
var IS_EN = process.argv.indexOf('--lang-en') >= 0;
|
|
5
|
+
|
|
6
|
+
var plugins = [
|
|
7
|
+
new webpack.DefinePlugin({
|
|
8
|
+
'typeof __DEV__': JSON.stringify('boolean'),
|
|
9
|
+
__DEV__: PROD ? false : true
|
|
10
|
+
})
|
|
11
|
+
];
|
|
12
|
+
var outputSuffix = '';
|
|
13
|
+
|
|
14
|
+
if (IS_EN) {
|
|
15
|
+
plugins.unshift(
|
|
16
|
+
new webpack.NormalModuleReplacementPlugin(/\/lang[.]js/, './langEN.js')
|
|
17
|
+
);
|
|
18
|
+
outputSuffix = '-en';
|
|
19
|
+
}
|
|
20
|
+
|
|
4
21
|
module.exports = {
|
|
5
|
-
plugins:
|
|
6
|
-
new webpack.DefinePlugin({
|
|
7
|
-
'typeof __DEV__': JSON.stringify('boolean'),
|
|
8
|
-
__DEV__: PROD ? false : true
|
|
9
|
-
})
|
|
10
|
-
],
|
|
22
|
+
plugins: plugins,
|
|
11
23
|
entry: {
|
|
12
24
|
'echarts': __dirname + '/index.js',
|
|
13
25
|
'echarts.simple': __dirname + '/index.simple.js',
|
|
@@ -17,6 +29,8 @@ module.exports = {
|
|
|
17
29
|
libraryTarget: 'umd',
|
|
18
30
|
library: 'echarts',
|
|
19
31
|
path: __dirname + '/dist',
|
|
20
|
-
filename: PROD
|
|
32
|
+
filename: PROD
|
|
33
|
+
? '[name]' + outputSuffix + '.min.js'
|
|
34
|
+
: '[name]' + outputSuffix + '.js'
|
|
21
35
|
}
|
|
22
36
|
};
|