From 5bfa9239f32e7929ad5869f7434472d4f4669edc Mon Sep 17 00:00:00 2001 From: Guillaume Meheut Date: Wed, 6 Nov 2024 09:29:35 +0100 Subject: [PATCH 1/9] skip nice if domainLimit is strict --- packages/x-charts/src/internals/computeAxisValue.ts | 8 ++++---- packages/x-charts/src/models/axis.ts | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/x-charts/src/internals/computeAxisValue.ts b/packages/x-charts/src/internals/computeAxisValue.ts index bd286f0848f6..917a153ace91 100644 --- a/packages/x-charts/src/internals/computeAxisValue.ts +++ b/packages/x-charts/src/internals/computeAxisValue.ts @@ -204,16 +204,16 @@ export function computeAxisValue({ const zoomedRange = zoomScaleRange(range, zoomRange); - // TODO: move nice to prop? Disable when there is zoom? - const scale = getScale(scaleType, axisExtremums, zoomedRange).nice(rawTickNumber); - const [minDomain, maxDomain] = scale.domain(); + const scale = getScale(scaleType, axisExtremums, zoomedRange); + const finalScale = axis.domainLimit === 'nice' ? scale.nice(rawTickNumber) : scale; + const [minDomain, maxDomain] = finalScale.domain(); const domain = [axis.min ?? minDomain, axis.max ?? maxDomain]; completeAxis[axis.id] = { ...axis, data, scaleType: scaleType as any, - scale: scale.domain(domain) as any, + scale: finalScale.domain(domain) as any, tickNumber, colorScale: axis.colorMap && getColorScale(axis.colorMap), }; diff --git a/packages/x-charts/src/models/axis.ts b/packages/x-charts/src/models/axis.ts index fddf9a852a7b..eeb13aa59ab0 100644 --- a/packages/x-charts/src/models/axis.ts +++ b/packages/x-charts/src/models/axis.ts @@ -333,6 +333,13 @@ export type AxisConfig< * If `true`, Reverse the axis scaleBand. */ reverse?: boolean; + /** + * Defines the axis scale domain based on the min/max values of series linked to it. + * - 'nice': Uses the `.nice()` method from d3-scale to round the domain at human friendly values. + * - 'strict': Set the domain to the min/max value displayed. No extras space is added. + * - function: takes as an argument an array with the min/max displayed values, and return the domain. + */ + domainLimit?: 'nice' | 'strict' | ((values: [number, number]) => [number, number]); } & Omit, 'axisId'> & Partial> & TickParams & From 2cc0a915a02df390187c9cee53bd9746f7b99fd8 Mon Sep 17 00:00:00 2001 From: Guillaume Meheut Date: Wed, 6 Nov 2024 09:55:52 +0100 Subject: [PATCH 2/9] run proptypes and remove func --- packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx | 2 ++ .../x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx | 2 ++ packages/x-charts-pro/src/Heatmap/Heatmap.tsx | 2 ++ packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx | 2 ++ .../ResponsiveChartContainerPro.tsx | 2 ++ packages/x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx | 2 ++ packages/x-charts/src/BarChart/BarChart.tsx | 2 ++ packages/x-charts/src/ChartContainer/ChartContainer.tsx | 2 ++ packages/x-charts/src/LineChart/LineChart.tsx | 2 ++ packages/x-charts/src/PieChart/PieChart.tsx | 2 ++ .../src/ResponsiveChartContainer/ResponsiveChartContainer.tsx | 2 ++ packages/x-charts/src/ScatterChart/ScatterChart.tsx | 2 ++ packages/x-charts/src/SparkLineChart/SparkLineChart.tsx | 2 ++ packages/x-charts/src/internals/computeAxisValue.ts | 2 +- packages/x-charts/src/models/axis.ts | 3 +-- 15 files changed, 28 insertions(+), 3 deletions(-) diff --git a/packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx b/packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx index 8424bfbb844f..1d78c6e4ad35 100644 --- a/packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx +++ b/packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx @@ -350,6 +350,7 @@ BarChartPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -437,6 +438,7 @@ BarChartPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx b/packages/x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx index ac179fe6887c..cb8ffccd0a57 100644 --- a/packages/x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx +++ b/packages/x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx @@ -196,6 +196,7 @@ ChartContainerPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -283,6 +284,7 @@ ChartContainerPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts-pro/src/Heatmap/Heatmap.tsx b/packages/x-charts-pro/src/Heatmap/Heatmap.tsx index 202b40914d81..4016617b834f 100644 --- a/packages/x-charts-pro/src/Heatmap/Heatmap.tsx +++ b/packages/x-charts-pro/src/Heatmap/Heatmap.tsx @@ -392,6 +392,7 @@ Heatmap.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -481,6 +482,7 @@ Heatmap.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx b/packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx index b7bbf72236ce..ae5678651109 100644 --- a/packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx +++ b/packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx @@ -422,6 +422,7 @@ LineChartPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -509,6 +510,7 @@ LineChartPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts-pro/src/ResponsiveChartContainerPro/ResponsiveChartContainerPro.tsx b/packages/x-charts-pro/src/ResponsiveChartContainerPro/ResponsiveChartContainerPro.tsx index 1b4d6bb55161..bf17cc6ef065 100644 --- a/packages/x-charts-pro/src/ResponsiveChartContainerPro/ResponsiveChartContainerPro.tsx +++ b/packages/x-charts-pro/src/ResponsiveChartContainerPro/ResponsiveChartContainerPro.tsx @@ -169,6 +169,7 @@ ResponsiveChartContainerPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -256,6 +257,7 @@ ResponsiveChartContainerPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx b/packages/x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx index b415635daf08..34cd171445d9 100644 --- a/packages/x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx +++ b/packages/x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx @@ -291,6 +291,7 @@ ScatterChartPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -378,6 +379,7 @@ ScatterChartPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/BarChart/BarChart.tsx b/packages/x-charts/src/BarChart/BarChart.tsx index 58dea244f59a..4d21c2a37505 100644 --- a/packages/x-charts/src/BarChart/BarChart.tsx +++ b/packages/x-charts/src/BarChart/BarChart.tsx @@ -362,6 +362,7 @@ BarChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -437,6 +438,7 @@ BarChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/ChartContainer/ChartContainer.tsx b/packages/x-charts/src/ChartContainer/ChartContainer.tsx index 661df7f5987a..9012af874e20 100644 --- a/packages/x-charts/src/ChartContainer/ChartContainer.tsx +++ b/packages/x-charts/src/ChartContainer/ChartContainer.tsx @@ -203,6 +203,7 @@ ChartContainer.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -278,6 +279,7 @@ ChartContainer.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/LineChart/LineChart.tsx b/packages/x-charts/src/LineChart/LineChart.tsx index f18aef0a7969..6aeec2354cbf 100644 --- a/packages/x-charts/src/LineChart/LineChart.tsx +++ b/packages/x-charts/src/LineChart/LineChart.tsx @@ -398,6 +398,7 @@ LineChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -473,6 +474,7 @@ LineChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/PieChart/PieChart.tsx b/packages/x-charts/src/PieChart/PieChart.tsx index b0496fa39bb5..f013c27bbdec 100644 --- a/packages/x-charts/src/PieChart/PieChart.tsx +++ b/packages/x-charts/src/PieChart/PieChart.tsx @@ -300,6 +300,7 @@ PieChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -375,6 +376,7 @@ PieChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/ResponsiveChartContainer/ResponsiveChartContainer.tsx b/packages/x-charts/src/ResponsiveChartContainer/ResponsiveChartContainer.tsx index 2b8882a2c2ac..df352040ef26 100644 --- a/packages/x-charts/src/ResponsiveChartContainer/ResponsiveChartContainer.tsx +++ b/packages/x-charts/src/ResponsiveChartContainer/ResponsiveChartContainer.tsx @@ -174,6 +174,7 @@ ResponsiveChartContainer.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -249,6 +250,7 @@ ResponsiveChartContainer.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/ScatterChart/ScatterChart.tsx b/packages/x-charts/src/ScatterChart/ScatterChart.tsx index 97583d34e035..b31ae0804fac 100644 --- a/packages/x-charts/src/ScatterChart/ScatterChart.tsx +++ b/packages/x-charts/src/ScatterChart/ScatterChart.tsx @@ -357,6 +357,7 @@ ScatterChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -432,6 +433,7 @@ ScatterChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx b/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx index af5b7b3d8760..b521015f7736 100644 --- a/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx +++ b/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx @@ -423,6 +423,7 @@ SparkLineChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -489,6 +490,7 @@ SparkLineChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, + domainLimit: PropTypes.oneOf(['nice', 'strict']), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/internals/computeAxisValue.ts b/packages/x-charts/src/internals/computeAxisValue.ts index 917a153ace91..ada1d4dd57c9 100644 --- a/packages/x-charts/src/internals/computeAxisValue.ts +++ b/packages/x-charts/src/internals/computeAxisValue.ts @@ -205,7 +205,7 @@ export function computeAxisValue({ const zoomedRange = zoomScaleRange(range, zoomRange); const scale = getScale(scaleType, axisExtremums, zoomedRange); - const finalScale = axis.domainLimit === 'nice' ? scale.nice(rawTickNumber) : scale; + const finalScale = axis.domainLimit === 'strict' ? scale : scale.nice(rawTickNumber); const [minDomain, maxDomain] = finalScale.domain(); const domain = [axis.min ?? minDomain, axis.max ?? maxDomain]; diff --git a/packages/x-charts/src/models/axis.ts b/packages/x-charts/src/models/axis.ts index eeb13aa59ab0..86c214fcb7be 100644 --- a/packages/x-charts/src/models/axis.ts +++ b/packages/x-charts/src/models/axis.ts @@ -337,9 +337,8 @@ export type AxisConfig< * Defines the axis scale domain based on the min/max values of series linked to it. * - 'nice': Uses the `.nice()` method from d3-scale to round the domain at human friendly values. * - 'strict': Set the domain to the min/max value displayed. No extras space is added. - * - function: takes as an argument an array with the min/max displayed values, and return the domain. */ - domainLimit?: 'nice' | 'strict' | ((values: [number, number]) => [number, number]); + domainLimit?: 'nice' | 'strict'; } & Omit, 'axisId'> & Partial> & TickParams & From 1f9d34ef1b177aeb499c70dcfee1ab314f8b96a8 Mon Sep 17 00:00:00 2001 From: Guillaume Meheut Date: Wed, 6 Nov 2024 11:48:45 +0100 Subject: [PATCH 3/9] add function domain --- packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx | 4 ++-- .../src/ChartContainerPro/ChartContainerPro.tsx | 4 ++-- packages/x-charts-pro/src/Heatmap/Heatmap.tsx | 4 ++-- packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx | 4 ++-- .../ResponsiveChartContainerPro.tsx | 4 ++-- .../x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx | 4 ++-- packages/x-charts/src/BarChart/BarChart.tsx | 4 ++-- packages/x-charts/src/ChartContainer/ChartContainer.tsx | 4 ++-- packages/x-charts/src/LineChart/LineChart.tsx | 4 ++-- packages/x-charts/src/PieChart/PieChart.tsx | 4 ++-- .../ResponsiveChartContainer/ResponsiveChartContainer.tsx | 4 ++-- packages/x-charts/src/ScatterChart/ScatterChart.tsx | 4 ++-- packages/x-charts/src/SparkLineChart/SparkLineChart.tsx | 4 ++-- packages/x-charts/src/internals/computeAxisValue.ts | 5 ++++- packages/x-charts/src/models/axis.ts | 7 ++++--- 15 files changed, 34 insertions(+), 30 deletions(-) diff --git a/packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx b/packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx index 1d78c6e4ad35..da45480f6bc3 100644 --- a/packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx +++ b/packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx @@ -350,7 +350,7 @@ BarChartPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -438,7 +438,7 @@ BarChartPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx b/packages/x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx index cb8ffccd0a57..6fdc9550226a 100644 --- a/packages/x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx +++ b/packages/x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx @@ -196,7 +196,7 @@ ChartContainerPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -284,7 +284,7 @@ ChartContainerPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts-pro/src/Heatmap/Heatmap.tsx b/packages/x-charts-pro/src/Heatmap/Heatmap.tsx index 4016617b834f..87ac869937b4 100644 --- a/packages/x-charts-pro/src/Heatmap/Heatmap.tsx +++ b/packages/x-charts-pro/src/Heatmap/Heatmap.tsx @@ -392,7 +392,7 @@ Heatmap.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -482,7 +482,7 @@ Heatmap.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx b/packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx index ae5678651109..94a5c8dfe705 100644 --- a/packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx +++ b/packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx @@ -422,7 +422,7 @@ LineChartPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -510,7 +510,7 @@ LineChartPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts-pro/src/ResponsiveChartContainerPro/ResponsiveChartContainerPro.tsx b/packages/x-charts-pro/src/ResponsiveChartContainerPro/ResponsiveChartContainerPro.tsx index bf17cc6ef065..f4f1515b909b 100644 --- a/packages/x-charts-pro/src/ResponsiveChartContainerPro/ResponsiveChartContainerPro.tsx +++ b/packages/x-charts-pro/src/ResponsiveChartContainerPro/ResponsiveChartContainerPro.tsx @@ -169,7 +169,7 @@ ResponsiveChartContainerPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -257,7 +257,7 @@ ResponsiveChartContainerPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx b/packages/x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx index 34cd171445d9..b836c9b47272 100644 --- a/packages/x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx +++ b/packages/x-charts-pro/src/ScatterChartPro/ScatterChartPro.tsx @@ -291,7 +291,7 @@ ScatterChartPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -379,7 +379,7 @@ ScatterChartPro.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/BarChart/BarChart.tsx b/packages/x-charts/src/BarChart/BarChart.tsx index 4d21c2a37505..ffc80ca0dc74 100644 --- a/packages/x-charts/src/BarChart/BarChart.tsx +++ b/packages/x-charts/src/BarChart/BarChart.tsx @@ -362,7 +362,7 @@ BarChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -438,7 +438,7 @@ BarChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/ChartContainer/ChartContainer.tsx b/packages/x-charts/src/ChartContainer/ChartContainer.tsx index 9012af874e20..525428415ab2 100644 --- a/packages/x-charts/src/ChartContainer/ChartContainer.tsx +++ b/packages/x-charts/src/ChartContainer/ChartContainer.tsx @@ -203,7 +203,7 @@ ChartContainer.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -279,7 +279,7 @@ ChartContainer.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/LineChart/LineChart.tsx b/packages/x-charts/src/LineChart/LineChart.tsx index 6aeec2354cbf..62cd369ede76 100644 --- a/packages/x-charts/src/LineChart/LineChart.tsx +++ b/packages/x-charts/src/LineChart/LineChart.tsx @@ -398,7 +398,7 @@ LineChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -474,7 +474,7 @@ LineChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/PieChart/PieChart.tsx b/packages/x-charts/src/PieChart/PieChart.tsx index f013c27bbdec..a7a9668dd7e4 100644 --- a/packages/x-charts/src/PieChart/PieChart.tsx +++ b/packages/x-charts/src/PieChart/PieChart.tsx @@ -300,7 +300,7 @@ PieChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -376,7 +376,7 @@ PieChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/ResponsiveChartContainer/ResponsiveChartContainer.tsx b/packages/x-charts/src/ResponsiveChartContainer/ResponsiveChartContainer.tsx index df352040ef26..82929324fc3e 100644 --- a/packages/x-charts/src/ResponsiveChartContainer/ResponsiveChartContainer.tsx +++ b/packages/x-charts/src/ResponsiveChartContainer/ResponsiveChartContainer.tsx @@ -174,7 +174,7 @@ ResponsiveChartContainer.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -250,7 +250,7 @@ ResponsiveChartContainer.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/ScatterChart/ScatterChart.tsx b/packages/x-charts/src/ScatterChart/ScatterChart.tsx index b31ae0804fac..e44b1ab992e0 100644 --- a/packages/x-charts/src/ScatterChart/ScatterChart.tsx +++ b/packages/x-charts/src/ScatterChart/ScatterChart.tsx @@ -357,7 +357,7 @@ ScatterChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -433,7 +433,7 @@ ScatterChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx b/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx index b521015f7736..026535c233cf 100644 --- a/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx +++ b/packages/x-charts/src/SparkLineChart/SparkLineChart.tsx @@ -423,7 +423,7 @@ SparkLineChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), @@ -490,7 +490,7 @@ SparkLineChart.propTypes = { dataKey: PropTypes.string, disableLine: PropTypes.bool, disableTicks: PropTypes.bool, - domainLimit: PropTypes.oneOf(['nice', 'strict']), + domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]), fill: PropTypes.string, hideTooltip: PropTypes.bool, id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/packages/x-charts/src/internals/computeAxisValue.ts b/packages/x-charts/src/internals/computeAxisValue.ts index ada1d4dd57c9..407b1abe1f55 100644 --- a/packages/x-charts/src/internals/computeAxisValue.ts +++ b/packages/x-charts/src/internals/computeAxisValue.ts @@ -198,7 +198,10 @@ export function computeAxisValue({ const scaleType = axis.scaleType ?? ('linear' as const); - const axisExtremums = [axis.min ?? minData, axis.max ?? maxData]; + const axisExtremums = + typeof axis.domainLimit === 'function' + ? axis.domainLimit([minData, maxData]) + : [axis.min ?? minData, axis.max ?? maxData]; const rawTickNumber = getTickNumber({ ...axis, range, domain: axisExtremums }); const tickNumber = rawTickNumber / ((zoomRange[1] - zoomRange[0]) / 100); diff --git a/packages/x-charts/src/models/axis.ts b/packages/x-charts/src/models/axis.ts index 86c214fcb7be..db4e4db56d83 100644 --- a/packages/x-charts/src/models/axis.ts +++ b/packages/x-charts/src/models/axis.ts @@ -335,10 +335,11 @@ export type AxisConfig< reverse?: boolean; /** * Defines the axis scale domain based on the min/max values of series linked to it. - * - 'nice': Uses the `.nice()` method from d3-scale to round the domain at human friendly values. - * - 'strict': Set the domain to the min/max value displayed. No extras space is added. + * - 'nice': Rounds the domain at human friendly values. + * - 'strict': Set the domain to the min/max value provided. No extras space is added. + * - function: takes as an argument an array with the min/max displayed values, and return the domain. */ - domainLimit?: 'nice' | 'strict'; + domainLimit?: 'nice' | 'strict' | ((range: [number, number]) => [number, number]); } & Omit, 'axisId'> & Partial> & TickParams & From 64d07e31d711dbf5940906e10f78996d1e07b716 Mon Sep 17 00:00:00 2001 From: Guillaume Meheut Date: Wed, 6 Nov 2024 12:21:01 +0100 Subject: [PATCH 4/9] add doc --- .../charts/sparkline/CustomDomainYAxis.js | 70 +++++++++++++++++++ .../charts/sparkline/CustomDomainYAxis.tsx | 70 +++++++++++++++++++ docs/data/charts/sparkline/sparkline.md | 4 ++ docs/pages/x/api/charts/axis-config.json | 5 ++ docs/pages/x/api/charts/bar-chart-pro.json | 4 +- docs/pages/x/api/charts/bar-chart.json | 4 +- .../x/api/charts/chart-container-pro.json | 4 +- docs/pages/x/api/charts/chart-container.json | 4 +- docs/pages/x/api/charts/heatmap.json | 4 +- docs/pages/x/api/charts/line-chart-pro.json | 4 +- docs/pages/x/api/charts/line-chart.json | 4 +- docs/pages/x/api/charts/pie-chart.json | 4 +- .../responsive-chart-container-pro.json | 4 +- .../charts/responsive-chart-container.json | 4 +- .../pages/x/api/charts/scatter-chart-pro.json | 4 +- docs/pages/x/api/charts/scatter-chart.json | 4 +- docs/pages/x/api/charts/spark-line-chart.json | 4 +- .../api-docs/charts/axis-config.json | 3 + 18 files changed, 178 insertions(+), 26 deletions(-) create mode 100644 docs/data/charts/sparkline/CustomDomainYAxis.js create mode 100644 docs/data/charts/sparkline/CustomDomainYAxis.tsx diff --git a/docs/data/charts/sparkline/CustomDomainYAxis.js b/docs/data/charts/sparkline/CustomDomainYAxis.js new file mode 100644 index 000000000000..9ccba8f57d05 --- /dev/null +++ b/docs/data/charts/sparkline/CustomDomainYAxis.js @@ -0,0 +1,70 @@ +import * as React from 'react'; +import Stack from '@mui/material/Stack'; +import Box from '@mui/material/Box'; +import Typography from '@mui/material/Typography'; +import { SparkLineChart } from '@mui/x-charts/SparkLineChart'; + +const settings = { + valueFormatter: (v) => `${v}%`, + height: 100, + showTooltip: true, + showHighlight: true, +}; + +const values = [60, -25, 66, 68, 87, 82, 83, 100, 92, 75, 76, 50, 91]; + +export default function CustomDomainYAxis() { + return ( + + Without strict domain limit + + + + + + + + + With strict domain limit + + + + + + + + + With custom function domain limit + + + [min - (min % 10), max + 10 - (max % 10)], + }} + {...settings} + /> + + + [min - (min % 10), max + 10 - (max % 10)], + }} + {...settings} + /> + + + + ); +} diff --git a/docs/data/charts/sparkline/CustomDomainYAxis.tsx b/docs/data/charts/sparkline/CustomDomainYAxis.tsx new file mode 100644 index 000000000000..880ca4650682 --- /dev/null +++ b/docs/data/charts/sparkline/CustomDomainYAxis.tsx @@ -0,0 +1,70 @@ +import * as React from 'react'; +import Stack from '@mui/material/Stack'; +import Box from '@mui/material/Box'; +import Typography from '@mui/material/Typography'; +import { SparkLineChart } from '@mui/x-charts/SparkLineChart'; + +const settings = { + valueFormatter: (v: number | null) => `${v}%`, + height: 100, + showTooltip: true, + showHighlight: true, +} as const; + +const values = [60, -25, 66, 68, 87, 82, 83, 100, 92, 75, 76, 50, 91]; + +export default function CustomDomainYAxis() { + return ( + + Without strict domain limit + + + + + + + + + With strict domain limit + + + + + + + + + With custom function domain limit + + + [min - (min % 10), max + 10 - (max % 10)], + }} + {...settings} + /> + + + [min - (min % 10), max + 10 - (max % 10)], + }} + {...settings} + /> + + + + ); +} diff --git a/docs/data/charts/sparkline/sparkline.md b/docs/data/charts/sparkline/sparkline.md index c85443972104..8bca242dc5be 100644 --- a/docs/data/charts/sparkline/sparkline.md +++ b/docs/data/charts/sparkline/sparkline.md @@ -58,3 +58,7 @@ The following demo shows two sparklines, one with small and another with large v The first row has the default y-axis values, while on the second row a fixed range from `0` to `100` has been set. {{"demo": "CustomYAxis.js"}} + +You can adjust the y-axis range of a sparkline using the `domainLimit` option in the `yAxis` configuration. The demo below shows different ways to set the y-axis range, including default behavior, a strict data-bound range, and a custom function that adjusts the range to rounded values. + +{{"demo": "CustomDomainYAxis.js"}} diff --git a/docs/pages/x/api/charts/axis-config.json b/docs/pages/x/api/charts/axis-config.json index a3b887bf9d81..46510000a0b7 100644 --- a/docs/pages/x/api/charts/axis-config.json +++ b/docs/pages/x/api/charts/axis-config.json @@ -9,6 +9,11 @@ }, "data": { "type": { "description": "V[]" } }, "dataKey": { "type": { "description": "string" } }, + "domainLimit": { + "type": { + "description": "'nice' | 'strict' | ((range: [number, number]) => [number, number])" + } + }, "hideTooltip": { "type": { "description": "boolean" } }, "max": { "type": { "description": "number | Date" } }, "min": { "type": { "description": "number | Date" } }, diff --git a/docs/pages/x/api/charts/bar-chart-pro.json b/docs/pages/x/api/charts/bar-chart-pro.json index eecf8a971d9e..5f9402154cb4 100644 --- a/docs/pages/x/api/charts/bar-chart-pro.json +++ b/docs/pages/x/api/charts/bar-chart-pro.json @@ -107,13 +107,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "zoom": { diff --git a/docs/pages/x/api/charts/bar-chart.json b/docs/pages/x/api/charts/bar-chart.json index d01462ab4231..db313dda3c84 100644 --- a/docs/pages/x/api/charts/bar-chart.json +++ b/docs/pages/x/api/charts/bar-chart.json @@ -100,13 +100,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } } }, diff --git a/docs/pages/x/api/charts/chart-container-pro.json b/docs/pages/x/api/charts/chart-container-pro.json index f609eed0cc23..eb65097dc587 100644 --- a/docs/pages/x/api/charts/chart-container-pro.json +++ b/docs/pages/x/api/charts/chart-container-pro.json @@ -44,13 +44,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "zAxis": { diff --git a/docs/pages/x/api/charts/chart-container.json b/docs/pages/x/api/charts/chart-container.json index e9b1d158b922..5701d94f4014 100644 --- a/docs/pages/x/api/charts/chart-container.json +++ b/docs/pages/x/api/charts/chart-container.json @@ -37,13 +37,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "zAxis": { diff --git a/docs/pages/x/api/charts/heatmap.json b/docs/pages/x/api/charts/heatmap.json index 9b6928effba9..73e966a09c05 100644 --- a/docs/pages/x/api/charts/heatmap.json +++ b/docs/pages/x/api/charts/heatmap.json @@ -7,14 +7,14 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ barGapRatio?: number, categoryGapRatio?: number, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ barGapRatio?: number, categoryGapRatio?: number, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" }, "required": true }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ barGapRatio?: number, categoryGapRatio?: number, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ barGapRatio?: number, categoryGapRatio?: number, classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" }, "required": true }, diff --git a/docs/pages/x/api/charts/line-chart-pro.json b/docs/pages/x/api/charts/line-chart-pro.json index 20e505292250..52fd5760554c 100644 --- a/docs/pages/x/api/charts/line-chart-pro.json +++ b/docs/pages/x/api/charts/line-chart-pro.json @@ -101,13 +101,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "zoom": { diff --git a/docs/pages/x/api/charts/line-chart.json b/docs/pages/x/api/charts/line-chart.json index 7602e918058c..4fccfab6d9ff 100644 --- a/docs/pages/x/api/charts/line-chart.json +++ b/docs/pages/x/api/charts/line-chart.json @@ -94,13 +94,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } } }, diff --git a/docs/pages/x/api/charts/pie-chart.json b/docs/pages/x/api/charts/pie-chart.json index 33ae8035bbe3..360f2158afbf 100644 --- a/docs/pages/x/api/charts/pie-chart.json +++ b/docs/pages/x/api/charts/pie-chart.json @@ -53,13 +53,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } } }, diff --git a/docs/pages/x/api/charts/responsive-chart-container-pro.json b/docs/pages/x/api/charts/responsive-chart-container-pro.json index dffda539ca70..2934c31be309 100644 --- a/docs/pages/x/api/charts/responsive-chart-container-pro.json +++ b/docs/pages/x/api/charts/responsive-chart-container-pro.json @@ -45,13 +45,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "zAxis": { diff --git a/docs/pages/x/api/charts/responsive-chart-container.json b/docs/pages/x/api/charts/responsive-chart-container.json index b4acbdd2cf5a..4bc3544a84b4 100644 --- a/docs/pages/x/api/charts/responsive-chart-container.json +++ b/docs/pages/x/api/charts/responsive-chart-container.json @@ -38,13 +38,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "zAxis": { diff --git a/docs/pages/x/api/charts/scatter-chart-pro.json b/docs/pages/x/api/charts/scatter-chart-pro.json index 05e53fd6a0fc..73c97994b81a 100644 --- a/docs/pages/x/api/charts/scatter-chart-pro.json +++ b/docs/pages/x/api/charts/scatter-chart-pro.json @@ -98,13 +98,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func, zoom?: { filterMode?: 'discard'
| 'keep', maxEnd?: number, maxSpan?: number, minSpan?: number, minStart?: number, panning?: bool, step?: number }
| bool }>" } }, "zAxis": { diff --git a/docs/pages/x/api/charts/scatter-chart.json b/docs/pages/x/api/charts/scatter-chart.json index 2cf1751c2293..06faebdcb3f4 100644 --- a/docs/pages/x/api/charts/scatter-chart.json +++ b/docs/pages/x/api/charts/scatter-chart.json @@ -91,13 +91,13 @@ "xAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "yAxis": { "type": { "name": "arrayOf", - "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" + "description": "Array<{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }>" } }, "zAxis": { diff --git a/docs/pages/x/api/charts/spark-line-chart.json b/docs/pages/x/api/charts/spark-line-chart.json index 7da12ca10d24..ef163ec9fc38 100644 --- a/docs/pages/x/api/charts/spark-line-chart.json +++ b/docs/pages/x/api/charts/spark-line-chart.json @@ -59,13 +59,13 @@ "xAxis": { "type": { "name": "shape", - "description": "{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }" + "description": "{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'bottom'
| 'top', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }" } }, "yAxis": { "type": { "name": "shape", - "description": "{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }" + "description": "{ classes?: object, colorMap?: { colors: Array<string>, type: 'ordinal', unknownColor?: string, values?: Array<Date
| number
| string> }
| { color: Array<string>
| func, max?: Date
| number, min?: Date
| number, type: 'continuous' }
| { colors: Array<string>, thresholds: Array<Date
| number>, type: 'piecewise' }, data?: array, dataKey?: string, disableLine?: bool, disableTicks?: bool, domainLimit?: 'nice'
| 'strict'
| func, fill?: string, hideTooltip?: bool, id?: number
| string, label?: string, labelFontSize?: number, labelStyle?: object, max?: Date
| number, min?: Date
| number, position?: 'left'
| 'right', reverse?: bool, scaleType?: 'band'
| 'linear'
| 'log'
| 'point'
| 'pow'
| 'sqrt'
| 'time'
| 'utc', slotProps?: object, slots?: object, stroke?: string, sx?: Array<func
| object
| bool>
| func
| object, tickFontSize?: number, tickInterval?: 'auto'
| array
| func, tickLabelInterval?: 'auto'
| func, tickLabelPlacement?: 'middle'
| 'tick', tickLabelStyle?: object, tickMaxStep?: number, tickMinStep?: number, tickNumber?: number, tickPlacement?: 'end'
| 'extremities'
| 'middle'
| 'start', tickSize?: number, valueFormatter?: func }" } } }, diff --git a/docs/translations/api-docs/charts/axis-config.json b/docs/translations/api-docs/charts/axis-config.json index feb903056b6a..b545ed7e821a 100644 --- a/docs/translations/api-docs/charts/axis-config.json +++ b/docs/translations/api-docs/charts/axis-config.json @@ -10,6 +10,9 @@ "dataKey": { "description": "The key used to retrieve data from the dataset prop." }, + "domainLimit": { + "description": "Defines the axis scale domain based on the min/max values of series linked to it.
- 'nice': Rounds the domain at human friendly values.
- 'strict': Set the domain to the min/max value provided. No extras space is added.
- function: takes as an argument an array with the min/max displayed values, and return the domain." + }, "hideTooltip": { "description": "If true, hide this value in the tooltip" }, "max": { "description": "The maximal value of the domain.
If not provided, it gets computed to display the entire chart data." From 6ac5194922379bd9d769beb275d1470c807c7ae7 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 6 Nov 2024 14:16:05 +0100 Subject: [PATCH 5/9] review --- .../charts/sparkline/CustomDomainYAxis.js | 49 ++++++++++++++++--- .../charts/sparkline/CustomDomainYAxis.tsx | 49 ++++++++++++++++--- docs/data/charts/sparkline/sparkline.md | 9 +++- .../api-docs/charts/axis-config.json | 2 +- .../src/internals/computeAxisValue.ts | 8 +-- packages/x-charts/src/models/axis.ts | 2 +- 6 files changed, 97 insertions(+), 22 deletions(-) diff --git a/docs/data/charts/sparkline/CustomDomainYAxis.js b/docs/data/charts/sparkline/CustomDomainYAxis.js index 9ccba8f57d05..b63abfefd4f3 100644 --- a/docs/data/charts/sparkline/CustomDomainYAxis.js +++ b/docs/data/charts/sparkline/CustomDomainYAxis.js @@ -11,13 +11,41 @@ const settings = { showHighlight: true, }; -const values = [60, -25, 66, 68, 87, 82, 83, 100, 92, 75, 76, 50, 91]; +// Extend a value to match a multiple of the step. +function extend(value, step) { + if (value > 0) { + // If >0 go to the next step + return step * Math.ceil(value / step); + } + // If <0 go to the previous step + return step * Math.floor(value / step); +} + +const values = [60, -15, 66, 68, 87, 82, 83, 85, 92, 75, 76, 50, 91]; export default function CustomDomainYAxis() { return ( - - Without strict domain limit - + ({ + width: '100%', + '& p': { mb: 1, mt: 2 }, + '& svg': { + borderWidth: 1, + borderStyle: 'solid', + borderColor: theme.palette.divider, + }, + })} + > + + domainLimit="nice", range from -100 to 100 + + @@ -25,7 +53,9 @@ export default function CustomDomainYAxis() { - With strict domain limit + + domainLimit="strict", range from -15 to 92 + - With custom function domain limit + custom function, range from -50 to 100 [min - (min % 10), max + 10 - (max % 10)], + domainLimit: ([min, max]) => [ + min - (Math.abs(min) % 50), + max + 50 - (Math.abs(max) % 50), + ], }} {...settings} /> @@ -59,7 +92,7 @@ export default function CustomDomainYAxis() { plotType="bar" data={values} yAxis={{ - domainLimit: ([min, max]) => [min - (min % 10), max + 10 - (max % 10)], + domainLimit: ([min, max]) => [extend(min, 50), extend(max, 50)], }} {...settings} /> diff --git a/docs/data/charts/sparkline/CustomDomainYAxis.tsx b/docs/data/charts/sparkline/CustomDomainYAxis.tsx index 880ca4650682..a9a856a37ab6 100644 --- a/docs/data/charts/sparkline/CustomDomainYAxis.tsx +++ b/docs/data/charts/sparkline/CustomDomainYAxis.tsx @@ -11,13 +11,41 @@ const settings = { showHighlight: true, } as const; -const values = [60, -25, 66, 68, 87, 82, 83, 100, 92, 75, 76, 50, 91]; +// Extend a value to match a multiple of the step. +function extend(value: number, step: number) { + if (value > 0) { + // If >0 go to the next step + return step * Math.ceil(value / step); + } + // If <0 go to the previous step + return step * Math.floor(value / step); +} + +const values = [60, -15, 66, 68, 87, 82, 83, 85, 92, 75, 76, 50, 91]; export default function CustomDomainYAxis() { return ( - - Without strict domain limit - + ({ + width: '100%', + '& p': { mb: 1, mt: 2 }, + '& svg': { + borderWidth: 1, + borderStyle: 'solid', + borderColor: theme.palette.divider, + }, + })} + > + + domainLimit="nice", range from -100 to 100 + + @@ -25,7 +53,9 @@ export default function CustomDomainYAxis() { - With strict domain limit + + domainLimit="strict", range from -15 to 92 + - With custom function domain limit + custom function, range from -50 to 100 [min - (min % 10), max + 10 - (max % 10)], + domainLimit: ([min, max]) => [ + min - (Math.abs(min) % 50), + max + 50 - (Math.abs(max) % 50), + ], }} {...settings} /> @@ -59,7 +92,7 @@ export default function CustomDomainYAxis() { plotType="bar" data={values} yAxis={{ - domainLimit: ([min, max]) => [min - (min % 10), max + 10 - (max % 10)], + domainLimit: ([min, max]) => [extend(min, 50), extend(max, 50)], }} {...settings} /> diff --git a/docs/data/charts/sparkline/sparkline.md b/docs/data/charts/sparkline/sparkline.md index 8bca242dc5be..305b6ef80c40 100644 --- a/docs/data/charts/sparkline/sparkline.md +++ b/docs/data/charts/sparkline/sparkline.md @@ -59,6 +59,13 @@ The first row has the default y-axis values, while on the second row a fixed ran {{"demo": "CustomYAxis.js"}} -You can adjust the y-axis range of a sparkline using the `domainLimit` option in the `yAxis` configuration. The demo below shows different ways to set the y-axis range, including default behavior, a strict data-bound range, and a custom function that adjusts the range to rounded values. +You can adjust the y-axis range of a sparkline relatively to its data by using the `domainLimit` option in the `yAxis` configuration. + +- `"nice"` Rounds the domain at human friendly values. It's the default behavior. +- `"strict"` Sets the domain to the min/max value to display. +- `([minValue, maxValue]) => [min, max]` Takes the range of value to be display by the axis and return the axis range. + +The demo below shows different ways to set the y-axis range. +They always display the same data, going from -15 to 92, but with different `domainLimit` settings. {{"demo": "CustomDomainYAxis.js"}} diff --git a/docs/translations/api-docs/charts/axis-config.json b/docs/translations/api-docs/charts/axis-config.json index b545ed7e821a..3180a3727064 100644 --- a/docs/translations/api-docs/charts/axis-config.json +++ b/docs/translations/api-docs/charts/axis-config.json @@ -11,7 +11,7 @@ "description": "The key used to retrieve data from the dataset prop." }, "domainLimit": { - "description": "Defines the axis scale domain based on the min/max values of series linked to it.
- 'nice': Rounds the domain at human friendly values.
- 'strict': Set the domain to the min/max value provided. No extras space is added.
- function: takes as an argument an array with the min/max displayed values, and return the domain." + "description": "Defines the axis scale domain based on the min/max values of series linked to it.
- 'nice': Rounds the domain at human friendly values.
- 'strict': Set the domain to the min/max value provided. No extras space is added.
- function: Takes the extremums to display as an arrgument, and return the axis domain." }, "hideTooltip": { "description": "If true, hide this value in the tooltip" }, "max": { diff --git a/packages/x-charts/src/internals/computeAxisValue.ts b/packages/x-charts/src/internals/computeAxisValue.ts index 407b1abe1f55..6b4364e9fb7c 100644 --- a/packages/x-charts/src/internals/computeAxisValue.ts +++ b/packages/x-charts/src/internals/computeAxisValue.ts @@ -198,9 +198,11 @@ export function computeAxisValue({ const scaleType = axis.scaleType ?? ('linear' as const); + const domainLimit = axis.domainLimit ?? 'nice'; + const axisExtremums = - typeof axis.domainLimit === 'function' - ? axis.domainLimit([minData, maxData]) + typeof domainLimit === 'function' + ? domainLimit([minData, maxData]) : [axis.min ?? minData, axis.max ?? maxData]; const rawTickNumber = getTickNumber({ ...axis, range, domain: axisExtremums }); const tickNumber = rawTickNumber / ((zoomRange[1] - zoomRange[0]) / 100); @@ -208,7 +210,7 @@ export function computeAxisValue({ const zoomedRange = zoomScaleRange(range, zoomRange); const scale = getScale(scaleType, axisExtremums, zoomedRange); - const finalScale = axis.domainLimit === 'strict' ? scale : scale.nice(rawTickNumber); + const finalScale = domainLimit === 'nice' ? scale.nice(rawTickNumber) : scale; const [minDomain, maxDomain] = finalScale.domain(); const domain = [axis.min ?? minDomain, axis.max ?? maxDomain]; diff --git a/packages/x-charts/src/models/axis.ts b/packages/x-charts/src/models/axis.ts index db4e4db56d83..3f06f5a6ab22 100644 --- a/packages/x-charts/src/models/axis.ts +++ b/packages/x-charts/src/models/axis.ts @@ -337,7 +337,7 @@ export type AxisConfig< * Defines the axis scale domain based on the min/max values of series linked to it. * - 'nice': Rounds the domain at human friendly values. * - 'strict': Set the domain to the min/max value provided. No extras space is added. - * - function: takes as an argument an array with the min/max displayed values, and return the domain. + * - function: Takes the extremums to display as an arrgument, and return the axis domain. */ domainLimit?: 'nice' | 'strict' | ((range: [number, number]) => [number, number]); } & Omit, 'axisId'> & From 8c906dbdae5f98c42e3df15079ecd8d22d346d68 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 7 Nov 2024 09:57:07 +0100 Subject: [PATCH 6/9] update docs --- docs/data/charts/axis/CustomDomainYAxis.js | 59 +++++++++ docs/data/charts/axis/CustomDomainYAxis.tsx | 63 ++++++++++ docs/data/charts/axis/axis.md | 14 +++ .../charts/sparkline/CustomDomainYAxis.js | 107 +++++++---------- .../charts/sparkline/CustomDomainYAxis.tsx | 113 ++++++++---------- docs/data/charts/sparkline/sparkline.md | 5 +- .../src/internals/computeAxisValue.ts | 12 +- packages/x-charts/src/models/axis.ts | 4 +- 8 files changed, 242 insertions(+), 135 deletions(-) create mode 100644 docs/data/charts/axis/CustomDomainYAxis.js create mode 100644 docs/data/charts/axis/CustomDomainYAxis.tsx diff --git a/docs/data/charts/axis/CustomDomainYAxis.js b/docs/data/charts/axis/CustomDomainYAxis.js new file mode 100644 index 000000000000..e09bd4a4fb1d --- /dev/null +++ b/docs/data/charts/axis/CustomDomainYAxis.js @@ -0,0 +1,59 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import { BarChart } from '@mui/x-charts/BarChart'; +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; + +const settings = { + valueFormatter: (v) => `${v}%`, + height: 200, + showTooltip: true, + showHighlight: true, + series: [{ data: [60, -15, 66, 68, 87, 82, 83, 85, 92, 75, 76, 50, 91] }], + margin: { top: 10, bottom: 20 }, +}; + +// Extend a value to match a multiple of the step. +function extend(value, step) { + if (value > 0) { + // If >0 go to the next step + return step * Math.ceil(value / step); + } + // If <0 go to the previous step + return step * Math.floor(value / step); +} + +export default function CustomDomainYAxis() { + const [domainLimit, setDomainLimit] = React.useState('nice'); + + return ( + + setDomainLimit(event.target.value)} + label="domain limit" + sx={{ minWidth: 150, mb: 2 }} + > + nice + strict + function + + + ({ + min: extend(min, 10), + max: extend(max, 10), + }) + : domainLimit, + }, + ]} + {...settings} + /> + + ); +} diff --git a/docs/data/charts/axis/CustomDomainYAxis.tsx b/docs/data/charts/axis/CustomDomainYAxis.tsx new file mode 100644 index 000000000000..999e0ec8ac39 --- /dev/null +++ b/docs/data/charts/axis/CustomDomainYAxis.tsx @@ -0,0 +1,63 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import { BarChart } from '@mui/x-charts/BarChart'; +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; + +const settings = { + valueFormatter: (v: number | null) => `${v}%`, + height: 200, + showTooltip: true, + showHighlight: true, + series: [{ data: [60, -15, 66, 68, 87, 82, 83, 85, 92, 75, 76, 50, 91] }], + margin: { top: 10, bottom: 20 }, +}; + +// Extend a value to match a multiple of the step. +function extend(value: number, step: number) { + if (value > 0) { + // If >0 go to the next step + return step * Math.ceil(value / step); + } + // If <0 go to the previous step + return step * Math.floor(value / step); +} + +export default function CustomDomainYAxis() { + const [domainLimit, setDomainLimit] = React.useState< + 'nice' | 'strict' | 'function' + >('nice'); + + return ( + + + setDomainLimit(event.target.value as 'nice' | 'strict' | 'function') + } + label="domain limit" + sx={{ minWidth: 150, mb: 2 }} + > + nice + strict + function + + + ({ + min: extend(min, 10), + max: extend(max, 10), + }) + : domainLimit, + }, + ]} + {...settings} + /> + + ); +} diff --git a/docs/data/charts/axis/axis.md b/docs/data/charts/axis/axis.md index e8edd2836409..7fe9cb459380 100644 --- a/docs/data/charts/axis/axis.md +++ b/docs/data/charts/axis/axis.md @@ -86,6 +86,20 @@ xAxis={[ {{"demo": "MinMaxExample.js"}} +### Relative axis sub domain + +You can adjust the axis range relatively to its data by using the `domainLimit` option. +It can take 3 different values: + +- `"nice"` Rounds the domain at human friendly values. It's the default behavior. +- `"strict"` Sets the domain to the min/max value to display. +- `([minValue, maxValue]) => [min, max]` Receives the calculated extremums as parameters, and should return the axis domain. + +The demo below shows different ways to set the y-axis range. +They always display the same data, going from -15 to 92, but with different `domainLimit` settings. + +{{"demo": "CustomDomainYAxis.js"}} + ### Axis direction By default, the axes' directions are left to right and bottom to top. diff --git a/docs/data/charts/sparkline/CustomDomainYAxis.js b/docs/data/charts/sparkline/CustomDomainYAxis.js index b63abfefd4f3..7a96bc10f70e 100644 --- a/docs/data/charts/sparkline/CustomDomainYAxis.js +++ b/docs/data/charts/sparkline/CustomDomainYAxis.js @@ -1,7 +1,10 @@ import * as React from 'react'; +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; import Stack from '@mui/material/Stack'; import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; + import { SparkLineChart } from '@mui/x-charts/SparkLineChart'; const settings = { @@ -9,6 +12,13 @@ const settings = { height: 100, showTooltip: true, showHighlight: true, + data: [60, -15, 66, 68, 87, 82, 83, 85, 92, 75, 76, 50, 91], + margin: { top: 10, bottom: 20, left: 5, right: 5 }, + sx: (theme) => ({ + borderWidth: 1, + borderStyle: 'solid', + borderColor: theme.palette.divider, + }), }; // Extend a value to match a multiple of the step. @@ -21,24 +31,42 @@ function extend(value, step) { return step * Math.floor(value / step); } -const values = [60, -15, 66, 68, 87, 82, 83, 85, 92, 75, 76, 50, 91]; - +const yRange = { + nice: '-100, 100', + strict: '-15, 92', + function: '-20, 100', +}; export default function CustomDomainYAxis() { + const [domainLimitKey, setDomainLimitKey] = React.useState('nice'); + + const domainLimit = + domainLimitKey === 'function' + ? (min, max) => ({ + min: extend(min, 10), + max: extend(max, 10), + }) + : domainLimitKey; return ( - ({ + - - domainLimit="nice", range from -100 to 100 - + + setDomainLimitKey(event.target.value)} + label="domain limit" + sx={{ minWidth: 150, mb: 2 }} + > + nice + strict + function + + y-axis range: {yRange[domainLimitKey]} + + - - - - - - - - domainLimit="strict", range from -15 to 92 - - - - - - - - - - custom function, range from -50 to 100 - - - [ - min - (Math.abs(min) % 50), - max + 50 - (Math.abs(max) % 50), - ], - }} - {...settings} - /> + - [extend(min, 50), extend(max, 50)], - }} - {...settings} - /> + - +
); } diff --git a/docs/data/charts/sparkline/CustomDomainYAxis.tsx b/docs/data/charts/sparkline/CustomDomainYAxis.tsx index a9a856a37ab6..3befb35356ed 100644 --- a/docs/data/charts/sparkline/CustomDomainYAxis.tsx +++ b/docs/data/charts/sparkline/CustomDomainYAxis.tsx @@ -1,7 +1,10 @@ import * as React from 'react'; +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; import Stack from '@mui/material/Stack'; import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; +import { Theme } from '@mui/material/styles'; import { SparkLineChart } from '@mui/x-charts/SparkLineChart'; const settings = { @@ -9,7 +12,14 @@ const settings = { height: 100, showTooltip: true, showHighlight: true, -} as const; + data: [60, -15, 66, 68, 87, 82, 83, 85, 92, 75, 76, 50, 91], + margin: { top: 10, bottom: 20, left: 5, right: 5 }, + sx: (theme: Theme) => ({ + borderWidth: 1, + borderStyle: 'solid', + borderColor: theme.palette.divider, + }), +}; // Extend a value to match a multiple of the step. function extend(value: number, step: number) { @@ -21,24 +31,46 @@ function extend(value: number, step: number) { return step * Math.floor(value / step); } -const values = [60, -15, 66, 68, 87, 82, 83, 85, 92, 75, 76, 50, 91]; - +const yRange = { + nice: '-100, 100', + strict: '-15, 92', + function: '-20, 100', +}; export default function CustomDomainYAxis() { + const [domainLimitKey, setDomainLimitKey] = React.useState< + 'nice' | 'strict' | 'function' + >('nice'); + + const domainLimit = + domainLimitKey === 'function' + ? (min: number, max: number) => ({ + min: extend(min, 10), + max: extend(max, 10), + }) + : domainLimitKey; return ( - ({ + - - domainLimit="nice", range from -100 to 100 - + + + setDomainLimitKey(event.target.value as 'nice' | 'strict' | 'function') + } + label="domain limit" + sx={{ minWidth: 150, mb: 2 }} + > + nice + strict + function + + y-axis range: {yRange[domainLimitKey]} + + - - - - - - - - domainLimit="strict", range from -15 to 92 - - - - - - - - - - custom function, range from -50 to 100 - - - [ - min - (Math.abs(min) % 50), - max + 50 - (Math.abs(max) % 50), - ], - }} - {...settings} - /> + - [extend(min, 50), extend(max, 50)], - }} - {...settings} - /> + - + ); } diff --git a/docs/data/charts/sparkline/sparkline.md b/docs/data/charts/sparkline/sparkline.md index 305b6ef80c40..c07e9cab3e42 100644 --- a/docs/data/charts/sparkline/sparkline.md +++ b/docs/data/charts/sparkline/sparkline.md @@ -60,10 +60,7 @@ The first row has the default y-axis values, while on the second row a fixed ran {{"demo": "CustomYAxis.js"}} You can adjust the y-axis range of a sparkline relatively to its data by using the `domainLimit` option in the `yAxis` configuration. - -- `"nice"` Rounds the domain at human friendly values. It's the default behavior. -- `"strict"` Sets the domain to the min/max value to display. -- `([minValue, maxValue]) => [min, max]` Takes the range of value to be display by the axis and return the axis range. +See the [axis docs page](http://localhost:3001/x/react-charts/axis/#relative-axis-sub-domain) form more information. The demo below shows different ways to set the y-axis range. They always display the same data, going from -15 to 92, but with different `domainLimit` settings. diff --git a/packages/x-charts/src/internals/computeAxisValue.ts b/packages/x-charts/src/internals/computeAxisValue.ts index 6b4364e9fb7c..46d5ad3df1fe 100644 --- a/packages/x-charts/src/internals/computeAxisValue.ts +++ b/packages/x-charts/src/internals/computeAxisValue.ts @@ -200,10 +200,14 @@ export function computeAxisValue({ const domainLimit = axis.domainLimit ?? 'nice'; - const axisExtremums = - typeof domainLimit === 'function' - ? domainLimit([minData, maxData]) - : [axis.min ?? minData, axis.max ?? maxData]; + const axisExtremums = [axis.min ?? minData, axis.max ?? maxData]; + + if (typeof domainLimit === 'function') { + const { min, max } = domainLimit(minData, maxData); + axisExtremums[0] = min; + axisExtremums[1] = max; + } + const rawTickNumber = getTickNumber({ ...axis, range, domain: axisExtremums }); const tickNumber = rawTickNumber / ((zoomRange[1] - zoomRange[0]) / 100); diff --git a/packages/x-charts/src/models/axis.ts b/packages/x-charts/src/models/axis.ts index 3f06f5a6ab22..e42777688f27 100644 --- a/packages/x-charts/src/models/axis.ts +++ b/packages/x-charts/src/models/axis.ts @@ -337,9 +337,9 @@ export type AxisConfig< * Defines the axis scale domain based on the min/max values of series linked to it. * - 'nice': Rounds the domain at human friendly values. * - 'strict': Set the domain to the min/max value provided. No extras space is added. - * - function: Takes the extremums to display as an arrgument, and return the axis domain. + * - function: eceives the calculated extremums as parameters, and should return the axis domain. */ - domainLimit?: 'nice' | 'strict' | ((range: [number, number]) => [number, number]); + domainLimit?: 'nice' | 'strict' | ((min: number, max: number) => { min: number; max: number }); } & Omit, 'axisId'> & Partial> & TickParams & From 43a057e879ff46fd72f79ef2df588802aa4146dd Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 7 Nov 2024 15:24:52 +0100 Subject: [PATCH 7/9] docs:api --- docs/pages/x/api/charts/axis-config.json | 2 +- docs/translations/api-docs/charts/axis-config.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages/x/api/charts/axis-config.json b/docs/pages/x/api/charts/axis-config.json index 46510000a0b7..930aac071102 100644 --- a/docs/pages/x/api/charts/axis-config.json +++ b/docs/pages/x/api/charts/axis-config.json @@ -11,7 +11,7 @@ "dataKey": { "type": { "description": "string" } }, "domainLimit": { "type": { - "description": "'nice' | 'strict' | ((range: [number, number]) => [number, number])" + "description": "'nice' | 'strict' | ((min: number, max: number) => { min: number; max: number })" } }, "hideTooltip": { "type": { "description": "boolean" } }, diff --git a/docs/translations/api-docs/charts/axis-config.json b/docs/translations/api-docs/charts/axis-config.json index 3180a3727064..408f91c75020 100644 --- a/docs/translations/api-docs/charts/axis-config.json +++ b/docs/translations/api-docs/charts/axis-config.json @@ -11,7 +11,7 @@ "description": "The key used to retrieve data from the dataset prop." }, "domainLimit": { - "description": "Defines the axis scale domain based on the min/max values of series linked to it.
- 'nice': Rounds the domain at human friendly values.
- 'strict': Set the domain to the min/max value provided. No extras space is added.
- function: Takes the extremums to display as an arrgument, and return the axis domain." + "description": "Defines the axis scale domain based on the min/max values of series linked to it.
- 'nice': Rounds the domain at human friendly values.
- 'strict': Set the domain to the min/max value provided. No extras space is added.
- function: eceives the calculated extremums as parameters, and should return the axis domain." }, "hideTooltip": { "description": "If true, hide this value in the tooltip" }, "max": { From abb3f8892574a7e5a9156a1b66577a3c971463c6 Mon Sep 17 00:00:00 2001 From: Jose Quintas Date: Thu, 7 Nov 2024 16:45:34 +0100 Subject: [PATCH 8/9] From d644ae0e2d4047bcdf2e1e36ecdb8a8a26eab86e Mon Sep 17 00:00:00 2001 From: Jose Quintas Date: Thu, 7 Nov 2024 17:19:49 +0100 Subject: [PATCH 9/9]