diff --git a/__tests__/integration/snapshots/static/alphabetIntervalMinHeight.png b/__tests__/integration/snapshots/static/alphabetIntervalMinHeight.png index 412858c293..b3c6d9c9ad 100644 Binary files a/__tests__/integration/snapshots/static/alphabetIntervalMinHeight.png and b/__tests__/integration/snapshots/static/alphabetIntervalMinHeight.png differ diff --git a/__tests__/integration/snapshots/static/alphabetIntervalMinHeightTransposed.png b/__tests__/integration/snapshots/static/alphabetIntervalMinHeightTransposed.png index 32eca6bf65..7576b56e2b 100644 Binary files a/__tests__/integration/snapshots/static/alphabetIntervalMinHeightTransposed.png and b/__tests__/integration/snapshots/static/alphabetIntervalMinHeightTransposed.png differ diff --git a/__tests__/plots/animation/stocks-keyframe.ts b/__tests__/plots/animation/stocks-keyframe.ts index 0a2f3f13bb..ca6ba306ac 100644 --- a/__tests__/plots/animation/stocks-keyframe.ts +++ b/__tests__/plots/animation/stocks-keyframe.ts @@ -265,5 +265,3 @@ export async function stocksKeyframe(): Promise { // The tests point of rest of the keyframes will be test in other test cases. const intervals = keyframes.map((_, i) => (i <= 2 ? [500] : false)); stocksKeyframe.intervals = [false, ...intervals]; - -stocksKeyframe.only = true; diff --git a/site/examples/general/interval/demo/column-min-height.ts b/site/examples/general/interval/demo/column-min-height.ts new file mode 100644 index 0000000000..bf4ac3f294 --- /dev/null +++ b/site/examples/general/interval/demo/column-min-height.ts @@ -0,0 +1,19 @@ +import { Chart } from '@antv/g2'; + +const chart = new Chart({ container: 'container' }); + +chart + .interval() + .data([ + { genre: 'Sports', sold: 0 }, + { genre: 'Strategy', sold: 115 }, + { genre: 'Action', sold: 120 }, + { genre: 'Shooter', sold: 350 }, + { genre: 'Other', sold: 150 }, + ]) + .encode('x', 'genre') + .encode('y', 'sold') + .encode('color', 'genre') + .style('minHeight', 50); + +chart.render(); diff --git a/site/examples/general/interval/demo/column-minHeight.ts b/site/examples/general/interval/demo/column-minHeight.ts deleted file mode 100644 index 848e77f378..0000000000 --- a/site/examples/general/interval/demo/column-minHeight.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Chart } from '@antv/g2'; - -const chart = new Chart({ container: 'container' }); -chart.data([ - { genre: 'Sports', sold: 0 }, - { genre: 'Strategy', sold: 115 }, - { genre: 'Action', sold: 120 }, - { genre: 'Shooter', sold: 350 }, - { genre: 'Other', sold: 150 }, -]); - -chart - .interval() - .encode('x', 'genre') - .encode('y', 'sold') - .encode('color', 'genre') - .axis({ x: { animate: false }, y: { animate: false } }) - .style('draggable', true) - .style('droppable', true) - .style('minHeight', 50); diff --git a/site/examples/general/interval/demo/meta.json b/site/examples/general/interval/demo/meta.json index fe4cd2e012..487c3887df 100644 --- a/site/examples/general/interval/demo/meta.json +++ b/site/examples/general/interval/demo/meta.json @@ -20,6 +20,14 @@ }, "screenshot": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*fu-BSYg7U_kAAAAAAAAAAAAADmJ7AQ/original" }, + { + "filename": "column-min-height.ts", + "title": { + "zh": "限制高度的柱形图", + "en": "Column with minHeight" + }, + "screenshot": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*bfqERaJK8e0AAAAAAAAAAAAADmJ7AQ/original" + }, { "filename": "column-log.ts", "title": {