Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
bd767e2
fix(polar): support borderRadius for polar bars #17980
Ovilia Nov 30, 2022
5667432
fix(polar): forgot to commit a new file
Ovilia Nov 30, 2022
4fad608
fix(polar): polar bar animation should start from r0 rather than 0
Ovilia Nov 30, 2022
02d11cd
Merge pull request #17997 from apache/fix-polar-animation
Ovilia Dec 1, 2022
d783405
feat(i18n): add Turkish(TR) translation (#18012)
partitect Dec 2, 2022
45a0689
chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2
dependabot[bot] Dec 4, 2022
6fdb47a
Merge pull request #18015 from apache/dependabot/npm_and_yarn/decode-…
plainheart Dec 5, 2022
47b6407
fix(ssr): fix label doesn't show in line series when `ssr` is enabled.`
plainheart Dec 7, 2022
2e1fbbe
Merge pull request #18047 from apache/release
plainheart Dec 9, 2022
0707a15
chore(deps): bump qs from 6.5.2 to 6.5.3
dependabot[bot] Dec 9, 2022
bc45cd3
Merge pull request #18048 from apache/dependabot/npm_and_yarn/qs-6.5.3
plainheart Dec 9, 2022
b0eeb41
chore(deps-dev): bump terser from 5.3.8 to 5.14.2
Dec 12, 2022
a9330a1
chore: update package-lock.json
plainheart Dec 12, 2022
88766b4
Merge pull request #18055 from neostfox/master
plainheart Dec 12, 2022
a29290a
chore: fix several typos
striezel Dec 14, 2022
b76eff2
Merge pull request #18061 from striezel-stash/several-typos
Ovilia Dec 14, 2022
4b4a732
fix(tree): change symbol type. close #17946
ChepteaCatalin Dec 15, 2022
6be45ba
Merge pull request #18070 from ChepteaCatalin/fix-17946
Ovilia Dec 16, 2022
d6ab9d4
Merge pull request #18032 from apache/fix-ssr-line
pissang Dec 20, 2022
1c57908
chore: fix a few typos
striezel Dec 25, 2022
c86e558
Merge pull request #18103 from striezel-stash/fix-small-typos
plainheart Dec 26, 2022
c5eb4fa
upload example
huangyulie Dec 27, 2022
843c1e8
Merge pull request #18115 from huangyulie/fix-auto-huangyulie
plainheart Dec 28, 2022
c91620e
chore: update notice year to 2023
plainheart Dec 31, 2022
eaa332b
Merge pull request #18128 from apache/update-notice-year
plainheart Dec 31, 2022
3e22c04
chore(deps): bump json5 from 2.1.3 to 2.2.3
dependabot[bot] Jan 6, 2023
27415e3
Merge pull request #18142 from apache/dependabot/npm_and_yarn/json5-2…
plainheart Jan 6, 2023
2d8bc8f
chore: fix few typos (#18203)
Aman1919 Jan 23, 2023
6af586f
<fix>(tooltip): fix alwaysShowContent doesn't work after leaving the …
Feb 1, 2023
376e455
<fix>(tooltip): fix alwaysShowContent doesn't work after leaving the …
Feb 2, 2023
ac64e3f
<fix>(tooltip): fix alwaysShowContent doesn't work after leaving the …
Feb 2, 2023
8401d1a
fix(markArea): markArea range in bar series #18130
Ovilia Feb 2, 2023
9335a76
fix(sunburst): `radial` rotation label might upside down
susiwen8 Feb 4, 2023
8120aab
docs: fix a lot of grammatical errors in CONTRIBUTING.md (#18244)
Shaheer-Ahmd Feb 5, 2023
da29a8d
fix(dataset): object source contains `length` breaks render
susiwen8 Feb 15, 2023
fc2be18
feat(i18n): add Vietnamese(vi_VN) translation (#18279)
nghiepdev Feb 16, 2023
9191ab2
Merge pull request #18276 from susiwen8/18050
Ovilia Feb 16, 2023
3941fc9
fix(sunburst): adjust label rotation
susiwen8 Feb 17, 2023
19c3c9d
<fix>(tooltip): fix alwaysShowContent doesn't work after leaving the …
Feb 21, 2023
c206dc3
chore: simplify code
susiwen8 Feb 22, 2023
6d1f491
chore: ignore files about 'contributing' when publishing to npm (#18301)
fullmooooon Feb 23, 2023
dbec96f
Merge pull request #18240 from susiwen8/#18023
Ovilia Feb 24, 2023
a208201
fix(type): fix `treePathInfo` is missing in the type of sunburst form…
plainheart Feb 25, 2023
dc3a694
chore: merge
Ovilia Feb 27, 2023
d5ea937
fix(markArea): fix situations when dims is not defined
Ovilia Feb 27, 2023
0e2954c
Merge pull request #18221 from jianghaoran116/fix-18111
Ovilia Mar 3, 2023
710e79d
test: add test case for markers
Ovilia Mar 3, 2023
9c743be
Merge pull request #18310 from apache/fix/sunburst-types
plainheart Mar 5, 2023
dca62c9
feat: support bar background borderRadius
Ovilia Mar 6, 2023
e02ca38
style(marker): improve code
Ovilia Mar 6, 2023
50641db
Merge branch 'master' into fix-17980
Ovilia Mar 6, 2023
2752bea
Merge pull request #18229 from apache/fix-18130
Ovilia Mar 6, 2023
baa57b0
Merge pull request #17995 from apache/fix-17980
plainheart Mar 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@
.DS_Store
Thumbs.db
Desktop.ini
/asset/contributing-inspect.png
CONTRIBUTING.md
# Hidden files
.*
.*
24 changes: 12 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Please check out the [Apache Code of Conduct](https://www.apache.org/foundation/

Contributions can be made in varied ways:

- Help others in the issues
- Help others with the issues
- Help solve problems with the issues
- Remind the authors to provide a demo if they are reporting for a bug
- Remind the authors to provide a demo if they are reporting a bug
- 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
Expand All @@ -19,22 +19,22 @@ Contributions can be made in varied ways:

## Issues

We have already prepared issue templates for bug report and feature request. If you want to fire an issue, just entering [New issue](https://github.com/apache/echarts/issues/new/choose) page and select either of them to get started.
We have already prepared issue templates for bug reports and feature requests. If you want to fire an issue, just enter the [New issue](https://github.com/apache/echarts/issues/new/choose) page and select either of them to get started.

Additionally, before doing so, please search for similar questions in our [issues list](https://github.com/apache/echarts/issues?utf8=%E2%9C%93&q=is%3Aissue). If you are able to reproduce an issue found in a closed issue, please create a new issue and reference the closed one.

Please read the [documentation](http://echarts.apache.org/option.html) carefully before asking any questions.

Any questions in the form of *how can I use echarts to* or *how to use echarts x feature to* belong in [Stack Overflow](http://stackoverflow.com), issues with questions like that in the issue tracker will be closed.
Any questions in the form of *how can I use echarts to* or *how to use echarts x feature to* belong in [Stack Overflow](http://stackoverflow.com). Issues with questions like that in the issue tracker will be closed.

## Release Milestone Discussion

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 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 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)
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 kick off the development of the next release, which is 4.4.0.
2. Finish 4.4.0 development on about the 22nd 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.

## Pull Requests
Expand All @@ -47,23 +47,23 @@ 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 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.
+ About using some algorithms/formulas or inspired by others' work:
+ We can be inspired by other people’s work. There is no problem with copying ideas and no problems associated with that as 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.
+ Reference where that idea/algorithm came from.
+ Use standard language when doing so (we need to define standard language).
+ "inspired by", "learned from" and "references to" are vague concepts in copyright.
+ If any copyrightable expression is copied from the existing idea/algorithm, compare its licensing to our licensing policies and include licensing accordingly.
+ Check the original discussion about it in: https://lists.apache.org/list.html?legal-discuss@apache.org:lte=36M:echarts
+ Check the original discussion about it at: https://lists.apache.org/list.html?legal-discuss@apache.org:lte=36M:echarts
+ About adding the license/header of 3rd-party work:
+ https://www.apache.org/legal/src-headers.html#3party
+ 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).
+ 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 Overflow, we must check:
+ before intending to copy code from Stack Overflow, we must check the following:
+ https://apache.org/legal/resolved.html#stackoverflow
+ https://issues.apache.org/jira/browse/LEGAL-471
+ Wikipedia (and most Wikimedia Foundation projects):
+ Wikipedia, and most Wikimedia Foundation projects, are licensed under CC 4.0 BY_SA (and sometimes GFDL) and is incompatible with the Apache license. Therefore, we should not copy code from Wikipedia, or Wikimedia Foundation projects.
+ Wikipedia, and most Wikimedia Foundation projects, are licensed under CC 4.0 BY_SA (and sometimes GFDL) and are incompatible with the Apache license. Therefore, we should not copy code from Wikipedia or Wikimedia Foundation projects.
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache ECharts
Copyright 2017-2022 The Apache Software Foundation
Copyright 2017-2023 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<img style="vertical-align: top;" src="./asset/logo.png?raw=true" alt="logo" height="50px">
</a>

Apache ECharts is a free, powerful charting and visualization library offering an easy way of adding intuitive, interactive, and highly customizable charts to your commercial products. It is written in pure JavaScript and based on <a href="https://github.com/ecomfe/zrender">zrender</a>, which is a whole new lightweight canvas library.
Apache ECharts is a free, powerful charting and visualization library offering easy ways to add intuitive, interactive, and highly customizable charts to your commercial products. It is written in pure JavaScript and based on <a href="https://github.com/ecomfe/zrender">zrender</a>, which is a whole new lightweight canvas library.

**[中文官网](https://echarts.apache.org/zh/index.html)** | **[ENGLISH HOMEPAGE](https://echarts.apache.org/en/index.html)**

Expand Down Expand Up @@ -45,12 +45,12 @@ Execute the instructions in the root directory of the echarts:
npm install

# Rebuild source code immediately in watch mode when changing the source code.
# It opens the `./test` directory and you may open `-cases.html` to get the list
# It opens the `./test` directory, and you may open `-cases.html` to get the list
# of all test cases.
# If you wish to create a test case, run `npm run mktest:help` to learn more.
npm run dev

# Check correctness of TypeScript code.
# Check the correctness of TypeScript code.
npm run checktype

# If intending to build and get all types of the "production" files:
Expand All @@ -61,7 +61,7 @@ Then the "production" files are generated in the `dist` directory.

## Contribution

If you wish to debug locally or make pull requests, please refer to the [contributing](https://github.com/apache/echarts/blob/master/CONTRIBUTING.md) document.
Please refer to the [contributing](https://github.com/apache/echarts/blob/master/CONTRIBUTING.md) document if you wish to debug locally or make pull requests.

## Resources

Expand Down
58 changes: 26 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"serve-handler": "6.1.1",
"slugify": "1.3.4",
"socket.io": "2.5.0",
"terser": "^5.3.8",
"terser": "^5.16.1",
"ts-jest": "^26.4.3",
"typescript": "4.4.3"
}
Expand Down
4 changes: 2 additions & 2 deletions src/chart/bar/BarSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ interface BarStatesMixin {
}

export interface BarItemStyleOption<TCbParams = never> extends ItemStyleOption<TCbParams> {
// Border radius is not supported for bar on polar
borderRadius?: number | number[]
// for polar bars, this is used for sector's cornerRadius
borderRadius?: (number | string)[] | number | string
}
export interface BarDataItemOption extends BarStateOption,
StatesOptionMixin<BarStateOption, BarStatesMixin>,
Expand Down
30 changes: 26 additions & 4 deletions src/chart/bar/BarView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import Path, {PathProps} from 'zrender/src/graphic/Path';
import Group from 'zrender/src/graphic/Group';
import {extend, each, map} from 'zrender/src/core/util';
import {BuiltinTextPosition} from 'zrender/src/core/types';
import {SectorProps} from 'zrender/src/graphic/shape/Sector';
import {RectProps} from 'zrender/src/graphic/shape/Rect';
import {
Rect,
Sector,
Expand Down Expand Up @@ -66,6 +68,7 @@ import { warn } from '../../util/log';
import {createSectorCalculateTextPosition, SectorTextPosition, setSectorTextRotation} from '../../label/sectorLabel';
import { saveOldStyle } from '../../animation/basicTransition';
import Element from 'zrender/src/Element';
import { getSectorCornerRadius } from '../helper/sectorHelper';

const mathMax = Math.max;
const mathMin = Math.min;
Expand Down Expand Up @@ -243,6 +246,9 @@ class BarView extends ChartView {
if (coord.type === 'cartesian2d') {
(bgEl as Rect).setShape('r', barBorderRadius);
}
else {
(bgEl as Sector).setShape('cornerRadius', barBorderRadius);
}
bgEls[dataIndex] = bgEl;
return bgEl;
};
Expand Down Expand Up @@ -334,11 +340,14 @@ class BarView extends ChartView {
if (coord.type === 'cartesian2d') {
(bgEl as Rect).setShape('r', barBorderRadius);
}
else {
(bgEl as Sector).setShape('cornerRadius', barBorderRadius);
}
bgEls[newIndex] = bgEl;
}
const bgLayout = getLayout[coord.type](data, newIndex);
const shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);
updateProps(bgEl, { shape }, animationModel, newIndex);
updateProps<RectProps | SectorProps>(bgEl, { shape }, animationModel, newIndex);
}

let el = oldData.getItemGraphicEl(oldIndex) as BarPossiblePath;
Expand Down Expand Up @@ -803,7 +812,7 @@ const elementCreator: {
const sectorShape = sector.shape;
const animateProperty = isRadial ? 'r' : 'endAngle' as 'r' | 'endAngle';
const animateTarget = {} as SectorShape;
sectorShape[animateProperty] = isRadial ? 0 : layout.startAngle;
sectorShape[animateProperty] = isRadial ? layout.r0 : layout.startAngle;
animateTarget[animateProperty] = layout[animateProperty];
(isUpdate ? updateProps : initProps)(sector, {
shape: animateTarget
Expand Down Expand Up @@ -971,7 +980,8 @@ function createPolarPositionMapping(isRadial: boolean)

function updateStyle(
el: BarPossiblePath,
data: SeriesData, dataIndex: number,
data: SeriesData,
dataIndex: number,
itemModel: Model<BarDataItemOption>,
layout: RectLayout | SectorLayout,
seriesModel: BarSeriesModel,
Expand All @@ -981,7 +991,19 @@ function updateStyle(
const style = data.getItemVisual(dataIndex, 'style');

if (!isPolar) {
(el as Rect).setShape('r', itemModel.get(['itemStyle', 'borderRadius']) || 0);
const borderRadius = itemModel
.get(['itemStyle', 'borderRadius']) as number | number[] || 0;
(el as Rect).setShape('r', borderRadius);
}
else if (!seriesModel.get('roundCap')) {
const sectorShape = (el as Sector).shape;
const cornerRadius = getSectorCornerRadius(
itemModel.getModel('itemStyle'),
sectorShape,
true
);
extend(sectorShape, cornerRadius);
(el as Sector).setShape(sectorShape);
}

el.useStyle(style);
Expand Down
Loading