Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
d1c0f2a
feat(WIP): axis with break
Ovilia Jan 2, 2024
f7a420e
feat(WIP): axis break with label formatter
Ovilia Jan 3, 2024
537de01
feat(WIP): axis break that can be expanded
Ovilia Jan 4, 2024
7a7b54b
feat(WIP): axis break background style
Ovilia Jan 4, 2024
2d554ec
feat(WIP): axis break with zigzags
Ovilia Jan 5, 2024
054c84e
Merge remote-tracking branch 'origin/module_default_esm'
Ovilia Jan 22, 2024
4872429
Merge branch 'master' of github.com:apache/echarts
Ovilia Jan 23, 2024
5dd39af
Merge branch 'master' into feat/break-axis
Ovilia Jan 24, 2024
88f3bf4
Merge branch 'master' into feat/break-axis
Ovilia Feb 26, 2024
3652564
feat(WIP): use clip for break axis with bars
Ovilia Feb 26, 2024
9180efa
feat(WIP): add zFloat to make axis breaks display on top of series
Ovilia Mar 1, 2024
065e4c1
feat(WIP): zigzag shape on top of bars
Ovilia Mar 5, 2024
736a469
feat(WIP): linear mapping inside break area
Ovilia Mar 6, 2024
8633eff
feat(WIP): support vertical and horizontal axes
Ovilia Mar 19, 2024
a2eb6ac
feat(WIP): expand on click
Ovilia Mar 19, 2024
3899e76
feat(WIP): break axis with category axis
Ovilia Mar 21, 2024
1586995
feat(WIP): break axis with category axis
Ovilia Mar 28, 2024
c75ad26
feat(WIP): break axis with category axis
Ovilia Apr 2, 2024
5474ac2
feat(WIP): break axis with category axis
Ovilia Apr 3, 2024
51cec2b
feat: break axis with category axis
Ovilia Apr 8, 2024
fdf9b55
feat: add intraday stock chart demo
Ovilia Apr 9, 2024
24a2c9d
Merge branch 'master' into feat/break-axis
Ovilia May 10, 2024
1cd9e09
Merge branch 'next' into feat/break-axis
Ovilia May 16, 2024
124376d
fix(break): fix lint
Ovilia May 16, 2024
f5f246d
Merge branch 'next' into feat/break-axis
Ovilia May 16, 2024
5673311
fix(break): fix category
Ovilia May 22, 2024
75e22ae
feat(break-axis): fix margin cases
Ovilia Jul 1, 2024
e53f6ca
fix: disable category axes
Ovilia Jul 2, 2024
44135d3
Merge branch 'master' into feat/break-axis
Ovilia Aug 13, 2024
a82672c
chore: merge
Ovilia Oct 29, 2024
72d009f
style: remove unused code
Ovilia Oct 29, 2024
f17615f
fix(break): fix dataToCoord with break axis
Ovilia Oct 30, 2024
2562c50
fix(break-axis): fix time axis ticks
Ovilia Dec 26, 2024
f13cf64
test(break): test case for snap break axis
Ovilia Jan 6, 2025
9193253
Merge branch 'v6' into feat/break-axis
Ovilia Jan 9, 2025
f32300e
fix(tooltip): indicesOfNearest use screen position
Ovilia Jan 9, 2025
356707a
test(break): test case for snap break axis
Ovilia Jan 10, 2025
3a65ed2
fix(break): run visual tests and fix
Ovilia Jan 15, 2025
efe6d87
fix(break): fix nearest in marker
Ovilia Jan 17, 2025
a5bef72
feat(break): break axis events and actions
Ovilia Jan 17, 2025
5378182
fix(break): fix unit test cases
Ovilia Jan 17, 2025
85c56b9
test(break): add test record
Ovilia Feb 21, 2025
9f4dfcf
(feat & fix): (1) break axis (2) time axis (3) test helper. Based on …
100pah Mar 24, 2025
b74fca5
Merge branch 'feat/break-axis' into feat/break-axis-crmod
100pah Mar 24, 2025
0abc0bd
(feat & fix): (1) fix test/axis-break-3.html (2) Add license headers.…
100pah Mar 26, 2025
397943d
(test): manually sync testHelper from branch: v6
100pah Mar 29, 2025
1d52dfb
Merge branch 'v6' into feat/break-axis
Ovilia Mar 31, 2025
fc1d010
Merge branch 'v6' into feat/break-axis
Ovilia Mar 31, 2025
28cebea
Merge branch 'v6' into feat/break-axis-crmod
Ovilia Mar 31, 2025
d8accf1
(tweak) rename public TS type: ScaleBreak => AxisBreak
100pah Apr 1, 2025
fef4195
(tweak) (1) support breakLabelLayout.moveOverlap. (2) rename axisLabe…
100pah Apr 2, 2025
7638b4d
(feat): Support `refineEvent` in `registerAction`, and refactor 'sele…
100pah Apr 4, 2025
bfc206b
(tweak): change axis break event to be user-friendly.
100pah Apr 5, 2025
12a05b2
(tweak): Add break connect test case.
100pah Apr 5, 2025
c37073d
(fix) Fix the extent boundary pruning by break.
100pah Apr 5, 2025
e593355
(test): (1) Sync testHelper update manually. (2) Fix buttons input an…
100pah Apr 6, 2025
26247ac
(feat) Support config margin for axis labels to escape overlap.
100pah Apr 6, 2025
8ed6871
(test) manually sync visual test fix.
100pah Apr 6, 2025
365f33b
(test): (1) Fix visual test facilities: the initial source "Release" …
100pah Apr 7, 2025
90395d5
[test] Fix test facilities. (1) Fix that visual test runtime thrown e…
100pah Apr 8, 2025
2629a7c
(fix) Remove the breaking change introduced by axis break. And export…
100pah Apr 8, 2025
e79c643
(test) Fix axis break test cases.
100pah Apr 8, 2025
092c9ed
Merge branch 'v6' into feat/break-axis-crmod
100pah Apr 8, 2025
18b2d65
Modify the zrender dep to github:ecomfe/zrender#v6 for testing.
100pah Apr 8, 2025
20ad93e
Merge branch 'feat/break-axis' into feat/break-axis-crmod
100pah Apr 8, 2025
7ef21ea
test(time): Fix failed time locale based test case.
100pah Apr 8, 2025
3fa2605
Merge pull request #20857 from apache/feat/break-axis-crmod
Ovilia Apr 10, 2025
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
},
"dependencies": {
"tslib": "2.3.0",
"zrender": "5.6.1"
"zrender": "github:ecomfe/zrender#v6"
},
"devDependencies": {
"@babel/code-frame": "7.10.4",
Expand Down
13 changes: 13 additions & 0 deletions src/chart/bar/BarView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ class BarView extends ChartView {

function createBackground(dataIndex: number) {
const bgLayout = getLayout[coord.type](data, dataIndex);
if (!bgLayout) {
return null;
}
const bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);
bgEl.useStyle(backgroundModel.getItemStyle());
// Only cartesian2d support borderRadius.
Expand All @@ -256,6 +259,9 @@ class BarView extends ChartView {
.add(function (dataIndex) {
const itemModel = data.getItemModel<BarDataItemOption>(dataIndex);
const layout = getLayout[coord.type](data, dataIndex, itemModel);
if (!layout) {
return;
}

if (drawBackground) {
createBackground(dataIndex);
Expand Down Expand Up @@ -327,6 +333,9 @@ class BarView extends ChartView {
.update(function (newIndex, oldIndex) {
const itemModel = data.getItemModel<BarDataItemOption>(newIndex);
const layout = getLayout[coord.type](data, newIndex, itemModel);
if (!layout) {
return;
}

if (drawBackground) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems also need a null checker in line 357,

const bgLayout = getLayout[coord.type](data, newIndex);
if (!bgLayout) { /* ... */ }

let bgEl: Rect | Sector;
Expand Down Expand Up @@ -927,6 +936,10 @@ const getLayout: {
// when calculating bar background layout.
cartesian2d(data, dataIndex, itemModel?): RectLayout {
const layout = data.getItemLayout(dataIndex) as RectLayout;
if (!layout) {
return null;
}

const fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0;

// fix layout with lineWidth
Expand Down
4 changes: 2 additions & 2 deletions src/chart/pie/labelLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ function constrainTextWidth(

const newRect = label.getBoundingRect();
textRect.width = newRect.width;
const margin = (label.style.margin || 0) + 2.1;
const margin = ((label.style.margin as number) || 0) + 2.1;
textRect.height = newRect.height + margin;
textRect.y -= (textRect.height - oldHeight) / 2;
}
Expand Down Expand Up @@ -501,7 +501,7 @@ export default function pieLabelLayout(
const textRect = label.getBoundingRect().clone();
textRect.applyTransform(label.getComputedTransform());
// Text has a default 1px stroke. Exclude this.
const margin = (label.style.margin || 0) + 2.1;
const margin = ((label.style.margin as number) || 0) + 2.1;
textRect.y -= margin / 2;
textRect.height += margin;

Expand Down
2 changes: 1 addition & 1 deletion src/component/axis/AngleAxisView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class AngleAxisView extends AxisView {
const polar = angleAxis.polar;
const radiusExtent = polar.getRadiusAxis().getExtent();

const ticksAngles = angleAxis.getTicksCoords();
const ticksAngles = angleAxis.getTicksCoords({breakTicks: 'none'});
const minorTickAngles = angleAxis.getMinorTicksCoords();

const labels = zrUtil.map(angleAxis.getViewLabels(), function (labelItem: TickLabel) {
Expand Down
Loading