Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Fix charts with on bar and line pages #16712

Merged
merged 3 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion docs/data/charts/areas-demo/PercentAreaChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const getPercents = (array) =>
export default function PercentAreaChart() {
return (
<LineChart
width={500}
height={300}
series={[
{
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/areas-demo/PercentAreaChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const getPercents = (array: number[]) =>
export default function PercentAreaChart() {
return (
<LineChart
width={500}
height={300}
series={[
{
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/areas-demo/SimpleAreaChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const xLabels = [
export default function SimpleAreaChart() {
return (
<LineChart
width={500}
height={300}
series={[{ data: uData, label: 'uv', area: true, showMark: false }]}
xAxis={[{ scaleType: 'point', data: xLabels }]}
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/areas-demo/SimpleAreaChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const xLabels = [
export default function SimpleAreaChart() {
return (
<LineChart
width={500}
height={300}
series={[{ data: uData, label: 'uv', area: true, showMark: false }]}
xAxis={[{ scaleType: 'point', data: xLabels }]}
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/areas-demo/SimpleAreaChart.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<LineChart
width={500}
height={300}
series={[{ data: uData, label: 'uv', area: true, showMark: false }]}
xAxis={[{ scaleType: 'point', data: xLabels }]}
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/areas-demo/StackedAreaChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const xLabels = [
export default function StackedAreaChart() {
return (
<LineChart
width={500}
height={300}
series={[
{ data: uData, label: 'uv', area: true, stack: 'total', showMark: false },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/areas-demo/StackedAreaChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const xLabels = [
export default function StackedAreaChart() {
return (
<LineChart
width={500}
height={300}
series={[
{ data: uData, label: 'uv', area: true, stack: 'total', showMark: false },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/BarChartStackedBySign.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const xLabels = [
export default function BarChartStackedBySign() {
return (
<BarChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', id: 'pvId', stack: 'stack1' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/BarChartStackedBySign.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const xLabels = [
export default function BarChartStackedBySign() {
return (
<BarChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', id: 'pvId', stack: 'stack1' },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<BarChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', id: 'pvId', stack: 'stack1' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/BiaxialBarChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const xLabels = [
export default function BiaxialBarChart() {
return (
<BarChart
width={500}
height={300}
series={[
{
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/BiaxialBarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const xLabels = [
export default function BiaxialBarChart() {
return (
<BarChart
width={500}
height={300}
series={[
{
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/MixedBarChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const xLabels = [
export default function MixedBarChart() {
return (
<BarChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', stack: 'stack1' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/MixedBarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const xLabels = [
export default function MixedBarChart() {
return (
<BarChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', stack: 'stack1' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/MixedBarChart.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<BarChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', stack: 'stack1' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/PositiveAndNegativeBarChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const xLabels = [
export default function PositiveAndNegativeBarChart() {
return (
<BarChart
width={500}
height={300}
series={[
{
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/PositiveAndNegativeBarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const xLabels = [
export default function PositiveAndNegativeBarChart() {
return (
<BarChart
width={500}
height={300}
series={[
{
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/SimpleBarChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const xLabels = [
export default function SimpleBarChart() {
return (
<BarChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', id: 'pvId' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/SimpleBarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const xLabels = [
export default function SimpleBarChart() {
return (
<BarChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', id: 'pvId' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/SimpleBarChart.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<BarChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', id: 'pvId' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/StackedBarChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const xLabels = [
export default function StackedBarChart() {
return (
<BarChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', id: 'pvId', stack: 'total' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/StackedBarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const xLabels = [
export default function StackedBarChart() {
return (
<BarChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', id: 'pvId', stack: 'total' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bar-demo/StackedBarChart.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<BarChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', id: 'pvId', stack: 'total' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/BarLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export default function BarLabel() {
<BarChart
xAxis={[{ scaleType: 'band', data: ['group A', 'group B', 'group C'] }]}
series={[{ data: [4, 3, 5] }, { data: [1, 6, 3] }, { data: [2, 5, 6] }]}
width={500}
height={300}
barLabel="value"
/>
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/BarLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export default function BarLabel() {
<BarChart
xAxis={[{ scaleType: 'band', data: ['group A', 'group B', 'group C'] }]}
series={[{ data: [4, 3, 5] }, { data: [1, 6, 3] }, { data: [2, 5, 6] }]}
width={500}
height={300}
barLabel="value"
/>
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/BarLabel.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<BarChart
xAxis={[{ scaleType: 'band', data: ['group A', 'group B', 'group C'] }]}
series={[{ data: [4, 3, 5] }, { data: [1, 6, 3] }, { data: [2, 5, 6] }]}
width={500}
height={300}
barLabel="value"
/>
1 change: 0 additions & 1 deletion docs/data/charts/bars/BarsDataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const chartSetting = {
label: 'rainfall (mm)',
},
],
width: 500,
height: 300,
margin: { left: 30 },
sx: {
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/BarsDataset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const chartSetting = {
label: 'rainfall (mm)',
},
],
width: 500,
height: 300,
margin: { left: 30 },
sx: {
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/BasicBars.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export default function BasicBars() {
<BarChart
xAxis={[{ scaleType: 'band', data: ['group A', 'group B', 'group C'] }]}
series={[{ data: [4, 3, 5] }, { data: [1, 6, 3] }, { data: [2, 5, 6] }]}
width={500}
height={300}
/>
);
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/BasicBars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export default function BasicBars() {
<BarChart
xAxis={[{ scaleType: 'band', data: ['group A', 'group B', 'group C'] }]}
series={[{ data: [4, 3, 5] }, { data: [1, 6, 3] }, { data: [2, 5, 6] }]}
width={500}
height={300}
/>
);
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/BasicBars.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<BarChart
xAxis={[{ scaleType: 'band', data: ['group A', 'group B', 'group C'] }]}
series={[{ data: [4, 3, 5] }, { data: [1, 6, 3] }, { data: [2, 5, 6] }]}
width={500}
height={300}
/>
1 change: 0 additions & 1 deletion docs/data/charts/bars/CustomLabels.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default function CustomLabels() {
}
return context.bar.height < 60 ? null : item.value?.toString();
}}
width={600}
height={350}
/>
);
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/CustomLabels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default function CustomLabels() {
}
return context.bar.height < 60 ? null : item.value?.toString();
}}
width={600}
height={350}
/>
);
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/CustomLabels.tsx.preview
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
}
return context.bar.height < 60 ? null : item.value?.toString();
}}
width={600}
height={350}
/>
1 change: 0 additions & 1 deletion docs/data/charts/bars/GridDemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const chartSetting = {
label: 'rainfall (mm)',
},
],
width: 500,
height: 400,
};

Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/GridDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const chartSetting = {
label: 'rainfall (mm)',
},
],
width: 500,
height: 400,
};

Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/HorizontalBars.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const chartSetting = {
label: 'rainfall (mm)',
},
],
width: 500,
height: 400,
};

Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/HorizontalBars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const chartSetting = {
label: 'rainfall (mm)',
},
],
width: 500,
height: 400,
};

Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/StackBars.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export default function StackBars() {
}

const config = {
width: 600,
height: 350,
margin: { left: 40 },
hideLegend: true,
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/bars/StackBars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export default function StackBars() {
}

const config: Partial<BarChartProps> = {
width: 600,
height: 350,
margin: { left: 40 },
hideLegend: true,
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/line-demo/BiaxialLineChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const xLabels = [
export default function BiaxialLineChart() {
return (
<LineChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', yAxisId: 'leftAxisId' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/line-demo/BiaxialLineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const xLabels = [
export default function BiaxialLineChart() {
return (
<LineChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', yAxisId: 'leftAxisId' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/line-demo/BiaxialLineChart.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<LineChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', yAxisId: 'leftAxisId' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/line-demo/CustomLineMarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const xLabels = [
export default function CustomLineMarks() {
return (
<LineChart
width={500}
height={300}
series={[
{
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/line-demo/CustomLineMarks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const xLabels = [
export default function CustomLineMarks() {
return (
<LineChart
width={500}
height={300}
series={[
{
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/line-demo/DashedLineChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const xLabels = [
export default function DashedLineChart() {
return (
<LineChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', id: 'pvId' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/line-demo/DashedLineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const xLabels = [
export default function DashedLineChart() {
return (
<LineChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv', id: 'pvId' },
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/line-demo/LineWithPrediction.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export default function LineWithPrediction() {
]}
xAxis={[{ data: [0, 1, 2, 3, 4, 5, 6, 7, 8] }]}
height={200}
width={400}
slots={{ line: CustomAnimatedLine }}
slotProps={{ line: { limit: 5 } }}
sx={{ '& .line-after path': { strokeDasharray: '10 5' } }}
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/line-demo/LineWithPrediction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export default function LineWithPrediction() {
]}
xAxis={[{ data: [0, 1, 2, 3, 4, 5, 6, 7, 8] }]}
height={200}
width={400}
slots={{ line: CustomAnimatedLine }}
slotProps={{ line: { limit: 5 } as any }}
sx={{ '& .line-after path': { strokeDasharray: '10 5' } }}
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/line-demo/LineWithPrediction.tsx.preview
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
]}
xAxis={[{ data: [0, 1, 2, 3, 4, 5, 6, 7, 8] }]}
height={200}
width={400}
slots={{ line: CustomAnimatedLine }}
slotProps={{ line: { limit: 5 } as any }}
sx={{ '& .line-after path': { strokeDasharray: '10 5' } }}
Expand Down
1 change: 0 additions & 1 deletion docs/data/charts/line-demo/SimpleLineChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const xLabels = [
export default function SimpleLineChart() {
return (
<LineChart
width={500}
height={300}
series={[
{ data: pData, label: 'pv' },
Expand Down
Loading