Skip to content

Commit a6769e8

Browse files
authored
Merge pull request #16756 from apache/master
Merge master into release for 5.3.2
2 parents 06ee7c1 + 65f6044 commit a6769e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+764
-320
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Contributions can be made in varied ways:
1111
- Help others in the issues
1212
- Help solve problems with the issues
1313
- Remind the authors to provide a demo if they are reporting for a bug
14-
- Try to reproduce the problem as describe in the issues
14+
- Try to reproduce the problem as described in the issues
1515
- Make pull requests to fix bugs or implement new features
1616
- Improve or translate the documents
1717
- 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
2929

3030
## Release Milestone Discussion
3131

32-
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.
32+
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.
3333

34-
Regarding the release plan, we will release a mior version at the end of every month. Here is some detail.
34+
Regarding the release plan, we will release a minor version at the end of every month. Here is some detail.
3535

36-
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.
36+
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.
3737
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)
3838
3. Vote in the mailing list for the 4.4.0 release at the end of this month.
3939

@@ -48,7 +48,7 @@ Wiki: [How to setup the dev environment](https://github.com/apache/echarts/wiki/
4848
## Some hints about using code from other authors
4949

5050
+ About using some algorithms/formulas or inspired by other's work:
51-
+ 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.
51+
+ 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.
5252
+ But when you copy the code, even parts of files, it must remain under the copyright of the original authors.
5353
+ What's the right thing to do for the public good here? I'll go with:
5454
+ 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/
6262
+ Licenses that are compatible with the Apache license:
6363
+ BSD and MIT are compatible with the Apache license but CC_BY_SA is not (https://apache.org/legal/resolved.html#cc-sa).
6464
+ Stack Overflow:
65-
+ before intending to copy code from Stack Overlow, we must check:
65+
+ before intending to copy code from Stack Overflow, we must check:
6666
+ https://apache.org/legal/resolved.html#stackoverflow
6767
+ https://issues.apache.org/jira/browse/LEGAL-471
6868
+ Wikipedia (and most Wikimedia Foundation projects):

build/source-release/prepareReleaseMaterials.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ console.log('[Release Commit] ' + releaseCommit);
8282
console.log('[Release Name] ' + releaseFullName);
8383

8484
const voteTpl = fse.readFileSync(pathTool.join(__dirname, './template/vote-release.tpl'), 'utf-8');
85+
const voteResultTpl = fse.readFileSync(pathTool.join(__dirname, './template/vote-result.tpl'), 'utf-8');
8586
const announceTpl = fse.readFileSync(pathTool.join(__dirname, './template/announce-release.tpl'), 'utf-8');
8687
const voteUntil = new Date(+new Date() + (72 + 12) * 3600 * 1000); // 3.5 day.
8788

@@ -95,6 +96,14 @@ fse.writeFileSync(
9596
'utf-8'
9697
);
9798

99+
fse.ensureDirSync(outDir);
100+
fse.writeFileSync(
101+
pathTool.resolve(outDir, 'vote-result.txt'),
102+
voteResultTpl.replace(/{{ECHARTS_RELEASE_VERSION}}/g, rcVersion)
103+
.replace(/{{ECHARTS_RELEASE_VERSION_FULL_NAME}}/g, releaseFullName),
104+
'utf-8'
105+
);
106+
98107
fse.writeFileSync(
99108
pathTool.resolve(outDir, 'announce.txt'),
100109
announceTpl.replace(/{{ECHARTS_RELEASE_VERSION}}/g, stableVersion)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--- Mail To: ---
2+
3+
-----------------------------------------------------------
4+
5+
--- Subject: ---
6+
[RESULT] [VOTE] Release {{ECHARTS_RELEASE_VERSION_FULL_NAME}}
7+
-----------------------------------------------------------
8+
9+
Thanks to all who voted or provided comments!
10+
11+
We received ______NUMBER_OF_+1_VOTES______ +1 votes from the PMC members, and the release has PASSED:
12+
13+
+1 ______NAME______ (binding)
14+
15+
Other votes from the community:
16+
17+
+1 ______NAME______
18+
19+
Vote thread:
20+
https://lists.apache.org/thread/xxx
21+
22+
I'm going to release the source release of Apache ECharts {{ECHARTS_RELEASE_VERSION}}.
23+
Thank you all for making this happen!

src/chart/bar/PictorialBarSeries.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ class PictorialBarSeriesModel extends BaseBarSeriesModel<PictorialBarSeriesOptio
128128

129129
coordinateSystem: Cartesian2D;
130130

131-
132131
hasSymbolVisual = true;
133132
defaultSymbol = 'roundRect';
134133

src/chart/effectScatter/EffectScatterSeries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type ScatterDataValue = OptionDataValue | OptionDataValue[];
4545
interface EffectScatterStatesOptionMixin {
4646
emphasis?: {
4747
focus?: DefaultEmphasisFocus
48-
scale?: boolean
48+
scale?: boolean | number
4949
}
5050
}
5151
export interface EffectScatterStateOption<TCbParams = never> {

src/chart/gauge/GaugeView.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {createSymbol} from '../../util/symbol';
3333
import ZRImage from 'zrender/src/graphic/Image';
3434
import {extend, isFunction, isString} from 'zrender/src/core/util';
3535
import {setCommonECData} from '../../util/innerStore';
36+
import { normalizeArcAngles } from 'zrender/src/core/PathProxy';
3637

3738
type ECSymbol = ReturnType<typeof createSymbol>;
3839

@@ -72,8 +73,6 @@ function formatLabel(value: number, labelFormatter: string | ((value: number) =>
7273
return label;
7374
}
7475

75-
const PI2 = Math.PI * 2;
76-
7776
class GaugeView extends ChartView {
7877
static type = 'gauge' as const;
7978
type = GaugeView.type;
@@ -119,8 +118,12 @@ class GaugeView extends ChartView {
119118
const showAxis = axisLineModel.get('show');
120119
const lineStyleModel = axisLineModel.getModel('lineStyle');
121120
const axisLineWidth = lineStyleModel.get('width');
122-
const angleRangeSpan = !((endAngle - startAngle) % PI2) && endAngle !== startAngle
123-
? PI2 : (endAngle - startAngle) % PI2;
121+
122+
const angles = [startAngle, endAngle];
123+
normalizeArcAngles(angles, !clockwise);
124+
startAngle = angles[0];
125+
endAngle = angles[1];
126+
const angleRangeSpan = endAngle - startAngle;
124127

125128
let prevEndAngle = startAngle;
126129

@@ -173,12 +176,6 @@ class GaugeView extends ChartView {
173176
return colorList[i - 1][1];
174177
};
175178

176-
if (!clockwise) {
177-
const tmp = startAngle;
178-
startAngle = endAngle;
179-
endAngle = tmp;
180-
}
181-
182179
this._renderTicks(
183180
seriesModel, ecModel, api, getColor, posInfo,
184181
startAngle, endAngle, clockwise, axisLineWidth

src/chart/heatmap/HeatmapView.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,13 @@ class HeatmapView extends ChartView {
175175
) {
176176

177177
const coordSys = seriesModel.coordinateSystem as Cartesian2D | Calendar;
178+
const isCartesian2d = isCoordinateSystemType<Cartesian2D>(coordSys, 'cartesian2d');
178179
let width;
179180
let height;
180181
let xAxisExtent;
181182
let yAxisExtent;
182183

183-
if (isCoordinateSystemType<Cartesian2D>(coordSys, 'cartesian2d')) {
184+
if (isCartesian2d) {
184185
const xAxis = coordSys.getAxis('x');
185186
const yAxis = coordSys.getAxis('y');
186187

@@ -193,8 +194,9 @@ class HeatmapView extends ChartView {
193194
}
194195
}
195196

196-
width = xAxis.getBandWidth();
197-
height = yAxis.getBandWidth();
197+
// add 0.5px to avoid the gaps
198+
width = xAxis.getBandWidth() + .5;
199+
height = yAxis.getBandWidth() + .5;
198200
xAxisExtent = xAxis.scale.getExtent();
199201
yAxisExtent = yAxis.scale.getExtent();
200202
}
@@ -212,7 +214,7 @@ class HeatmapView extends ChartView {
212214
let blurScope = emphasisModel.get('blurScope');
213215
let emphasisDisabled = emphasisModel.get('disabled');
214216

215-
const dataDims = isCoordinateSystemType<Cartesian2D>(coordSys, 'cartesian2d')
217+
const dataDims = isCartesian2d
216218
? [
217219
data.mapDimension('x'),
218220
data.mapDimension('y'),
@@ -227,7 +229,7 @@ class HeatmapView extends ChartView {
227229
let rect;
228230
const style = data.getItemVisual(idx, 'style');
229231

230-
if (isCoordinateSystemType<Cartesian2D>(coordSys, 'cartesian2d')) {
232+
if (isCartesian2d) {
231233
const dataDimX = data.get(dataDims[0], idx);
232234
const dataDimY = data.get(dataDims[1], idx);
233235

@@ -248,10 +250,10 @@ class HeatmapView extends ChartView {
248250

249251
rect = new graphic.Rect({
250252
shape: {
251-
x: Math.floor(Math.round(point[0]) - width / 2),
252-
y: Math.floor(Math.round(point[1]) - height / 2),
253-
width: Math.ceil(width),
254-
height: Math.ceil(height)
253+
x: point[0] - width / 2,
254+
y: point[1] - height / 2,
255+
width,
256+
height
255257
},
256258
style
257259
});

src/chart/helper/Symbol.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { ColorString, BlurScope, AnimationOption, ZRColor, AnimationOptionMixin
2727
import SeriesModel from '../../model/Series';
2828
import { PathProps } from 'zrender/src/graphic/Path';
2929
import { SymbolDrawSeriesScope, SymbolDrawItemModelOption } from './SymbolDraw';
30-
import { extend } from 'zrender/src/core/util';
30+
import { extend, isNumber } from 'zrender/src/core/util';
3131
import { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle';
3232
import ZRImage from 'zrender/src/graphic/Image';
3333
import { saveOldStyle } from '../../animation/basicTrasition';
@@ -221,8 +221,8 @@ class Symbol extends graphic.Group {
221221

222222
let labelStatesModels;
223223

224-
let hoverScale;
225-
let cursorStyle;
224+
let hoverScale: SymbolDrawSeriesScope['hoverScale'];
225+
let cursorStyle: SymbolDrawSeriesScope['cursorStyle'];
226226

227227
if (seriesScope) {
228228
emphasisItemStyle = seriesScope.emphasisItemStyle;
@@ -337,7 +337,7 @@ class Symbol extends graphic.Group {
337337
symbolPath.ensureState('blur').style = blurItemStyle;
338338

339339
if (hoverScale) {
340-
const scaleRatio = Math.max(1.1, 3 / this._sizeY);
340+
const scaleRatio = Math.max(isNumber(hoverScale) ? hoverScale : 1.1, 3 / this._sizeY);
341341
emphasisState.scaleX = this._sizeX * scaleRatio;
342342
emphasisState.scaleY = this._sizeY * scaleRatio;
343343
}

src/chart/helper/SymbolDraw.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export interface SymbolDrawItemModelOption extends SymbolOptionMixin<object>,
103103
StatesOptionMixin<SymbolDrawStateOption, {
104104
emphasis?: {
105105
focus?: DefaultEmphasisFocus
106-
scale?: boolean
106+
scale?: boolean | number
107107
}
108108
}>,
109109
SymbolDrawStateOption {
@@ -127,7 +127,7 @@ export interface SymbolDrawSeriesScope {
127127

128128
itemModel?: Model<SymbolDrawItemModelOption>
129129

130-
hoverScale?: boolean
130+
hoverScale?: boolean | number
131131

132132
cursorStyle?: string
133133
fadeIn?: boolean

src/chart/line/LineSeries.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption<CallbackD
101101
lineStyle?: LineStyleOption
102102

103103
areaStyle?: AreaStyleOption & {
104-
origin?: 'auto' | 'start' | 'end'
104+
origin?: 'auto' | 'start' | 'end' | number
105105
}
106106

107107
step?: false | 'start' | 'end' | 'middle'
@@ -213,7 +213,7 @@ class LineSeriesModel extends SeriesModel<LineSeriesOption> {
213213
divideShape: 'clone'
214214
},
215215

216-
triggerLineEvent: false,
216+
triggerLineEvent: false
217217
};
218218

219219
getLegendIcon(opt: LegendIconParams): ECSymbol | Group {

0 commit comments

Comments
 (0)