@rowsncolumns/charts 28.1.12 → 28.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -428,11 +428,11 @@ var BasicChart = function (_a) {
428
428
  * Triggers a chart update
429
429
  */
430
430
  var updateChart = function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
431
- var threeDRenderKind, canRender3D, willRender3D, isRegionMap, regionSpec, geoScope, geo, labels, seriesEntry, values, _a, data, unmatched, min, max, textColor, ramp, noDataColor, borderColor, regionSeriesLabel, seriesName, chartDomains, chartSeries, legend, chartType, position, showAxis, isBubble, isHierarchy, skipHeaders_1, labelValues, perSeriesX, perSeriesSize, seriesInputs, i, seriesEntry, resolvedLabel, _b, xValues, sizeValues_1, sharedXValues, sharedSizeValues, _c, categories_1, preparedSeries, sizeValues, sizeScale_1, bubblePalette_1, bubbleItemColor_1, hasBubbleSecondaryAxis, xAxisConfig, tooltipFormatter, bubbleSeriesLabelFor_1, bubbleSeries, bubbleOverlays, hierarchyRows, headerTitle, hierarchyPalette, isTreemap, banner, hierarchyData, rootName, drillDown, seriesDisplayName, hierarchyDepth, levels, hierarchyLegend, legendShown, categoryLegendSeries, sizeNumberFormat_1, tooltipFormatter, hierarchyDataLabels, hierarchyLabelOpts, hierarchyLabel, hierarchyBand, isContour, categories_2, contourSeriesInputs, _d, _e, seriesEntry, dataLabel, _f, _g, values, e_1_1, seriesNames_1, contourPoints, _h, zMin, zMax, contourFormats_1, contourLabel, categories_3, threeDSeriesInputs, _j, _k, seriesEntry, dataLabel, _l, _m, values, e_2_1, seriesNames_2, threeDPalette_1, seriesColorAt_1, categoryAxisLabel, seriesAxisLabel, stackedBar3D_1, threeDFormats_1, threeDTooltipFormatter, threeDSeries, visualMap, xAxis3D, yAxis3D, categoryCount, categoryTotals_1, threeDSeriesInputs_1, threeDSeriesInputs_1_1, entry, isPercent_1, surfacePoints, _o, zMin, zMax, skipHeaders, categories, radarSeriesInputs, _p, _q, seriesEntry, label, values, radarAxisOptions_1, indicators_1, radarData, radarStyle_1, radarColors_1, radarFormats_1, radarDataLabels_1, radarSeriesLabelFor_1, radarTooltipFormatter, variant_1, categories, seriesValues, stockFormats_1, stockRoleIndex_1, stockFormatFor_1, stockDataLabels_1, stockSeriesLabelFor_1, upColor_1, downColor_1, volumePoints, hasVolume, stockGrid, baseStockXAxis, stockXAxis, volumeYAxis, volumeSeries, stockAxisPointer, candleData, lineSeries, stockColors_1, isStacked, isCircularChart, isOfPie, ofPieLayout, isHorizontalBarChart, shouldAggregate, primaryDomainSource, rawPrimaryDomainValues, aggregateDomainValues, categoryLevels, pushSeriesOverlays, sideBySideBarCount, specBarGap, specBarCategoryGap, seriesPalette, paletteColorAt, _loop_1, _r, _s, _t, specSeriesIndex, series, e_3_1, labels, seriesEntry, rawValues, _u, main_1, secondary, otherTotal, total, ofPieType_1, secondScale, halfAngle_1, hasSecondary, MAIN_CX_1, CY_1, MAIN_RADIUS_PCT_1, SECONDARY_CX_1, secondaryRadiusPct_1, BAR_LEFT_1, BAR_RIGHT, barHalfFrac_1, ofPiePalette_1, paletteAt_1, connectorColor_1, primaryDomainSource_1, rawDomainValues, labels, seriesEntry, rawValues_1, totalIndices, steps, accent_1, decreaseColor_1, totalColor_1, pointColors_1, _v, _w, dp, connectors, primaryDomainSource_2, rawDomainValues, labels_1, seriesEntry, rawValues, funnelPalette, funnelColor_1, stageColors_1, _x, _y, dp, funnelData, funnelLayout, quartileMethod, showOutliers, showMeanMarker, boxStats, boxLabels, outlierPoints, meanPoints, _z, _0, seriesEntry, label, rawValues, summary, boxIndex, lo, hi, _1, _2, outlier, boxSeries, boxColor, rawValues, histogramDomainSource, histogramCategories, _3, labels, counts, isPareto_1, cumulativePercents, pareto, histogramSeries, histogramColor, paretoLineColor, renderedSeriesCount, replaceMerge, valueAxisBase, isPareto, hasSecondaryAxis, isPercentStackedBars, primaryAxisNumberFormat, secondaryAxisNumberFormat, axisNumberFormatFor, seriesNumberFormats, seriesNumberFormatFor, tooltipConfig, finalLegend, bottomAxisNameGap, legendBand, positionedLegend, gridConfig, chartDataLabels, seriesLabelOptionFor, isDoughnut, doughnutHoleSize, doughnutSeriesOrder, doughnutRingSet, explosion, explosionOffset, barSeries, len, categoryTotals_2, barSeries_1, barSeries_1_1, s, i, raw, n, barSeries_2, barSeries_2_1, s, seriesWithLabels;
432
- var e_1, _4, e_2, _5, e_4, _6, e_5, _7, e_3, _8, e_6, _9, e_7, _10, e_8, _11, e_9, _12, e_10, _13, e_11, _14;
433
- var _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166;
434
- return tslib_1.__generator(this, function (_167) {
435
- switch (_167.label) {
431
+ var threeDRenderKind, canRender3D, willRender3D, isRegionMap, regionSpec, geoScope, geo, labels, seriesEntry, values, _a, data, unmatched, min, max, textColor, ramp, noDataColor, borderColor, regionSeriesLabel, seriesName, chartDomains, chartSeries, legend, chartType, position, showAxis, isBubble, isHierarchy, skipHeaders_1, labelValues, perSeriesX, perSeriesSize, seriesInputs, i, seriesEntry, resolvedLabel, _b, xValues, sizeValues_1, sharedXValues, sharedSizeValues, _c, categories_1, preparedSeries, sizeValues, sizeScale_1, bubblePalette_1, bubbleItemColor_1, hasBubbleSecondaryAxis, xAxisConfig, tooltipFormatter, bubbleSeriesLabelFor_1, bubbleSeries, bubbleOverlays, bubbleLegend, bubbleBand, hierarchyRows, headerTitle, hierarchyPalette, isTreemap, banner, hierarchyData, rootName, drillDown, seriesDisplayName, hierarchyDepth, levels, hierarchyLegend, legendShown, categoryLegendSeries, sizeNumberFormat_1, tooltipFormatter, hierarchyDataLabels, hierarchyLabelOpts, hierarchyLabel, hierarchyBand, isContour, categories_2, contourSeriesInputs, _d, _e, seriesEntry, dataLabel, _f, _g, values, e_1_1, seriesNames_1, contourPoints, _h, zMin, zMax, contourFormats_1, contourLabel, categories_3, threeDSeriesInputs, _j, _k, seriesEntry, dataLabel, _l, _m, values, e_2_1, seriesNames_2, threeDPalette_1, seriesColorAt_1, categoryAxisLabel, seriesAxisLabel, stackedBar3D_1, threeDFormats_1, threeDTooltipFormatter, threeDSeries, visualMap, xAxis3D, yAxis3D, categoryCount, categoryTotals_1, threeDSeriesInputs_1, threeDSeriesInputs_1_1, entry, isPercent_1, surfacePoints, _o, zMin, zMax, skipHeaders, categories, radarSeriesInputs, _p, _q, seriesEntry, label, values, radarAxisOptions_1, indicators_1, radarData, radarStyle_1, radarColors_1, radarFormats_1, radarDataLabels_1, radarSeriesLabelFor_1, radarTooltipFormatter, radarLegend, radarBand, radarPlotWidth, radarPlotHeight, radarGeometry, variant_1, categories, seriesValues, stockFormats_1, stockRoleIndex_1, stockFormatFor_1, stockDataLabels_1, stockSeriesLabelFor_1, upColor_1, downColor_1, volumePoints, hasVolume, stockGrid, baseStockXAxis, stockXAxis, volumeYAxis, volumeSeries, stockAxisPointer, candleData, lineSeries, stockColors_1, isStacked, isCircularChart, isOfPie, ofPieLayout, isHorizontalBarChart, shouldAggregate, primaryDomainSource, rawPrimaryDomainValues, aggregateDomainValues, categoryLevels, pushSeriesOverlays, sideBySideBarCount, specBarGap, specBarCategoryGap, seriesPalette, paletteColorAt, _loop_1, _r, _s, _t, specSeriesIndex, series, e_3_1, labels, seriesEntry, rawValues, _u, main_1, secondary, otherTotal, total, ofPieType_1, secondScale, halfAngle_1, hasSecondary, MAIN_CX_1, CY_1, MAIN_RADIUS_PCT_1, SECONDARY_CX_1, secondaryRadiusPct_1, BAR_LEFT_1, BAR_RIGHT, barHalfFrac_1, ofPiePalette_1, paletteAt_1, connectorColor_1, primaryDomainSource_1, rawDomainValues, labels, seriesEntry, rawValues_1, totalIndices, steps, accent_1, decreaseColor_1, totalColor_1, pointColors_1, _v, _w, dp, connectors, primaryDomainSource_2, rawDomainValues, labels_1, seriesEntry, rawValues, funnelPalette, funnelColor_1, stageColors_1, _x, _y, dp, funnelData, funnelLayout, funnelLabelsOff, quartileMethod_1, showOutliers_1, showMeanMarker_1, showInnerPoints_1, showMeanLine_1, boxDomainSource, boxCategories_2, grouped_1, groups_1, boxCategories_1, boxCategories_1_1, c, boxSeriesSpecs, slots_1, boxGap, boxPlotWidth, boxBand, boxWidthMax_1, boxCount_1, slotX_1, boxLegend_1, rawValues, histogramDomainSource, histogramCategories, _z, labels, counts, isPareto_1, cumulativePercents, pareto, histogramSeries, histogramColor, paretoLineColor, renderedSeriesCount, replaceMerge, valueAxisBase, isPareto, hasSecondaryAxis, isPercentStackedBars, primaryAxisNumberFormat, secondaryAxisNumberFormat, axisNumberFormatFor, seriesNumberFormats, seriesNumberFormatFor, tooltipConfig, finalLegend, bottomAxisNameGap, legendBand, positionedLegend, gridConfig, chartDataLabels, seriesLabelOptionFor, isDoughnut, doughnutHoleSize, doughnutSeriesOrder, doughnutRingSet, explosion, explosionOffset, barSeries, len, categoryTotals_2, barSeries_1, barSeries_1_1, s, i, raw, n, barSeries_2, barSeries_2_1, s, seriesWithLabels;
432
+ var e_1, _0, e_2, _1, e_4, _2, e_5, _3, e_3, _4, e_6, _5, e_7, _6, e_8, _7, e_9, _8, e_10, _9;
433
+ var _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175, _176, _177, _178, _179, _180;
434
+ return tslib_1.__generator(this, function (_181) {
435
+ switch (_181.label) {
436
436
  case 0:
437
437
  (0, utils_1.debug)("Updating chart", chart);
438
438
  threeDRenderKind = (0, three_d_1.resolve3DRenderKind)(spec.sourceChartType);
@@ -456,7 +456,7 @@ var BasicChart = function (_a) {
456
456
  // Leaving 3-D (spec edit) — the grid3D option doesn't merge back
457
457
  // into a cartesian one, so re-initialize from a clean slate and
458
458
  // let the normal 2-D flow below do a full structural render.
459
- (_15 = chartRef.current) === null || _15 === void 0 ? void 0 : _15.dispose();
459
+ (_10 = chartRef.current) === null || _10 === void 0 ? void 0 : _10.dispose();
460
460
  chartRef.current = undefined;
461
461
  renderedIn3D.current = false;
462
462
  previousChartType.current = undefined;
@@ -470,7 +470,7 @@ var BasicChart = function (_a) {
470
470
  // doesn't merge back into a cartesian one, so re-initialize from
471
471
  // a clean slate and let the normal flow below do a full
472
472
  // structural render.
473
- (_16 = chartRef.current) === null || _16 === void 0 ? void 0 : _16.dispose();
473
+ (_11 = chartRef.current) === null || _11 === void 0 ? void 0 : _11.dispose();
474
474
  chartRef.current = undefined;
475
475
  renderedAsRegionMap.current = false;
476
476
  previousChartType.current = undefined;
@@ -483,7 +483,7 @@ var BasicChart = function (_a) {
483
483
  geoScope = (0, region_map_1.resolveGeoScope)(regionSpec.geoScope);
484
484
  return [4 /*yield*/, (0, region_map_loader_1.loadRegionMapGeo)(geoScope)];
485
485
  case 1:
486
- geo = _167.sent();
486
+ geo = _181.sent();
487
487
  // Entering the region map from a cartesian render: the previous
488
488
  // grid/axis option doesn't merge into the map one, so start from
489
489
  // a bare instance (theme options are re-applied after setOption).
@@ -498,7 +498,7 @@ var BasicChart = function (_a) {
498
498
  if (!geo) {
499
499
  // Map asset failed to load (or unknown scope) — the loader
500
500
  // already warned once; render an empty chart, never crash.
501
- (_17 = chartRef.current) === null || _17 === void 0 ? void 0 : _17.setOption({ series: [] }, { replaceMerge: ["series", "visualMap"] });
501
+ (_12 = chartRef.current) === null || _12 === void 0 ? void 0 : _12.setOption({ series: [] }, { replaceMerge: ["series", "visualMap"] });
502
502
  renderedAsRegionMap.current = true;
503
503
  applyThemeOptions();
504
504
  previousChartType.current = spec.chartType;
@@ -506,7 +506,7 @@ var BasicChart = function (_a) {
506
506
  return [2 /*return*/];
507
507
  }
508
508
  labels = flattenChartDataValues(regionSpec.domains, getDomainValuesFromRange, regionSpec.hiddenDimensionStrategy, false);
509
- seriesEntry = (_18 = regionSpec.series) === null || _18 === void 0 ? void 0 : _18[0];
509
+ seriesEntry = (_13 = regionSpec.series) === null || _13 === void 0 ? void 0 : _13[0];
510
510
  values = seriesEntry
511
511
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, regionSpec.hiddenDimensionStrategy)
512
512
  : [];
@@ -522,7 +522,7 @@ var BasicChart = function (_a) {
522
522
  seriesName = (seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
523
523
  ? seriesEntry.dataLabel
524
524
  : "";
525
- (_19 = chartRef.current) === null || _19 === void 0 ? void 0 : _19.setOption({
525
+ (_14 = chartRef.current) === null || _14 === void 0 ? void 0 : _14.setOption({
526
526
  // The visualMap color scale is the value legend; the series
527
527
  // legend stays hidden unless an authored override turns it on.
528
528
  legend: (0, overrides_1.applyLegendOverrides)(tslib_1.__assign(tslib_1.__assign({}, defaultLegendConfig), { show: false }), spec.legend),
@@ -590,36 +590,36 @@ var BasicChart = function (_a) {
590
590
  hierarchyTitleRef.current = explicitChartTitle;
591
591
  skipHeaders_1 = spec.useFirstRowAsHeaders !== false;
592
592
  labelValues = flattenChartDataValues(spec.bubbleLabels, getDomainValuesFromRange, spec.hiddenDimensionStrategy, skipHeaders_1);
593
- perSeriesX = ((_20 = spec.domains) !== null && _20 !== void 0 ? _20 : []).map(function (dom) {
593
+ perSeriesX = ((_15 = spec.domains) !== null && _15 !== void 0 ? _15 : []).map(function (dom) {
594
594
  return flattenChartDataValues([dom], getSeriesValuesFromRange, spec.hiddenDimensionStrategy, skipHeaders_1);
595
595
  });
596
- perSeriesSize = ((_21 = spec.bubbleSizes) !== null && _21 !== void 0 ? _21 : []).map(function (sz) {
596
+ perSeriesSize = ((_16 = spec.bubbleSizes) !== null && _16 !== void 0 ? _16 : []).map(function (sz) {
597
597
  return flattenChartDataValues([sz], getSeriesValuesFromRange, spec.hiddenDimensionStrategy, skipHeaders_1);
598
598
  });
599
599
  seriesInputs = [];
600
600
  i = 0;
601
- _167.label = 3;
601
+ _181.label = 3;
602
602
  case 3:
603
603
  if (!(i < spec.series.length)) return [3 /*break*/, 7];
604
604
  seriesEntry = spec.series[i];
605
- resolvedLabel = (_22 = seriesEntry.dataLabel) !== null && _22 !== void 0 ? _22 : "";
605
+ resolvedLabel = (_17 = seriesEntry.dataLabel) !== null && _17 !== void 0 ? _17 : "";
606
606
  if (!(resolvedLabel && (0, utils_1.isAFormula)(resolvedLabel))) return [3 /*break*/, 5];
607
607
  _b = chart_spec_utils_1.coerceCalculatedLabel;
608
- return [4 /*yield*/, onRequestCalculate(resolvedLabel, (_23 = position.sheetId) !== null && _23 !== void 0 ? _23 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
608
+ return [4 /*yield*/, onRequestCalculate(resolvedLabel, (_18 = position.sheetId) !== null && _18 !== void 0 ? _18 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
609
609
  case 4:
610
- resolvedLabel = _b.apply(void 0, [_167.sent()]);
611
- _167.label = 5;
610
+ resolvedLabel = _b.apply(void 0, [_181.sent()]);
611
+ _181.label = 5;
612
612
  case 5:
613
- xValues = (_24 = perSeriesX[i]) !== null && _24 !== void 0 ? _24 : perSeriesX[0];
614
- sizeValues_1 = (_25 = perSeriesSize[i]) !== null && _25 !== void 0 ? _25 : perSeriesSize[0];
613
+ xValues = (_19 = perSeriesX[i]) !== null && _19 !== void 0 ? _19 : perSeriesX[0];
614
+ sizeValues_1 = (_20 = perSeriesSize[i]) !== null && _20 !== void 0 ? _20 : perSeriesSize[0];
615
615
  seriesInputs.push(tslib_1.__assign(tslib_1.__assign({ name: resolvedLabel, values: flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy, skipHeaders_1) }, (xValues ? { xValues: xValues } : {})), (sizeValues_1 ? { sizeValues: sizeValues_1 } : {})));
616
- _167.label = 6;
616
+ _181.label = 6;
617
617
  case 6:
618
618
  i++;
619
619
  return [3 /*break*/, 3];
620
620
  case 7:
621
- sharedXValues = (_26 = perSeriesX[0]) !== null && _26 !== void 0 ? _26 : [];
622
- sharedSizeValues = (_27 = perSeriesSize[0]) !== null && _27 !== void 0 ? _27 : [];
621
+ sharedXValues = (_21 = perSeriesX[0]) !== null && _21 !== void 0 ? _21 : [];
622
+ sharedSizeValues = (_22 = perSeriesSize[0]) !== null && _22 !== void 0 ? _22 : [];
623
623
  _c = (0, bubble_1.prepareBubbleSeriesData)({
624
624
  xValues: sharedXValues,
625
625
  labelValues: labelValues,
@@ -640,7 +640,7 @@ var BasicChart = function (_a) {
640
640
  theme.themeColors.accent6,
641
641
  ]);
642
642
  bubbleItemColor_1 = function (seriesEntry, index) {
643
- var e_12, _a;
643
+ var e_11, _a;
644
644
  var _b, _c;
645
645
  var base = (_b = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _b !== void 0 ? _b : (0, utils_1.chartPaletteColorAt)(bubblePalette_1, index);
646
646
  var overrides = new Map();
@@ -652,29 +652,29 @@ var BasicChart = function (_a) {
652
652
  }
653
653
  }
654
654
  }
655
- catch (e_12_1) { e_12 = { error: e_12_1 }; }
655
+ catch (e_11_1) { e_11 = { error: e_11_1 }; }
656
656
  finally {
657
657
  try {
658
658
  if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
659
659
  }
660
- finally { if (e_12) throw e_12.error; }
660
+ finally { if (e_11) throw e_11.error; }
661
661
  }
662
662
  return overrides.size
663
663
  ? function (params) { var _a, _b; return (_b = overrides.get((_a = params === null || params === void 0 ? void 0 : params.data) === null || _a === void 0 ? void 0 : _a.index)) !== null && _b !== void 0 ? _b : base; }
664
664
  : base;
665
665
  };
666
- hasBubbleSecondaryAxis = ((_28 = spec.series) !== null && _28 !== void 0 ? _28 : []).some(function (seriesEntry) { return seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.useSecondaryAxis; });
666
+ hasBubbleSecondaryAxis = ((_23 = spec.series) !== null && _23 !== void 0 ? _23 : []).some(function (seriesEntry) { return seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.useSecondaryAxis; });
667
667
  xAxisConfig = categories_1.length > 0
668
668
  ? {
669
669
  type: "category",
670
670
  data: categories_1,
671
- name: (_29 = spec.horizontalAxisTitle) !== null && _29 !== void 0 ? _29 : "",
671
+ name: (_24 = spec.horizontalAxisTitle) !== null && _24 !== void 0 ? _24 : "",
672
672
  nameLocation: "middle",
673
673
  nameGap: 30,
674
674
  }
675
675
  : {
676
676
  type: "value",
677
- name: (_30 = spec.horizontalAxisTitle) !== null && _30 !== void 0 ? _30 : "",
677
+ name: (_25 = spec.horizontalAxisTitle) !== null && _25 !== void 0 ? _25 : "",
678
678
  nameLocation: "middle",
679
679
  nameGap: 30,
680
680
  };
@@ -756,14 +756,29 @@ var BasicChart = function (_a) {
756
756
  },
757
757
  });
758
758
  });
759
- (_31 = chartRef.current) === null || _31 === void 0 ? void 0 : _31.setOption({
759
+ bubbleLegend = (0, overrides_1.applyLegendOverrides)(tslib_1.__assign(tslib_1.__assign({}, legend), { show: preparedSeries.length > 1, data: preparedSeries.map(function (entry) { return entry.name; }) }), spec.legend);
760
+ bubbleBand = (0, legend_layout_1.reserveEchartsLegendBand)({
761
+ position: (_26 = spec.legend) === null || _26 === void 0 ? void 0 : _26.position,
762
+ visible: bubbleLegend.show !== false,
763
+ labels: preparedSeries.map(function (entry) { return entry.name; }),
764
+ legendFontSize: (_31 = (_28 = (_27 = bubbleLegend.textStyle) === null || _27 === void 0 ? void 0 : _27.fontSize) !== null && _28 !== void 0 ? _28 : (_30 = (_29 = spec.legend) === null || _29 === void 0 ? void 0 : _29.textFormat) === null || _30 === void 0 ? void 0 : _30.fontSize) !== null && _31 !== void 0 ? _31 : 12,
765
+ legendItemWidth: defaultLegendConfig.itemWidth,
766
+ width: width !== null && width !== void 0 ? width : 0,
767
+ height: height !== null && height !== void 0 ? height : 0,
768
+ hasTitle: Boolean(explicitChartTitle),
769
+ titleFontSize: (_33 = (_32 = spec.titleTextFormat) === null || _32 === void 0 ? void 0 : _32.fontSize) !== null && _33 !== void 0 ? _33 : 16,
770
+ hasBottomAxisTitle: Boolean(spec.horizontalAxisTitle),
771
+ bottomAxisNameGap: 30,
772
+ hasLeftAxisTitle: Boolean(spec.verticalAxisTitle),
773
+ });
774
+ (_34 = chartRef.current) === null || _34 === void 0 ? void 0 : _34.setOption({
760
775
  xAxis: [
761
776
  (0, overrides_1.applyAxisOverrides)(tslib_1.__assign({}, xAxisConfig), spec.categoryAxisOptions),
762
777
  ],
763
778
  yAxis: tslib_1.__spreadArray([
764
779
  (0, overrides_1.applyAxisOverrides)({
765
780
  type: "value",
766
- name: (_32 = spec.verticalAxisTitle) !== null && _32 !== void 0 ? _32 : "",
781
+ name: (_35 = spec.verticalAxisTitle) !== null && _35 !== void 0 ? _35 : "",
767
782
  nameLocation: "middle",
768
783
  nameGap: 45,
769
784
  }, spec.valueAxisOptions, undefined, locale)
@@ -778,13 +793,10 @@ var BasicChart = function (_a) {
778
793
  }, spec.secondaryValueAxisOptions, undefined, locale),
779
794
  ]
780
795
  : [])), false),
781
- legend: (0, overrides_1.applyLegendOverrides)(tslib_1.__assign(tslib_1.__assign({}, legend), { show: preparedSeries.length > 1, data: preparedSeries.map(function (entry) { return entry.name; }) }), spec.legend),
782
- grid: {
783
- left: "3%",
784
- right: "4%",
785
- bottom: "3%",
786
- containLabel: true,
787
- },
796
+ legend: tslib_1.__assign(tslib_1.__assign({}, bubbleLegend), bubbleBand.legend),
797
+ // The plot shrinks to leave the legend its own band, as the
798
+ // category charts do (#1089).
799
+ grid: bubbleBand.grid,
788
800
  tooltip: {
789
801
  trigger: "item",
790
802
  formatter: tooltipFormatter,
@@ -827,9 +839,9 @@ var BasicChart = function (_a) {
827
839
  isTreemap = spec.chartType === "treemap";
828
840
  banner = isTreemap && treemapBannerShown(spec.parentLabelLayout);
829
841
  hierarchyData = colorHierarchyNodes((0, hierarchy_1.buildHierarchyTree)(hierarchyRows), hierarchyPalette, { banner: banner });
830
- rootName = hierarchyData.length === 1 ? (_34 = (_33 = hierarchyData[0]) === null || _33 === void 0 ? void 0 : _33.name) !== null && _34 !== void 0 ? _34 : "" : "";
842
+ rootName = hierarchyData.length === 1 ? (_37 = (_36 = hierarchyData[0]) === null || _36 === void 0 ? void 0 : _36.name) !== null && _37 !== void 0 ? _37 : "" : "";
831
843
  drillDown = Boolean(spec.drillDown);
832
- seriesDisplayName = (_36 = (_35 = explicitChartTitle !== null && explicitChartTitle !== void 0 ? explicitChartTitle : headerTitle) !== null && _35 !== void 0 ? _35 : rootName) !== null && _36 !== void 0 ? _36 : "";
844
+ seriesDisplayName = (_39 = (_38 = explicitChartTitle !== null && explicitChartTitle !== void 0 ? explicitChartTitle : headerTitle) !== null && _38 !== void 0 ? _38 : rootName) !== null && _39 !== void 0 ? _39 : "";
833
845
  hierarchyDepth = getHierarchyDepth(hierarchyData);
834
846
  levels = buildHierarchyLevels(hierarchyDepth, {
835
847
  treemap: isTreemap,
@@ -851,7 +863,7 @@ var BasicChart = function (_a) {
851
863
  });
852
864
  })
853
865
  : [];
854
- sizeNumberFormat_1 = (0, axis_number_format_1.resolveSourceNumberFormat)((_38 = (_37 = spec.sizeData) === null || _37 === void 0 ? void 0 : _37[0]) === null || _38 === void 0 ? void 0 : _38.sources, getFormattingFromRange, spec.hiddenDimensionStrategy);
866
+ sizeNumberFormat_1 = (0, axis_number_format_1.resolveSourceNumberFormat)((_41 = (_40 = spec.sizeData) === null || _40 === void 0 ? void 0 : _40[0]) === null || _41 === void 0 ? void 0 : _41.sources, getFormattingFromRange, spec.hiddenDimensionStrategy);
855
867
  tooltipFormatter = function (params) {
856
868
  var _a;
857
869
  var value = Array.isArray(params.value)
@@ -867,20 +879,20 @@ var BasicChart = function (_a) {
867
879
  : (hierarchyLabelOpts === null || hierarchyLabelOpts === void 0 ? void 0 : hierarchyLabelOpts.show)
868
880
  ? tslib_1.__assign({ show: true, formatter: (0, overrides_1.dataLabelFormatter)(hierarchyLabelOpts, locale, isTreemap ? "\n" : ": ") }, (isTreemap ? { position: "insideBottomLeft" } : {})) : tslib_1.__assign({ show: true, formatter: "{b}" }, (isTreemap ? { position: "insideBottomLeft" } : {}));
869
881
  hierarchyBand = (0, legend_layout_1.reserveEchartsLegendBand)({
870
- position: (_39 = spec.legend) === null || _39 === void 0 ? void 0 : _39.position,
882
+ position: (_42 = spec.legend) === null || _42 === void 0 ? void 0 : _42.position,
871
883
  visible: legendShown && hierarchyData.length > 0,
872
884
  labels: hierarchyData.map(function (node) { return node.name; }),
873
- legendFontSize: (_44 = (_41 = (_40 = hierarchyLegend.textStyle) === null || _40 === void 0 ? void 0 : _40.fontSize) !== null && _41 !== void 0 ? _41 : (_43 = (_42 = spec.legend) === null || _42 === void 0 ? void 0 : _42.textFormat) === null || _43 === void 0 ? void 0 : _43.fontSize) !== null && _44 !== void 0 ? _44 : 12,
885
+ legendFontSize: (_47 = (_44 = (_43 = hierarchyLegend.textStyle) === null || _43 === void 0 ? void 0 : _43.fontSize) !== null && _44 !== void 0 ? _44 : (_46 = (_45 = spec.legend) === null || _45 === void 0 ? void 0 : _45.textFormat) === null || _46 === void 0 ? void 0 : _46.fontSize) !== null && _47 !== void 0 ? _47 : 12,
874
886
  legendItemWidth: defaultLegendConfig.itemWidth,
875
887
  width: width !== null && width !== void 0 ? width : 0,
876
888
  height: height !== null && height !== void 0 ? height : 0,
877
889
  hasTitle: Boolean(explicitChartTitle !== null && explicitChartTitle !== void 0 ? explicitChartTitle : headerTitle),
878
- titleFontSize: (_46 = (_45 = spec.titleTextFormat) === null || _45 === void 0 ? void 0 : _45.fontSize) !== null && _46 !== void 0 ? _46 : 16,
890
+ titleFontSize: (_49 = (_48 = spec.titleTextFormat) === null || _48 === void 0 ? void 0 : _48.fontSize) !== null && _49 !== void 0 ? _49 : 16,
879
891
  hasBottomAxisTitle: false,
880
892
  bottomAxisNameGap: 0,
881
893
  hasLeftAxisTitle: false,
882
894
  });
883
- (_47 = chartRef.current) === null || _47 === void 0 ? void 0 : _47.setOption({
895
+ (_50 = chartRef.current) === null || _50 === void 0 ? void 0 : _50.setOption({
884
896
  xAxis: [
885
897
  {
886
898
  type: "category",
@@ -952,7 +964,7 @@ var BasicChart = function (_a) {
952
964
  }
953
965
  isContour = (0, three_d_1.isContourSpec)(spec);
954
966
  if (renderedAsContour.current && !isContour) {
955
- (_48 = chartRef.current) === null || _48 === void 0 ? void 0 : _48.dispose();
967
+ (_51 = chartRef.current) === null || _51 === void 0 ? void 0 : _51.dispose();
956
968
  chartRef.current = undefined;
957
969
  renderedAsContour.current = false;
958
970
  previousChartType.current = undefined;
@@ -963,39 +975,39 @@ var BasicChart = function (_a) {
963
975
  if (!isContour) return [3 /*break*/, 19];
964
976
  categories_2 = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, false).map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
965
977
  contourSeriesInputs = [];
966
- _167.label = 9;
978
+ _181.label = 9;
967
979
  case 9:
968
- _167.trys.push([9, 16, 17, 18]);
969
- _d = tslib_1.__values((_49 = spec.series) !== null && _49 !== void 0 ? _49 : []), _e = _d.next();
970
- _167.label = 10;
980
+ _181.trys.push([9, 16, 17, 18]);
981
+ _d = tslib_1.__values((_52 = spec.series) !== null && _52 !== void 0 ? _52 : []), _e = _d.next();
982
+ _181.label = 10;
971
983
  case 10:
972
984
  if (!!_e.done) return [3 /*break*/, 15];
973
985
  seriesEntry = _e.value;
974
986
  if (!(!(0, utils_1.isNil)(seriesEntry.dataLabel) && (0, utils_1.isAFormula)(seriesEntry.dataLabel))) return [3 /*break*/, 12];
975
987
  _g = chart_spec_utils_1.coerceCalculatedLabel;
976
- return [4 /*yield*/, onRequestCalculate(seriesEntry.dataLabel, (_50 = position.sheetId) !== null && _50 !== void 0 ? _50 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
988
+ return [4 /*yield*/, onRequestCalculate(seriesEntry.dataLabel, (_53 = position.sheetId) !== null && _53 !== void 0 ? _53 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
977
989
  case 11:
978
- _f = _g.apply(void 0, [_167.sent()]);
990
+ _f = _g.apply(void 0, [_181.sent()]);
979
991
  return [3 /*break*/, 13];
980
992
  case 12:
981
- _f = (_51 = seriesEntry.dataLabel) !== null && _51 !== void 0 ? _51 : "";
982
- _167.label = 13;
993
+ _f = (_54 = seriesEntry.dataLabel) !== null && _54 !== void 0 ? _54 : "";
994
+ _181.label = 13;
983
995
  case 13:
984
996
  dataLabel = _f;
985
997
  values = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(sanitizeChartValue);
986
998
  contourSeriesInputs.push({ name: dataLabel, values: values });
987
- _167.label = 14;
999
+ _181.label = 14;
988
1000
  case 14:
989
1001
  _e = _d.next();
990
1002
  return [3 /*break*/, 10];
991
1003
  case 15: return [3 /*break*/, 18];
992
1004
  case 16:
993
- e_1_1 = _167.sent();
1005
+ e_1_1 = _181.sent();
994
1006
  e_1 = { error: e_1_1 };
995
1007
  return [3 /*break*/, 18];
996
1008
  case 17:
997
1009
  try {
998
- if (_e && !_e.done && (_4 = _d.return)) _4.call(_d);
1010
+ if (_e && !_e.done && (_0 = _d.return)) _0.call(_d);
999
1011
  }
1000
1012
  finally { if (e_1) throw e_1.error; }
1001
1013
  return [7 /*endfinally*/];
@@ -1015,7 +1027,7 @@ var BasicChart = function (_a) {
1015
1027
  chartRef.current = echarts.init(el.current);
1016
1028
  bindSeriesSelection(chartRef.current);
1017
1029
  }
1018
- (_52 = chartRef.current) === null || _52 === void 0 ? void 0 : _52.setOption({
1030
+ (_55 = chartRef.current) === null || _55 === void 0 ? void 0 : _55.setOption({
1019
1031
  tooltip: {
1020
1032
  textStyle: { fontSize: 12 },
1021
1033
  trigger: "item",
@@ -1035,7 +1047,7 @@ var BasicChart = function (_a) {
1035
1047
  type: "category",
1036
1048
  data: categories_2,
1037
1049
  splitArea: { show: true },
1038
- name: (_53 = spec.horizontalAxisTitle) !== null && _53 !== void 0 ? _53 : "",
1050
+ name: (_56 = spec.horizontalAxisTitle) !== null && _56 !== void 0 ? _56 : "",
1039
1051
  nameLocation: "middle",
1040
1052
  nameGap: 30,
1041
1053
  }, spec.categoryAxisOptions),
@@ -1045,7 +1057,7 @@ var BasicChart = function (_a) {
1045
1057
  type: "category",
1046
1058
  data: seriesNames_1,
1047
1059
  splitArea: { show: true },
1048
- name: (_54 = spec.verticalAxisTitle) !== null && _54 !== void 0 ? _54 : "",
1060
+ name: (_57 = spec.verticalAxisTitle) !== null && _57 !== void 0 ? _57 : "",
1049
1061
  nameLocation: "middle",
1050
1062
  nameGap: 50,
1051
1063
  },
@@ -1098,39 +1110,39 @@ var BasicChart = function (_a) {
1098
1110
  if (!(willRender3D && threeDRenderKind)) return [3 /*break*/, 30];
1099
1111
  categories_3 = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, false).map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
1100
1112
  threeDSeriesInputs = [];
1101
- _167.label = 20;
1113
+ _181.label = 20;
1102
1114
  case 20:
1103
- _167.trys.push([20, 27, 28, 29]);
1104
- _j = tslib_1.__values((_55 = spec.series) !== null && _55 !== void 0 ? _55 : []), _k = _j.next();
1105
- _167.label = 21;
1115
+ _181.trys.push([20, 27, 28, 29]);
1116
+ _j = tslib_1.__values((_58 = spec.series) !== null && _58 !== void 0 ? _58 : []), _k = _j.next();
1117
+ _181.label = 21;
1106
1118
  case 21:
1107
1119
  if (!!_k.done) return [3 /*break*/, 26];
1108
1120
  seriesEntry = _k.value;
1109
1121
  if (!(!(0, utils_1.isNil)(seriesEntry.dataLabel) && (0, utils_1.isAFormula)(seriesEntry.dataLabel))) return [3 /*break*/, 23];
1110
1122
  _m = chart_spec_utils_1.coerceCalculatedLabel;
1111
- return [4 /*yield*/, onRequestCalculate(seriesEntry.dataLabel, (_56 = position.sheetId) !== null && _56 !== void 0 ? _56 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
1123
+ return [4 /*yield*/, onRequestCalculate(seriesEntry.dataLabel, (_59 = position.sheetId) !== null && _59 !== void 0 ? _59 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
1112
1124
  case 22:
1113
- _l = _m.apply(void 0, [_167.sent()]);
1125
+ _l = _m.apply(void 0, [_181.sent()]);
1114
1126
  return [3 /*break*/, 24];
1115
1127
  case 23:
1116
- _l = (_57 = seriesEntry.dataLabel) !== null && _57 !== void 0 ? _57 : "";
1117
- _167.label = 24;
1128
+ _l = (_60 = seriesEntry.dataLabel) !== null && _60 !== void 0 ? _60 : "";
1129
+ _181.label = 24;
1118
1130
  case 24:
1119
1131
  dataLabel = _l;
1120
1132
  values = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(sanitizeChartValue);
1121
1133
  threeDSeriesInputs.push({ name: dataLabel, values: values });
1122
- _167.label = 25;
1134
+ _181.label = 25;
1123
1135
  case 25:
1124
1136
  _k = _j.next();
1125
1137
  return [3 /*break*/, 21];
1126
1138
  case 26: return [3 /*break*/, 29];
1127
1139
  case 27:
1128
- e_2_1 = _167.sent();
1140
+ e_2_1 = _181.sent();
1129
1141
  e_2 = { error: e_2_1 };
1130
1142
  return [3 /*break*/, 29];
1131
1143
  case 28:
1132
1144
  try {
1133
- if (_k && !_k.done && (_5 = _j.return)) _5.call(_j);
1145
+ if (_k && !_k.done && (_1 = _j.return)) _1.call(_j);
1134
1146
  }
1135
1147
  finally { if (e_2) throw e_2.error; }
1136
1148
  return [7 /*endfinally*/];
@@ -1204,7 +1216,7 @@ var BasicChart = function (_a) {
1204
1216
  catch (e_4_1) { e_4 = { error: e_4_1 }; }
1205
1217
  finally {
1206
1218
  try {
1207
- if (threeDSeriesInputs_1_1 && !threeDSeriesInputs_1_1.done && (_6 = threeDSeriesInputs_1.return)) _6.call(threeDSeriesInputs_1);
1219
+ if (threeDSeriesInputs_1_1 && !threeDSeriesInputs_1_1.done && (_2 = threeDSeriesInputs_1.return)) _2.call(threeDSeriesInputs_1);
1208
1220
  }
1209
1221
  finally { if (e_4) throw e_4.error; }
1210
1222
  }
@@ -1294,12 +1306,12 @@ var BasicChart = function (_a) {
1294
1306
  inRange: { color: tslib_1.__spreadArray([], tslib_1.__read(three_d_1.SURFACE_COLOR_RAMP), false) },
1295
1307
  };
1296
1308
  }
1297
- (_58 = chartRef.current) === null || _58 === void 0 ? void 0 : _58.setOption(tslib_1.__assign(tslib_1.__assign({ tooltip: {
1309
+ (_61 = chartRef.current) === null || _61 === void 0 ? void 0 : _61.setOption(tslib_1.__assign(tslib_1.__assign({ tooltip: {
1298
1310
  textStyle: { fontSize: 12 },
1299
1311
  formatter: threeDTooltipFormatter,
1300
1312
  }, legend: threeDRenderKind === "line3D" || stackedBar3D_1
1301
1313
  ? (0, overrides_1.applyLegendOverrides)(tslib_1.__assign(tslib_1.__assign({}, defaultLegendConfig), { show: seriesNames_2.length > 1, data: seriesNames_2 }), spec.legend)
1302
- : { show: false }, xAxis3D: tslib_1.__assign(tslib_1.__assign({}, xAxis3D), { name: (_59 = spec.horizontalAxisTitle) !== null && _59 !== void 0 ? _59 : "" }), yAxis3D: tslib_1.__assign(tslib_1.__assign({}, yAxis3D), { name: "" }), zAxis3D: { type: "value", name: (_60 = spec.verticalAxisTitle) !== null && _60 !== void 0 ? _60 : "" }, grid3D: {
1314
+ : { show: false }, xAxis3D: tslib_1.__assign(tslib_1.__assign({}, xAxis3D), { name: (_62 = spec.horizontalAxisTitle) !== null && _62 !== void 0 ? _62 : "" }), yAxis3D: tslib_1.__assign(tslib_1.__assign({}, yAxis3D), { name: "" }), zAxis3D: { type: "value", name: (_63 = spec.verticalAxisTitle) !== null && _63 !== void 0 ? _63 : "" }, grid3D: {
1303
1315
  boxDepth: Math.max(20, Math.min(100, seriesNames_2.length * 20)),
1304
1316
  viewControl: { autoRotate: false },
1305
1317
  } }, (visualMap ? { visualMap: [visualMap] } : {})), { series: threeDSeries }), {
@@ -1330,7 +1342,7 @@ var BasicChart = function (_a) {
1330
1342
  categories = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, skipHeaders);
1331
1343
  radarSeriesInputs = [];
1332
1344
  try {
1333
- for (_p = tslib_1.__values((_61 = spec.series) !== null && _61 !== void 0 ? _61 : []), _q = _p.next(); !_q.done; _q = _p.next()) {
1345
+ for (_p = tslib_1.__values((_64 = spec.series) !== null && _64 !== void 0 ? _64 : []), _q = _p.next(); !_q.done; _q = _p.next()) {
1334
1346
  seriesEntry = _q.value;
1335
1347
  label = seriesEntry.dataLabel && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
1336
1348
  ? seriesEntry.dataLabel
@@ -1342,14 +1354,14 @@ var BasicChart = function (_a) {
1342
1354
  catch (e_5_1) { e_5 = { error: e_5_1 }; }
1343
1355
  finally {
1344
1356
  try {
1345
- if (_q && !_q.done && (_7 = _p.return)) _7.call(_p);
1357
+ if (_q && !_q.done && (_3 = _p.return)) _3.call(_p);
1346
1358
  }
1347
1359
  finally { if (e_5) throw e_5.error; }
1348
1360
  }
1349
1361
  radarAxisOptions_1 = spec.valueAxisOptions;
1350
1362
  indicators_1 = (0, radar_1.buildRadarIndicators)(categories, radarSeriesInputs, radarAxisOptions_1);
1351
1363
  radarData = (0, radar_1.buildRadarSeriesData)(radarSeriesInputs, indicators_1.length);
1352
- radarStyle_1 = (_62 = spec.radarStyle) !== null && _62 !== void 0 ? _62 : "standard";
1364
+ radarStyle_1 = (_65 = spec.radarStyle) !== null && _65 !== void 0 ? _65 : "standard";
1353
1365
  radarColors_1 = radarSeriesInputs.map(function (_, i) { var _a, _b; return (_b = (_a = spec.series) === null || _a === void 0 ? void 0 : _a[i]) === null || _b === void 0 ? void 0 : _b.color; });
1354
1366
  radarFormats_1 = (0, axis_number_format_1.resolveSeriesNumberFormats)(spec.series, getFormattingFromRange, spec.hiddenDimensionStrategy);
1355
1367
  radarDataLabels_1 = spec.dataLabels;
@@ -1366,8 +1378,34 @@ var BasicChart = function (_a) {
1366
1378
  });
1367
1379
  return tslib_1.__spreadArray([(_b = params === null || params === void 0 ? void 0 : params.name) !== null && _b !== void 0 ? _b : ""], tslib_1.__read(lines), false).filter(Boolean).join("<br/>");
1368
1380
  };
1369
- (_63 = chartRef.current) === null || _63 === void 0 ? void 0 : _63.setOption({
1370
- radar: {
1381
+ radarLegend = (0, overrides_1.applyLegendOverrides)(tslib_1.__assign(tslib_1.__assign({}, legend), { show: radarData.length > 1, data: radarData.map(function (d) { return d.name; }) }), spec.legend);
1382
+ radarBand = (0, legend_layout_1.reserveEchartsLegendBand)({
1383
+ position: (_66 = spec.legend) === null || _66 === void 0 ? void 0 : _66.position,
1384
+ visible: radarLegend.show !== false,
1385
+ labels: radarData.map(function (d) { return d.name; }),
1386
+ legendFontSize: (_71 = (_68 = (_67 = radarLegend.textStyle) === null || _67 === void 0 ? void 0 : _67.fontSize) !== null && _68 !== void 0 ? _68 : (_70 = (_69 = spec.legend) === null || _69 === void 0 ? void 0 : _69.textFormat) === null || _70 === void 0 ? void 0 : _70.fontSize) !== null && _71 !== void 0 ? _71 : 12,
1387
+ legendItemWidth: defaultLegendConfig.itemWidth,
1388
+ width: width !== null && width !== void 0 ? width : 0,
1389
+ height: height !== null && height !== void 0 ? height : 0,
1390
+ hasTitle: Boolean(explicitChartTitle),
1391
+ titleFontSize: (_73 = (_72 = spec.titleTextFormat) === null || _72 === void 0 ? void 0 : _72.fontSize) !== null && _73 !== void 0 ? _73 : 16,
1392
+ hasBottomAxisTitle: false,
1393
+ bottomAxisNameGap: 0,
1394
+ hasLeftAxisTitle: false,
1395
+ });
1396
+ radarPlotWidth = Math.max(0, (width !== null && width !== void 0 ? width : 0) - radarBand.grid.left - radarBand.grid.right);
1397
+ radarPlotHeight = Math.max(0, (height !== null && height !== void 0 ? height : 0) - radarBand.grid.top - radarBand.grid.bottom);
1398
+ radarGeometry = radarPlotWidth > 0 && radarPlotHeight > 0
1399
+ ? {
1400
+ center: [
1401
+ radarBand.grid.left + radarPlotWidth / 2,
1402
+ radarBand.grid.top + radarPlotHeight / 2,
1403
+ ],
1404
+ radius: Math.max(10, Math.min(radarPlotWidth, radarPlotHeight) / 2 - 30),
1405
+ }
1406
+ : {};
1407
+ (_74 = chartRef.current) === null || _74 === void 0 ? void 0 : _74.setOption({
1408
+ radar: tslib_1.__assign(tslib_1.__assign({}, radarGeometry), {
1371
1409
  // The common scale's tick labels along ONE axis, as Excel draws
1372
1410
  // them: echarts labels every indicator axis, so each indicator
1373
1411
  // carries its own `axisLabel.show` (an indicator's own options win
@@ -1377,15 +1415,13 @@ var BasicChart = function (_a) {
1377
1415
  ? indicators_1
1378
1416
  : [{ name: "", min: 0, max: 1 }]).map(function (indicator, index) { return (tslib_1.__assign(tslib_1.__assign({}, indicator), { axisLabel: {
1379
1417
  show: index === 0 && (radarAxisOptions_1 === null || radarAxisOptions_1 === void 0 ? void 0 : radarAxisOptions_1.visible) !== false,
1380
- } })); }),
1381
- axisLabel: {
1418
+ } })); }), axisLabel: {
1382
1419
  show: (radarAxisOptions_1 === null || radarAxisOptions_1 === void 0 ? void 0 : radarAxisOptions_1.visible) !== false,
1383
1420
  formatter: function (value) {
1384
1421
  return (0, axis_number_format_1.formatAxisValue)(radarFormats_1[0], value, locale);
1385
1422
  },
1386
- },
1387
- },
1388
- legend: (0, overrides_1.applyLegendOverrides)(tslib_1.__assign(tslib_1.__assign({}, legend), { show: radarData.length > 1, data: radarData.map(function (d) { return d.name; }) }), spec.legend),
1423
+ } }),
1424
+ legend: tslib_1.__assign(tslib_1.__assign({}, radarLegend), radarBand.legend),
1389
1425
  tooltip: { trigger: "item", formatter: radarTooltipFormatter },
1390
1426
  series: [
1391
1427
  {
@@ -1422,9 +1458,9 @@ var BasicChart = function (_a) {
1422
1458
  // V-variants additionally get a volume column sub-pane below the
1423
1459
  // price plot.
1424
1460
  if (spec.chartType === "stock") {
1425
- variant_1 = ((_64 = spec.stockVariant) !== null && _64 !== void 0 ? _64 : "HLC");
1461
+ variant_1 = ((_75 = spec.stockVariant) !== null && _75 !== void 0 ? _75 : "HLC");
1426
1462
  categories = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, false).map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
1427
- seriesValues = ((_65 = spec.series) !== null && _65 !== void 0 ? _65 : []).map(function (seriesEntry) {
1463
+ seriesValues = ((_76 = spec.series) !== null && _76 !== void 0 ? _76 : []).map(function (seriesEntry) {
1428
1464
  return flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); });
1429
1465
  });
1430
1466
  stockFormats_1 = (0, axis_number_format_1.resolveSeriesNumberFormats)(spec.series, getFormattingFromRange, spec.hiddenDimensionStrategy);
@@ -1442,7 +1478,7 @@ var BasicChart = function (_a) {
1442
1478
  upColor_1 = theme.themeColors.accent1;
1443
1479
  downColor_1 = theme.themeColors.accent2;
1444
1480
  volumePoints = (0, stock_1.toVolumeSeries)(seriesValues, variant_1);
1445
- hasVolume = ((_66 = volumePoints === null || volumePoints === void 0 ? void 0 : volumePoints.length) !== null && _66 !== void 0 ? _66 : 0) > 0;
1481
+ hasVolume = ((_77 = volumePoints === null || volumePoints === void 0 ? void 0 : volumePoints.length) !== null && _77 !== void 0 ? _77 : 0) > 0;
1446
1482
  stockGrid = hasVolume
1447
1483
  ? [
1448
1484
  { left: "10%", right: "4%", top: "8%", height: "56%" },
@@ -1456,7 +1492,7 @@ var BasicChart = function (_a) {
1456
1492
  axisLine: { show: true },
1457
1493
  axisTick: { show: true },
1458
1494
  splitLine: { show: false },
1459
- name: (_67 = spec.horizontalAxisTitle) !== null && _67 !== void 0 ? _67 : "",
1495
+ name: (_78 = spec.horizontalAxisTitle) !== null && _78 !== void 0 ? _78 : "",
1460
1496
  nameLocation: "middle",
1461
1497
  nameGap: 30,
1462
1498
  }, spec.categoryAxisOptions);
@@ -1498,14 +1534,14 @@ var BasicChart = function (_a) {
1498
1534
  // (no open) fall through to the line-derived rendering below.
1499
1535
  if (variant_1 === "OHLC" || variant_1 === "VOHLC") {
1500
1536
  candleData = (0, stock_1.toCandlestick)(seriesValues, variant_1);
1501
- (_68 = chartRef.current) === null || _68 === void 0 ? void 0 : _68.setOption({
1537
+ (_79 = chartRef.current) === null || _79 === void 0 ? void 0 : _79.setOption({
1502
1538
  xAxis: stockXAxis,
1503
1539
  yAxis: tslib_1.__spreadArray([
1504
1540
  (0, overrides_1.applyAxisOverrides)({
1505
1541
  type: "value",
1506
1542
  show: true,
1507
1543
  scale: true,
1508
- name: (_69 = spec.verticalAxisTitle) !== null && _69 !== void 0 ? _69 : "",
1544
+ name: (_80 = spec.verticalAxisTitle) !== null && _80 !== void 0 ? _80 : "",
1509
1545
  nameLocation: "middle",
1510
1546
  nameGap: 50,
1511
1547
  gridIndex: 0,
@@ -1550,13 +1586,13 @@ var BasicChart = function (_a) {
1550
1586
  theme.themeColors.accent3,
1551
1587
  theme.themeColors.accent4,
1552
1588
  ]);
1553
- (_70 = chartRef.current) === null || _70 === void 0 ? void 0 : _70.setOption({
1589
+ (_81 = chartRef.current) === null || _81 === void 0 ? void 0 : _81.setOption({
1554
1590
  xAxis: stockXAxis,
1555
1591
  yAxis: tslib_1.__spreadArray([
1556
1592
  (0, overrides_1.applyAxisOverrides)({
1557
1593
  type: "value",
1558
1594
  show: true,
1559
- name: (_71 = spec.verticalAxisTitle) !== null && _71 !== void 0 ? _71 : "",
1595
+ name: (_82 = spec.verticalAxisTitle) !== null && _82 !== void 0 ? _82 : "",
1560
1596
  nameLocation: "middle",
1561
1597
  nameGap: 50,
1562
1598
  gridIndex: 0,
@@ -1595,14 +1631,14 @@ var BasicChart = function (_a) {
1595
1631
  ofPieLayout = null;
1596
1632
  isHorizontalBarChart = spec.chartType === "bar";
1597
1633
  shouldAggregate = (0, aggregation_1.shouldAggregateSeries)(spec.series);
1598
- primaryDomainSource = (_74 = (_73 = (_72 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _72 === void 0 ? void 0 : _72[0]) === null || _73 === void 0 ? void 0 : _73.sources) === null || _74 === void 0 ? void 0 : _74[0];
1634
+ primaryDomainSource = (_85 = (_84 = (_83 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _83 === void 0 ? void 0 : _83[0]) === null || _84 === void 0 ? void 0 : _84.sources) === null || _85 === void 0 ? void 0 : _85[0];
1599
1635
  rawPrimaryDomainValues = primaryDomainSource
1600
- ? (0, aggregation_1.sanitizeDomainValues)((_75 = getDomainValuesFromRange(primaryDomainSource, spec.hiddenDimensionStrategy)) !== null && _75 !== void 0 ? _75 : [])
1636
+ ? (0, aggregation_1.sanitizeDomainValues)((_86 = getDomainValuesFromRange(primaryDomainSource, spec.hiddenDimensionStrategy)) !== null && _86 !== void 0 ? _86 : [])
1601
1637
  : [];
1602
1638
  aggregateDomainValues = (0, aggregation_1.getDomainValuesForAxis)(rawPrimaryDomainValues, shouldAggregate);
1603
1639
  categoryLevels = isCircularChart
1604
1640
  ? undefined
1605
- : (0, category_levels_1.resolveCategoryLevels)((_76 = spec.categoryLevels) === null || _76 === void 0 ? void 0 : _76.map(function (level) {
1641
+ : (0, category_levels_1.resolveCategoryLevels)((_87 = spec.categoryLevels) === null || _87 === void 0 ? void 0 : _87.map(function (level) {
1606
1642
  return flattenChartDataValues([level], getDomainValuesFromRange, spec.hiddenDimensionStrategy, false);
1607
1643
  }));
1608
1644
  if (categoryLevels) {
@@ -1613,15 +1649,15 @@ var BasicChart = function (_a) {
1613
1649
  axisTick: { show: true },
1614
1650
  splitLine: { show: true },
1615
1651
  name: isHorizontalBarChart
1616
- ? (_77 = spec.verticalAxisTitle) !== null && _77 !== void 0 ? _77 : ""
1617
- : (_78 = spec.horizontalAxisTitle) !== null && _78 !== void 0 ? _78 : "",
1652
+ ? (_88 = spec.verticalAxisTitle) !== null && _88 !== void 0 ? _88 : ""
1653
+ : (_89 = spec.horizontalAxisTitle) !== null && _89 !== void 0 ? _89 : "",
1618
1654
  nameLocation: "middle",
1619
1655
  nameGap: CATEGORY_AXIS_NAME_GAP + 24 * categoryLevels.outer.length,
1620
1656
  })), false));
1621
1657
  }
1622
1658
  // One category axis per domain (Excel): a domain drawn from several
1623
1659
  // ranges lists their categories in sequence on that single axis.
1624
- (categoryLevels ? [] : (_79 = spec.domains) !== null && _79 !== void 0 ? _79 : []).forEach(function (domain, domainIndex) {
1660
+ (categoryLevels ? [] : (_90 = spec.domains) !== null && _90 !== void 0 ? _90 : []).forEach(function (domain, domainIndex) {
1625
1661
  var _a, _b;
1626
1662
  var axisData = domain.sources.flatMap(function (sheetRange, sourceIndex) {
1627
1663
  var _a;
@@ -1657,8 +1693,8 @@ var BasicChart = function (_a) {
1657
1693
  splitLine: { show: true },
1658
1694
  gridIndex: 0,
1659
1695
  name: isHorizontalBarChart
1660
- ? (_80 = spec.verticalAxisTitle) !== null && _80 !== void 0 ? _80 : ""
1661
- : (_81 = spec.horizontalAxisTitle) !== null && _81 !== void 0 ? _81 : "",
1696
+ ? (_91 = spec.verticalAxisTitle) !== null && _91 !== void 0 ? _91 : ""
1697
+ : (_92 = spec.horizontalAxisTitle) !== null && _92 !== void 0 ? _92 : "",
1662
1698
  nameLocation: "middle",
1663
1699
  nameGap: CATEGORY_AXIS_NAME_GAP,
1664
1700
  });
@@ -1690,7 +1726,7 @@ var BasicChart = function (_a) {
1690
1726
  };
1691
1727
  sideBySideBarCount = isStacked
1692
1728
  ? 1
1693
- : ((_82 = spec.series) !== null && _82 !== void 0 ? _82 : []).reduce(function (count, s) {
1729
+ : ((_93 = spec.series) !== null && _93 !== void 0 ? _93 : []).reduce(function (count, s) {
1694
1730
  var _a;
1695
1731
  var seriesType = (_a = s.seriesChartType) !== null && _a !== void 0 ? _a : spec.chartType;
1696
1732
  return seriesType === "bar" || seriesType === "column"
@@ -1714,29 +1750,29 @@ var BasicChart = function (_a) {
1714
1750
  return (0, utils_1.chartPaletteColorAt)(seriesPalette, index);
1715
1751
  };
1716
1752
  _loop_1 = function (specSeriesIndex, series) {
1717
- var dataLabel, _168, _169, effectiveChartType, lineLike, domainSources, pieDomainLabels, piePointOffset, data, seriesEchartsType, seriesStyleAttrs, seriesEntry, isBarOrColumn, seriesAny, markerSymbol, wantsMarkers, labelsWithoutMarkers, isolated, marked, isolated_1, isolated_1_1, i, gradientArgs, gradient, overrides_2, _170, _171, dp, fallback_1, overrides_3, _172, _173, dp, positiveColor_1, negativeColor_1;
1718
- var e_13, _174, e_14, _175, e_15, _176;
1719
- return tslib_1.__generator(this, function (_177) {
1720
- switch (_177.label) {
1753
+ var dataLabel, _182, _183, effectiveChartType, lineLike, domainSources, pieDomainLabels, piePointOffset, data, seriesEchartsType, seriesStyleAttrs, seriesEntry, isBarOrColumn, seriesAny, markerSymbol, wantsMarkers, labelsWithoutMarkers, isolated, marked, isolated_1, isolated_1_1, i, gradientArgs, gradient, overrides_2, _184, _185, dp, fallback_1, overrides_3, _186, _187, dp, positiveColor_1, negativeColor_1;
1754
+ var e_12, _188, e_13, _189, e_14, _190;
1755
+ return tslib_1.__generator(this, function (_191) {
1756
+ switch (_191.label) {
1721
1757
  case 0:
1722
1758
  if (!(!(0, utils_1.isNil)(series.dataLabel) && (0, utils_1.isAFormula)(series.dataLabel))) return [3 /*break*/, 2];
1723
- _169 = chart_spec_utils_1.coerceCalculatedLabel;
1724
- return [4 /*yield*/, onRequestCalculate(series.dataLabel, (_84 = position.sheetId) !== null && _84 !== void 0 ? _84 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
1759
+ _183 = chart_spec_utils_1.coerceCalculatedLabel;
1760
+ return [4 /*yield*/, onRequestCalculate(series.dataLabel, (_95 = position.sheetId) !== null && _95 !== void 0 ? _95 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
1725
1761
  case 1:
1726
- _168 = _169.apply(void 0, [_177.sent()]);
1762
+ _182 = _183.apply(void 0, [_191.sent()]);
1727
1763
  return [3 /*break*/, 3];
1728
1764
  case 2:
1729
- _168 = (_85 = series.dataLabel) !== null && _85 !== void 0 ? _85 : "";
1730
- _177.label = 3;
1765
+ _182 = (_96 = series.dataLabel) !== null && _96 !== void 0 ? _96 : "";
1766
+ _191.label = 3;
1731
1767
  case 3:
1732
- dataLabel = _168;
1768
+ dataLabel = _182;
1733
1769
  // Label
1734
1770
  if (dataLabel) {
1735
- (_86 = legend.data) === null || _86 === void 0 ? void 0 : _86.push(dataLabel);
1771
+ (_97 = legend.data) === null || _97 === void 0 ? void 0 : _97.push(dataLabel);
1736
1772
  }
1737
- effectiveChartType = (_87 = series.seriesChartType) !== null && _87 !== void 0 ? _87 : spec.chartType;
1773
+ effectiveChartType = (_98 = series.seriesChartType) !== null && _98 !== void 0 ? _98 : spec.chartType;
1738
1774
  lineLike = (0, empty_cells_1.isLineLikeChartType)(effectiveChartType);
1739
- domainSources = (_90 = (_89 = (_88 = spec.domains) === null || _88 === void 0 ? void 0 : _88[0]) === null || _89 === void 0 ? void 0 : _89.sources) !== null && _90 !== void 0 ? _90 : [];
1775
+ domainSources = (_101 = (_100 = (_99 = spec.domains) === null || _99 === void 0 ? void 0 : _99[0]) === null || _100 === void 0 ? void 0 : _100.sources) !== null && _101 !== void 0 ? _101 : [];
1740
1776
  pieDomainLabels = isCircularChart &&
1741
1777
  (domainSources.length > 1 || series.sources.length > 1)
1742
1778
  ? domainSources.flatMap(function (sheetRange) {
@@ -1768,7 +1804,7 @@ var BasicChart = function (_a) {
1768
1804
  seriesEntry = tslib_1.__assign(tslib_1.__assign({ type: seriesEchartsType,
1769
1805
  // Ties the rendered series back to spec.series for click selection
1770
1806
  // One rendered series per spec series (source index 0).
1771
- id: (0, series_click_1.chartSeriesId)(specSeriesIndex, 0), name: dataLabel, data: data, stack: isStacked ? "dataLabel" : undefined, smooth: (_91 = spec.smooth) !== null && _91 !== void 0 ? _91 : undefined, radius: (_92 = spec.radius) !== null && _92 !== void 0 ? _92 : (isCircularChart ? [0, "75%"] : undefined) }, ((0, empty_cells_1.connectsAcrossEmptyCells)(spec, lineLike)
1807
+ id: (0, series_click_1.chartSeriesId)(specSeriesIndex, 0), name: dataLabel, data: data, stack: isStacked ? "dataLabel" : undefined, smooth: (_102 = spec.smooth) !== null && _102 !== void 0 ? _102 : undefined, radius: (_103 = spec.radius) !== null && _103 !== void 0 ? _103 : (isCircularChart ? [0, "75%"] : undefined) }, ((0, empty_cells_1.connectsAcrossEmptyCells)(spec, lineLike)
1772
1808
  ? { connectNulls: true }
1773
1809
  : {})), seriesStyleAttrs);
1774
1810
  // Plot this series against a secondary value axis. The 2nd
@@ -1793,17 +1829,17 @@ var BasicChart = function (_a) {
1793
1829
  }
1794
1830
  seriesAny = series;
1795
1831
  if (effectiveChartType === "line") {
1796
- markerSymbol = (_93 = seriesAny.marker) === null || _93 === void 0 ? void 0 : _93.symbol;
1832
+ markerSymbol = (_104 = seriesAny.marker) === null || _104 === void 0 ? void 0 : _104.symbol;
1797
1833
  wantsMarkers = markerSymbol === "none"
1798
1834
  ? false
1799
1835
  : Boolean(spec.showMarkers) || !(0, utils_1.isNil)(markerSymbol);
1800
1836
  labelsWithoutMarkers = !wantsMarkers &&
1801
- Boolean((_94 = (0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, seriesAny)) === null || _94 === void 0 ? void 0 : _94.show);
1837
+ Boolean((_105 = (0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, seriesAny)) === null || _105 === void 0 ? void 0 : _105.show);
1802
1838
  seriesEntry.showSymbol = wantsMarkers || labelsWithoutMarkers;
1803
1839
  if (wantsMarkers) {
1804
1840
  seriesEntry.symbol =
1805
- (_95 = (0, helpers_1.mapMarkerSymbolToEcharts)(markerSymbol)) !== null && _95 !== void 0 ? _95 : "circle";
1806
- seriesEntry.symbolSize = (_97 = (_96 = seriesAny.marker) === null || _96 === void 0 ? void 0 : _96.size) !== null && _97 !== void 0 ? _97 : 6;
1841
+ (_106 = (0, helpers_1.mapMarkerSymbolToEcharts)(markerSymbol)) !== null && _106 !== void 0 ? _106 : "circle";
1842
+ seriesEntry.symbolSize = (_108 = (_107 = seriesAny.marker) === null || _107 === void 0 ? void 0 : _107.size) !== null && _108 !== void 0 ? _108 : 6;
1807
1843
  }
1808
1844
  else {
1809
1845
  if (labelsWithoutMarkers) {
@@ -1818,17 +1854,17 @@ var BasicChart = function (_a) {
1818
1854
  seriesEntry.symbol = "none";
1819
1855
  marked = tslib_1.__spreadArray([], tslib_1.__read(data), false);
1820
1856
  try {
1821
- for (isolated_1 = (e_13 = void 0, tslib_1.__values(isolated)), isolated_1_1 = isolated_1.next(); !isolated_1_1.done; isolated_1_1 = isolated_1.next()) {
1857
+ for (isolated_1 = (e_12 = void 0, tslib_1.__values(isolated)), isolated_1_1 = isolated_1.next(); !isolated_1_1.done; isolated_1_1 = isolated_1.next()) {
1822
1858
  i = isolated_1_1.value;
1823
1859
  marked[i] = { value: marked[i], symbol: "circle", symbolSize: 6 };
1824
1860
  }
1825
1861
  }
1826
- catch (e_13_1) { e_13 = { error: e_13_1 }; }
1862
+ catch (e_12_1) { e_12 = { error: e_12_1 }; }
1827
1863
  finally {
1828
1864
  try {
1829
- if (isolated_1_1 && !isolated_1_1.done && (_174 = isolated_1.return)) _174.call(isolated_1);
1865
+ if (isolated_1_1 && !isolated_1_1.done && (_188 = isolated_1.return)) _188.call(isolated_1);
1830
1866
  }
1831
- finally { if (e_13) throw e_13.error; }
1867
+ finally { if (e_12) throw e_12.error; }
1832
1868
  }
1833
1869
  seriesEntry.data = marked;
1834
1870
  }
@@ -1838,9 +1874,9 @@ var BasicChart = function (_a) {
1838
1874
  gradientArgs = (0, gradient_1.gradientToEcharts)(series.gradient);
1839
1875
  if (gradientArgs && !seriesAny.noFill) {
1840
1876
  gradient = new echarts.graphic.LinearGradient(gradientArgs.x, gradientArgs.y, gradientArgs.x2, gradientArgs.y2, gradientArgs.colorStops);
1841
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_98 = seriesEntry.itemStyle) !== null && _98 !== void 0 ? _98 : {})), { color: gradient });
1877
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_109 = seriesEntry.itemStyle) !== null && _109 !== void 0 ? _109 : {})), { color: gradient });
1842
1878
  if (effectiveChartType === "area") {
1843
- seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_99 = seriesEntry.areaStyle) !== null && _99 !== void 0 ? _99 : {})), { color: gradient });
1879
+ seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_110 = seriesEntry.areaStyle) !== null && _110 !== void 0 ? _110 : {})), { color: gradient });
1844
1880
  }
1845
1881
  }
1846
1882
  else if (seriesAny.noFill) {
@@ -1848,58 +1884,58 @@ var BasicChart = function (_a) {
1848
1884
  // with `transparent` so layout is preserved but nothing
1849
1885
  // paints. Legend entries are also suppressed via `name: ""`
1850
1886
  // since the series carries no semantic information.
1851
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_100 = seriesEntry.itemStyle) !== null && _100 !== void 0 ? _100 : {})), { color: "transparent", borderColor: "transparent" });
1887
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_111 = seriesEntry.itemStyle) !== null && _111 !== void 0 ? _111 : {})), { color: "transparent", borderColor: "transparent" });
1852
1888
  }
1853
1889
  else if (isBarOrColumn &&
1854
1890
  Array.isArray(seriesAny.dataPointColors) &&
1855
1891
  seriesAny.dataPointColors.length) {
1856
1892
  overrides_2 = new Map();
1857
1893
  try {
1858
- for (_170 = (e_14 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _171 = _170.next(); !_171.done; _171 = _170.next()) {
1859
- dp = _171.value;
1894
+ for (_184 = (e_13 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _185 = _184.next(); !_185.done; _185 = _184.next()) {
1895
+ dp = _185.value;
1860
1896
  if (typeof dp.idx === "number" && typeof dp.color === "string") {
1861
1897
  overrides_2.set(dp.idx, dp.color);
1862
1898
  }
1863
1899
  }
1864
1900
  }
1865
- catch (e_14_1) { e_14 = { error: e_14_1 }; }
1901
+ catch (e_13_1) { e_13 = { error: e_13_1 }; }
1866
1902
  finally {
1867
1903
  try {
1868
- if (_171 && !_171.done && (_175 = _170.return)) _175.call(_170);
1904
+ if (_185 && !_185.done && (_189 = _184.return)) _189.call(_184);
1869
1905
  }
1870
- finally { if (e_14) throw e_14.error; }
1906
+ finally { if (e_13) throw e_13.error; }
1871
1907
  }
1872
- fallback_1 = (_101 = series.color) !== null && _101 !== void 0 ? _101 : paletteColorAt(specSeriesIndex);
1873
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_102 = seriesEntry.itemStyle) !== null && _102 !== void 0 ? _102 : {})), { color: function (params) { var _a; return (_a = overrides_2.get(params.dataIndex)) !== null && _a !== void 0 ? _a : fallback_1; } });
1908
+ fallback_1 = (_112 = series.color) !== null && _112 !== void 0 ? _112 : paletteColorAt(specSeriesIndex);
1909
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_113 = seriesEntry.itemStyle) !== null && _113 !== void 0 ? _113 : {})), { color: function (params) { var _a; return (_a = overrides_2.get(params.dataIndex)) !== null && _a !== void 0 ? _a : fallback_1; } });
1874
1910
  }
1875
1911
  else if (isCircularChart &&
1876
1912
  Array.isArray(seriesAny.dataPointColors) &&
1877
1913
  seriesAny.dataPointColors.length) {
1878
1914
  overrides_3 = new Map();
1879
1915
  try {
1880
- for (_172 = (e_15 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _173 = _172.next(); !_173.done; _173 = _172.next()) {
1881
- dp = _173.value;
1916
+ for (_186 = (e_14 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _187 = _186.next(); !_187.done; _187 = _186.next()) {
1917
+ dp = _187.value;
1882
1918
  if (typeof dp.idx === "number" && typeof dp.color === "string") {
1883
1919
  overrides_3.set(dp.idx, dp.color);
1884
1920
  }
1885
1921
  }
1886
1922
  }
1887
- catch (e_15_1) { e_15 = { error: e_15_1 }; }
1923
+ catch (e_14_1) { e_14 = { error: e_14_1 }; }
1888
1924
  finally {
1889
1925
  try {
1890
- if (_173 && !_173.done && (_176 = _172.return)) _176.call(_172);
1926
+ if (_187 && !_187.done && (_190 = _186.return)) _190.call(_186);
1891
1927
  }
1892
- finally { if (e_15) throw e_15.error; }
1928
+ finally { if (e_14) throw e_14.error; }
1893
1929
  }
1894
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_103 = seriesEntry.itemStyle) !== null && _103 !== void 0 ? _103 : {})), { color: function (params) {
1930
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_114 = seriesEntry.itemStyle) !== null && _114 !== void 0 ? _114 : {})), { color: function (params) {
1895
1931
  var _a, _b;
1896
1932
  return (_b = (_a = overrides_3.get(params.dataIndex)) !== null && _a !== void 0 ? _a : series.color) !== null && _b !== void 0 ? _b : paletteColorAt(params.dataIndex);
1897
1933
  } });
1898
1934
  }
1899
1935
  else if (isBarOrColumn && series.invertIfNegative) {
1900
- positiveColor_1 = (_104 = series.color) !== null && _104 !== void 0 ? _104 : paletteColorAt(specSeriesIndex);
1901
- negativeColor_1 = (_105 = series.negativeColor) !== null && _105 !== void 0 ? _105 : "#FF0000";
1902
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_106 = seriesEntry.itemStyle) !== null && _106 !== void 0 ? _106 : {})), { color: function (params) {
1936
+ positiveColor_1 = (_115 = series.color) !== null && _115 !== void 0 ? _115 : paletteColorAt(specSeriesIndex);
1937
+ negativeColor_1 = (_116 = series.negativeColor) !== null && _116 !== void 0 ? _116 : "#FF0000";
1938
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_117 = seriesEntry.itemStyle) !== null && _117 !== void 0 ? _117 : {})), { color: function (params) {
1903
1939
  var _a, _b;
1904
1940
  var value = Array.isArray(params.data)
1905
1941
  ? params.data[1]
@@ -1910,10 +1946,10 @@ var BasicChart = function (_a) {
1910
1946
  } });
1911
1947
  }
1912
1948
  else if (series.color) {
1913
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_107 = seriesEntry.itemStyle) !== null && _107 !== void 0 ? _107 : {})), { color: series.color });
1914
- seriesEntry.lineStyle = tslib_1.__assign(tslib_1.__assign({}, ((_108 = seriesEntry.lineStyle) !== null && _108 !== void 0 ? _108 : {})), { color: series.color });
1949
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_118 = seriesEntry.itemStyle) !== null && _118 !== void 0 ? _118 : {})), { color: series.color });
1950
+ seriesEntry.lineStyle = tslib_1.__assign(tslib_1.__assign({}, ((_119 = seriesEntry.lineStyle) !== null && _119 !== void 0 ? _119 : {})), { color: series.color });
1915
1951
  if (effectiveChartType === "area") {
1916
- seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_109 = seriesEntry.areaStyle) !== null && _109 !== void 0 ? _109 : {})), { color: series.color });
1952
+ seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_120 = seriesEntry.areaStyle) !== null && _120 !== void 0 ? _120 : {})), { color: series.color });
1917
1953
  }
1918
1954
  }
1919
1955
  chartSeries.push(seriesEntry);
@@ -1922,29 +1958,29 @@ var BasicChart = function (_a) {
1922
1958
  }
1923
1959
  });
1924
1960
  };
1925
- _167.label = 31;
1961
+ _181.label = 31;
1926
1962
  case 31:
1927
- _167.trys.push([31, 36, 37, 38]);
1928
- _r = tslib_1.__values(((_83 = spec.series) !== null && _83 !== void 0 ? _83 : []).entries()), _s = _r.next();
1929
- _167.label = 32;
1963
+ _181.trys.push([31, 36, 37, 38]);
1964
+ _r = tslib_1.__values(((_94 = spec.series) !== null && _94 !== void 0 ? _94 : []).entries()), _s = _r.next();
1965
+ _181.label = 32;
1930
1966
  case 32:
1931
1967
  if (!!_s.done) return [3 /*break*/, 35];
1932
1968
  _t = tslib_1.__read(_s.value, 2), specSeriesIndex = _t[0], series = _t[1];
1933
1969
  return [5 /*yield**/, _loop_1(specSeriesIndex, series)];
1934
1970
  case 33:
1935
- _167.sent();
1936
- _167.label = 34;
1971
+ _181.sent();
1972
+ _181.label = 34;
1937
1973
  case 34:
1938
1974
  _s = _r.next();
1939
1975
  return [3 /*break*/, 32];
1940
1976
  case 35: return [3 /*break*/, 38];
1941
1977
  case 36:
1942
- e_3_1 = _167.sent();
1978
+ e_3_1 = _181.sent();
1943
1979
  e_3 = { error: e_3_1 };
1944
1980
  return [3 /*break*/, 38];
1945
1981
  case 37:
1946
1982
  try {
1947
- if (_s && !_s.done && (_8 = _r.return)) _8.call(_r);
1983
+ if (_s && !_s.done && (_4 = _r.return)) _4.call(_r);
1948
1984
  }
1949
1985
  finally { if (e_3) throw e_3.error; }
1950
1986
  return [7 /*endfinally*/];
@@ -1957,7 +1993,7 @@ var BasicChart = function (_a) {
1957
1993
  }
1958
1994
  if (isOfPie) {
1959
1995
  labels = rawPrimaryDomainValues.map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
1960
- seriesEntry = (_110 = spec.series) === null || _110 === void 0 ? void 0 : _110[0];
1996
+ seriesEntry = (_121 = spec.series) === null || _121 === void 0 ? void 0 : _121[0];
1961
1997
  rawValues = seriesEntry
1962
1998
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); })
1963
1999
  : [];
@@ -2004,7 +2040,7 @@ var BasicChart = function (_a) {
2004
2040
  };
2005
2041
  chartSeries.push({
2006
2042
  type: "pie",
2007
- name: (_111 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _111 !== void 0 ? _111 : "",
2043
+ name: (_122 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _122 !== void 0 ? _122 : "",
2008
2044
  center: ["".concat(MAIN_CX_1 * 100, "%"), "".concat(CY_1 * 100, "%")],
2009
2045
  radius: [0, "".concat(MAIN_RADIUS_PCT_1, "%")],
2010
2046
  // Rotate the pie so the "Other" slice's angular midpoint faces
@@ -2022,7 +2058,7 @@ var BasicChart = function (_a) {
2022
2058
  if (ofPieType_1 === "pie") {
2023
2059
  chartSeries.push({
2024
2060
  type: "pie",
2025
- name: (_112 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _112 !== void 0 ? _112 : "",
2061
+ name: (_123 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _123 !== void 0 ? _123 : "",
2026
2062
  center: ["".concat(SECONDARY_CX_1 * 100, "%"), "".concat(CY_1 * 100, "%")],
2027
2063
  radius: [0, "".concat(secondaryRadiusPct_1, "%")],
2028
2064
  data: secondary.map(function (s, i) { return ({
@@ -2117,16 +2153,16 @@ var BasicChart = function (_a) {
2117
2153
  legend.data = tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(main_1.map(function (s) { return s.label; })), false), tslib_1.__read(secondary.map(function (s) { return s.label; })), false);
2118
2154
  }
2119
2155
  else if (spec.chartType === "waterfall") {
2120
- primaryDomainSource_1 = (_115 = (_114 = (_113 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _113 === void 0 ? void 0 : _113[0]) === null || _114 === void 0 ? void 0 : _114.sources) === null || _115 === void 0 ? void 0 : _115[0];
2156
+ primaryDomainSource_1 = (_126 = (_125 = (_124 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _124 === void 0 ? void 0 : _124[0]) === null || _125 === void 0 ? void 0 : _125.sources) === null || _126 === void 0 ? void 0 : _126[0];
2121
2157
  rawDomainValues = primaryDomainSource_1
2122
- ? (0, aggregation_1.sanitizeDomainValues)((_116 = getDomainValuesFromRange(primaryDomainSource_1, spec.hiddenDimensionStrategy)) !== null && _116 !== void 0 ? _116 : [])
2158
+ ? (0, aggregation_1.sanitizeDomainValues)((_127 = getDomainValuesFromRange(primaryDomainSource_1, spec.hiddenDimensionStrategy)) !== null && _127 !== void 0 ? _127 : [])
2123
2159
  : [];
2124
2160
  labels = rawDomainValues.map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
2125
- seriesEntry = (_117 = spec.series) === null || _117 === void 0 ? void 0 : _117[0];
2161
+ seriesEntry = (_128 = spec.series) === null || _128 === void 0 ? void 0 : _128[0];
2126
2162
  rawValues_1 = seriesEntry
2127
2163
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); })
2128
2164
  : [];
2129
- totalIndices = new Set((_118 = spec.totalIndices) !== null && _118 !== void 0 ? _118 : []);
2165
+ totalIndices = new Set((_129 = spec.totalIndices) !== null && _129 !== void 0 ? _129 : []);
2130
2166
  steps = (0, waterfall_1.computeWaterfall)(rawValues_1, labels, totalIndices);
2131
2167
  chartDomains.length = 0;
2132
2168
  chartDomains.push({
@@ -2136,7 +2172,7 @@ var BasicChart = function (_a) {
2136
2172
  axisLine: { show: true },
2137
2173
  axisTick: { show: true },
2138
2174
  splitLine: { show: false },
2139
- name: (_119 = spec.horizontalAxisTitle) !== null && _119 !== void 0 ? _119 : "",
2175
+ name: (_130 = spec.horizontalAxisTitle) !== null && _130 !== void 0 ? _130 : "",
2140
2176
  nameLocation: "middle",
2141
2177
  nameGap: 30,
2142
2178
  });
@@ -2153,12 +2189,12 @@ var BasicChart = function (_a) {
2153
2189
  label: { show: false },
2154
2190
  tooltip: { show: false },
2155
2191
  });
2156
- accent_1 = (_120 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _120 !== void 0 ? _120 : theme.themeColors.accent1;
2157
- decreaseColor_1 = (_122 = (_121 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.negativeColor) !== null && _121 !== void 0 ? _121 : theme.themeColors.accent2) !== null && _122 !== void 0 ? _122 : accent_1;
2158
- totalColor_1 = (_123 = theme.themeColors.accent3) !== null && _123 !== void 0 ? _123 : accent_1;
2192
+ accent_1 = (_131 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _131 !== void 0 ? _131 : theme.themeColors.accent1;
2193
+ decreaseColor_1 = (_133 = (_132 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.negativeColor) !== null && _132 !== void 0 ? _132 : theme.themeColors.accent2) !== null && _133 !== void 0 ? _133 : accent_1;
2194
+ totalColor_1 = (_134 = theme.themeColors.accent3) !== null && _134 !== void 0 ? _134 : accent_1;
2159
2195
  pointColors_1 = new Map();
2160
2196
  try {
2161
- for (_v = tslib_1.__values((_124 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataPointColors) !== null && _124 !== void 0 ? _124 : []), _w = _v.next(); !_w.done; _w = _v.next()) {
2197
+ for (_v = tslib_1.__values((_135 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataPointColors) !== null && _135 !== void 0 ? _135 : []), _w = _v.next(); !_w.done; _w = _v.next()) {
2162
2198
  dp = _w.value;
2163
2199
  if (typeof (dp === null || dp === void 0 ? void 0 : dp.idx) === "number" && typeof (dp === null || dp === void 0 ? void 0 : dp.color) === "string") {
2164
2200
  pointColors_1.set(dp.idx, dp.color);
@@ -2168,7 +2204,7 @@ var BasicChart = function (_a) {
2168
2204
  catch (e_6_1) { e_6 = { error: e_6_1 }; }
2169
2205
  finally {
2170
2206
  try {
2171
- if (_w && !_w.done && (_9 = _v.return)) _9.call(_v);
2207
+ if (_w && !_w.done && (_5 = _v.return)) _5.call(_v);
2172
2208
  }
2173
2209
  finally { if (e_6) throw e_6.error; }
2174
2210
  }
@@ -2180,7 +2216,7 @@ var BasicChart = function (_a) {
2180
2216
  type: "bar",
2181
2217
  id: (0, series_click_1.chartSeriesId)(0, 0),
2182
2218
  stack: "waterfall",
2183
- name: (_125 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _125 !== void 0 ? _125 : "",
2219
+ name: (_136 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _136 !== void 0 ? _136 : "",
2184
2220
  // A bar's height is the step's magnitude; the signed source value
2185
2221
  // rides along as `originalValue` so labels and tooltips read
2186
2222
  // "-90" for a decrease, like Excel.
@@ -2214,12 +2250,12 @@ var BasicChart = function (_a) {
2214
2250
  legend.data = [];
2215
2251
  }
2216
2252
  else if (spec.chartType === "funnel") {
2217
- primaryDomainSource_2 = (_128 = (_127 = (_126 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _126 === void 0 ? void 0 : _126[0]) === null || _127 === void 0 ? void 0 : _127.sources) === null || _128 === void 0 ? void 0 : _128[0];
2253
+ primaryDomainSource_2 = (_139 = (_138 = (_137 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _137 === void 0 ? void 0 : _137[0]) === null || _138 === void 0 ? void 0 : _138.sources) === null || _139 === void 0 ? void 0 : _139[0];
2218
2254
  rawDomainValues = primaryDomainSource_2
2219
- ? (0, aggregation_1.sanitizeDomainValues)((_129 = getDomainValuesFromRange(primaryDomainSource_2, spec.hiddenDimensionStrategy)) !== null && _129 !== void 0 ? _129 : [])
2255
+ ? (0, aggregation_1.sanitizeDomainValues)((_140 = getDomainValuesFromRange(primaryDomainSource_2, spec.hiddenDimensionStrategy)) !== null && _140 !== void 0 ? _140 : [])
2220
2256
  : [];
2221
2257
  labels_1 = rawDomainValues.map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
2222
- seriesEntry = (_130 = spec.series) === null || _130 === void 0 ? void 0 : _130[0];
2258
+ seriesEntry = (_141 = spec.series) === null || _141 === void 0 ? void 0 : _141[0];
2223
2259
  rawValues = seriesEntry
2224
2260
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : 0); })
2225
2261
  : [];
@@ -2233,10 +2269,10 @@ var BasicChart = function (_a) {
2233
2269
  theme.themeColors.accent5,
2234
2270
  theme.themeColors.accent6,
2235
2271
  ]);
2236
- funnelColor_1 = (_131 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _131 !== void 0 ? _131 : (0, utils_1.chartPaletteColorAt)(funnelPalette, 0);
2272
+ funnelColor_1 = (_142 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _142 !== void 0 ? _142 : (0, utils_1.chartPaletteColorAt)(funnelPalette, 0);
2237
2273
  stageColors_1 = new Map();
2238
2274
  try {
2239
- for (_x = tslib_1.__values((_132 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataPointColors) !== null && _132 !== void 0 ? _132 : []), _y = _x.next(); !_y.done; _y = _x.next()) {
2275
+ for (_x = tslib_1.__values((_143 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataPointColors) !== null && _143 !== void 0 ? _143 : []), _y = _x.next(); !_y.done; _y = _x.next()) {
2240
2276
  dp = _y.value;
2241
2277
  if (typeof (dp === null || dp === void 0 ? void 0 : dp.idx) === "number" && typeof (dp === null || dp === void 0 ? void 0 : dp.color) === "string") {
2242
2278
  stageColors_1.set(dp.idx, dp.color);
@@ -2246,7 +2282,7 @@ var BasicChart = function (_a) {
2246
2282
  catch (e_7_1) { e_7 = { error: e_7_1 }; }
2247
2283
  finally {
2248
2284
  try {
2249
- if (_y && !_y.done && (_10 = _x.return)) _10.call(_x);
2285
+ if (_y && !_y.done && (_6 = _x.return)) _6.call(_x);
2250
2286
  }
2251
2287
  finally { if (e_7) throw e_7.error; }
2252
2288
  }
@@ -2264,115 +2300,202 @@ var BasicChart = function (_a) {
2264
2300
  top: 60,
2265
2301
  bottom: 20,
2266
2302
  };
2267
- chartSeries.push(tslib_1.__assign(tslib_1.__assign({ type: "funnel", id: (0, series_click_1.chartSeriesId)(0, 0), name: (_133 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _133 !== void 0 ? _133 : "", data: funnelData }, funnelLayout), { itemStyle: {
2303
+ funnelLabelsOff = ((_144 = (0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, seriesEntry)) === null || _144 === void 0 ? void 0 : _144.show) ===
2304
+ false;
2305
+ chartSeries.push(tslib_1.__assign(tslib_1.__assign({ type: "funnel", id: (0, series_click_1.chartSeriesId)(0, 0), name: (_145 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _145 !== void 0 ? _145 : "", data: funnelData }, funnelLayout), { itemStyle: {
2268
2306
  color: function (params) { var _a; return (_a = stageColors_1.get(params.dataIndex)) !== null && _a !== void 0 ? _a : funnelColor_1; },
2269
- }, label: {
2270
- show: true,
2271
- position: "inside",
2272
- formatter: function (params) {
2273
- return (0, axis_number_format_1.formatAxisValue)(undefined, params.value, locale);
2274
- },
2275
- } }));
2307
+ }, label: funnelLabelsOff
2308
+ ? { show: false }
2309
+ : {
2310
+ show: true,
2311
+ position: "inside",
2312
+ formatter: function (params) {
2313
+ return (0, axis_number_format_1.formatAxisValue)(undefined, params.value, locale);
2314
+ },
2315
+ } }));
2276
2316
  // The stage names sit to the left of the bars, where Excel's
2277
2317
  // category axis puts them: an invisible twin funnel carries them.
2278
2318
  chartSeries.push(tslib_1.__assign(tslib_1.__assign({ type: "funnel", id: FUNNEL_NAMES_ID, data: funnelData }, funnelLayout), { silent: true, itemStyle: { color: "transparent", borderWidth: 0 }, emphasis: { disabled: true }, tooltip: { show: false }, label: { show: true, position: "left", formatter: "{b}" }, labelLine: { show: false }, z: 1 }));
2279
- legend.data = [];
2319
+ // The legend lists the series (shown when `legend.position` says so).
2320
+ legend.data = (seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) ? [seriesEntry.dataLabel] : [];
2280
2321
  }
2281
2322
  else if (spec.chartType === "boxplot") {
2282
- quartileMethod = spec.quartileMethod;
2283
- showOutliers = spec.showOutliers;
2284
- showMeanMarker = spec.showMeanMarker === true;
2285
- boxStats = [];
2286
- boxLabels = [];
2287
- outlierPoints = [];
2288
- meanPoints = [];
2289
- try {
2290
- for (_z = tslib_1.__values((_134 = spec.series) !== null && _134 !== void 0 ? _134 : []), _0 = _z.next(); !_0.done; _0 = _z.next()) {
2291
- seriesEntry = _0.value;
2292
- label = seriesEntry.dataLabel && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
2293
- ? seriesEntry.dataLabel
2294
- : "";
2295
- rawValues = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); });
2296
- summary = (0, boxplot_1.computeBoxplotSummary)(rawValues, { quartileMethod: quartileMethod });
2297
- if (summary) {
2298
- boxIndex = boxStats.length;
2299
- lo = showOutliers === true ? summary.lowerWhisker : summary.min;
2300
- hi = showOutliers === true ? summary.upperWhisker : summary.max;
2301
- boxStats.push([lo, summary.q1, summary.median, summary.q3, hi]);
2302
- boxLabels.push(label);
2303
- if (showOutliers === true) {
2304
- try {
2305
- for (_1 = (e_9 = void 0, tslib_1.__values(summary.outliers)), _2 = _1.next(); !_2.done; _2 = _1.next()) {
2306
- outlier = _2.value;
2307
- outlierPoints.push([boxIndex, outlier]);
2308
- }
2309
- }
2310
- catch (e_9_1) { e_9 = { error: e_9_1 }; }
2311
- finally {
2312
- try {
2313
- if (_2 && !_2.done && (_12 = _1.return)) _12.call(_1);
2314
- }
2315
- finally { if (e_9) throw e_9.error; }
2316
- }
2317
- }
2318
- if (showMeanMarker) {
2319
- meanPoints.push([boxIndex, summary.mean]);
2320
- }
2323
+ quartileMethod_1 = spec.quartileMethod;
2324
+ showOutliers_1 = spec.showOutliers !== false;
2325
+ showMeanMarker_1 = spec.showMeanMarker === true;
2326
+ showInnerPoints_1 = spec.showInnerPoints === true;
2327
+ showMeanLine_1 = spec.showMeanLine === true;
2328
+ boxDomainSource = (_148 = (_147 = (_146 = spec.domains) === null || _146 === void 0 ? void 0 : _146[0]) === null || _147 === void 0 ? void 0 : _147.sources) === null || _148 === void 0 ? void 0 : _148[0];
2329
+ boxCategories_2 = boxDomainSource
2330
+ ? ((_149 = getDomainValuesFromRange(boxDomainSource, spec.hiddenDimensionStrategy)) !== null && _149 !== void 0 ? _149 : []).map(function (v) { return (v === null || v === undefined ? "" : "".concat(v).trim()); })
2331
+ : [];
2332
+ grouped_1 = boxCategories_2.some(function (c) { return c !== ""; });
2333
+ groups_1 = [];
2334
+ if (grouped_1) {
2335
+ try {
2336
+ for (boxCategories_1 = tslib_1.__values(boxCategories_2), boxCategories_1_1 = boxCategories_1.next(); !boxCategories_1_1.done; boxCategories_1_1 = boxCategories_1.next()) {
2337
+ c = boxCategories_1_1.value;
2338
+ if (c !== "" && !groups_1.includes(c))
2339
+ groups_1.push(c);
2321
2340
  }
2322
2341
  }
2323
- }
2324
- catch (e_8_1) { e_8 = { error: e_8_1 }; }
2325
- finally {
2326
- try {
2327
- if (_0 && !_0.done && (_11 = _z.return)) _11.call(_z);
2342
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
2343
+ finally {
2344
+ try {
2345
+ if (boxCategories_1_1 && !boxCategories_1_1.done && (_7 = boxCategories_1.return)) _7.call(boxCategories_1);
2346
+ }
2347
+ finally { if (e_8) throw e_8.error; }
2328
2348
  }
2329
- finally { if (e_8) throw e_8.error; }
2330
2349
  }
2350
+ boxSeriesSpecs = (_150 = spec.series) !== null && _150 !== void 0 ? _150 : [];
2351
+ slots_1 = grouped_1 ? groups_1 : boxSeriesSpecs.map(function (s, i) {
2352
+ return s.dataLabel && !(0, utils_1.isAFormula)(s.dataLabel) ? s.dataLabel : "Series ".concat(i + 1);
2353
+ });
2354
+ boxGap = typeof spec.gapWidth === "number" ? Math.max(0, spec.gapWidth) : 150;
2355
+ boxPlotWidth = Math.max(0, (width !== null && width !== void 0 ? width : 0) * 0.85 - 40);
2356
+ boxBand = slots_1.length ? boxPlotWidth / slots_1.length : boxPlotWidth;
2357
+ boxWidthMax_1 = Math.max(2, Math.round(boxBand / (Math.max(1, boxSeriesSpecs.length) + boxGap / 100)));
2358
+ boxCount_1 = Math.max(1, boxSeriesSpecs.length);
2359
+ slotX_1 = function (slotIndex, seriesIndex) {
2360
+ return slotIndex + ((seriesIndex + 0.5) / boxCount_1 - 0.5) * 0.8;
2361
+ };
2331
2362
  chartDomains.length = 0;
2332
2363
  chartDomains.push({
2333
2364
  type: "category",
2334
- data: boxLabels,
2365
+ data: slots_1,
2335
2366
  show: showAxis,
2336
2367
  axisLine: { show: true },
2337
2368
  axisTick: { show: true },
2338
2369
  splitLine: { show: false },
2339
- name: (_135 = spec.horizontalAxisTitle) !== null && _135 !== void 0 ? _135 : "",
2370
+ name: (_151 = spec.horizontalAxisTitle) !== null && _151 !== void 0 ? _151 : "",
2340
2371
  nameLocation: "middle",
2341
2372
  nameGap: 30,
2342
2373
  });
2343
2374
  chartSeries.length = 0;
2344
- boxSeries = {
2345
- type: "boxplot",
2346
- name: "",
2347
- data: boxStats,
2348
- };
2349
- boxColor = (_137 = (_136 = spec.series) === null || _136 === void 0 ? void 0 : _136[0]) === null || _137 === void 0 ? void 0 : _137.color;
2350
- if (boxColor) {
2351
- boxSeries.itemStyle = { color: boxColor, borderColor: boxColor };
2352
- }
2353
- chartSeries.push(boxSeries);
2354
- if (outlierPoints.length > 0) {
2355
- chartSeries.push(tslib_1.__assign(tslib_1.__assign({ type: "scatter", name: "", data: outlierPoints, symbolSize: 6 }, (boxColor ? { itemStyle: { color: boxColor } } : {})), { tooltip: { show: false } }));
2356
- }
2357
- if (meanPoints.length > 0) {
2358
- chartSeries.push(tslib_1.__assign(tslib_1.__assign({ type: "scatter", name: "", data: meanPoints, symbol: "diamond", symbolSize: 9 }, (boxColor ? { itemStyle: { color: boxColor } } : {})), { tooltip: { show: false } }));
2359
- }
2360
- legend.data = [];
2375
+ boxLegend_1 = [];
2376
+ boxSeriesSpecs.forEach(function (seriesEntry, seriesIndex) {
2377
+ var _a;
2378
+ var label = seriesEntry.dataLabel && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
2379
+ ? seriesEntry.dataLabel
2380
+ : "";
2381
+ var rawValues = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); });
2382
+ var color = (_a = seriesEntry.color) !== null && _a !== void 0 ? _a : paletteColorAt(seriesIndex);
2383
+ var boxData = [];
2384
+ var outlierPoints = [];
2385
+ var innerPoints = [];
2386
+ var meanPoints = [];
2387
+ var meanLine = [];
2388
+ var slotValues = grouped_1
2389
+ ? groups_1.map(function (g) { return rawValues.filter(function (_, i) { return boxCategories_2[i] === g; }); })
2390
+ : slots_1.map(function (_, i) { return (i === seriesIndex ? rawValues : []); });
2391
+ slotValues.forEach(function (values, slotIndex) {
2392
+ var e_15, _a, e_16, _b;
2393
+ var summary = (0, boxplot_1.computeBoxplotSummary)(values, { quartileMethod: quartileMethod_1 });
2394
+ if (!summary) {
2395
+ boxData.push([]);
2396
+ meanLine.push(null);
2397
+ return;
2398
+ }
2399
+ // Whiskers stop at the most extreme points inside the 1.5×IQR
2400
+ // fences; hiding the outliers hides the points only (Excel).
2401
+ boxData.push([
2402
+ summary.lowerWhisker,
2403
+ summary.q1,
2404
+ summary.median,
2405
+ summary.q3,
2406
+ summary.upperWhisker,
2407
+ ]);
2408
+ meanLine.push(summary.mean);
2409
+ var x = slotX_1(slotIndex, seriesIndex);
2410
+ if (showOutliers_1) {
2411
+ try {
2412
+ for (var _c = tslib_1.__values(summary.outliers), _d = _c.next(); !_d.done; _d = _c.next()) {
2413
+ var outlier = _d.value;
2414
+ outlierPoints.push([x, outlier]);
2415
+ }
2416
+ }
2417
+ catch (e_15_1) { e_15 = { error: e_15_1 }; }
2418
+ finally {
2419
+ try {
2420
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
2421
+ }
2422
+ finally { if (e_15) throw e_15.error; }
2423
+ }
2424
+ }
2425
+ if (showInnerPoints_1) {
2426
+ try {
2427
+ for (var values_1 = tslib_1.__values(values), values_1_1 = values_1.next(); !values_1_1.done; values_1_1 = values_1.next()) {
2428
+ var v = values_1_1.value;
2429
+ if (v >= summary.lowerWhisker && v <= summary.upperWhisker) {
2430
+ innerPoints.push([x, v]);
2431
+ }
2432
+ }
2433
+ }
2434
+ catch (e_16_1) { e_16 = { error: e_16_1 }; }
2435
+ finally {
2436
+ try {
2437
+ if (values_1_1 && !values_1_1.done && (_b = values_1.return)) _b.call(values_1);
2438
+ }
2439
+ finally { if (e_16) throw e_16.error; }
2440
+ }
2441
+ }
2442
+ if (showMeanMarker_1)
2443
+ meanPoints.push([x, summary.mean]);
2444
+ });
2445
+ if (label)
2446
+ boxLegend_1.push(label);
2447
+ chartSeries.push({
2448
+ type: "boxplot",
2449
+ id: (0, series_click_1.chartSeriesId)(seriesIndex, 0),
2450
+ name: label,
2451
+ data: boxData,
2452
+ boxWidth: [2, boxWidthMax_1],
2453
+ itemStyle: { color: color, borderColor: color },
2454
+ });
2455
+ var pointSeries = function (name, points, extra) {
2456
+ return (tslib_1.__assign({ type: "scatter", name: name, data: points, itemStyle: { color: color }, tooltip: { show: false } }, extra));
2457
+ };
2458
+ if (outlierPoints.length > 0) {
2459
+ chartSeries.push(pointSeries("", outlierPoints, { symbolSize: 6 }));
2460
+ }
2461
+ if (innerPoints.length > 0) {
2462
+ chartSeries.push(pointSeries("", innerPoints, { symbolSize: 4, itemStyle: { color: color, opacity: 0.6 } }));
2463
+ }
2464
+ if (meanPoints.length > 0) {
2465
+ chartSeries.push(pointSeries("", meanPoints, { symbol: "diamond", symbolSize: 9 }));
2466
+ }
2467
+ if (showMeanLine_1 && meanLine.some(function (m) { return m !== null; })) {
2468
+ chartSeries.push({
2469
+ type: "line",
2470
+ name: "",
2471
+ data: meanLine.map(function (m, slotIndex) {
2472
+ return m === null ? null : [slotX_1(slotIndex, seriesIndex), m];
2473
+ }),
2474
+ showSymbol: false,
2475
+ lineStyle: { color: color, type: "dashed", width: 1 },
2476
+ itemStyle: { color: color },
2477
+ tooltip: { show: false },
2478
+ z: 3,
2479
+ });
2480
+ }
2481
+ });
2482
+ // The legend lists the series (shown when `legend.position` says so).
2483
+ legend.data = boxLegend_1;
2361
2484
  }
2362
2485
  else if (spec.chartType === "histogram") {
2363
2486
  rawValues = flattenChartDataValues(spec.series, getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); });
2364
- histogramDomainSource = (_140 = (_139 = (_138 = spec.domains) === null || _138 === void 0 ? void 0 : _138[0]) === null || _139 === void 0 ? void 0 : _139.sources) === null || _140 === void 0 ? void 0 : _140[0];
2487
+ histogramDomainSource = (_154 = (_153 = (_152 = spec.domains) === null || _152 === void 0 ? void 0 : _152[0]) === null || _153 === void 0 ? void 0 : _153.sources) === null || _154 === void 0 ? void 0 : _154[0];
2365
2488
  histogramCategories = histogramDomainSource
2366
- ? ((_141 = getDomainValuesFromRange(histogramDomainSource, spec.hiddenDimensionStrategy)) !== null && _141 !== void 0 ? _141 : [])
2489
+ ? ((_155 = getDomainValuesFromRange(histogramDomainSource, spec.hiddenDimensionStrategy)) !== null && _155 !== void 0 ? _155 : [])
2367
2490
  : [];
2368
- _3 = histogramCategories.length
2369
- ? (0, histogram_1.aggregateByCategory)(histogramCategories, rawValues, (_144 = (_143 = (_142 = spec.series) === null || _142 === void 0 ? void 0 : _142[0]) === null || _143 === void 0 ? void 0 : _143.aggregateType) !== null && _144 !== void 0 ? _144 : "SUM")
2491
+ _z = histogramCategories.length
2492
+ ? (0, histogram_1.aggregateByCategory)(histogramCategories, rawValues, (_158 = (_157 = (_156 = spec.series) === null || _156 === void 0 ? void 0 : _156[0]) === null || _157 === void 0 ? void 0 : _157.aggregateType) !== null && _158 !== void 0 ? _158 : "SUM")
2370
2493
  : (0, histogram_1.binHistogram)(rawValues, spec.binCount, {
2371
2494
  binSize: spec.binSize,
2372
2495
  intervalClosed: spec.intervalClosed,
2373
2496
  overflow: spec.overflow,
2374
2497
  underflow: spec.underflow,
2375
- }), labels = _3.labels, counts = _3.counts;
2498
+ }), labels = _z.labels, counts = _z.counts;
2376
2499
  isPareto_1 = (0, histogram_1.isParetoSpec)(spec);
2377
2500
  cumulativePercents = [];
2378
2501
  if (isPareto_1) {
@@ -2389,20 +2512,20 @@ var BasicChart = function (_a) {
2389
2512
  axisLine: { show: true },
2390
2513
  axisTick: { show: true },
2391
2514
  splitLine: { show: false },
2392
- name: (_145 = spec.horizontalAxisTitle) !== null && _145 !== void 0 ? _145 : "",
2515
+ name: (_159 = spec.horizontalAxisTitle) !== null && _159 !== void 0 ? _159 : "",
2393
2516
  nameLocation: "middle",
2394
2517
  nameGap: 30,
2395
2518
  });
2396
2519
  chartSeries.length = 0;
2397
2520
  histogramSeries = {
2398
2521
  type: "bar",
2399
- name: (_148 = (_147 = (_146 = spec.series) === null || _146 === void 0 ? void 0 : _146[0]) === null || _147 === void 0 ? void 0 : _147.dataLabel) !== null && _148 !== void 0 ? _148 : "",
2522
+ name: (_162 = (_161 = (_160 = spec.series) === null || _160 === void 0 ? void 0 : _160[0]) === null || _161 === void 0 ? void 0 : _161.dataLabel) !== null && _162 !== void 0 ? _162 : "",
2400
2523
  data: counts,
2401
2524
  // Excel's histogram columns touch unless `gapWidth` says otherwise
2402
2525
  // (#1087); the gap maps like a column chart's.
2403
- barCategoryGap: (_150 = (0, bar_layout_1.gapWidthToBarCategoryGap)((_149 = spec.gapWidth) !== null && _149 !== void 0 ? _149 : 0, { seriesCount: 1 })) !== null && _150 !== void 0 ? _150 : "0%",
2526
+ barCategoryGap: (_164 = (0, bar_layout_1.gapWidthToBarCategoryGap)((_163 = spec.gapWidth) !== null && _163 !== void 0 ? _163 : 0, { seriesCount: 1 })) !== null && _164 !== void 0 ? _164 : "0%",
2404
2527
  };
2405
- histogramColor = (_152 = (_151 = spec.series) === null || _151 === void 0 ? void 0 : _151[0]) === null || _152 === void 0 ? void 0 : _152.color;
2528
+ histogramColor = (_166 = (_165 = spec.series) === null || _165 === void 0 ? void 0 : _165[0]) === null || _166 === void 0 ? void 0 : _166.color;
2406
2529
  if (histogramColor) {
2407
2530
  histogramSeries.itemStyle = { color: histogramColor };
2408
2531
  }
@@ -2435,20 +2558,20 @@ var BasicChart = function (_a) {
2435
2558
  isPareto = spec.chartType === "histogram" && (0, histogram_1.isParetoSpec)(spec);
2436
2559
  hasSecondaryAxis = !isCircularChart &&
2437
2560
  !isHorizontalBarChart &&
2438
- (((_153 = spec.series) !== null && _153 !== void 0 ? _153 : []).some(function (s) { return s.useSecondaryAxis; }) || isPareto);
2561
+ (((_167 = spec.series) !== null && _167 !== void 0 ? _167 : []).some(function (s) { return s.useSecondaryAxis; }) || isPareto);
2439
2562
  isPercentStackedBars = spec.stackedType === "PERCENT_STACKED" &&
2440
2563
  (spec.chartType === "bar" || spec.chartType === "column");
2441
2564
  primaryAxisNumberFormat = isPercentStackedBars
2442
2565
  ? undefined
2443
2566
  : (0, axis_number_format_1.resolveValueAxisNumberFormat)({
2444
2567
  axisOptions: spec.valueAxisOptions,
2445
- series: ((_154 = spec.series) !== null && _154 !== void 0 ? _154 : []).filter(function (s) { return !s.useSecondaryAxis; }),
2568
+ series: ((_168 = spec.series) !== null && _168 !== void 0 ? _168 : []).filter(function (s) { return !s.useSecondaryAxis; }),
2446
2569
  getFormattingFromRange: getFormattingFromRange,
2447
2570
  hiddenDimensionStrategy: spec.hiddenDimensionStrategy,
2448
2571
  });
2449
2572
  secondaryAxisNumberFormat = (0, axis_number_format_1.resolveValueAxisNumberFormat)({
2450
2573
  axisOptions: spec.secondaryValueAxisOptions,
2451
- series: ((_155 = spec.series) !== null && _155 !== void 0 ? _155 : []).filter(function (s) { return s.useSecondaryAxis; }),
2574
+ series: ((_169 = spec.series) !== null && _169 !== void 0 ? _169 : []).filter(function (s) { return s.useSecondaryAxis; }),
2452
2575
  getFormattingFromRange: getFormattingFromRange,
2453
2576
  hiddenDimensionStrategy: spec.hiddenDimensionStrategy,
2454
2577
  });
@@ -2477,17 +2600,17 @@ var BasicChart = function (_a) {
2477
2600
  finalLegend = (0, overrides_1.applyLegendOverrides)(legend, spec.legend);
2478
2601
  bottomAxisNameGap = isHorizontalBarChart
2479
2602
  ? valueAxisBase.nameGap
2480
- : Number((_157 = (_156 = chartDomains[0]) === null || _156 === void 0 ? void 0 : _156.nameGap) !== null && _157 !== void 0 ? _157 : CATEGORY_AXIS_NAME_GAP);
2603
+ : Number((_171 = (_170 = chartDomains[0]) === null || _170 === void 0 ? void 0 : _170.nameGap) !== null && _171 !== void 0 ? _171 : CATEGORY_AXIS_NAME_GAP);
2481
2604
  legendBand = (0, legend_layout_1.reserveEchartsLegendBand)({
2482
- position: (_158 = spec.legend) === null || _158 === void 0 ? void 0 : _158.position,
2605
+ position: (_172 = spec.legend) === null || _172 === void 0 ? void 0 : _172.position,
2483
2606
  visible: finalLegend.show !== false,
2484
2607
  labels: (0, legend_layout_1.legendLabelsFrom)(finalLegend.data, chartSeries.map(function (s) { return s === null || s === void 0 ? void 0 : s.name; })),
2485
- legendFontSize: (_163 = (_160 = (_159 = finalLegend.textStyle) === null || _159 === void 0 ? void 0 : _159.fontSize) !== null && _160 !== void 0 ? _160 : (_162 = (_161 = spec.legend) === null || _161 === void 0 ? void 0 : _161.textFormat) === null || _162 === void 0 ? void 0 : _162.fontSize) !== null && _163 !== void 0 ? _163 : 12,
2608
+ legendFontSize: (_177 = (_174 = (_173 = finalLegend.textStyle) === null || _173 === void 0 ? void 0 : _173.fontSize) !== null && _174 !== void 0 ? _174 : (_176 = (_175 = spec.legend) === null || _175 === void 0 ? void 0 : _175.textFormat) === null || _176 === void 0 ? void 0 : _176.fontSize) !== null && _177 !== void 0 ? _177 : 12,
2486
2609
  legendItemWidth: defaultLegendConfig.itemWidth,
2487
2610
  width: width !== null && width !== void 0 ? width : 0,
2488
2611
  height: height !== null && height !== void 0 ? height : 0,
2489
2612
  hasTitle: Boolean(title),
2490
- titleFontSize: (_165 = (_164 = spec.titleTextFormat) === null || _164 === void 0 ? void 0 : _164.fontSize) !== null && _165 !== void 0 ? _165 : 16,
2613
+ titleFontSize: (_179 = (_178 = spec.titleTextFormat) === null || _178 === void 0 ? void 0 : _178.fontSize) !== null && _179 !== void 0 ? _179 : 16,
2491
2614
  hasBottomAxisTitle: !isCircularChart && Boolean(spec.horizontalAxisTitle),
2492
2615
  bottomAxisNameGap: bottomAxisNameGap,
2493
2616
  hasLeftAxisTitle: !isCircularChart && Boolean(spec.verticalAxisTitle),
@@ -2560,12 +2683,12 @@ var BasicChart = function (_a) {
2560
2683
  }
2561
2684
  }
2562
2685
  }
2563
- catch (e_10_1) { e_10 = { error: e_10_1 }; }
2686
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
2564
2687
  finally {
2565
2688
  try {
2566
- if (barSeries_1_1 && !barSeries_1_1.done && (_13 = barSeries_1.return)) _13.call(barSeries_1);
2689
+ if (barSeries_1_1 && !barSeries_1_1.done && (_8 = barSeries_1.return)) _8.call(barSeries_1);
2567
2690
  }
2568
- finally { if (e_10) throw e_10.error; }
2691
+ finally { if (e_9) throw e_9.error; }
2569
2692
  }
2570
2693
  try {
2571
2694
  for (barSeries_2 = tslib_1.__values(barSeries), barSeries_2_1 = barSeries_2.next(); !barSeries_2_1.done; barSeries_2_1 = barSeries_2.next()) {
@@ -2582,12 +2705,12 @@ var BasicChart = function (_a) {
2582
2705
  });
2583
2706
  }
2584
2707
  }
2585
- catch (e_11_1) { e_11 = { error: e_11_1 }; }
2708
+ catch (e_10_1) { e_10 = { error: e_10_1 }; }
2586
2709
  finally {
2587
2710
  try {
2588
- if (barSeries_2_1 && !barSeries_2_1.done && (_14 = barSeries_2.return)) _14.call(barSeries_2);
2711
+ if (barSeries_2_1 && !barSeries_2_1.done && (_9 = barSeries_2.return)) _9.call(barSeries_2);
2589
2712
  }
2590
- finally { if (e_11) throw e_11.error; }
2713
+ finally { if (e_10) throw e_10.error; }
2591
2714
  }
2592
2715
  }
2593
2716
  seriesWithLabels = chartSeries.map(function (s) {
@@ -2657,7 +2780,7 @@ var BasicChart = function (_a) {
2657
2780
  return next;
2658
2781
  });
2659
2782
  // Update charts
2660
- (_166 = chartRef.current) === null || _166 === void 0 ? void 0 : _166.setOption({
2783
+ (_180 = chartRef.current) === null || _180 === void 0 ? void 0 : _180.setOption({
2661
2784
  xAxis: (function () {
2662
2785
  var _a, _b;
2663
2786
  if (isOfPie) {