Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
eb45d17
fix(axis): fix axis label may have inappropriate precision or take to…
plainheart Dec 17, 2025
4cf7cb4
test(dataZoom): fix test case -- accidentally broken in v6. And add m…
100pah Jan 8, 2026
d013d5e
timeScale: Add the missing rounding (broken from a previous version) …
100pah Jan 8, 2026
479dcd4
fix&feat: Change and clarify the rounding error and auto-precision ut…
100pah Jan 9, 2026
d168bf2
fix(axisTick&dataZoom): (1) Apply a better auto-precision method. (2)…
100pah Jan 9, 2026
ffcc636
fix(alignTicks): Change alignTick strategy: (1) Previously some serie…
100pah Jan 9, 2026
a6ab245
feat(alignTicks): (1) Fix LogScale precision. (2) Tweak align ticks l…
100pah Jan 14, 2026
18a23a8
refactor(scale): For readability and maintainability (1) Migrate `cal…
100pah Jan 18, 2026
0f4561d
refactor&fix: (1) Unify series data union code - remove union code fr…
100pah Jan 24, 2026
dedc5dc
fix(logScale): (1) Thoroughly resolve a long-standing issue of non-po…
100pah Jan 25, 2026
28e74ef
fix(pie-on-cartesian): Previously when pie is located on Cartesian, a…
100pah Jan 25, 2026
64305a4
fix(dataZoom): (1) Fix dataZoom dragging cursor style (use 'drag' and…
100pah Jan 25, 2026
fe932a2
refactor&feature:
100pah Feb 17, 2026
1f74fd7
test(visual): Update markers.
100pah Feb 17, 2026
c4a3823
Merge branch 'release' into pr/plainheart_fix/alignTicks-precision
100pah Feb 17, 2026
bdec91e
refactor: Remove the default value of number round due to its unreaso…
100pah Feb 17, 2026
52ceb92
fix: (1) Fix dataZoom AxisProxy can not be cleared when dataZoom opti…
100pah Feb 18, 2026
d47ea4a
fix(dataZoom): Do not display values outside of effective extent.
100pah Feb 19, 2026
b16d96c
chore: Tweak the usage of isFinite.
100pah Feb 20, 2026
8de2b64
feature&fix(axis):
100pah Feb 27, 2026
7a8d38b
fix: Fix inappropriate impl introduced by the previous commits.
100pah Feb 27, 2026
dbfaf6a
fix&feature:
100pah Mar 6, 2026
18bedbb
fix: Temporarily fix incorrect stack base dimension selection when bo…
100pah Mar 6, 2026
bb56e9a
chore: Sync the modification of #21448 to release.
100pah Mar 6, 2026
bd19110
fix: (1) Clarify and uniform terminology and add comments to explain …
100pah Mar 7, 2026
eb7530b
fix(appendData): Fix that the dataZoom inside is disabled when append…
100pah Mar 8, 2026
d2cc085
tweak: Clarity the previous implements of axis statistics.
100pah Mar 9, 2026
12b6d9f
Merge branch 'release' into PR/plainheart_fix/alignTicks-precision
100pah Mar 9, 2026
b094f98
fix(toolbox): Fix that toolbox theme cause corresponding icons are al…
100pah Mar 10, 2026
6de824d
fix(toolbox): Simplify toolbox and fix that toolbox throw error when …
100pah Mar 10, 2026
abb3ad4
fix: fix previous commit.
100pah Mar 12, 2026
9335851
fix: (1) Previously hoverLayerThreshold modification does not work. (…
100pah Mar 15, 2026
56a32c0
fix(axisPointer&tooltip): (1) axisPointer and tooltip should be able …
100pah Mar 15, 2026
f019371
test: add hover layer test.
100pah Mar 17, 2026
91a60fc
fix(progressive): (1) Fix that candlestick large data progressive ren…
100pah Mar 23, 2026
15af0db
fix: Fix min/max label show in category axis. Previously, axisLabel.s…
100pah Mar 24, 2026
7a9eda4
Fix bugs introduced by preceding commit.
100pah Mar 24, 2026
8ddaa5c
Fix category axis min/max ticks/labels show hide when interval > 0. R…
100pah Mar 26, 2026
04763b9
Supplement tests and fix boxplot (broken by preceding commits)
100pah Mar 27, 2026
8cd5c80
fix: Simplify and clarify the code about axis ticks regarding ordinal…
100pah Mar 28, 2026
3ceabff
Fix and add test cases (introduced by preceding commits)
100pah Mar 28, 2026
5fd5980
Tweak mktest.
100pah Mar 28, 2026
b81fa44
fix: Fix issues in regression test.
100pah Mar 29, 2026
56f6dc3
fix: Fix and clarify the definition of axis.`startValue`.
100pah Mar 30, 2026
9c4aa42
fix: Fix candlestick clip path on category axis.
100pah Mar 30, 2026
25bb7da
fix_regression: Fix onZero and startValue backward compatibility.
100pah Mar 31, 2026
3973b21
fix: (1) Fix: fix bar overflow issue on category axis with boundaryGa…
100pah Apr 2, 2026
1e6a16f
test regression: fix recent broken.
100pah Apr 2, 2026
2064963
fix regression: (1) User specified `interval` show be backward compat…
100pah Apr 3, 2026
40b77b4
fix: (1) Fix time axis reach safeLimit when value scale is milisecond…
100pah Apr 5, 2026
990f3ef
test: add test.
100pah Apr 5, 2026
2eec8a8
fix(progressive): No need to explicitly assign zlevel for el.incremen…
100pah Apr 6, 2026
03f0e33
fix regression: (1) Revert the recent change to zlevelKey for backwar…
100pah Apr 7, 2026
694c44a
fix regression: bandWidth and containShape should properly handle sin…
100pah Apr 7, 2026
fbe49c8
fix regression: Fix gauge label precision.
100pah Apr 7, 2026
2e82d33
fix regression: onZero should be backward compatibility. And clarify …
100pah Apr 8, 2026
4b99289
chore: (1) Shift all pure function handlers (legacy pattern) to stage…
100pah Apr 8, 2026
8a17066
fix regression: Fix category axis backward compatibility and axis sta…
100pah Apr 8, 2026
e5744ce
fix regression: Fix NPE and simplify code.
100pah Apr 9, 2026
6dff663
test: Add test util for canvas layer debug.
100pah Apr 9, 2026
14cc0f8
test: Add visual test marks for v6.1.0.
100pah Apr 10, 2026
64c1c66
Merge branch 'release' into PR/plainheart_fix/alignTicks-precision
100pah Apr 10, 2026
963e99d
fix regression: fix test cases.
100pah Apr 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
"test:dts": "npm install --prefix ./test/types && node build/testDts.js",
"test:dts:fast": "node build/testDts.js",
"mktest": "node test/build/mktest.js",
"mktest2": "node test/build/mktest.js --with-inputs-common",
"mktest3": "node test/build/mktest.js --with-inputs-all",
"mktest:canvas:debug": "node test/build/mktest.js --with-canvas-debug",
"mktest:help": "node test/build/mktest.js -h",
"checktype": "tsc --noEmit",
"checkheader": "node build/checkHeader.js",
Expand Down
22 changes: 14 additions & 8 deletions src/chart/bar/BarSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ import { inheritDefaultOption } from '../../util/component';
import SeriesData from '../../data/SeriesData';
import { BrushCommonSelectorsForSeries } from '../../component/brush/selector';
import tokens from '../../visual/tokens';
import { preparePipelineContext } from '../../util/model';
import type { Pipeline } from '../../core/Scheduler';
import type ChartView from '../../view/Chart';
import { SERIES_TYPE_BAR } from '../../layout/barCommon';

type PolarBarLabelPositionExtra = 'start' | 'insideStart' | 'middle' | 'end' | 'insideEnd';
export type PolarBarLabelPosition = SeriesLabelOption['position'] | PolarBarLabelPositionExtra;
Expand Down Expand Up @@ -94,7 +98,7 @@ export interface BarSeriesOption
}

class BarSeriesModel extends BaseBarSeriesModel<BarSeriesOption> {
static type = 'series.bar';
static type = 'series.' + SERIES_TYPE_BAR;
type = BarSeriesModel.type;

static dependencies = ['grid', 'polar'];
Expand All @@ -119,16 +123,18 @@ class BarSeriesModel extends BaseBarSeriesModel<BarSeriesOption> {
}

/**
* @override
* @implement
*/
getProgressiveThreshold() {
__preparePipelineContext(
view: ChartView,
pipeline: Pick<Pipeline, 'progressiveEnabled' | 'threshold'>
) {
const context = preparePipelineContext(this, view, pipeline);
// Do not support progressive in normal mode.
let progressiveThreshold = this.get('progressiveThreshold');
const largeThreshold = this.get('largeThreshold');
if (largeThreshold > progressiveThreshold) {
progressiveThreshold = largeThreshold;
if (context.progressiveRender) {
context.large = true;
}
return progressiveThreshold;
return context;
}

brushSelector(dataIndex: number, data: SeriesData, selectors: BrushCommonSelectorsForSeries): boolean {
Expand Down
54 changes: 18 additions & 36 deletions src/chart/bar/BarView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ import {createSectorCalculateTextPosition, SectorTextPosition, setSectorTextRota
import { saveOldStyle } from '../../animation/basicTransition';
import Element from 'zrender/src/Element';
import { getSectorCornerRadius } from '../helper/sectorHelper';
import { getIncrementalId } from '../../util/model';
import { SERIES_TYPE_BAR } from '../../layout/barCommon';

const mathMax = Math.max;
const mathMin = Math.min;
Expand All @@ -92,32 +94,10 @@ type RealtimeSortConfig = {
// Return a number, based on which the ordinal sorted.
type OrderMapping = (dataIndex: number) => number;

function getClipArea(coord: CoordSysOfBar, data: SeriesData, strictClip?: boolean) {
const coordSysClipArea = coord.getArea && coord.getArea();
if (isCoordinateSystemType<Cartesian2D>(coord, 'cartesian2d')) {
const baseAxis = coord.getBaseAxis();
// When boundaryGap is false or using time axis. bar may exceed the grid.
// We should not clip this part.
// See test/bar2.html
if (!strictClip && (baseAxis.type !== 'category' || !baseAxis.onBand)) {
const expandWidth = data.getLayout('bandWidth');
if (baseAxis.isHorizontal()) {
(coordSysClipArea as CartesianCoordArea).x -= expandWidth;
(coordSysClipArea as CartesianCoordArea).width += expandWidth * 2;
}
else {
(coordSysClipArea as CartesianCoordArea).y -= expandWidth;
(coordSysClipArea as CartesianCoordArea).height += expandWidth * 2;
}
}
}

return coordSysClipArea as PolarCoordArea | CartesianCoordArea;
}

class BarView extends ChartView {
static type = 'bar' as const;
type = BarView.type;
static readonly type = SERIES_TYPE_BAR;
readonly type = SERIES_TYPE_BAR;

private _data: SeriesData;

Expand Down Expand Up @@ -172,7 +152,7 @@ class BarView extends ChartView {
}

incrementalRender(params: StageHandlerProgressParams, seriesModel: BarSeriesModel): void {
// Reset
// Reset for eachRendered
this._progressiveEls = [];
// Do not support progressive in normal mode.
this._incrementalRenderLarge(params, seriesModel);
Expand Down Expand Up @@ -220,12 +200,13 @@ class BarView extends ChartView {
}

const needsClip = seriesModel.get('clip', true) || realtimeSortCfg;
const strictClip = seriesModel.get('clip', true);
const coordSysClipArea = getClipArea(coord, data, strictClip);
// Both `cartesian2d` and `polar` has `getArea()`.
const coordSysClipArea = coord.getArea();
// If there is clipPath created in large mode. Remove it.
group.removeClipPath();
// We don't use clipPath in normal mode because we needs a perfect animation
// And don't want the label are clipped.
// Instead, `Clipper` is used in normal mode.

const roundCap = seriesModel.get('roundCap', true);

Expand Down Expand Up @@ -695,12 +676,12 @@ class BarView extends ChartView {
}

interface Clipper {
(coordSysBoundingRect: PolarCoordArea | CartesianCoordArea, layout: RectLayout | SectorLayout): boolean
(coordSysClipArea: PolarCoordArea | CartesianCoordArea, layout: RectLayout | SectorLayout): boolean
}
const clip: {
[key in 'cartesian2d' | 'polar']: Clipper
} = {
cartesian2d(coordSysBoundingRect: CartesianCoordArea, layout: Rect['shape']) {
cartesian2d(coordSysClipArea: CartesianCoordArea, layout: Rect['shape']) {
const signWidth = layout.width < 0 ? -1 : 1;
const signHeight = layout.height < 0 ? -1 : 1;
// Needs positive width and height
Expand All @@ -713,11 +694,11 @@ const clip: {
layout.height = -layout.height;
}

const coordSysX2 = coordSysBoundingRect.x + coordSysBoundingRect.width;
const coordSysY2 = coordSysBoundingRect.y + coordSysBoundingRect.height;
const x = mathMax(layout.x, coordSysBoundingRect.x);
const coordSysX2 = coordSysClipArea.x + coordSysClipArea.width;
const coordSysY2 = coordSysClipArea.y + coordSysClipArea.height;
const x = mathMax(layout.x, coordSysClipArea.x);
const x2 = mathMin(layout.x + layout.width, coordSysX2);
const y = mathMax(layout.y, coordSysBoundingRect.y);
const y = mathMax(layout.y, coordSysClipArea.y);
const y2 = mathMin(layout.y + layout.height, coordSysY2);

const xClipped = x2 < x;
Expand Down Expand Up @@ -1168,13 +1149,14 @@ function createLarge(

const backgroundModel = seriesModel.getModel('backgroundStyle');
const bgPoints = data.getLayout('largeBackgroundPoints');
const incrementalId = incremental ? getIncrementalId(seriesModel) : 0;

if (bgPoints) {
const bgEl = new LargePath({
shape: {
points: bgPoints
},
incremental: !!incremental,
incremental: incrementalId,
silent: true,
z2: 0
});
Expand All @@ -1189,7 +1171,7 @@ function createLarge(

const el = new LargePath({
shape: {points: data.getLayout('largePoints')},
incremental: !!incremental,
incremental: incrementalId,
ignoreCoarsePointer: true,
z2: 1
});
Expand All @@ -1198,7 +1180,7 @@ function createLarge(
el.barWidth = barWidth;
group.add(el);
el.useStyle(data.getVisual('style'));
// Stroke is rendered first to avoid overlapping with fill
// Stroke is rendered first to avoid overlapping with fill. See #20465
el.style.stroke = null;
// Enable tooltip and user mouse/touch event handlers.
getECData(el).seriesIndex = seriesModel.seriesIndex;
Expand Down
13 changes: 12 additions & 1 deletion src/chart/bar/BaseBarSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ import SeriesData from '../../data/SeriesData';
import {dimPermutations} from '../../component/marker/MarkAreaView';
import { each } from 'zrender/src/core/util';
import type Axis2D from '../../coord/cartesian/Axis2D';
import type Model from '../../model/Model';
import { CategoryAxisBaseOption } from '../../coord/axisCommonTypes';
import type Axis from '../../coord/Axis';


export interface BaseBarSeriesOption<StateOption, ExtraStateOption extends StatesMixinBase = DefaultStatesMixin>
Expand Down Expand Up @@ -106,7 +109,8 @@ class BaseBarSeriesModel<Opts extends BaseBarSeriesOption<unknown> = BaseBarSeri
// If axis type is category, use tick coords instead
if (axis.type === 'category' && dims != null) {
const tickCoords = axis.getTicksCoords();
const alignTicksWithLabel = axis.getTickModel().get('alignWithLabel');
const alignTicksWithLabel = (axis.getTickModel() as Model<CategoryAxisBaseOption['axisTick']>)
.get('alignWithLabel');

let targetTickId = clampData[idx];
// The index of rightmost tick of markArea is 1 larger than x1/y1 index
Expand Down Expand Up @@ -186,6 +190,13 @@ class BaseBarSeriesModel<Opts extends BaseBarSeriesOption<unknown> = BaseBarSeri
return [NaN, NaN];
}

/**
* @implements
*/
__requireStartValue(axis: Axis): boolean {
return this.getBaseAxis() !== axis;
}

static defaultOption: BaseBarSeriesOption<unknown, unknown> = {
// zlevel: 0,
z: 2,
Expand Down
3 changes: 2 additions & 1 deletion src/chart/bar/PictorialBarSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
import type Cartesian2D from '../../coord/cartesian/Cartesian2D';
import { inheritDefaultOption } from '../../util/component';
import tokens from '../../visual/tokens';
import { SERIES_TYPE_PICTORIAL_BAR } from '../../layout/barCommon';

export interface PictorialBarStateOption {
itemStyle?: ItemStyleOption
Expand Down Expand Up @@ -126,7 +127,7 @@ export interface PictorialBarSeriesOption
}

class PictorialBarSeriesModel extends BaseBarSeriesModel<PictorialBarSeriesOption> {
static type = 'series.pictorialBar';
static type = 'series.' + SERIES_TYPE_PICTORIAL_BAR;
type = PictorialBarSeriesModel.type;

static dependencies = ['grid'];
Expand Down
5 changes: 3 additions & 2 deletions src/chart/bar/PictorialBarView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle';
import ZRImage from 'zrender/src/graphic/Image';
import { getECData } from '../../util/innerStore';
import { createClipPath } from '../helper/createClipPathFromCoordSys';
import { SERIES_TYPE_PICTORIAL_BAR } from '../../layout/barCommon';

const BAR_BORDER_WIDTH_QUERY = ['itemStyle', 'borderWidth'] as const;

Expand Down Expand Up @@ -127,8 +128,8 @@ interface PictorialBarElement extends graphic.Group {
}

class PictorialBarView extends ChartView {
static type = 'pictorialBar';
readonly type = PictorialBarView.type;
static readonly type = SERIES_TYPE_PICTORIAL_BAR;
readonly type = SERIES_TYPE_PICTORIAL_BAR;

private _data: SeriesData;

Expand Down
17 changes: 12 additions & 5 deletions src/chart/bar/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,33 @@
*/

import { EChartsExtensionInstallRegisters } from '../../extension';
import * as zrUtil from 'zrender/src/core/util';
import {layout, createProgressiveLayout} from '../../layout/barGrid';
import {
createCrossSeriesLayoutHandler, createProgressiveLayout, registerBarGridAxisHandlers
} from '../../layout/barGrid';
import dataSample from '../../processor/dataSample';

import BarSeries from './BarSeries';
import BarView from './BarView';
import CartesianAxisModel from '../../coord/cartesian/AxisModel';
import { SERIES_TYPE_BAR } from '../../layout/barCommon';

export function install(registers: EChartsExtensionInstallRegisters) {

registers.registerChartView(BarView);
registers.registerSeriesModel(BarSeries);

registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, zrUtil.curry(layout, 'bar'));
registers.registerLayout(
registers.PRIORITY.VISUAL.LAYOUT, createCrossSeriesLayoutHandler(SERIES_TYPE_BAR)
);
// Do layout after other overall layout, which can prepare some information.
registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout('bar'));
registers.registerLayout(
registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout(SERIES_TYPE_BAR)
);

// Down sample after filter
registers.registerProcessor(
registers.PRIORITY.PROCESSOR.STATISTIC,
dataSample('bar')
dataSample(SERIES_TYPE_BAR)
);

/**
Expand Down Expand Up @@ -67,4 +73,5 @@ export function install(registers: EChartsExtensionInstallRegisters) {
);
});

registerBarGridAxisHandlers(registers);
}
16 changes: 12 additions & 4 deletions src/chart/bar/installPictorialBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,22 @@
import { EChartsExtensionInstallRegisters } from '../../extension';
import PictorialBarView from './PictorialBarView';
import PictorialBarSeriesModel from './PictorialBarSeries';
import { createProgressiveLayout, layout } from '../../layout/barGrid';
import { curry } from 'zrender/src/core/util';
import {
createProgressiveLayout, createCrossSeriesLayoutHandler, registerBarGridAxisHandlers
} from '../../layout/barGrid';
import { SERIES_TYPE_PICTORIAL_BAR } from '../../layout/barCommon';

export function install(registers: EChartsExtensionInstallRegisters) {
registers.registerChartView(PictorialBarView);
registers.registerSeriesModel(PictorialBarSeriesModel);

registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, curry(layout, 'pictorialBar'));
registers.registerLayout(
registers.PRIORITY.VISUAL.LAYOUT, createCrossSeriesLayoutHandler(SERIES_TYPE_PICTORIAL_BAR)
);
// Do layout after other overall layout, which can prepare some information.
registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout('pictorialBar'));
registers.registerLayout(
registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout(SERIES_TYPE_PICTORIAL_BAR)
);

registerBarGridAxisHandlers(registers);
}
6 changes: 5 additions & 1 deletion src/chart/boxplot/BoxplotSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export interface BoxplotSeriesOption
coordinateSystem?: 'cartesian2d'

layout?: LayoutOrient
clip?: boolean;
/**
* [min, max] can be percent of band width.
*/
Expand All @@ -73,9 +74,11 @@ export interface BoxplotSeriesOption
data?: (BoxplotDataValue | BoxplotDataItemOption)[]
}

export const SERIES_TYPE_BOXPLOT = 'boxplot';

class BoxplotSeriesModel extends SeriesModel<BoxplotSeriesOption> {

static readonly type = 'series.boxplot';
static readonly type = 'series.' + SERIES_TYPE_BOXPLOT;
readonly type = BoxplotSeriesModel.type;

static readonly dependencies = ['xAxis', 'yAxis', 'grid'];
Expand Down Expand Up @@ -109,6 +112,7 @@ class BoxplotSeriesModel extends SeriesModel<BoxplotSeriesOption> {
legendHoverLink: true,

layout: null,
clip: true,
boxWidth: [7, 50],

itemStyle: {
Expand Down
Loading
Loading