fix(plugin-chart-echarts): undefined bounds for bubble chart (#26243)

This commit is contained in:
Ville Brofeldt
2023-12-12 09:22:29 -08:00
committed by GitHub
parent 136ad0ef4f
commit 5df544b6fb
4 changed files with 48 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ export const DEFAULT_FORM_DATA: Partial<EchartsBubbleFormData> = {
yAxisTitleMargin: 30,
truncateXAxis: false,
truncateYAxis: false,
xAxisBounds: [null, null],
yAxisBounds: [null, null],
xAxisLabelRotation: defaultXAxis.xAxisLabelRotation,
opacity: 0.6,

View File

@@ -143,8 +143,8 @@ export default function transformProps(chartProps: EchartsBubbleChartProps) {
const yAxisFormatter = getNumberFormatter(yAxisFormat);
const tooltipSizeFormatter = getNumberFormatter(tooltipSizeFormat);
const [xAxisMin, xAxisMax] = xAxisBounds.map(parseAxisBound);
const [yAxisMin, yAxisMax] = yAxisBounds.map(parseAxisBound);
const [xAxisMin, xAxisMax] = (xAxisBounds || []).map(parseAxisBound);
const [yAxisMin, yAxisMax] = (yAxisBounds || []).map(parseAxisBound);
const padding = getPadding(
showLegend,