From a5ad5debafffeea84ae8d246f15aa303b297782c Mon Sep 17 00:00:00 2001 From: plainheart Date: Sun, 23 Jan 2022 01:49:08 +0800 Subject: [PATCH 01/36] fix(heatmap): add 0.5px to avoid the gaps in Cartesian 2D coordinate system when dpr is not an integer. --- src/chart/heatmap/HeatmapView.ts | 20 +++++++++++--------- test/heatmap-gap-bug.html | 6 +++++- test/heatmap-large.html | 8 ++++++-- test/runTest/actions/__meta__.json | 1 + test/runTest/actions/heatmap-gap-bug.json | 1 + 5 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 test/runTest/actions/heatmap-gap-bug.json diff --git a/src/chart/heatmap/HeatmapView.ts b/src/chart/heatmap/HeatmapView.ts index 253fe50e6a..f366905073 100644 --- a/src/chart/heatmap/HeatmapView.ts +++ b/src/chart/heatmap/HeatmapView.ts @@ -175,12 +175,13 @@ class HeatmapView extends ChartView { ) { const coordSys = seriesModel.coordinateSystem as Cartesian2D | Calendar; + const isCartesian2d = isCoordinateSystemType(coordSys, 'cartesian2d'); let width; let height; let xAxisExtent; let yAxisExtent; - if (isCoordinateSystemType(coordSys, 'cartesian2d')) { + if (isCartesian2d) { const xAxis = coordSys.getAxis('x'); const yAxis = coordSys.getAxis('y'); @@ -193,8 +194,9 @@ class HeatmapView extends ChartView { } } - width = xAxis.getBandWidth(); - height = yAxis.getBandWidth(); + // add 0.5px to avoid the gaps + width = xAxis.getBandWidth() + .5; + height = yAxis.getBandWidth() + .5; xAxisExtent = xAxis.scale.getExtent(); yAxisExtent = yAxis.scale.getExtent(); } @@ -211,7 +213,7 @@ class HeatmapView extends ChartView { let blurScope = emphasisModel.get('blurScope'); let emphasisDisabled = emphasisModel.get('disabled'); - const dataDims = isCoordinateSystemType(coordSys, 'cartesian2d') + const dataDims = isCartesian2d ? [ data.mapDimension('x'), data.mapDimension('y'), @@ -226,7 +228,7 @@ class HeatmapView extends ChartView { let rect; const style = data.getItemVisual(idx, 'style'); - if (isCoordinateSystemType(coordSys, 'cartesian2d')) { + if (isCartesian2d) { const dataDimX = data.get(dataDims[0], idx); const dataDimY = data.get(dataDims[1], idx); @@ -247,10 +249,10 @@ class HeatmapView extends ChartView { rect = new graphic.Rect({ shape: { - x: Math.floor(Math.round(point[0]) - width / 2), - y: Math.floor(Math.round(point[1]) - height / 2), - width: Math.ceil(width), - height: Math.ceil(height) + x: point[0] - width / 2, + y: point[1] - height / 2, + width, + height }, style }); diff --git a/test/heatmap-gap-bug.html b/test/heatmap-gap-bug.html index a6793b0f12..1fd6b73dfe 100644 --- a/test/heatmap-gap-bug.html +++ b/test/heatmap-gap-bug.html @@ -97,7 +97,11 @@ - \ No newline at end of file + diff --git a/test/runTest/actions/__meta__.json b/test/runTest/actions/__meta__.json index a20b5533ac..81336054f2 100644 --- a/test/runTest/actions/__meta__.json +++ b/test/runTest/actions/__meta__.json @@ -103,6 +103,7 @@ "graphic-draggable": 1, "graphic-transition": 3, "heatmap": 1, + "heatmap-gap-bug": 1, "heatmap-map": 1, "homepage3": 1, "hoverFocus": 12, diff --git a/test/runTest/actions/heatmap-gap-bug.json b/test/runTest/actions/heatmap-gap-bug.json new file mode 100644 index 0000000000..5a3cfca338 --- /dev/null +++ b/test/runTest/actions/heatmap-gap-bug.json @@ -0,0 +1 @@ +[{"name":"Action 1","ops":[{"type":"mousedown","time":482,"x":413,"y":595},{"type":"mouseup","time":1742,"x":454,"y":595},{"time":1743,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1772,"x":454,"y":595}],"scrollY":0,"scrollX":0,"timestamp":1642876188713}] \ No newline at end of file From 61ef71c4bf13e5d71011561773f658f567205308 Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Sat, 19 Feb 2022 00:05:43 +0800 Subject: [PATCH 02/36] fix(labelLine): update labelLine `ignore` --- src/chart/pie/PieView.ts | 11 ++++++-- test/pie-label.html | 59 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/src/chart/pie/PieView.ts b/src/chart/pie/PieView.ts index 9118f9267b..f4deb1282b 100644 --- a/src/chart/pie/PieView.ts +++ b/src/chart/pie/PieView.ts @@ -58,6 +58,7 @@ class PiePiece extends graphic.Sector { const seriesModel = data.hostModel as PieSeriesModel; const itemModel = data.getItemModel(idx); const emphasisModel = itemModel.getModel('emphasis'); + const selectModel = itemModel.getModel('select'); const layout = data.getItemLayout(idx) as graphic.Sector['shape']; // cornerRadius & innerCornerRadius doesn't exist in the item layout. Use `0` if null value is specified. // see `setItemLayout` in `pieLayout.ts`. @@ -154,14 +155,20 @@ class PiePiece extends graphic.Sector { const labelLine = sector.getTextGuideLine(); const labelText = sector.getTextContent(); + labelLine && extend(labelLine.ensureState('emphasis'), { + ignore: !emphasisModel.get(['labelLine', 'show']) + }); + labelLine && extend(labelLine.ensureState('select'), { x: dx, - y: dy + y: dy, + ignore: !selectModel.get(['labelLine', 'show']) }); // TODO: needs dx, dy in zrender? extend(labelText.ensureState('select'), { x: dx, - y: dy + y: dy, + ignore: !selectModel.get(['label', 'show']) }); toggleHoverEmphasis( diff --git a/test/pie-label.html b/test/pie-label.html index 0d1c0c4dbb..85541efd72 100644 --- a/test/pie-label.html +++ b/test/pie-label.html @@ -50,6 +50,7 @@
+
+ + From a411087dfd5b1564a024c06b930c3bfc2824d597 Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Sun, 27 Feb 2022 23:51:49 +0800 Subject: [PATCH 03/36] fix(sanky):fallback to black if color were illegal --- src/visual/VisualMapping.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/visual/VisualMapping.ts b/src/visual/VisualMapping.ts index 16c7394229..2af648c4de 100644 --- a/src/visual/VisualMapping.ts +++ b/src/visual/VisualMapping.ts @@ -28,6 +28,7 @@ import { VisualOptionUnit, ParsedValue } from '../util/types'; +import { warn } from '../util/log'; const each = zrUtil.each; const isObject = zrUtil.isObject; @@ -693,7 +694,11 @@ function setVisualToOption(thisOption: VisualMappingInnerOption, visualArr: Visu thisOption.visual = visualArr; if (thisOption.type === 'color') { thisOption.parsedVisual = zrUtil.map(visualArr, function (item: string) { - return zrColor.parse(item); + const color = zrColor.parse(item); + if (!color && __DEV__) { + warn(`'${item}' is an illegal color, fallback to '#000000'`, true); + } + return zrColor.parse(item) || [0, 0, 0, 1]; }); } return visualArr; From c572d102c2804bfde33abbe0e4fea34a9ec6b199 Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Wed, 2 Mar 2022 22:59:17 +0800 Subject: [PATCH 04/36] fix(sankey): return cached value --- src/visual/VisualMapping.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/visual/VisualMapping.ts b/src/visual/VisualMapping.ts index 2af648c4de..8898bc7b06 100644 --- a/src/visual/VisualMapping.ts +++ b/src/visual/VisualMapping.ts @@ -698,7 +698,7 @@ function setVisualToOption(thisOption: VisualMappingInnerOption, visualArr: Visu if (!color && __DEV__) { warn(`'${item}' is an illegal color, fallback to '#000000'`, true); } - return zrColor.parse(item) || [0, 0, 0, 1]; + return color || [0, 0, 0, 1]; }); } return visualArr; From 9e636f9499a0be1fcaf87937692a5796bb3d8710 Mon Sep 17 00:00:00 2001 From: Ovilia Date: Mon, 7 Mar 2022 10:58:10 +0800 Subject: [PATCH 05/36] chore: add vote result template in the release materials --- .../source-release/prepareReleaseMaterials.js | 9 ++++++++ build/source-release/template/vote-result.tpl | 23 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 build/source-release/template/vote-result.tpl diff --git a/build/source-release/prepareReleaseMaterials.js b/build/source-release/prepareReleaseMaterials.js index cb96d5e301..90c98fd729 100644 --- a/build/source-release/prepareReleaseMaterials.js +++ b/build/source-release/prepareReleaseMaterials.js @@ -82,6 +82,7 @@ console.log('[Release Commit] ' + releaseCommit); console.log('[Release Name] ' + releaseFullName); const voteTpl = fse.readFileSync(pathTool.join(__dirname, './template/vote-release.tpl'), 'utf-8'); +const voteResultTpl = fse.readFileSync(pathTool.join(__dirname, './template/vote-result.tpl'), 'utf-8'); const announceTpl = fse.readFileSync(pathTool.join(__dirname, './template/announce-release.tpl'), 'utf-8'); const voteUntil = new Date(+new Date() + (72 + 12) * 3600 * 1000); // 3.5 day. @@ -95,6 +96,14 @@ fse.writeFileSync( 'utf-8' ); +fse.ensureDirSync(outDir); +fse.writeFileSync( + pathTool.resolve(outDir, 'vote-result.txt'), + voteResultTpl.replace(/{{ECHARTS_RELEASE_VERSION}}/g, rcVersion) + .replace(/{{ECHARTS_RELEASE_VERSION_FULL_NAME}}/g, releaseFullName), + 'utf-8' +); + fse.writeFileSync( pathTool.resolve(outDir, 'announce.txt'), announceTpl.replace(/{{ECHARTS_RELEASE_VERSION}}/g, stableVersion) diff --git a/build/source-release/template/vote-result.tpl b/build/source-release/template/vote-result.tpl new file mode 100644 index 0000000000..e757ab5e04 --- /dev/null +++ b/build/source-release/template/vote-result.tpl @@ -0,0 +1,23 @@ +--- Mail To: --- +dev@echarts.apache.org +----------------------------------------------------------- + +--- Subject: --- +[RESULT] [VOTE] Release {{ECHARTS_RELEASE_VERSION_FULL_NAME}} +----------------------------------------------------------- + +Thanks to all who voted or provided comments! + +We received 3 +1 votes from the PMC members, and the release has PASSED: + ++1 xxx (binding) + +Other votes from the community: + ++1 xxx + +Vote thread: +https://lists.apache.org/thread/xxx + +I'm going to release the source release of Apache ECharts {{ECHARTS_RELEASE_VERSION}}. +Thank you all for making this happen! From 13a85f2b713684acbcfdf37971dca97093f9c562 Mon Sep 17 00:00:00 2001 From: Ovilia Date: Mon, 7 Mar 2022 12:46:41 +0800 Subject: [PATCH 06/36] chore: update template --- build/source-release/template/vote-result.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/source-release/template/vote-result.tpl b/build/source-release/template/vote-result.tpl index e757ab5e04..4a92d738b2 100644 --- a/build/source-release/template/vote-result.tpl +++ b/build/source-release/template/vote-result.tpl @@ -8,13 +8,13 @@ dev@echarts.apache.org Thanks to all who voted or provided comments! -We received 3 +1 votes from the PMC members, and the release has PASSED: +We received ______NUMBER_OF_+1_VOTES______ +1 votes from the PMC members, and the release has PASSED: -+1 xxx (binding) ++1 ______NAME______ (binding) Other votes from the community: -+1 xxx ++1 ______NAME______ Vote thread: https://lists.apache.org/thread/xxx From 69a04d220a29cd5c43adb7b923701b5a87123a41 Mon Sep 17 00:00:00 2001 From: suyan Date: Tue, 8 Mar 2022 14:43:38 +0800 Subject: [PATCH 07/36] source code format (#16644) --- src/chart/bar/PictorialBarSeries.ts | 1 - src/chart/line/LineSeries.ts | 2 +- src/chart/tree/TreeView.ts | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/chart/bar/PictorialBarSeries.ts b/src/chart/bar/PictorialBarSeries.ts index 17191b639c..9ee0517ff9 100644 --- a/src/chart/bar/PictorialBarSeries.ts +++ b/src/chart/bar/PictorialBarSeries.ts @@ -128,7 +128,6 @@ class PictorialBarSeriesModel extends BaseBarSeriesModel { divideShape: 'clone' }, - triggerLineEvent: false, + triggerLineEvent: false }; getLegendIcon(opt: LegendIconParams): ECSymbol | Group { diff --git a/src/chart/tree/TreeView.ts b/src/chart/tree/TreeView.ts index 1a20497051..1c240fde97 100644 --- a/src/chart/tree/TreeView.ts +++ b/src/chart/tree/TreeView.ts @@ -141,8 +141,6 @@ class TreeView extends ChartView { private _max: number[]; init(ecModel: GlobalModel, api: ExtensionAPI) { - - this._controller = new RoamController(api.getZr()); this._controllerHost = { From 5d3e06f5db50e2332d12b0d911d45d5b4f5d066a Mon Sep 17 00:00:00 2001 From: plainheart Date: Wed, 9 Mar 2022 11:28:29 +0800 Subject: [PATCH 08/36] fix(gauge): fix progress bar may be unexpectedly circle when value is `0` and `progress.roundCap` is enabled, resolves #16640. --- src/chart/gauge/GaugeView.ts | 17 ++++------ test/gauge-case.html | 65 ++++++++++++++++++++++++++++++++++-- 2 files changed, 70 insertions(+), 12 deletions(-) diff --git a/src/chart/gauge/GaugeView.ts b/src/chart/gauge/GaugeView.ts index f9fd24ddf9..b646607d75 100644 --- a/src/chart/gauge/GaugeView.ts +++ b/src/chart/gauge/GaugeView.ts @@ -33,6 +33,7 @@ import {createSymbol} from '../../util/symbol'; import ZRImage from 'zrender/src/graphic/Image'; import {extend, isFunction, isString} from 'zrender/src/core/util'; import {setCommonECData} from '../../util/innerStore'; +import { normalizeArcAngles } from 'zrender/src/core/PathProxy'; type ECSymbol = ReturnType; @@ -72,8 +73,6 @@ function formatLabel(value: number, labelFormatter: string | ((value: number) => return label; } -const PI2 = Math.PI * 2; - class GaugeView extends ChartView { static type = 'gauge' as const; type = GaugeView.type; @@ -119,8 +118,12 @@ class GaugeView extends ChartView { const showAxis = axisLineModel.get('show'); const lineStyleModel = axisLineModel.getModel('lineStyle'); const axisLineWidth = lineStyleModel.get('width'); - const angleRangeSpan = !((endAngle - startAngle) % PI2) && endAngle !== startAngle - ? PI2 : (endAngle - startAngle) % PI2; + + const angles = [startAngle, endAngle]; + normalizeArcAngles(angles, !clockwise); + startAngle = angles[0]; + endAngle = angles[1]; + const angleRangeSpan = endAngle - startAngle; let prevEndAngle = startAngle; @@ -173,12 +176,6 @@ class GaugeView extends ChartView { return colorList[i - 1][1]; }; - if (!clockwise) { - const tmp = startAngle; - startAngle = endAngle; - endAngle = tmp; - } - this._renderTicks( seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth diff --git a/test/gauge-case.html b/test/gauge-case.html index 30bd029072..94f8bd5626 100644 --- a/test/gauge-case.html +++ b/test/gauge-case.html @@ -37,8 +37,8 @@
- - +
+
+ + + + From d491f7c67f92e596ab897844bd0e5a9b276ff45a Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Wed, 9 Mar 2022 21:01:15 +0800 Subject: [PATCH 09/36] feat(event-tree): add `isExpand` to `click` cb --- src/chart/tree/TreeSeries.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/chart/tree/TreeSeries.ts b/src/chart/tree/TreeSeries.ts index 53768bd3a0..0e37fb7c35 100644 --- a/src/chart/tree/TreeSeries.ts +++ b/src/chart/tree/TreeSeries.ts @@ -121,6 +121,7 @@ export interface TreeAncestors { } export interface TreeSeriesCallbackDataParams extends CallbackDataParams { + isExpand: boolean; treeAncestors?: TreeAncestors[] } @@ -240,6 +241,7 @@ class TreeSeriesModel extends SeriesModel { const node = this.getData().tree.getNodeByDataIndex(dataIndex); params.treeAncestors = wrapTreePathInfo(node, this); + params.isExpand = node.isExpand; return params; } From 5461c3b907d4950c0a35f3efe1c5bb7e3f6ab1e4 Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Fri, 11 Mar 2022 10:14:32 +0800 Subject: [PATCH 10/36] feat(tree): repalce `isExpand` with `collapsed` --- src/chart/tree/TreeSeries.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chart/tree/TreeSeries.ts b/src/chart/tree/TreeSeries.ts index 0e37fb7c35..a8391c58fa 100644 --- a/src/chart/tree/TreeSeries.ts +++ b/src/chart/tree/TreeSeries.ts @@ -121,7 +121,7 @@ export interface TreeAncestors { } export interface TreeSeriesCallbackDataParams extends CallbackDataParams { - isExpand: boolean; + collapsed: boolean; treeAncestors?: TreeAncestors[] } @@ -241,7 +241,7 @@ class TreeSeriesModel extends SeriesModel { const node = this.getData().tree.getNodeByDataIndex(dataIndex); params.treeAncestors = wrapTreePathInfo(node, this); - params.isExpand = node.isExpand; + params.collapsed = node.isExpand; return params; } From a865d4405ee595004e2cd7971a718a1216bb4e32 Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Fri, 11 Mar 2022 10:50:37 +0800 Subject: [PATCH 11/36] fix(tree): `collapsed` value is wrong --- src/chart/tree/TreeSeries.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chart/tree/TreeSeries.ts b/src/chart/tree/TreeSeries.ts index a8391c58fa..03d85113d4 100644 --- a/src/chart/tree/TreeSeries.ts +++ b/src/chart/tree/TreeSeries.ts @@ -241,7 +241,7 @@ class TreeSeriesModel extends SeriesModel { const node = this.getData().tree.getNodeByDataIndex(dataIndex); params.treeAncestors = wrapTreePathInfo(node, this); - params.collapsed = node.isExpand; + params.collapsed = !node.isExpand; return params; } From a08c1042e9da7cea6fd3c85612774a2d052d1c39 Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Sat, 12 Mar 2022 16:13:38 +0800 Subject: [PATCH 12/36] fix(state): comp `isBlured` is true when blur --- src/util/states.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/states.ts b/src/util/states.ts index d247cb62b4..e6d313977d 100644 --- a/src/util/states.ts +++ b/src/util/states.ts @@ -520,6 +520,7 @@ export function blurSeries( } const view = api.getViewOfComponentModel(componentModel); if (view && view.blurSeries) { + getComponentStates(componentModel).isBlured = true; view.blurSeries(blurredSeries, ecModel); } }); From 20437bb15a04632bad66d2105aa440a9de5eab7f Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Sat, 12 Mar 2022 16:28:12 +0800 Subject: [PATCH 13/36] test(markPoint): add test case --- test/markPoint.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/markPoint.html b/test/markPoint.html index bf42fbaa07..f4ca85f12f 100644 --- a/test/markPoint.html +++ b/test/markPoint.html @@ -89,7 +89,9 @@ symbolSize: 6, areaStyle: {normal: {}}, data: data1, - + emphasis: { + focus: 'series' + }, markPoint: { data: [ { From fd4285da14fe88b97fe749f89c79cafc8df7d2fa Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Sat, 12 Mar 2022 23:04:18 +0800 Subject: [PATCH 14/36] fix(marker): marker leave blur --- src/component/marker/MarkerView.ts | 19 ++++++++++++++++++- src/util/states.ts | 13 +++++++++---- src/view/Component.ts | 8 ++++++++ 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/component/marker/MarkerView.ts b/src/component/marker/MarkerView.ts index 9af63e3760..3dfde52ebd 100644 --- a/src/component/marker/MarkerView.ts +++ b/src/component/marker/MarkerView.ts @@ -25,7 +25,7 @@ import ExtensionAPI from '../../core/ExtensionAPI'; import { makeInner } from '../../util/model'; import SeriesModel from '../../model/Series'; import Group from 'zrender/src/graphic/Group'; -import { enterBlur } from '../../util/states'; +import { enterBlur, leaveBlur } from '../../util/states'; const inner = makeInner<{ keep: boolean @@ -88,6 +88,23 @@ abstract class MarkerView extends ComponentView { }); } + leaveBlurSeries(seriesModelList: SeriesModel[]) { + each(seriesModelList, seriesModel => { + const markerModel = MarkerModel.getMarkerModelFromSeries( + seriesModel, + this.type as 'markPoint' | 'markLine' | 'markArea' + ); + if (markerModel) { + const data = markerModel.getData(); + data.eachItemGraphicEl(function (el) { + if (el) { + leaveBlur(el); + } + }); + } + }); + } + abstract renderSeries( seriesModel: SeriesModel, markerModel: MarkerModel, diff --git a/src/util/states.ts b/src/util/states.ts index e6d313977d..9c323ece47 100644 --- a/src/util/states.ts +++ b/src/util/states.ts @@ -61,6 +61,7 @@ import GlobalModel from '../model/Global'; import ExtensionAPI from '../core/ExtensionAPI'; import ComponentModel from '../model/Component'; import { error } from './log'; +import type ComponentView from '../view/Component'; // Reserve 0 as default. let _highlightNextDigit = 1; @@ -427,17 +428,22 @@ function shouldSilent(el: Element, e: ElementEvent) { export function allLeaveBlur(api: ExtensionAPI) { const model = api.getModel(); + const leaveBlurredSeries: SeriesModel[] = []; model.eachComponent(function (componentType, componentModel) { const componentStates = getComponentStates(componentModel); + const view = componentType === 'series' + ? api.getViewOfSeriesModel(componentModel as SeriesModel) + : api.getViewOfComponentModel(componentModel); + componentType === 'series' && leaveBlurredSeries.push(componentModel as SeriesModel); if (componentStates.isBlured) { - const view = componentType === 'series' - ? api.getViewOfSeriesModel(componentModel as SeriesModel) - : api.getViewOfComponentModel(componentModel); // Leave blur anyway view.group.traverse(function (child) { singleLeaveBlur(child); }); } + if (view && (view as ComponentView).leaveBlurSeries) { + (view as ComponentView).leaveBlurSeries(leaveBlurredSeries, model); + } componentStates.isBlured = false; }); } @@ -520,7 +526,6 @@ export function blurSeries( } const view = api.getViewOfComponentModel(componentModel); if (view && view.blurSeries) { - getComponentStates(componentModel).isBlured = true; view.blurSeries(blurredSeries, ecModel); } }); diff --git a/src/view/Component.ts b/src/view/Component.ts index 1c729a1ee3..2c597bc758 100644 --- a/src/view/Component.ts +++ b/src/view/Component.ts @@ -114,6 +114,14 @@ class ComponentView { // Do nothing; } + /** + * Hook for leaving blur target series. + * Can be used in marker for leaving blur the markers + */ + leaveBlurSeries(seriesModels: SeriesModel[], ecModel: GlobalModel): void { + // Do nothing; + } + /** * Traverse the new rendered elements. * From 0e60839d122bc4f728dcdf6977e5d5c847dba5e8 Mon Sep 17 00:00:00 2001 From: Junhao Zhange <1479553491@qq.com> Date: Sun, 13 Mar 2022 20:22:52 +0800 Subject: [PATCH 15/36] fix(OrdinalScale): fix line graph renders null value incorrectly. close #16664 --- src/scale/Ordinal.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scale/Ordinal.ts b/src/scale/Ordinal.ts index eb532bdf8d..7763d9bece 100644 --- a/src/scale/Ordinal.ts +++ b/src/scale/Ordinal.ts @@ -130,6 +130,10 @@ class OrdinalScale extends Scale { } parse(val: OrdinalRawValue | OrdinalNumber): OrdinalNumber { + // Caution: Math.round(null) will return `0` rather than `NaN` + if (val == null) { + val = undefined; + } return isString(val) ? this._ordinalMeta.getOrdinal(val) // val might be float. From ba060b2d92ab84d5be874a0ebbb89df1e804f011 Mon Sep 17 00:00:00 2001 From: Junhao Zhange <1479553491@qq.com> Date: Sun, 13 Mar 2022 20:22:52 +0800 Subject: [PATCH 16/36] fix(OrdinalScale): fix line graph renders null value incorrectly. close #16664 --- src/scale/Ordinal.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scale/Ordinal.ts b/src/scale/Ordinal.ts index eb532bdf8d..dd7d255c88 100644 --- a/src/scale/Ordinal.ts +++ b/src/scale/Ordinal.ts @@ -130,6 +130,10 @@ class OrdinalScale extends Scale { } parse(val: OrdinalRawValue | OrdinalNumber): OrdinalNumber { + // Caution: Math.round(null) will return `0` rather than `NaN` + if (val == null) { + return NaN; + } return isString(val) ? this._ordinalMeta.getOrdinal(val) // val might be float. From 3d8e2557450f090e0ceb5a185f9756a12af95a3b Mon Sep 17 00:00:00 2001 From: fuchunhui Date: Mon, 14 Mar 2022 17:03:23 +0800 Subject: [PATCH 17/36] fix(visualmap): add textShadowColor, make text shadow work on visualMap. close #14440 --- src/component/visualMap/ContinuousView.ts | 4 +- src/component/visualMap/PiecewiseView.ts | 6 +- src/model/mixin/textStyle.ts | 11 ++ test/visualMap-continuous.html | 171 ++++++++-------------- test/visualMap-pieces.html | 158 +++++++------------- 5 files changed, 132 insertions(+), 218 deletions(-) diff --git a/src/component/visualMap/ContinuousView.ts b/src/component/visualMap/ContinuousView.ts index 4b9e959487..49b94702d7 100644 --- a/src/component/visualMap/ContinuousView.ts +++ b/src/component/visualMap/ContinuousView.ts @@ -182,6 +182,7 @@ class ContinuousView extends VisualMapView { ); const orient = this._orient; const textStyleModel = this.visualMapModel.textStyleModel; + const textShadow = textStyleModel.getTextShadow(); this.group.add(new graphic.Text({ style: { @@ -191,7 +192,8 @@ class ContinuousView extends VisualMapView { align: orient === 'horizontal' ? align as TextAlign : 'center', text: text, font: textStyleModel.getFont(), - fill: textStyleModel.getTextColor() + fill: textStyleModel.getTextColor(), + ...textShadow } })); } diff --git a/src/component/visualMap/PiecewiseView.ts b/src/component/visualMap/PiecewiseView.ts index c62b27e2c0..d4f1c6bac1 100644 --- a/src/component/visualMap/PiecewiseView.ts +++ b/src/component/visualMap/PiecewiseView.ts @@ -101,8 +101,6 @@ class PiecewiseVisualMapView extends VisualMapView { this.renderBackground(thisGroup); this.positionGroup(thisGroup); - - } private _enableHoverLink(itemGroup: graphic.Group, pieceIndex: number) { @@ -155,6 +153,7 @@ class PiecewiseVisualMapView extends VisualMapView { const itemGroup = new graphic.Group(); const textStyleModel = this.visualMapModel.textStyleModel; + const textShadow = textStyleModel.getTextShadow(); itemGroup.add(new graphic.Text({ style: { @@ -164,7 +163,8 @@ class PiecewiseVisualMapView extends VisualMapView { align: showLabel ? (itemAlign as TextAlign) : 'center', text: text, font: textStyleModel.getFont(), - fill: textStyleModel.getTextColor() + fill: textStyleModel.getTextColor(), + ...textShadow } })); diff --git a/src/model/mixin/textStyle.ts b/src/model/mixin/textStyle.ts index 6c5cce9a3f..054405f4ea 100644 --- a/src/model/mixin/textStyle.ts +++ b/src/model/mixin/textStyle.ts @@ -35,6 +35,8 @@ const textStyleParams = [ 'fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'padding', 'lineHeight', 'rich', 'width', 'height', 'overflow' ] as const; +type LabelTextShadowOption = Pick; // TODO Performance improvement? const tmpText = new ZRText(); @@ -77,6 +79,15 @@ class TextStyleMixin { tmpText.update(); return tmpText.getBoundingRect(); } + + getTextShadow(this: Model) { + return { + textShadowBlur: this.getShallow('textShadowBlur'), + textShadowColor: this.getShallow('textShadowColor'), + textShadowOffsetX: this.getShallow('textShadowOffsetX'), + textShadowOffsetY: this.getShallow('textShadowOffsetY') + }; + } }; export default TextStyleMixin; diff --git a/test/visualMap-continuous.html b/test/visualMap-continuous.html index db99d73b1e..848b510e8a 100644 --- a/test/visualMap-continuous.html +++ b/test/visualMap-continuous.html @@ -49,39 +49,30 @@
Stacked Bar (and inversed)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/visualMap-pieces.html b/test/visualMap-pieces.html index 2f6bea5a15..2ae4cdf5d4 100644 --- a/test/visualMap-pieces.html +++ b/test/visualMap-pieces.html @@ -18,7 +18,6 @@ under the License. --> - @@ -46,25 +45,15 @@ } - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 21eee5774fd43d50b08f1d9a1ebdeeefbc452cf1 Mon Sep 17 00:00:00 2001 From: fuchunhui Date: Mon, 14 Mar 2022 18:06:33 +0800 Subject: [PATCH 18/36] fix(visualmap): use createTextStyle for more properties. close #14440 --- src/component/visualMap/ContinuousView.ts | 7 ++++--- src/component/visualMap/PiecewiseView.ts | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/component/visualMap/ContinuousView.ts b/src/component/visualMap/ContinuousView.ts index 49b94702d7..5d50974952 100644 --- a/src/component/visualMap/ContinuousView.ts +++ b/src/component/visualMap/ContinuousView.ts @@ -38,6 +38,7 @@ import { setAsHighDownDispatcher } from '../../util/states'; import { createSymbol } from '../../util/symbol'; import ZRImage from 'zrender/src/graphic/Image'; import { getECData } from '../../util/innerStore'; +import { createTextStyle } from '../../label/labelStyle'; const linearMap = numberUtil.linearMap; const each = zrUtil.each; @@ -185,16 +186,16 @@ class ContinuousView extends VisualMapView { const textShadow = textStyleModel.getTextShadow(); this.group.add(new graphic.Text({ - style: { + style: createTextStyle(textStyleModel, { x: position[0], y: position[1], verticalAlign: orient === 'horizontal' ? 'middle' : align as TextVerticalAlign, align: orient === 'horizontal' ? align as TextAlign : 'center', - text: text, + text, font: textStyleModel.getFont(), fill: textStyleModel.getTextColor(), ...textShadow - } + }) })); } diff --git a/src/component/visualMap/PiecewiseView.ts b/src/component/visualMap/PiecewiseView.ts index d4f1c6bac1..cab8b27ca7 100644 --- a/src/component/visualMap/PiecewiseView.ts +++ b/src/component/visualMap/PiecewiseView.ts @@ -26,6 +26,7 @@ import * as helper from './helper'; import PiecewiseModel from './PiecewiseModel'; import { TextAlign } from 'zrender/src/core/types'; import { VisualMappingOption } from '../../visual/VisualMapping'; +import { createTextStyle } from '../../label/labelStyle'; class PiecewiseVisualMapView extends VisualMapView { @@ -156,7 +157,7 @@ class PiecewiseVisualMapView extends VisualMapView { const textShadow = textStyleModel.getTextShadow(); itemGroup.add(new graphic.Text({ - style: { + style: createTextStyle(textStyleModel, { x: showLabel ? (itemAlign === 'right' ? itemSize[0] : 0) : itemSize[0] / 2, y: itemSize[1] / 2, verticalAlign: 'middle', @@ -165,7 +166,7 @@ class PiecewiseVisualMapView extends VisualMapView { font: textStyleModel.getFont(), fill: textStyleModel.getTextColor(), ...textShadow - } + }) })); group.add(itemGroup); From 764b5c8698519201ac565786c6f8c328e9c4c2af Mon Sep 17 00:00:00 2001 From: fuchunhui Date: Mon, 14 Mar 2022 19:11:20 +0800 Subject: [PATCH 19/36] fix(visualmap): remove getTextShadow, createTextStyle already did that. close #14440 --- src/component/visualMap/ContinuousView.ts | 6 +----- src/component/visualMap/PiecewiseView.ts | 6 +----- src/model/mixin/textStyle.ts | 11 ----------- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/component/visualMap/ContinuousView.ts b/src/component/visualMap/ContinuousView.ts index 5d50974952..6e88a6b7b5 100644 --- a/src/component/visualMap/ContinuousView.ts +++ b/src/component/visualMap/ContinuousView.ts @@ -183,7 +183,6 @@ class ContinuousView extends VisualMapView { ); const orient = this._orient; const textStyleModel = this.visualMapModel.textStyleModel; - const textShadow = textStyleModel.getTextShadow(); this.group.add(new graphic.Text({ style: createTextStyle(textStyleModel, { @@ -191,10 +190,7 @@ class ContinuousView extends VisualMapView { y: position[1], verticalAlign: orient === 'horizontal' ? 'middle' : align as TextVerticalAlign, align: orient === 'horizontal' ? align as TextAlign : 'center', - text, - font: textStyleModel.getFont(), - fill: textStyleModel.getTextColor(), - ...textShadow + text }) })); } diff --git a/src/component/visualMap/PiecewiseView.ts b/src/component/visualMap/PiecewiseView.ts index cab8b27ca7..f3f260593e 100644 --- a/src/component/visualMap/PiecewiseView.ts +++ b/src/component/visualMap/PiecewiseView.ts @@ -154,7 +154,6 @@ class PiecewiseVisualMapView extends VisualMapView { const itemGroup = new graphic.Group(); const textStyleModel = this.visualMapModel.textStyleModel; - const textShadow = textStyleModel.getTextShadow(); itemGroup.add(new graphic.Text({ style: createTextStyle(textStyleModel, { @@ -162,10 +161,7 @@ class PiecewiseVisualMapView extends VisualMapView { y: itemSize[1] / 2, verticalAlign: 'middle', align: showLabel ? (itemAlign as TextAlign) : 'center', - text: text, - font: textStyleModel.getFont(), - fill: textStyleModel.getTextColor(), - ...textShadow + text }) })); diff --git a/src/model/mixin/textStyle.ts b/src/model/mixin/textStyle.ts index 054405f4ea..6c5cce9a3f 100644 --- a/src/model/mixin/textStyle.ts +++ b/src/model/mixin/textStyle.ts @@ -35,8 +35,6 @@ const textStyleParams = [ 'fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'padding', 'lineHeight', 'rich', 'width', 'height', 'overflow' ] as const; -type LabelTextShadowOption = Pick; // TODO Performance improvement? const tmpText = new ZRText(); @@ -79,15 +77,6 @@ class TextStyleMixin { tmpText.update(); return tmpText.getBoundingRect(); } - - getTextShadow(this: Model) { - return { - textShadowBlur: this.getShallow('textShadowBlur'), - textShadowColor: this.getShallow('textShadowColor'), - textShadowOffsetX: this.getShallow('textShadowOffsetX'), - textShadowOffsetY: this.getShallow('textShadowOffsetY') - }; - } }; export default TextStyleMixin; From 7e6eadb7715502eb8c844905bdb6ba262b33cc85 Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Mon, 14 Mar 2022 20:47:54 +0800 Subject: [PATCH 20/36] fix(marker): timing of calling leave blur --- src/component/marker/MarkerView.ts | 21 ++------------------- src/util/states.ts | 22 +++++++++++++++------- src/view/Component.ts | 16 ++++------------ 3 files changed, 21 insertions(+), 38 deletions(-) diff --git a/src/component/marker/MarkerView.ts b/src/component/marker/MarkerView.ts index 3dfde52ebd..751dd9f97e 100644 --- a/src/component/marker/MarkerView.ts +++ b/src/component/marker/MarkerView.ts @@ -71,7 +71,7 @@ abstract class MarkerView extends ComponentView { inner(drawGroup).keep = true; } - blurSeries(seriesModelList: SeriesModel[]) { + toggleBlurSeries(seriesModelList: SeriesModel[], isBlur: boolean) { each(seriesModelList, seriesModel => { const markerModel = MarkerModel.getMarkerModelFromSeries( seriesModel, @@ -81,24 +81,7 @@ abstract class MarkerView extends ComponentView { const data = markerModel.getData(); data.eachItemGraphicEl(function (el) { if (el) { - enterBlur(el); - } - }); - } - }); - } - - leaveBlurSeries(seriesModelList: SeriesModel[]) { - each(seriesModelList, seriesModel => { - const markerModel = MarkerModel.getMarkerModelFromSeries( - seriesModel, - this.type as 'markPoint' | 'markLine' | 'markArea' - ); - if (markerModel) { - const data = markerModel.getData(); - data.eachItemGraphicEl(function (el) { - if (el) { - leaveBlur(el); + isBlur ? enterBlur(el) : leaveBlur(el); } }); } diff --git a/src/util/states.ts b/src/util/states.ts index 9c323ece47..5c0e7cbcbf 100644 --- a/src/util/states.ts +++ b/src/util/states.ts @@ -429,23 +429,31 @@ function shouldSilent(el: Element, e: ElementEvent) { export function allLeaveBlur(api: ExtensionAPI) { const model = api.getModel(); const leaveBlurredSeries: SeriesModel[] = []; + const allComponents: ComponentModel[] = []; model.eachComponent(function (componentType, componentModel) { const componentStates = getComponentStates(componentModel); - const view = componentType === 'series' - ? api.getViewOfSeriesModel(componentModel as SeriesModel) + const isSeries = componentType === 'series'; + const view = isSeries ? api.getViewOfSeriesModel(componentModel as SeriesModel) : api.getViewOfComponentModel(componentModel); - componentType === 'series' && leaveBlurredSeries.push(componentModel as SeriesModel); + !isSeries && allComponents.push(componentModel); + isSeries && leaveBlurredSeries.push(componentModel as SeriesModel); if (componentStates.isBlured) { // Leave blur anyway view.group.traverse(function (child) { singleLeaveBlur(child); }); } - if (view && (view as ComponentView).leaveBlurSeries) { - (view as ComponentView).leaveBlurSeries(leaveBlurredSeries, model); + if (view && (view as ComponentView).toggleBlurSeries) { + (view as ComponentView).toggleBlurSeries(leaveBlurredSeries, false, model); } componentStates.isBlured = false; }); + each(allComponents, function (component) { + const view = api.getViewOfComponentModel(component); + if (view && (view as ComponentView).toggleBlurSeries) { + (view as ComponentView).toggleBlurSeries(leaveBlurredSeries, false, model); + } + }); } export function blurSeries( @@ -525,8 +533,8 @@ export function blurSeries( return; } const view = api.getViewOfComponentModel(componentModel); - if (view && view.blurSeries) { - view.blurSeries(blurredSeries, ecModel); + if (view && view.toggleBlurSeries) { + view.toggleBlurSeries(blurredSeries, true, ecModel); } }); } diff --git a/src/view/Component.ts b/src/view/Component.ts index 2c597bc758..ed7fa8ef37 100644 --- a/src/view/Component.ts +++ b/src/view/Component.ts @@ -107,19 +107,11 @@ class ComponentView { } /** - * Hook for blur target series. - * Can be used in marker for blur the markers + * Hook for toggle blur target series. + * Can be used in marker for blur or leave blur the markers */ - blurSeries(seriesModels: SeriesModel[], ecModel: GlobalModel): void { - // Do nothing; - } - - /** - * Hook for leaving blur target series. - * Can be used in marker for leaving blur the markers - */ - leaveBlurSeries(seriesModels: SeriesModel[], ecModel: GlobalModel): void { - // Do nothing; + toggleBlurSeries(seriesModels: SeriesModel[], isBlur: boolean, ecModel: GlobalModel): void { + // Do nothing; } /** From a255fa15dd49e53d99859d756063b08bde9d4883 Mon Sep 17 00:00:00 2001 From: fuchunhui Date: Tue, 15 Mar 2022 10:46:29 +0800 Subject: [PATCH 21/36] fix(visualmap): use createTextStyle on handleLabel and indicatorLabel. close #14440 --- src/component/visualMap/ContinuousView.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/component/visualMap/ContinuousView.ts b/src/component/visualMap/ContinuousView.ts index 6e88a6b7b5..ac31cd0943 100644 --- a/src/component/visualMap/ContinuousView.ts +++ b/src/component/visualMap/ContinuousView.ts @@ -299,11 +299,11 @@ class ContinuousView extends VisualMapView { eventTool.stop(e.event); }, ondragend: onDragEnd, - style: { - x: 0, y: 0, text: '', - font: textStyleModel.getFont(), - fill: textStyleModel.getTextColor() - } + style: createTextStyle(textStyleModel, { + x: 0, + y: 0, + text: '' + }) }); handleLabel.ensureState('blur').style = { opacity: 0.1 @@ -359,11 +359,11 @@ class ContinuousView extends VisualMapView { const indicatorLabel = new graphic.Text({ silent: true, invisible: true, - style: { - x: 0, y: 0, text: '', - font: textStyleModel.getFont(), - fill: textStyleModel.getTextColor() - } + style: createTextStyle(textStyleModel, { + x: 0, + y: 0, + text: '' + }) }); this.group.add(indicatorLabel); From 16d166f28b6e6bb0392c2566044774eaa86505fb Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Tue, 15 Mar 2022 10:48:39 +0800 Subject: [PATCH 22/36] fix(state): add series model to`leaveBlurredSeries` if series is blured --- src/util/states.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/util/states.ts b/src/util/states.ts index 5c0e7cbcbf..641b251849 100644 --- a/src/util/states.ts +++ b/src/util/states.ts @@ -61,7 +61,6 @@ import GlobalModel from '../model/Global'; import ExtensionAPI from '../core/ExtensionAPI'; import ComponentModel from '../model/Component'; import { error } from './log'; -import type ComponentView from '../view/Component'; // Reserve 0 as default. let _highlightNextDigit = 1; @@ -436,22 +435,19 @@ export function allLeaveBlur(api: ExtensionAPI) { const view = isSeries ? api.getViewOfSeriesModel(componentModel as SeriesModel) : api.getViewOfComponentModel(componentModel); !isSeries && allComponents.push(componentModel); - isSeries && leaveBlurredSeries.push(componentModel as SeriesModel); if (componentStates.isBlured) { // Leave blur anyway view.group.traverse(function (child) { singleLeaveBlur(child); }); - } - if (view && (view as ComponentView).toggleBlurSeries) { - (view as ComponentView).toggleBlurSeries(leaveBlurredSeries, false, model); + isSeries && leaveBlurredSeries.push(componentModel as SeriesModel); } componentStates.isBlured = false; }); each(allComponents, function (component) { const view = api.getViewOfComponentModel(component); - if (view && (view as ComponentView).toggleBlurSeries) { - (view as ComponentView).toggleBlurSeries(leaveBlurredSeries, false, model); + if (view && view.toggleBlurSeries) { + view.toggleBlurSeries(leaveBlurredSeries, false, model); } }); } From bfe8d538a2165ad64fdd2d8c5915125b17e11888 Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Tue, 15 Mar 2022 13:56:02 +0800 Subject: [PATCH 23/36] chore(state): reduce uncessary function call --- src/util/states.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/states.ts b/src/util/states.ts index 641b251849..f3886cd78a 100644 --- a/src/util/states.ts +++ b/src/util/states.ts @@ -61,6 +61,7 @@ import GlobalModel from '../model/Global'; import ExtensionAPI from '../core/ExtensionAPI'; import ComponentModel from '../model/Component'; import { error } from './log'; +import type ComponentView from '../view/Component'; // Reserve 0 as default. let _highlightNextDigit = 1; @@ -428,13 +429,13 @@ function shouldSilent(el: Element, e: ElementEvent) { export function allLeaveBlur(api: ExtensionAPI) { const model = api.getModel(); const leaveBlurredSeries: SeriesModel[] = []; - const allComponents: ComponentModel[] = []; + const allComponentViews: ComponentView[] = []; model.eachComponent(function (componentType, componentModel) { const componentStates = getComponentStates(componentModel); const isSeries = componentType === 'series'; const view = isSeries ? api.getViewOfSeriesModel(componentModel as SeriesModel) : api.getViewOfComponentModel(componentModel); - !isSeries && allComponents.push(componentModel); + !isSeries && allComponentViews.push(view as ComponentView); if (componentStates.isBlured) { // Leave blur anyway view.group.traverse(function (child) { @@ -444,8 +445,7 @@ export function allLeaveBlur(api: ExtensionAPI) { } componentStates.isBlured = false; }); - each(allComponents, function (component) { - const view = api.getViewOfComponentModel(component); + each(allComponentViews, function (view) { if (view && view.toggleBlurSeries) { view.toggleBlurSeries(leaveBlurredSeries, false, model); } From 45a882c0afca10cb92ce5a28d378192c7e6e3e1a Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Wed, 16 Mar 2022 21:42:14 +0800 Subject: [PATCH 24/36] feat(scatter): `scale` support number --- src/chart/effectScatter/EffectScatterSeries.ts | 2 +- src/chart/helper/Symbol.ts | 8 ++++---- src/chart/helper/SymbolDraw.ts | 4 ++-- test/scatter.html | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/chart/effectScatter/EffectScatterSeries.ts b/src/chart/effectScatter/EffectScatterSeries.ts index 2d7e1ca690..72d40f6bca 100644 --- a/src/chart/effectScatter/EffectScatterSeries.ts +++ b/src/chart/effectScatter/EffectScatterSeries.ts @@ -45,7 +45,7 @@ type ScatterDataValue = OptionDataValue | OptionDataValue[]; interface EffectScatterStatesOptionMixin { emphasis?: { focus?: DefaultEmphasisFocus - scale?: boolean + scale?: boolean | number } } export interface EffectScatterStateOption { diff --git a/src/chart/helper/Symbol.ts b/src/chart/helper/Symbol.ts index d73e9ffba7..e666bcada9 100644 --- a/src/chart/helper/Symbol.ts +++ b/src/chart/helper/Symbol.ts @@ -27,7 +27,7 @@ import { ColorString, BlurScope, AnimationOption, ZRColor, AnimationOptionMixin import SeriesModel from '../../model/Series'; import { PathProps } from 'zrender/src/graphic/Path'; import { SymbolDrawSeriesScope, SymbolDrawItemModelOption } from './SymbolDraw'; -import { extend } from 'zrender/src/core/util'; +import { extend, isNumber } from 'zrender/src/core/util'; import { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle'; import ZRImage from 'zrender/src/graphic/Image'; import { saveOldStyle } from '../../animation/basicTrasition'; @@ -221,8 +221,8 @@ class Symbol extends graphic.Group { let labelStatesModels; - let hoverScale; - let cursorStyle; + let hoverScale: SymbolDrawSeriesScope['hoverScale']; + let cursorStyle: SymbolDrawSeriesScope['cursorStyle']; if (seriesScope) { emphasisItemStyle = seriesScope.emphasisItemStyle; @@ -337,7 +337,7 @@ class Symbol extends graphic.Group { symbolPath.ensureState('blur').style = blurItemStyle; if (hoverScale) { - const scaleRatio = Math.max(1.1, 3 / this._sizeY); + const scaleRatio = Math.max((isNumber(hoverScale) ? hoverScale : 1.1), 3 / this._sizeY); emphasisState.scaleX = this._sizeX * scaleRatio; emphasisState.scaleY = this._sizeY * scaleRatio; } diff --git a/src/chart/helper/SymbolDraw.ts b/src/chart/helper/SymbolDraw.ts index 1578278b6f..93e13848e1 100644 --- a/src/chart/helper/SymbolDraw.ts +++ b/src/chart/helper/SymbolDraw.ts @@ -103,7 +103,7 @@ export interface SymbolDrawItemModelOption extends SymbolOptionMixin, StatesOptionMixin, SymbolDrawStateOption { @@ -127,7 +127,7 @@ export interface SymbolDrawSeriesScope { itemModel?: Model - hoverScale?: boolean + hoverScale?: boolean | number cursorStyle?: string fadeIn?: boolean diff --git a/test/scatter.html b/test/scatter.html index 19d6eb30dd..c92256d0f8 100644 --- a/test/scatter.html +++ b/test/scatter.html @@ -113,6 +113,7 @@ name: names[1], type: 'scatter', emphasis: { + scale: 3, label: { show: true, position: 'top', From 52c0de306af4497c2e5174b79108d685df6da370 Mon Sep 17 00:00:00 2001 From: plainheart Date: Thu, 17 Mar 2022 17:10:11 +0800 Subject: [PATCH 25/36] fix(dataview): fix unexpected scrollbar and outline when using default textview. --- src/component/toolbox/feature/DataView.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/component/toolbox/feature/DataView.ts b/src/component/toolbox/feature/DataView.ts index ca84c809c1..cdca9614e7 100644 --- a/src/component/toolbox/feature/DataView.ts +++ b/src/component/toolbox/feature/DataView.ts @@ -29,6 +29,7 @@ import ExtensionAPI from '../../../core/ExtensionAPI'; import { addEventListener } from 'zrender/src/core/event'; import Axis from '../../../coord/Axis'; import Cartesian2D from '../../../coord/cartesian/Cartesian2D'; +import { warn } from '../../../util/log'; /* global document */ @@ -363,7 +364,7 @@ class DataView extends ToolboxFeature { textarea.readOnly = model.get('readOnly'); const style = textarea.style; // eslint-disable-next-line max-len - style.cssText = 'width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none'; + style.cssText = 'width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;vertical-align:middle;box-sizing:border-box;outline:none'; style.color = model.get('textColor'); style.borderColor = model.get('textareaBorderColor'); style.backgroundColor = model.get('textareaColor'); @@ -397,7 +398,7 @@ class DataView extends ToolboxFeature { || (contentToOption != null && optionToContent == null)) { if (__DEV__) { // eslint-disable-next-line - console.warn('It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored.') + warn('It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored.') } close(); return; From 2ce7e1c9a3ecf018ab340ed64332ee7f95d7a87d Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Fri, 18 Mar 2022 09:40:55 +0800 Subject: [PATCH 26/36] chore: remove extra bracket --- src/chart/helper/Symbol.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chart/helper/Symbol.ts b/src/chart/helper/Symbol.ts index e666bcada9..efb45428ae 100644 --- a/src/chart/helper/Symbol.ts +++ b/src/chart/helper/Symbol.ts @@ -337,7 +337,7 @@ class Symbol extends graphic.Group { symbolPath.ensureState('blur').style = blurItemStyle; if (hoverScale) { - const scaleRatio = Math.max((isNumber(hoverScale) ? hoverScale : 1.1), 3 / this._sizeY); + const scaleRatio = Math.max(isNumber(hoverScale) ? hoverScale : 1.1, 3 / this._sizeY); emphasisState.scaleX = this._sizeX * scaleRatio; emphasisState.scaleY = this._sizeY * scaleRatio; } From b364916dd9300f06021f48161a9ecc18a7e45c9e Mon Sep 17 00:00:00 2001 From: plainheart Date: Fri, 18 Mar 2022 11:20:40 +0800 Subject: [PATCH 27/36] fix(dataview): set `display` of the default `textview` as `block`. --- src/component/toolbox/feature/DataView.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/component/toolbox/feature/DataView.ts b/src/component/toolbox/feature/DataView.ts index cdca9614e7..6efd570432 100644 --- a/src/component/toolbox/feature/DataView.ts +++ b/src/component/toolbox/feature/DataView.ts @@ -364,7 +364,7 @@ class DataView extends ToolboxFeature { textarea.readOnly = model.get('readOnly'); const style = textarea.style; // eslint-disable-next-line max-len - style.cssText = 'width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;vertical-align:middle;box-sizing:border-box;outline:none'; + style.cssText = 'display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none'; style.color = model.get('textColor'); style.borderColor = model.get('textareaBorderColor'); style.backgroundColor = model.get('textareaColor'); From 0ce725bb74754d8e8ea231752228aae2c2a35b4f Mon Sep 17 00:00:00 2001 From: plainheart Date: Fri, 18 Mar 2022 20:55:16 +0800 Subject: [PATCH 28/36] fix(toolbox): toolbox doesn't enter emphasis state when hovering on the icon. --- src/component/toolbox/ToolboxView.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/component/toolbox/ToolboxView.ts b/src/component/toolbox/ToolboxView.ts index 67ea92151e..fc4edfc086 100644 --- a/src/component/toolbox/ToolboxView.ts +++ b/src/component/toolbox/ToolboxView.ts @@ -259,11 +259,11 @@ class ToolboxView extends ComponentView { // Use enterEmphasis and leaveEmphasis provide by ec. // There are flags managed by the echarts. - enterEmphasis(this); + api.enterEmphasis(this); }) .on('mouseout', function () { if (featureModel.get(['iconStatus', iconName]) !== 'emphasis') { - leaveEmphasis(this); + api.leaveEmphasis(this); } textContent.hide(); }); From ad7adc26725c43ce7ff711d383f1d13c8e86acea Mon Sep 17 00:00:00 2001 From: plainheart Date: Sat, 19 Mar 2022 20:58:27 +0800 Subject: [PATCH 29/36] fix(toolbox): fix toolbox title may be outside of the chart. --- src/component/toolbox/ToolboxView.ts | 24 +++++++++++++++--------- test/toolbox-title.html | 4 ++-- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/component/toolbox/ToolboxView.ts b/src/component/toolbox/ToolboxView.ts index fc4edfc086..faa3404184 100644 --- a/src/component/toolbox/ToolboxView.ts +++ b/src/component/toolbox/ToolboxView.ts @@ -39,7 +39,6 @@ import { import { getUID } from '../../util/component'; import Displayable from 'zrender/src/graphic/Displayable'; import ZRText from 'zrender/src/graphic/Text'; -import { getECData } from '../../util/innerStore'; type IconPath = ToolboxFeatureModel['iconPaths'][string]; @@ -70,6 +69,7 @@ class ToolboxView extends ComponentView { } const itemSize = +toolboxModel.get('itemSize'); + const isVertical = toolboxModel.get('orient') === 'vertical'; const featureOpts = toolboxModel.get('feature') || {}; const features = this._features || (this._features = {}); @@ -238,15 +238,21 @@ class ToolboxView extends ComponentView { } }); - // graphic.enableHoverEmphasis(path); - (path as ExtendedPath).__title = titlesMap[iconName]; (path as graphic.Path).on('mouseover', function () { // Should not reuse above hoverStyle, which might be modified. const hoverStyle = iconStyleEmphasisModel.getItemStyle(); - const defaultTextPosition = toolboxModel.get('orient') === 'vertical' - ? (toolboxModel.get('right') == null ? 'right' as const : 'left' as const) - : (toolboxModel.get('bottom') == null ? 'bottom' as const : 'top' as const); + const defaultTextPosition = isVertical + ? ( + toolboxModel.get('right') == null && toolboxModel.get('left') !== 'right' + ? 'right' as const + : 'left' as const + ) + : ( + toolboxModel.get('bottom') == null && toolboxModel.get('top') !== 'bottom' + ? 'bottom' as const + : 'top' as const + ); textContent.setStyle({ fill: (iconStyleEmphasisModel.get('textFill') || hoverStyle.fill || hoverStyle.stroke || '#000') as string, @@ -284,7 +290,7 @@ class ToolboxView extends ComponentView { group.add(listComponentHelper.makeBackground(group.getBoundingRect(), toolboxModel)); // Adjust icon title positions to avoid them out of screen - group.eachChild(function (icon: IconPath) { + isVertical || group.eachChild(function (icon: IconPath) { const titleText = (icon as ExtendedPath).__title; // const hoverStyle = icon.hoverStyle; @@ -292,7 +298,7 @@ class ToolboxView extends ComponentView { const emphasisState = icon.ensureState('emphasis'); const emphasisTextConfig = emphasisState.textConfig || (emphasisState.textConfig = {}); const textContent = icon.getTextContent(); - const emphasisTextState = textContent && textContent.states.emphasis; + const emphasisTextState = textContent && textContent.ensureState('emphasis'); // May be background element if (emphasisTextState && !zrUtil.isFunction(emphasisTextState) && titleText) { const emphasisTextStyle = emphasisTextState.style || (emphasisTextState.style = {}); @@ -307,7 +313,7 @@ class ToolboxView extends ComponentView { emphasisTextConfig.position = 'top'; needPutOnTop = true; } - const topOffset = needPutOnTop ? (-5 - rect.height) : (itemSize + 8); + const topOffset = needPutOnTop ? (-5 - rect.height) : (itemSize + 10); if (offsetX + rect.width / 2 > api.getWidth()) { emphasisTextConfig.position = ['100%', topOffset]; emphasisTextStyle.align = 'right'; diff --git a/test/toolbox-title.html b/test/toolbox-title.html index 6c5c9dfc2d..81e40a1b83 100644 --- a/test/toolbox-title.html +++ b/test/toolbox-title.html @@ -150,7 +150,7 @@ var chart = testHelper.create(echarts, 'main2', { title: [ - 'orient: horizontal; bottom left side', + 'orient: vertical; top left side', 'Text when hover on toolbox icon should not be outside of the canvas' ], option: option @@ -186,7 +186,7 @@ var chart = testHelper.create(echarts, 'main3', { title: [ - 'orient: horizontal; bottom right side', + 'orient: vertical; top right side', 'Text when hover on toolbox icon should not be outside of the canvas' ], option: option From 48472ee85d66d7a4986812a610fab9151508d456 Mon Sep 17 00:00:00 2001 From: jiawulin001 Date: Tue, 22 Mar 2022 15:32:35 +0800 Subject: [PATCH 30/36] feat: allow areaStyle.origin to take number as input --- src/chart/line/LineSeries.ts | 2 +- src/chart/line/helper.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/chart/line/LineSeries.ts b/src/chart/line/LineSeries.ts index 7a3774e666..d46640bbc3 100644 --- a/src/chart/line/LineSeries.ts +++ b/src/chart/line/LineSeries.ts @@ -101,7 +101,7 @@ export interface LineSeriesOption extends SeriesOption Date: Wed, 23 Mar 2022 14:45:06 +0800 Subject: [PATCH 31/36] An example of origin Updated --- test/area-origin.html | 180 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 test/area-origin.html diff --git a/test/area-origin.html b/test/area-origin.html new file mode 100644 index 0000000000..b70b1689fc --- /dev/null +++ b/test/area-origin.html @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + \ No newline at end of file From d7786c52c49bccb1b8c78989ef5e4d29348543fa Mon Sep 17 00:00:00 2001 From: yuanjiangxia <511217468@qq.com> Date: Wed, 23 Mar 2022 17:53:33 +0800 Subject: [PATCH 32/36] fix(dataZoom): fix the dataZoom was unexpectedly displayed at the top when data contains null values. --- src/data/DataStore.ts | 8 ++- test/dataZoom-feature.html | 112 ++++++++++++++++++++++++++++++++++++- 2 files changed, 116 insertions(+), 4 deletions(-) diff --git a/src/data/DataStore.ts b/src/data/DataStore.ts index ddd3c09a44..4ceb7ba894 100644 --- a/src/data/DataStore.ts +++ b/src/data/DataStore.ts @@ -290,8 +290,10 @@ class DataStore { // Parse from previous data offset. len may be changed after appendData for (let i = offset; i < len; i++) { const val = (chunk as any)[i] = ordinalMeta.parseAndCollect(chunk[i]); - dimRawExtent[0] = Math.min(val, dimRawExtent[0]); - dimRawExtent[1] = Math.max(val, dimRawExtent[1]); + if (!isNaN(val)) { + dimRawExtent[0] = Math.min(val, dimRawExtent[0]); + dimRawExtent[1] = Math.max(val, dimRawExtent[1]); + } } dim.ordinalMeta = ordinalMeta; @@ -1308,4 +1310,4 @@ class DataStore { })(); } -export default DataStore; \ No newline at end of file +export default DataStore; diff --git a/test/dataZoom-feature.html b/test/dataZoom-feature.html index 8f2b5b0e97..6715089fd0 100644 --- a/test/dataZoom-feature.html +++ b/test/dataZoom-feature.html @@ -43,7 +43,7 @@
- +
@@ -746,6 +746,116 @@ }); + + From 5b4ad8859ba0510ccb569f3a8d262db059316fb1 Mon Sep 17 00:00:00 2001 From: plainheart Date: Thu, 24 Mar 2022 11:27:00 +0800 Subject: [PATCH 33/36] fix(splitLine): fix chart throws errors when `radiusAxis.splitLine` is enabled. --- src/component/axis/RadiusAxisView.ts | 5 ++- test/runTest/actions/__meta__.json | 1 + test/runTest/actions/splitLine.json | 1 + test/splitLine.html | 62 +++++++++++++++++++++++++++- 4 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 test/runTest/actions/splitLine.json diff --git a/src/component/axis/RadiusAxisView.ts b/src/component/axis/RadiusAxisView.ts index 2cc5e7814a..b09dd50603 100644 --- a/src/component/axis/RadiusAxisView.ts +++ b/src/component/axis/RadiusAxisView.ts @@ -116,7 +116,8 @@ const axisElementBuilders: Record= 0 + r: Math.max(ticksCoords[i].coord, 0) } })); } @@ -225,4 +226,4 @@ function layoutAxis(polar: Polar, radiusAxisModel: RadiusAxisModel, axisAngle: n }; } -export default RadiusAxisView; \ No newline at end of file +export default RadiusAxisView; diff --git a/test/runTest/actions/__meta__.json b/test/runTest/actions/__meta__.json index 468dbfb821..1aa77623e2 100644 --- a/test/runTest/actions/__meta__.json +++ b/test/runTest/actions/__meta__.json @@ -163,6 +163,7 @@ "scatter-single-axis": 2, "scatterMatrix": 3, "setOption": 1, + "splitLine": 1, "stackBar-dataZoom": 7, "sunburst-book": 1, "sunburst-canvas": 1, diff --git a/test/runTest/actions/splitLine.json b/test/runTest/actions/splitLine.json new file mode 100644 index 0000000000..106e397bf0 --- /dev/null +++ b/test/runTest/actions/splitLine.json @@ -0,0 +1 @@ +[{"name":"Action 1","ops":[{"type":"mousedown","time":660,"x":50,"y":175},{"type":"mouseup","time":802,"x":50,"y":175},{"time":803,"delay":400,"type":"screenshot-auto"}],"scrollY":797.2000122070312,"scrollX":0,"timestamp":1648092272395}] \ No newline at end of file diff --git a/test/splitLine.html b/test/splitLine.html index 5a2fe742ae..ea847a07e8 100755 --- a/test/splitLine.html +++ b/test/splitLine.html @@ -41,7 +41,7 @@
- +
@@ -201,9 +201,67 @@ + - \ No newline at end of file + From 291bf29dfa3a63f5b9e517d30c8a3052cb3ab126 Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Thu, 24 Mar 2022 22:30:51 +0800 Subject: [PATCH 34/36] fix(labelLine): use correct state name --- src/chart/pie/PieView.ts | 11 ++--------- src/label/labelGuideHelper.ts | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/chart/pie/PieView.ts b/src/chart/pie/PieView.ts index f4deb1282b..9118f9267b 100644 --- a/src/chart/pie/PieView.ts +++ b/src/chart/pie/PieView.ts @@ -58,7 +58,6 @@ class PiePiece extends graphic.Sector { const seriesModel = data.hostModel as PieSeriesModel; const itemModel = data.getItemModel(idx); const emphasisModel = itemModel.getModel('emphasis'); - const selectModel = itemModel.getModel('select'); const layout = data.getItemLayout(idx) as graphic.Sector['shape']; // cornerRadius & innerCornerRadius doesn't exist in the item layout. Use `0` if null value is specified. // see `setItemLayout` in `pieLayout.ts`. @@ -155,20 +154,14 @@ class PiePiece extends graphic.Sector { const labelLine = sector.getTextGuideLine(); const labelText = sector.getTextContent(); - labelLine && extend(labelLine.ensureState('emphasis'), { - ignore: !emphasisModel.get(['labelLine', 'show']) - }); - labelLine && extend(labelLine.ensureState('select'), { x: dx, - y: dy, - ignore: !selectModel.get(['labelLine', 'show']) + y: dy }); // TODO: needs dx, dy in zrender? extend(labelText.ensureState('select'), { x: dx, - y: dy, - ignore: !selectModel.get(['label', 'show']) + y: dy }); toggleHoverEmphasis( diff --git a/src/label/labelGuideHelper.ts b/src/label/labelGuideHelper.ts index c9a4b5bdb2..13008a7642 100644 --- a/src/label/labelGuideHelper.ts +++ b/src/label/labelGuideHelper.ts @@ -618,7 +618,7 @@ export function setLabelLineStyle( if (isLabelIgnored // Not show when label is not shown in this state. || !retrieve2(stateShow, showNormal) // Use normal state by default if not set. ) { - const stateObj = isNormal ? labelLine : (labelLine && labelLine.states.normal); + const stateObj = isNormal ? labelLine : (labelLine && labelLine.states[stateName]); if (stateObj) { stateObj.ignore = true; } From 45b75977ca21422861468f18cdc32bb6f1a76943 Mon Sep 17 00:00:00 2001 From: Yasser Lahbibi Date: Fri, 25 Mar 2022 10:35:55 +0100 Subject: [PATCH 35/36] fix: wrong jpg instead of jpeg types --- src/component/toolbox/feature/SaveAsImage.ts | 2 +- src/core/echarts.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/component/toolbox/feature/SaveAsImage.ts b/src/component/toolbox/feature/SaveAsImage.ts index 7e9c690e80..8777a97891 100644 --- a/src/component/toolbox/feature/SaveAsImage.ts +++ b/src/component/toolbox/feature/SaveAsImage.ts @@ -29,7 +29,7 @@ import { isFunction } from 'zrender/src/core/util'; export interface ToolboxSaveAsImageFeatureOption extends ToolboxFeatureOption { icon?: string title?: string - type?: 'png' | 'jpg' + type?: 'png' | 'jpeg' backgroundColor?: ZRColor connectedBackgroundColor?: ZRColor diff --git a/src/core/echarts.ts b/src/core/echarts.ts index a4323a4f19..c2f24ddd06 100644 --- a/src/core/echarts.ts +++ b/src/core/echarts.ts @@ -763,7 +763,7 @@ class ECharts extends Eventful { getDataURL(opts?: { // file type 'png' by default - type?: 'png' | 'jpg' | 'svg', + type?: 'png' | 'jpeg' | 'svg', pixelRatio?: number, backgroundColor?: ZRColor, // component type array @@ -807,7 +807,7 @@ class ECharts extends Eventful { getConnectedDataURL(opts?: { // file type 'png' by default - type?: 'png' | 'jpg' | 'svg', + type?: 'png' | 'jpeg' | 'svg', pixelRatio?: number, backgroundColor?: ZRColor, connectedBackgroundColor?: ZRColor From d3c5bec2642b7aa5e54979c92b0eb5de973ea213 Mon Sep 17 00:00:00 2001 From: Dalpat Rathore <69510006+DalpatRathore@users.noreply.github.com> Date: Sun, 27 Mar 2022 11:16:14 +0530 Subject: [PATCH 36/36] fix: CONTRIBUTING.md grammar --- CONTRIBUTING.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 52654df348..0a7507e9d8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,7 @@ Contributions can be made in varied ways: - Help others in the issues - Help solve problems with the issues - Remind the authors to provide a demo if they are reporting for a bug - - Try to reproduce the problem as describe in the issues + - Try to reproduce the problem as described in the issues - Make pull requests to fix bugs or implement new features - Improve or translate the documents - Discuss in the [mailing list](https://echarts.apache.org/en/maillist.html) @@ -29,11 +29,11 @@ Any questions in the form of *how can I use echarts to* or *how to use echarts x ## Release Milestone Discussion -We will start the discussion about the bugs to fix and features of each release in the [mailing list](https://echarts.apache.org/en/maillist.html). You may subscribe to our [mailing list](https://echarts.apache.org/en/maillist.html) to give your valuable advice in milestone dicussions. +We will start the discussion about the bugs to fix and the features of each release in the [mailing list](https://echarts.apache.org/en/maillist.html). You may subscribe to our [mailing list](https://echarts.apache.org/en/maillist.html) to give your valuable advice in milestone discussions. -Regarding the release plan, we will release a mior version at the end of every month. Here is some detail. +Regarding the release plan, we will release a minor version at the end of every month. Here is some detail. -1. Assume our current stable release is 4.3.0. We will start the discussion of milestone of the release two versions ahead, which is 4.5.0 at the beginning of each month. At this time we should also kickoff the developing of the next release, which is 4.4.0. +1. Assume our current stable release is 4.3.0. We will start the discussion of the milestone of the release two versions ahead, which is 4.5.0 at the beginning of each month. At this time we should also kickoff the development of the next release, which is 4.4.0. 2. Finish 4.4.0 developing at about 22th of this month and start the testing. And the 4.5.0 milestone discussion is frozen and published on the [GitHub](https://github.com/apache/echarts/milestone/14) 3. Vote in the mailing list for the 4.4.0 release at the end of this month. @@ -48,7 +48,7 @@ Wiki: [How to setup the dev environment](https://github.com/apache/echarts/wiki/ ## Some hints about using code from other authors + About using some algorithms/formulas or inspired by other's work: - + We can be inspired from other people’s work. There is no problem with copying ideas and no problems associated with that so long as the code is entirely yours and you aren’t violating the license of the inspirational work. You can just follow "normal" source code rules. + + We can be inspired by other people’s work. There is no problem with copying ideas and no problems associated with that so long as the code is entirely yours and you aren’t violating the license of the inspirational work. You can just follow "normal" source code rules. + But when you copy the code, even parts of files, it must remain under the copyright of the original authors. + What's the right thing to do for the public good here? I'll go with: + Be transparent when implementing an existing idea/algorithm. @@ -62,7 +62,7 @@ Wiki: [How to setup the dev environment](https://github.com/apache/echarts/wiki/ + Licenses that are compatible with the Apache license: + BSD and MIT are compatible with the Apache license but CC_BY_SA is not (https://apache.org/legal/resolved.html#cc-sa). + Stack Overflow: - + before intending to copy code from Stack Overlow, we must check: + + before intending to copy code from Stack Overflow, we must check: + https://apache.org/legal/resolved.html#stackoverflow + https://issues.apache.org/jira/browse/LEGAL-471 + Wikipedia (and most Wikimedia Foundation projects):