echarts 4.5.0 → 4.9.0
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/.DS_Store +0 -0
- package/.gitattributes +3 -0
- package/.github/pull_request_template.md +66 -0
- package/.github/workflows/nodejs.yml +15 -3
- package/.huskyrc +5 -0
- package/CONTRIBUTING.md +16 -160
- package/NOTICE +1 -1
- package/README.md +3 -3
- package/asset/.DS_Store +0 -0
- package/build/.DS_Store +0 -0
- package/dist/echarts-en.common.js +3072 -1261
- package/dist/echarts-en.common.min.js +1 -1
- package/dist/echarts-en.js +4339 -1685
- package/dist/echarts-en.js.map +1 -1
- package/dist/echarts-en.min.js +1 -1
- package/dist/echarts-en.simple.js +2496 -1011
- package/dist/echarts-en.simple.min.js +1 -1
- package/dist/echarts.common.js +3046 -1261
- package/dist/echarts.common.min.js +1 -1
- package/dist/echarts.js +4313 -1685
- package/dist/echarts.js.map +1 -1
- package/dist/echarts.min.js +1 -1
- package/dist/echarts.simple.js +2470 -1011
- package/dist/echarts.simple.min.js +1 -1
- package/dist/extension/bmap.js +33 -11
- package/dist/extension/bmap.js.map +1 -1
- package/dist/extension/bmap.min.js +1 -1
- package/dist/extension/dataTool.js.map +1 -1
- package/extension/.DS_Store +0 -0
- package/extension/bmap/BMapCoordSys.js +14 -4
- package/extension/bmap/BMapModel.js +4 -0
- package/extension/bmap/BMapView.js +18 -10
- package/extension-src/bmap/BMapCoordSys.js +14 -4
- package/extension-src/bmap/BMapModel.js +6 -1
- package/extension-src/bmap/BMapView.js +16 -9
- package/lib/chart/bar/BarSeries.js +14 -1
- package/lib/chart/bar/BarView.js +196 -18
- package/lib/chart/bar/BaseBarSeries.js +3 -1
- package/lib/chart/bar/PictorialBarSeries.js +1 -1
- package/lib/chart/candlestick/candlestickVisual.js +1 -1
- package/lib/chart/effectScatter/EffectScatterSeries.js +3 -1
- package/lib/chart/funnel/FunnelSeries.js +14 -5
- package/lib/chart/funnel/funnelLayout.js +162 -46
- package/lib/chart/gauge/GaugeSeries.js +0 -2
- package/lib/chart/graph/GraphSeries.js +23 -7
- package/lib/chart/graph/GraphView.js +30 -12
- package/lib/chart/graph/circularLayoutHelper.js +8 -2
- package/lib/chart/graph/forceLayout.js +6 -1
- package/lib/chart/graph/simpleLayout.js +1 -1
- package/lib/chart/graph/simpleLayoutHelper.js +10 -4
- package/lib/chart/heatmap/HeatmapView.js +4 -4
- package/lib/chart/helper/EffectLine.js +23 -1
- package/lib/chart/helper/EffectSymbol.js +2 -1
- package/lib/chart/helper/Line.js +129 -42
- package/lib/chart/helper/LineDraw.js +5 -1
- package/lib/chart/helper/Symbol.js +2 -3
- package/lib/chart/helper/createClipPathFromCoordSys.js +4 -1
- package/lib/chart/helper/createListFromArray.js +14 -8
- package/lib/chart/helper/createRenderPlanner.js +6 -3
- package/lib/chart/helper/multipleGraphEdgeHelper.js +258 -0
- package/lib/chart/helper/whiskerBoxCommon.js +22 -16
- package/lib/chart/line/LineSeries.js +3 -1
- package/lib/chart/line/LineView.js +41 -2
- package/lib/chart/lines/LinesSeries.js +0 -2
- package/lib/chart/map/MapSeries.js +14 -5
- package/lib/chart/pie/PieSeries.js +27 -6
- package/lib/chart/pie/PieView.js +22 -15
- package/lib/chart/pie/labelLayout.js +102 -19
- package/lib/chart/pie/pieLayout.js +19 -7
- package/lib/chart/radar/RadarSeries.js +27 -6
- package/lib/chart/radar/RadarView.js +3 -1
- package/lib/chart/sankey/SankeySeries.js +13 -1
- package/lib/chart/sankey/SankeyView.js +70 -32
- package/lib/chart/sankey/sankeyLayout.js +22 -3
- package/lib/chart/scatter/ScatterSeries.js +3 -1
- package/lib/chart/sunburst/SunburstPiece.js +5 -1
- package/lib/chart/sunburst/SunburstSeries.js +29 -12
- package/lib/chart/sunburst/SunburstView.js +5 -1
- package/lib/chart/themeRiver/ThemeRiverSeries.js +24 -33
- package/lib/chart/tree/TreeSeries.js +20 -3
- package/lib/chart/tree/TreeView.js +149 -23
- package/lib/chart/treemap/TreemapSeries.js +25 -4
- package/lib/chart/treemap/TreemapView.js +80 -38
- package/lib/chart/treemap/treemapLayout.js +1 -1
- package/lib/chart/treemap/treemapVisual.js +9 -15
- package/lib/component/axis/AngleAxisView.js +64 -7
- package/lib/component/axis/AxisBuilder.js +62 -24
- package/lib/component/axis/CartesianAxisView.js +52 -85
- package/lib/component/axis/RadiusAxisView.js +36 -4
- package/lib/component/axis/SingleAxisView.js +21 -6
- package/lib/component/axis/axisSplitHelper.js +132 -0
- package/lib/component/axisPointer/axisTrigger.js +1 -1
- package/lib/component/brush/BrushView.js +11 -1
- package/lib/component/brush/visualEncoding.js +13 -2
- package/lib/component/dataZoom/SliderZoomView.js +4 -10
- package/lib/component/helper/BrushController.js +33 -43
- package/lib/component/helper/MapDraw.js +30 -4
- package/lib/component/legend/LegendModel.js +3 -3
- package/lib/component/legend/LegendView.js +17 -13
- package/lib/component/legend/ScrollableLegendView.js +18 -18
- package/lib/component/marker/MarkAreaView.js +53 -15
- package/lib/component/marker/MarkLineModel.js +2 -1
- package/lib/component/marker/MarkLineView.js +3 -0
- package/lib/component/marker/MarkPointView.js +8 -1
- package/lib/component/marker/MarkerModel.js +3 -2
- package/lib/component/marker/markerHelper.js +7 -4
- package/lib/component/timeline/SliderTimelineView.js +7 -1
- package/lib/component/title.js +6 -2
- package/lib/component/toolbox/ToolboxView.js +5 -1
- package/lib/component/toolbox/feature/DataView.js +23 -8
- package/lib/component/toolbox/feature/DataZoom.js +6 -6
- package/lib/component/toolbox/feature/MagicType.js +20 -14
- package/lib/component/toolbox/feature/SaveAsImage.js +4 -2
- package/lib/component/tooltip/TooltipContent.js +101 -30
- package/lib/component/tooltip/TooltipRichContent.js +56 -8
- package/lib/component/tooltip/TooltipView.js +11 -12
- package/lib/component/visualMap/PiecewiseModel.js +3 -6
- package/lib/component/visualMap/VisualMapModel.js +1 -1
- package/lib/coord/Axis.js +30 -2
- package/lib/coord/View.js +9 -0
- package/lib/coord/axisDefault.js +22 -3
- package/lib/coord/axisHelper.js +24 -18
- package/lib/coord/calendar/Calendar.js +8 -4
- package/lib/coord/geo/GeoModel.js +2 -1
- package/lib/coord/geo/geoJSONLoader.js +3 -2
- package/lib/coord/geo/geoSourceManager.js +3 -2
- package/lib/coord/geo/parseGeoJson.js +3 -2
- package/lib/coord/radar/Radar.js +5 -5
- package/lib/data/DataDimensionInfo.js +157 -0
- package/lib/data/Graph.js +1 -6
- package/lib/data/List.js +26 -20
- package/lib/data/Tree.js +5 -42
- package/lib/data/helper/completeDimensions.js +43 -32
- package/lib/data/helper/createDimensions.js +2 -0
- package/lib/data/helper/sourceHelper.js +214 -114
- package/lib/echarts.js +57 -34
- package/lib/langEN.js +26 -0
- package/lib/layout/barGrid.js +19 -13
- package/lib/layout/barPolar.js +1 -6
- package/lib/loading/default.js +43 -27
- package/lib/model/Series.js +4 -4
- package/lib/model/referHelper.js +40 -12
- package/lib/processor/dataSample.js +1 -1
- package/lib/scale/Interval.js +87 -2
- package/lib/scale/Log.js +9 -2
- package/lib/scale/helper.js +1 -43
- package/lib/stream/Scheduler.js +10 -2
- package/lib/theme/dark.js +3 -0
- package/lib/util/format.js +19 -2
- package/lib/util/graphic.js +14 -12
- package/lib/visual/LegendVisualProvider.js +75 -0
- package/lib/visual/VisualMapping.js +1 -1
- package/lib/visual/dataColor.js +2 -12
- package/lib/visual/seriesColor.js +15 -7
- package/lib/visual/symbol.js +12 -2
- package/map/.DS_Store +0 -0
- package/map/js/.DS_Store +0 -0
- package/map/js/china.js +1 -1
- package/map/js/province/.DS_Store +0 -0
- package/map/js/province/chongqing.js +1 -1
- package/map/js/province/gansu.js +2 -2
- package/map/js/province/tianjin.js +1 -28
- package/map/json/.DS_Store +0 -0
- package/map/json/china.json +1 -1
- package/map/json/province/chongqing.json +1 -1
- package/map/json/province/tianjin.json +1 -1
- package/package.json +12 -6
- package/src/.DS_Store +0 -0
- package/src/chart/.DS_Store +0 -0
- package/src/chart/bar/BarSeries.js +15 -1
- package/src/chart/bar/BarView.js +198 -17
- package/src/chart/bar/BaseBarSeries.js +1 -1
- package/src/chart/bar/PictorialBarSeries.js +2 -2
- package/src/chart/candlestick/candlestickVisual.js +1 -1
- package/src/chart/effectScatter/EffectScatterSeries.js +1 -1
- package/src/chart/funnel/FunnelSeries.js +11 -4
- package/src/chart/funnel/funnelLayout.js +179 -53
- package/src/chart/gauge/GaugeSeries.js +0 -1
- package/src/chart/graph/GraphSeries.js +19 -7
- package/src/chart/graph/GraphView.js +28 -10
- package/src/chart/graph/circularLayoutHelper.js +8 -2
- package/src/chart/graph/forceLayout.js +7 -1
- package/src/chart/graph/simpleLayout.js +1 -1
- package/src/chart/graph/simpleLayoutHelper.js +12 -5
- package/src/chart/heatmap/HeatmapView.js +4 -4
- package/src/chart/helper/EffectLine.js +23 -1
- package/src/chart/helper/EffectSymbol.js +2 -1
- package/src/chart/helper/Line.js +122 -37
- package/src/chart/helper/LineDraw.js +5 -1
- package/src/chart/helper/Symbol.js +4 -4
- package/src/chart/helper/createClipPathFromCoordSys.js +4 -0
- package/src/chart/helper/createGraphFromNodeEdge.js +2 -1
- package/src/chart/helper/createListFromArray.js +13 -8
- package/src/chart/helper/createRenderPlanner.js +5 -2
- package/src/chart/helper/multipleGraphEdgeHelper.js +229 -0
- package/src/chart/helper/whiskerBoxCommon.js +21 -16
- package/src/chart/line/LineSeries.js +1 -1
- package/src/chart/line/LineView.js +45 -1
- package/src/chart/lines/LinesSeries.js +1 -3
- package/src/chart/map/MapSeries.js +11 -5
- package/src/chart/pie/PieSeries.js +26 -5
- package/src/chart/pie/PieView.js +20 -15
- package/src/chart/pie/labelLayout.js +114 -22
- package/src/chart/pie/pieLayout.js +20 -7
- package/src/chart/radar/RadarSeries.js +31 -6
- package/src/chart/radar/RadarView.js +4 -2
- package/src/chart/sankey/SankeySeries.js +12 -1
- package/src/chart/sankey/SankeyView.js +75 -30
- package/src/chart/sankey/sankeyLayout.js +25 -5
- package/src/chart/scatter/ScatterSeries.js +1 -1
- package/src/chart/sunburst/SunburstPiece.js +7 -1
- package/src/chart/sunburst/SunburstSeries.js +28 -15
- package/src/chart/sunburst/SunburstView.js +2 -1
- package/src/chart/themeRiver/ThemeRiverSeries.js +25 -30
- package/src/chart/tree/TreeSeries.js +19 -6
- package/src/chart/tree/TreeView.js +156 -23
- package/src/chart/treemap/TreemapSeries.js +23 -5
- package/src/chart/treemap/TreemapView.js +77 -41
- package/src/chart/treemap/treemapLayout.js +2 -2
- package/src/chart/treemap/treemapVisual.js +8 -25
- package/src/component/axis/AngleAxisView.js +75 -7
- package/src/component/axis/AxisBuilder.js +77 -32
- package/src/component/axis/CartesianAxisView.js +47 -83
- package/src/component/axis/RadiusAxisView.js +37 -4
- package/src/component/axis/SingleAxisView.js +21 -4
- package/src/component/axis/axisSplitHelper.js +114 -0
- package/src/component/axisPointer/axisTrigger.js +1 -1
- package/src/component/brush/BrushView.js +8 -1
- package/src/component/brush/visualEncoding.js +6 -3
- package/src/component/dataZoom/SliderZoomView.js +4 -9
- package/src/component/helper/BrushController.js +40 -47
- package/src/component/helper/MapDraw.js +27 -4
- package/src/component/legend/LegendModel.js +3 -3
- package/src/component/legend/LegendView.js +18 -12
- package/src/component/legend/ScrollableLegendView.js +18 -16
- package/src/component/marker/MarkAreaView.js +53 -15
- package/src/component/marker/MarkLineModel.js +2 -1
- package/src/component/marker/MarkLineView.js +3 -1
- package/src/component/marker/MarkPointView.js +7 -1
- package/src/component/marker/MarkerModel.js +3 -2
- package/src/component/marker/markerHelper.js +8 -5
- package/src/component/timeline/SliderTimelineView.js +9 -6
- package/src/component/title.js +4 -3
- package/src/component/toolbox/.DS_Store +0 -0
- package/src/component/toolbox/ToolboxView.js +5 -0
- package/src/component/toolbox/feature/DataView.js +20 -8
- package/src/component/toolbox/feature/DataZoom.js +6 -6
- package/src/component/toolbox/feature/MagicType.js +19 -13
- package/src/component/toolbox/feature/SaveAsImage.js +4 -2
- package/src/component/tooltip/TooltipContent.js +94 -28
- package/src/component/tooltip/TooltipRichContent.js +52 -9
- package/src/component/tooltip/TooltipView.js +14 -12
- package/src/component/visualMap/PiecewiseModel.js +5 -9
- package/src/component/visualMap/VisualMapModel.js +1 -1
- package/src/coord/Axis.js +29 -2
- package/src/coord/View.js +10 -1
- package/src/coord/axisDefault.js +26 -2
- package/src/coord/axisHelper.js +30 -21
- package/src/coord/calendar/Calendar.js +12 -5
- package/src/coord/geo/GeoModel.js +3 -6
- package/src/coord/geo/geoJSONLoader.js +3 -2
- package/src/coord/geo/geoSourceManager.js +3 -2
- package/src/coord/geo/parseGeoJson.js +3 -2
- package/src/coord/radar/Radar.js +6 -8
- package/src/data/DataDimensionInfo.js +135 -0
- package/src/data/Graph.js +0 -5
- package/src/data/List.js +30 -17
- package/src/data/Tree.js +6 -39
- package/src/data/helper/completeDimensions.js +49 -30
- package/src/data/helper/createDimensions.js +2 -0
- package/src/data/helper/sourceHelper.js +216 -124
- package/src/echarts.js +60 -36
- package/src/langEN.js +26 -0
- package/src/layout/barGrid.js +22 -10
- package/src/layout/barPolar.js +4 -6
- package/src/loading/default.js +46 -34
- package/src/model/.DS_Store +0 -0
- package/src/model/Series.js +4 -4
- package/src/model/referHelper.js +34 -11
- package/src/preprocessor/.DS_Store +0 -0
- package/src/processor/dataSample.js +1 -1
- package/src/scale/Interval.js +84 -4
- package/src/scale/Log.js +9 -2
- package/src/scale/helper.js +1 -39
- package/src/stream/Scheduler.js +9 -1
- package/src/theme/dark.js +3 -0
- package/src/util/.DS_Store +0 -0
- package/src/util/format.js +17 -1
- package/src/util/graphic.js +13 -11
- package/src/visual/LegendVisualProvider.js +55 -0
- package/src/visual/VisualMapping.js +1 -1
- package/src/visual/dataColor.js +0 -13
- package/src/visual/seriesColor.js +13 -7
- package/src/visual/symbol.js +11 -2
- package/theme/.DS_Store +0 -0
- package/theme/azul.js +163 -0
- package/theme/bee-inspired.js +178 -0
- package/theme/blue.js +178 -0
- package/theme/caravan.js +178 -0
- package/theme/carp.js +163 -0
- package/theme/cool.js +180 -0
- package/theme/dark-blue.js +168 -0
- package/theme/dark-bold.js +168 -0
- package/theme/dark-digerati.js +168 -0
- package/theme/dark-fresh-cut.js +168 -0
- package/theme/dark-mushroom.js +168 -0
- package/theme/dark.js +69 -62
- package/theme/eduardo.js +178 -0
- package/theme/forest.js +163 -0
- package/theme/fresh-cut.js +163 -0
- package/theme/fruit.js +178 -0
- package/theme/gray.js +220 -0
- package/theme/green.js +222 -0
- package/theme/helianthus.js +263 -0
- package/theme/infographic.js +72 -57
- package/theme/inspired.js +163 -0
- package/theme/jazz.js +163 -0
- package/theme/london.js +163 -0
- package/theme/macarons.js +80 -57
- package/theme/macarons2.js +251 -0
- package/theme/mint.js +155 -0
- package/theme/red-velvet.js +163 -0
- package/theme/red.js +225 -0
- package/theme/roma.js +55 -22
- package/theme/royal.js +163 -0
- package/theme/sakura.js +140 -0
- package/theme/shine.js +52 -45
- package/theme/tech-blue.js +180 -0
- package/theme/vintage.js +37 -23
package/src/layout/barGrid.js
CHANGED
|
@@ -246,7 +246,6 @@ function doCalBarWidthAndOffset(seriesInfoList) {
|
|
|
246
246
|
// only the attributes set on the last series will work.
|
|
247
247
|
// Do not change this fact unless there will be a break change.
|
|
248
248
|
|
|
249
|
-
// TODO
|
|
250
249
|
var barWidth = seriesInfo.barWidth;
|
|
251
250
|
if (barWidth && !stacks[stackId].width) {
|
|
252
251
|
// See #6312, do not restrict width.
|
|
@@ -286,6 +285,7 @@ function doCalBarWidthAndOffset(seriesInfoList) {
|
|
|
286
285
|
zrUtil.each(stacks, function (column) {
|
|
287
286
|
var maxWidth = column.maxWidth;
|
|
288
287
|
var minWidth = column.minWidth;
|
|
288
|
+
|
|
289
289
|
if (!column.width) {
|
|
290
290
|
var finalWidth = autoWidth;
|
|
291
291
|
if (maxWidth && maxWidth < finalWidth) {
|
|
@@ -301,7 +301,7 @@ function doCalBarWidthAndOffset(seriesInfoList) {
|
|
|
301
301
|
}
|
|
302
302
|
if (finalWidth !== autoWidth) {
|
|
303
303
|
column.width = finalWidth;
|
|
304
|
-
remainedWidth -= finalWidth;
|
|
304
|
+
remainedWidth -= finalWidth + barGapPercent * finalWidth;
|
|
305
305
|
autoWidthCount--;
|
|
306
306
|
}
|
|
307
307
|
}
|
|
@@ -318,7 +318,7 @@ function doCalBarWidthAndOffset(seriesInfoList) {
|
|
|
318
318
|
finalWidth = Math.max(finalWidth, minWidth);
|
|
319
319
|
}
|
|
320
320
|
column.width = finalWidth;
|
|
321
|
-
remainedWidth -= finalWidth;
|
|
321
|
+
remainedWidth -= finalWidth + barGapPercent * finalWidth;
|
|
322
322
|
autoWidthCount--;
|
|
323
323
|
}
|
|
324
324
|
});
|
|
@@ -326,8 +326,10 @@ function doCalBarWidthAndOffset(seriesInfoList) {
|
|
|
326
326
|
// Recalculate width again
|
|
327
327
|
autoWidth = (remainedWidth - categoryGap)
|
|
328
328
|
/ (autoWidthCount + (autoWidthCount - 1) * barGapPercent);
|
|
329
|
+
|
|
329
330
|
autoWidth = Math.max(autoWidth, 0);
|
|
330
331
|
|
|
332
|
+
|
|
331
333
|
var widthSum = 0;
|
|
332
334
|
var lastColumn;
|
|
333
335
|
zrUtil.each(stacks, function (column, idx) {
|
|
@@ -418,11 +420,6 @@ export function layout(seriesType, ecModel) {
|
|
|
418
420
|
var value = data.get(valueDim, idx);
|
|
419
421
|
var baseValue = data.get(baseDim, idx);
|
|
420
422
|
|
|
421
|
-
// If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in "axisProxy".
|
|
422
|
-
if (isNaN(value) || isNaN(baseValue)) {
|
|
423
|
-
continue;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
423
|
var sign = value >= 0 ? 'p' : 'n';
|
|
427
424
|
var baseCoord = valueAxisStart;
|
|
428
425
|
|
|
@@ -455,7 +452,10 @@ export function layout(seriesType, ecModel) {
|
|
|
455
452
|
if (Math.abs(width) < barMinHeight) {
|
|
456
453
|
width = (width < 0 ? -1 : 1) * barMinHeight;
|
|
457
454
|
}
|
|
458
|
-
|
|
455
|
+
// Ignore stack from NaN value
|
|
456
|
+
if (!isNaN(width)) {
|
|
457
|
+
stacked && (lastStackCoords[stackId][baseValue][sign] += width);
|
|
458
|
+
}
|
|
459
459
|
}
|
|
460
460
|
else {
|
|
461
461
|
var coord = cartesian.dataToPoint([baseValue, value]);
|
|
@@ -468,8 +468,12 @@ export function layout(seriesType, ecModel) {
|
|
|
468
468
|
// Include zero to has a positive bar
|
|
469
469
|
height = (height <= 0 ? -1 : 1) * barMinHeight;
|
|
470
470
|
}
|
|
471
|
-
|
|
471
|
+
// Ignore stack from NaN value
|
|
472
|
+
if (!isNaN(height)) {
|
|
473
|
+
stacked && (lastStackCoords[stackId][baseValue][sign] += height);
|
|
474
|
+
}
|
|
472
475
|
}
|
|
476
|
+
|
|
473
477
|
data.setItemLayout(idx, {
|
|
474
478
|
x: x,
|
|
475
479
|
y: y,
|
|
@@ -495,6 +499,7 @@ export var largeLayout = {
|
|
|
495
499
|
|
|
496
500
|
var data = seriesModel.getData();
|
|
497
501
|
var cartesian = seriesModel.coordinateSystem;
|
|
502
|
+
var coordLayout = cartesian.grid.getRect();
|
|
498
503
|
var baseAxis = cartesian.getBaseAxis();
|
|
499
504
|
var valueAxis = cartesian.getOtherAxis(baseAxis);
|
|
500
505
|
var valueDim = data.mapDimension(valueAxis.dim);
|
|
@@ -514,6 +519,7 @@ export var largeLayout = {
|
|
|
514
519
|
function progress(params, data) {
|
|
515
520
|
var count = params.count;
|
|
516
521
|
var largePoints = new LargeArr(count * 2);
|
|
522
|
+
var largeBackgroundPoints = new LargeArr(count * 2);
|
|
517
523
|
var largeDataIndices = new LargeArr(count);
|
|
518
524
|
var dataIndex;
|
|
519
525
|
var coord = [];
|
|
@@ -527,7 +533,11 @@ export var largeLayout = {
|
|
|
527
533
|
|
|
528
534
|
coord = cartesian.dataToPoint(valuePair, null, coord);
|
|
529
535
|
// Data index might not be in order, depends on `progressiveChunkMode`.
|
|
536
|
+
largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
|
|
537
|
+
? coordLayout.x + coordLayout.width : coord[0];
|
|
530
538
|
largePoints[pointsOffset++] = coord[0];
|
|
539
|
+
largeBackgroundPoints[pointsOffset] = valueAxisHorizontal
|
|
540
|
+
? coord[1] : coordLayout.y + coordLayout.height;
|
|
531
541
|
largePoints[pointsOffset++] = coord[1];
|
|
532
542
|
largeDataIndices[idxOffset++] = dataIndex;
|
|
533
543
|
}
|
|
@@ -535,8 +545,10 @@ export var largeLayout = {
|
|
|
535
545
|
data.setLayout({
|
|
536
546
|
largePoints: largePoints,
|
|
537
547
|
largeDataIndices: largeDataIndices,
|
|
548
|
+
largeBackgroundPoints: largeBackgroundPoints,
|
|
538
549
|
barWidth: barWidth,
|
|
539
550
|
valueAxisStart: getValueAxisStart(baseAxis, valueAxis, false),
|
|
551
|
+
backgroundStart: valueAxisHorizontal ? coordLayout.x : coordLayout.y,
|
|
540
552
|
valueAxisHorizontal: valueAxisHorizontal
|
|
541
553
|
});
|
|
542
554
|
}
|
package/src/layout/barPolar.js
CHANGED
|
@@ -82,16 +82,13 @@ function barLayoutPolar(seriesType, ecModel, api) {
|
|
|
82
82
|
var clampLayout = baseAxis.dim !== 'radius'
|
|
83
83
|
|| !seriesModel.get('roundCap', true);
|
|
84
84
|
|
|
85
|
-
var valueAxisStart = valueAxis.
|
|
86
|
-
|
|
85
|
+
var valueAxisStart = valueAxis.dim === 'radius'
|
|
86
|
+
? valueAxis.dataToRadius(0)
|
|
87
|
+
: valueAxis.dataToAngle(0);
|
|
87
88
|
for (var idx = 0, len = data.count(); idx < len; idx++) {
|
|
88
89
|
var value = data.get(valueDim, idx);
|
|
89
90
|
var baseValue = data.get(baseDim, idx);
|
|
90
91
|
|
|
91
|
-
if (isNaN(value)) {
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
92
|
var sign = value >= 0 ? 'p' : 'n';
|
|
96
93
|
var baseCoord = valueAxisStart;
|
|
97
94
|
|
|
@@ -99,6 +96,7 @@ function barLayoutPolar(seriesType, ecModel, api) {
|
|
|
99
96
|
// stackResultDimension directly.
|
|
100
97
|
// Only ordinal axis can be stacked.
|
|
101
98
|
if (stacked) {
|
|
99
|
+
|
|
102
100
|
if (!lastStackCoords[stackId][baseValue]) {
|
|
103
101
|
lastStackCoords[stackId][baseValue] = {
|
|
104
102
|
p: valueAxisStart, // Positive stack
|
package/src/loading/default.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
import * as zrUtil from 'zrender/src/core/util';
|
|
21
21
|
import * as graphic from '../util/graphic';
|
|
22
|
+
import * as textContain from 'zrender/src/contain/text';
|
|
22
23
|
|
|
23
24
|
var PI = Math.PI;
|
|
24
25
|
|
|
@@ -34,11 +35,16 @@ export default function (api, opts) {
|
|
|
34
35
|
opts = opts || {};
|
|
35
36
|
zrUtil.defaults(opts, {
|
|
36
37
|
text: 'loading',
|
|
37
|
-
color: '#c23531',
|
|
38
38
|
textColor: '#000',
|
|
39
|
+
fontSize: '12px',
|
|
39
40
|
maskColor: 'rgba(255, 255, 255, 0.8)',
|
|
41
|
+
showSpinner: true,
|
|
42
|
+
color: '#c23531',
|
|
43
|
+
spinnerRadius: 10,
|
|
44
|
+
lineWidth: 5,
|
|
40
45
|
zlevel: 0
|
|
41
46
|
});
|
|
47
|
+
var group = new graphic.Group();
|
|
42
48
|
var mask = new graphic.Rect({
|
|
43
49
|
style: {
|
|
44
50
|
fill: opts.maskColor
|
|
@@ -46,24 +52,13 @@ export default function (api, opts) {
|
|
|
46
52
|
zlevel: opts.zlevel,
|
|
47
53
|
z: 10000
|
|
48
54
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
startAngle: -PI / 2,
|
|
52
|
-
endAngle: -PI / 2 + 0.1,
|
|
53
|
-
r: 10
|
|
54
|
-
},
|
|
55
|
-
style: {
|
|
56
|
-
stroke: opts.color,
|
|
57
|
-
lineCap: 'round',
|
|
58
|
-
lineWidth: 5
|
|
59
|
-
},
|
|
60
|
-
zlevel: opts.zlevel,
|
|
61
|
-
z: 10001
|
|
62
|
-
});
|
|
55
|
+
group.add(mask);
|
|
56
|
+
var font = opts.fontSize + ' sans-serif';
|
|
63
57
|
var labelRect = new graphic.Rect({
|
|
64
58
|
style: {
|
|
65
59
|
fill: 'none',
|
|
66
60
|
text: opts.text,
|
|
61
|
+
font: font,
|
|
67
62
|
textPosition: 'right',
|
|
68
63
|
textDistance: 10,
|
|
69
64
|
textFill: opts.textColor
|
|
@@ -71,32 +66,49 @@ export default function (api, opts) {
|
|
|
71
66
|
zlevel: opts.zlevel,
|
|
72
67
|
z: 10001
|
|
73
68
|
});
|
|
74
|
-
|
|
75
|
-
arc.animateShape(true)
|
|
76
|
-
.when(1000, {
|
|
77
|
-
endAngle: PI * 3 / 2
|
|
78
|
-
})
|
|
79
|
-
.start('circularInOut');
|
|
80
|
-
arc.animateShape(true)
|
|
81
|
-
.when(1000, {
|
|
82
|
-
startAngle: PI * 3 / 2
|
|
83
|
-
})
|
|
84
|
-
.delay(300)
|
|
85
|
-
.start('circularInOut');
|
|
86
|
-
|
|
87
|
-
var group = new graphic.Group();
|
|
88
|
-
group.add(arc);
|
|
89
69
|
group.add(labelRect);
|
|
90
|
-
|
|
70
|
+
if (opts.showSpinner) {
|
|
71
|
+
var arc = new graphic.Arc({
|
|
72
|
+
shape: {
|
|
73
|
+
startAngle: -PI / 2,
|
|
74
|
+
endAngle: -PI / 2 + 0.1,
|
|
75
|
+
r: opts.spinnerRadius
|
|
76
|
+
},
|
|
77
|
+
style: {
|
|
78
|
+
stroke: opts.color,
|
|
79
|
+
lineCap: 'round',
|
|
80
|
+
lineWidth: opts.lineWidth
|
|
81
|
+
},
|
|
82
|
+
zlevel: opts.zlevel,
|
|
83
|
+
z: 10001
|
|
84
|
+
});
|
|
85
|
+
arc.animateShape(true)
|
|
86
|
+
.when(1000, {
|
|
87
|
+
endAngle: PI * 3 / 2
|
|
88
|
+
})
|
|
89
|
+
.start('circularInOut');
|
|
90
|
+
arc.animateShape(true)
|
|
91
|
+
.when(1000, {
|
|
92
|
+
startAngle: PI * 3 / 2
|
|
93
|
+
})
|
|
94
|
+
.delay(300)
|
|
95
|
+
.start('circularInOut');
|
|
96
|
+
group.add(arc);
|
|
97
|
+
}
|
|
91
98
|
// Inject resize
|
|
92
99
|
group.resize = function () {
|
|
93
|
-
var
|
|
100
|
+
var textWidth = textContain.getWidth(opts.text, font);
|
|
101
|
+
var r = opts.showSpinner ? opts.spinnerRadius : 0;
|
|
102
|
+
// cx = (containerWidth - arcDiameter - textDistance - textWidth) / 2
|
|
103
|
+
// textDistance needs to be calculated when both animation and text exist
|
|
104
|
+
var cx = (api.getWidth() - r * 2 - (opts.showSpinner && textWidth ? 10 : 0) - textWidth) / 2
|
|
105
|
+
// only show the text
|
|
106
|
+
- (opts.showSpinner ? 0 : textWidth / 2);
|
|
94
107
|
var cy = api.getHeight() / 2;
|
|
95
|
-
arc.setShape({
|
|
108
|
+
opts.showSpinner && arc.setShape({
|
|
96
109
|
cx: cx,
|
|
97
110
|
cy: cy
|
|
98
111
|
});
|
|
99
|
-
var r = arc.shape.r;
|
|
100
112
|
labelRect.setShape({
|
|
101
113
|
x: cx - r,
|
|
102
114
|
y: cy - r,
|
|
Binary file
|
package/src/model/Series.js
CHANGED
|
@@ -62,11 +62,11 @@ var SeriesModel = ComponentModel.extend({
|
|
|
62
62
|
defaultOption: null,
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
66
|
-
* @type {
|
|
65
|
+
* legend visual provider to the legend component
|
|
66
|
+
* @type {Object}
|
|
67
67
|
*/
|
|
68
68
|
// PENDING
|
|
69
|
-
|
|
69
|
+
legendVisualProvider: null,
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* Access path of color for visual
|
|
@@ -584,7 +584,7 @@ function dataTaskReset(context) {
|
|
|
584
584
|
|
|
585
585
|
function dataTaskProgress(param, context) {
|
|
586
586
|
// Avoid repead cloneShallow when data just created in reset.
|
|
587
|
-
if (param.end > context.outputData.count()) {
|
|
587
|
+
if (context.outputData && param.end > context.outputData.count()) {
|
|
588
588
|
context.model.getRawData().cloneShallow(context.outputData);
|
|
589
589
|
}
|
|
590
590
|
}
|
package/src/model/referHelper.js
CHANGED
|
@@ -30,7 +30,8 @@ import {__DEV__} from '../config';
|
|
|
30
30
|
import {createHashMap, retrieve, each} from 'zrender/src/core/util';
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* @
|
|
33
|
+
* @class
|
|
34
|
+
* For example:
|
|
34
35
|
* {
|
|
35
36
|
* coordSysName: 'cartesian2d',
|
|
36
37
|
* coordSysDims: ['x', 'y', ...],
|
|
@@ -42,19 +43,41 @@ import {createHashMap, retrieve, each} from 'zrender/src/core/util';
|
|
|
42
43
|
* x: xAxisModel,
|
|
43
44
|
* y: undefined
|
|
44
45
|
* }),
|
|
45
|
-
* //
|
|
46
|
+
* // The index of the first category axis in `coordSysDims`.
|
|
47
|
+
* // `null/undefined` means no category axis exists.
|
|
46
48
|
* firstCategoryDimIndex: 1,
|
|
47
49
|
* // To replace user specified encode.
|
|
48
50
|
* }
|
|
49
51
|
*/
|
|
50
|
-
|
|
52
|
+
function CoordSysInfo(coordSysName) {
|
|
53
|
+
/**
|
|
54
|
+
* @type {string}
|
|
55
|
+
*/
|
|
56
|
+
this.coordSysName = coordSysName;
|
|
57
|
+
/**
|
|
58
|
+
* @type {Array.<string>}
|
|
59
|
+
*/
|
|
60
|
+
this.coordSysDims = [];
|
|
61
|
+
/**
|
|
62
|
+
* @type {module:zrender/core/util#HashMap}
|
|
63
|
+
*/
|
|
64
|
+
this.axisMap = createHashMap();
|
|
65
|
+
/**
|
|
66
|
+
* @type {module:zrender/core/util#HashMap}
|
|
67
|
+
*/
|
|
68
|
+
this.categoryAxisMap = createHashMap();
|
|
69
|
+
/**
|
|
70
|
+
* @type {number}
|
|
71
|
+
*/
|
|
72
|
+
this.firstCategoryDimIndex = null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @return {module:model/referHelper#CoordSysInfo}
|
|
77
|
+
*/
|
|
78
|
+
export function getCoordSysInfoBySeries(seriesModel) {
|
|
51
79
|
var coordSysName = seriesModel.get('coordinateSystem');
|
|
52
|
-
var result =
|
|
53
|
-
coordSysName: coordSysName,
|
|
54
|
-
coordSysDims: [],
|
|
55
|
-
axisMap: createHashMap(),
|
|
56
|
-
categoryAxisMap: createHashMap()
|
|
57
|
-
};
|
|
80
|
+
var result = new CoordSysInfo(coordSysName);
|
|
58
81
|
var fetch = fetchers[coordSysName];
|
|
59
82
|
if (fetch) {
|
|
60
83
|
fetch(seriesModel, result, result.axisMap, result.categoryAxisMap);
|
|
@@ -95,7 +118,7 @@ var fetchers = {
|
|
|
95
118
|
}
|
|
96
119
|
if (isCategory(yAxisModel)) {
|
|
97
120
|
categoryAxisMap.set('y', yAxisModel);
|
|
98
|
-
result.firstCategoryDimIndex = 1;
|
|
121
|
+
result.firstCategoryDimIndex == null & (result.firstCategoryDimIndex = 1);
|
|
99
122
|
}
|
|
100
123
|
},
|
|
101
124
|
|
|
@@ -141,7 +164,7 @@ var fetchers = {
|
|
|
141
164
|
}
|
|
142
165
|
if (isCategory(angleAxisModel)) {
|
|
143
166
|
categoryAxisMap.set('angle', angleAxisModel);
|
|
144
|
-
result.firstCategoryDimIndex = 1;
|
|
167
|
+
result.firstCategoryDimIndex == null && (result.firstCategoryDimIndex = 1);
|
|
145
168
|
}
|
|
146
169
|
},
|
|
147
170
|
|
|
Binary file
|
|
@@ -83,7 +83,7 @@ export default function (seriesType) {
|
|
|
83
83
|
var valueAxis = coordSys.getOtherAxis(baseAxis);
|
|
84
84
|
var extent = baseAxis.getExtent();
|
|
85
85
|
// Coordinste system has been resized
|
|
86
|
-
var size = extent[1] - extent[0];
|
|
86
|
+
var size = Math.abs(extent[1] - extent[0]);
|
|
87
87
|
var rate = Math.round(data.count() / size);
|
|
88
88
|
if (rate > 1) {
|
|
89
89
|
var sampler;
|
package/src/scale/Interval.js
CHANGED
|
@@ -81,12 +81,92 @@ var IntervalScale = Scale.extend({
|
|
|
81
81
|
},
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
|
+
* @param {boolean} [expandToNicedExtent=false] If expand the ticks to niced extent.
|
|
84
85
|
* @return {Array.<number>}
|
|
85
86
|
*/
|
|
86
|
-
getTicks: function () {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
getTicks: function (expandToNicedExtent) {
|
|
88
|
+
var interval = this._interval;
|
|
89
|
+
var extent = this._extent;
|
|
90
|
+
var niceTickExtent = this._niceExtent;
|
|
91
|
+
var intervalPrecision = this._intervalPrecision;
|
|
92
|
+
|
|
93
|
+
var ticks = [];
|
|
94
|
+
// If interval is 0, return [];
|
|
95
|
+
if (!interval) {
|
|
96
|
+
return ticks;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Consider this case: using dataZoom toolbox, zoom and zoom.
|
|
100
|
+
var safeLimit = 10000;
|
|
101
|
+
|
|
102
|
+
if (extent[0] < niceTickExtent[0]) {
|
|
103
|
+
if (expandToNicedExtent) {
|
|
104
|
+
ticks.push(roundNumber(niceTickExtent[0] - interval, intervalPrecision));
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
ticks.push(extent[0]);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
var tick = niceTickExtent[0];
|
|
111
|
+
|
|
112
|
+
while (tick <= niceTickExtent[1]) {
|
|
113
|
+
ticks.push(tick);
|
|
114
|
+
// Avoid rounding error
|
|
115
|
+
tick = roundNumber(tick + interval, intervalPrecision);
|
|
116
|
+
if (tick === ticks[ticks.length - 1]) {
|
|
117
|
+
// Consider out of safe float point, e.g.,
|
|
118
|
+
// -3711126.9907707 + 2e-10 === -3711126.9907707
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
if (ticks.length > safeLimit) {
|
|
122
|
+
return [];
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Consider this case: the last item of ticks is smaller
|
|
126
|
+
// than niceTickExtent[1] and niceTickExtent[1] === extent[1].
|
|
127
|
+
var lastNiceTick = ticks.length ? ticks[ticks.length - 1] : niceTickExtent[1];
|
|
128
|
+
if (extent[1] > lastNiceTick) {
|
|
129
|
+
if (expandToNicedExtent) {
|
|
130
|
+
ticks.push(roundNumber(lastNiceTick + interval, intervalPrecision));
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
ticks.push(extent[1]);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return ticks;
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @param {number} [splitNumber=5]
|
|
142
|
+
* @return {Array.<Array.<number>>}
|
|
143
|
+
*/
|
|
144
|
+
getMinorTicks: function (splitNumber) {
|
|
145
|
+
var ticks = this.getTicks(true);
|
|
146
|
+
var minorTicks = [];
|
|
147
|
+
var extent = this.getExtent();
|
|
148
|
+
|
|
149
|
+
for (var i = 1; i < ticks.length; i++) {
|
|
150
|
+
var nextTick = ticks[i];
|
|
151
|
+
var prevTick = ticks[i - 1];
|
|
152
|
+
var count = 0;
|
|
153
|
+
var minorTicksGroup = [];
|
|
154
|
+
var interval = nextTick - prevTick;
|
|
155
|
+
var minorInterval = interval / splitNumber;
|
|
156
|
+
|
|
157
|
+
while (count < splitNumber - 1) {
|
|
158
|
+
var minorTick = numberUtil.round(prevTick + (count + 1) * minorInterval);
|
|
159
|
+
|
|
160
|
+
// For the first and last interval. The count may be less than splitNumber.
|
|
161
|
+
if (minorTick > extent[0] && minorTick < extent[1]) {
|
|
162
|
+
minorTicksGroup.push(minorTick);
|
|
163
|
+
}
|
|
164
|
+
count++;
|
|
165
|
+
}
|
|
166
|
+
minorTicks.push(minorTicksGroup);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return minorTicks;
|
|
90
170
|
},
|
|
91
171
|
|
|
92
172
|
/**
|
package/src/scale/Log.js
CHANGED
|
@@ -53,14 +53,15 @@ var LogScale = Scale.extend({
|
|
|
53
53
|
},
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
+
* @param {boolean} [expandToNicedExtent=false] If expand the ticks to niced extent.
|
|
56
57
|
* @return {Array.<number>}
|
|
57
58
|
*/
|
|
58
|
-
getTicks: function () {
|
|
59
|
+
getTicks: function (expandToNicedExtent) {
|
|
59
60
|
var originalScale = this._originalScale;
|
|
60
61
|
var extent = this._extent;
|
|
61
62
|
var originalExtent = originalScale.getExtent();
|
|
62
63
|
|
|
63
|
-
return zrUtil.map(intervalScaleProto.getTicks.call(this), function (val) {
|
|
64
|
+
return zrUtil.map(intervalScaleProto.getTicks.call(this, expandToNicedExtent), function (val) {
|
|
64
65
|
var powVal = numberUtil.round(mathPow(this.base, val));
|
|
65
66
|
|
|
66
67
|
// Fix #4158
|
|
@@ -75,6 +76,12 @@ var LogScale = Scale.extend({
|
|
|
75
76
|
}, this);
|
|
76
77
|
},
|
|
77
78
|
|
|
79
|
+
/**
|
|
80
|
+
* @param {number} splitNumber
|
|
81
|
+
* @return {Array.<Array.<number>>}
|
|
82
|
+
*/
|
|
83
|
+
getMinorTicks: intervalScaleProto.getMinorTicks,
|
|
84
|
+
|
|
78
85
|
/**
|
|
79
86
|
* @param {number} val
|
|
80
87
|
* @return {string}
|
package/src/scale/helper.js
CHANGED
|
@@ -79,42 +79,4 @@ export function fixExtent(niceTickExtent, extent) {
|
|
|
79
79
|
if (niceTickExtent[0] > niceTickExtent[1]) {
|
|
80
80
|
niceTickExtent[0] = niceTickExtent[1];
|
|
81
81
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export function intervalScaleGetTicks(interval, extent, niceTickExtent, intervalPrecision) {
|
|
85
|
-
var ticks = [];
|
|
86
|
-
|
|
87
|
-
// If interval is 0, return [];
|
|
88
|
-
if (!interval) {
|
|
89
|
-
return ticks;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// Consider this case: using dataZoom toolbox, zoom and zoom.
|
|
93
|
-
var safeLimit = 10000;
|
|
94
|
-
|
|
95
|
-
if (extent[0] < niceTickExtent[0]) {
|
|
96
|
-
ticks.push(extent[0]);
|
|
97
|
-
}
|
|
98
|
-
var tick = niceTickExtent[0];
|
|
99
|
-
|
|
100
|
-
while (tick <= niceTickExtent[1]) {
|
|
101
|
-
ticks.push(tick);
|
|
102
|
-
// Avoid rounding error
|
|
103
|
-
tick = roundNumber(tick + interval, intervalPrecision);
|
|
104
|
-
if (tick === ticks[ticks.length - 1]) {
|
|
105
|
-
// Consider out of safe float point, e.g.,
|
|
106
|
-
// -3711126.9907707 + 2e-10 === -3711126.9907707
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
if (ticks.length > safeLimit) {
|
|
110
|
-
return [];
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
// Consider this case: the last item of ticks is smaller
|
|
114
|
-
// than niceTickExtent[1] and niceTickExtent[1] === extent[1].
|
|
115
|
-
if (extent[1] > (ticks.length ? ticks[ticks.length - 1] : niceTickExtent[1])) {
|
|
116
|
-
ticks.push(extent[1]);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return ticks;
|
|
120
|
-
}
|
|
82
|
+
}
|
package/src/stream/Scheduler.js
CHANGED
|
@@ -65,7 +65,7 @@ var proto = Scheduler.prototype;
|
|
|
65
65
|
* @param {Object} payload
|
|
66
66
|
*/
|
|
67
67
|
proto.restoreData = function (ecModel, payload) {
|
|
68
|
-
// TODO: Only
|
|
68
|
+
// TODO: Only restore needed series and components, but not all components.
|
|
69
69
|
// Currently `restoreData` of all of the series and component will be called.
|
|
70
70
|
// But some independent components like `title`, `legend`, `graphic`, `toolbox`,
|
|
71
71
|
// `tooltip`, `axisPointer`, etc, do not need series refresh when `setOption`,
|
|
@@ -260,6 +260,14 @@ function performStageTasks(scheduler, stageHandlers, ecModel, payload, opt) {
|
|
|
260
260
|
task.dirty();
|
|
261
261
|
}
|
|
262
262
|
var performArgs = scheduler.getPerformArgs(task, opt.block);
|
|
263
|
+
// FIXME
|
|
264
|
+
// if intending to decalare `performRawSeries` in handlers, only
|
|
265
|
+
// stream-independent (specifically, data item independent) operations can be
|
|
266
|
+
// performed. Because is a series is filtered, most of the tasks will not
|
|
267
|
+
// be performed. A stream-dependent operation probably cause wrong biz logic.
|
|
268
|
+
// Perhaps we should not provide a separate callback for this case instead
|
|
269
|
+
// of providing the config `performRawSeries`. The stream-dependent operaions
|
|
270
|
+
// and stream-independent operations should better not be mixed.
|
|
263
271
|
performArgs.skip = !stageHandler.performRawSeries
|
|
264
272
|
&& ecModel.isSeriesFiltered(task.context.model);
|
|
265
273
|
updatePayload(task, payload);
|
package/src/theme/dark.js
CHANGED
|
Binary file
|
package/src/util/format.js
CHANGED
|
@@ -23,7 +23,7 @@ import * as numberUtil from './number';
|
|
|
23
23
|
// import Text from 'zrender/src/graphic/Text';
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* add commas after every three numbers
|
|
27
27
|
* @param {string|number} x
|
|
28
28
|
* @return {string}
|
|
29
29
|
*/
|
|
@@ -275,3 +275,19 @@ export function getTextRect(
|
|
|
275
275
|
text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate
|
|
276
276
|
);
|
|
277
277
|
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* open new tab
|
|
281
|
+
* @param {string} link url
|
|
282
|
+
* @param {string} target blank or self
|
|
283
|
+
*/
|
|
284
|
+
export function windowOpen(link, target) {
|
|
285
|
+
if (target === '_blank' || target === 'blank') {
|
|
286
|
+
var blank = window.open();
|
|
287
|
+
blank.opener = null;
|
|
288
|
+
blank.location = link;
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
window.open(link, target);
|
|
292
|
+
}
|
|
293
|
+
}
|