@rowsncolumns/charts 28.1.17 → 28.1.18

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.
Files changed (36) hide show
  1. package/Readme.md +18 -1
  2. package/dist/cjs/basic-chart/basic-chart.d.ts +1 -1
  3. package/dist/cjs/basic-chart/basic-chart.d.ts.map +1 -1
  4. package/dist/cjs/basic-chart/basic-chart.js +175 -151
  5. package/dist/cjs/components/editors/chart-editor.d.ts +7 -1
  6. package/dist/cjs/components/editors/chart-editor.d.ts.map +1 -1
  7. package/dist/cjs/components/editors/chart-editor.js +3 -2
  8. package/dist/cjs/config.d.ts +10 -0
  9. package/dist/cjs/config.d.ts.map +1 -1
  10. package/dist/cjs/config.js +45 -10
  11. package/dist/cjs/types.d.ts +10 -0
  12. package/dist/cjs/types.d.ts.map +1 -1
  13. package/dist/cjs/utils/echarts-gl-loader.d.ts +6 -0
  14. package/dist/cjs/utils/echarts-gl-loader.d.ts.map +1 -1
  15. package/dist/cjs/utils/echarts-gl-loader.js +42 -1
  16. package/dist/cjs/utils/three-d.d.ts +12 -1
  17. package/dist/cjs/utils/three-d.d.ts.map +1 -1
  18. package/dist/cjs/utils/three-d.js +4 -1
  19. package/dist/esm/basic-chart/basic-chart.d.ts +1 -1
  20. package/dist/esm/basic-chart/basic-chart.d.ts.map +1 -1
  21. package/dist/esm/basic-chart/basic-chart.js +60 -35
  22. package/dist/esm/components/editors/chart-editor.d.ts +7 -1
  23. package/dist/esm/components/editors/chart-editor.d.ts.map +1 -1
  24. package/dist/esm/components/editors/chart-editor.js +4 -3
  25. package/dist/esm/config.d.ts +10 -0
  26. package/dist/esm/config.d.ts.map +1 -1
  27. package/dist/esm/config.js +20 -0
  28. package/dist/esm/types.d.ts +10 -0
  29. package/dist/esm/types.d.ts.map +1 -1
  30. package/dist/esm/utils/echarts-gl-loader.d.ts +6 -0
  31. package/dist/esm/utils/echarts-gl-loader.d.ts.map +1 -1
  32. package/dist/esm/utils/echarts-gl-loader.js +40 -0
  33. package/dist/esm/utils/three-d.d.ts +12 -1
  34. package/dist/esm/utils/three-d.d.ts.map +1 -1
  35. package/dist/esm/utils/three-d.js +4 -1
  36. package/package.json +1 -1
@@ -256,7 +256,7 @@ var defaultLegendConfig = {
256
256
  var CATEGORY_AXIS_NAME_GAP = (0, legend_layout_1.categoryAxisNameGap)();
257
257
  var BasicChart = function (_a) {
258
258
  var _b, _c, _d;
259
- var width = _a.width, height = _a.height, chart = _a.chart, theme = _a.theme, isDarkMode = _a.isDarkMode, sheetId = _a.sheetId, readonly = _a.readonly, getDomainValuesFromRange = _a.getDomainValuesFromRange, getSeriesValuesFromRange = _a.getSeriesValuesFromRange, getFormattingFromRange = _a.getFormattingFromRange, onDeleteChart = _a.onDeleteChart, onUpdateChart = _a.onUpdateChart, onRequestEdit = _a.onRequestEdit, onRequestCalculate = _a.onRequestCalculate, isSelected = _a.isSelected, fieldButtons = _a.fieldButtons, locale = _a.locale;
259
+ var width = _a.width, height = _a.height, chart = _a.chart, theme = _a.theme, isDarkMode = _a.isDarkMode, sheetId = _a.sheetId, readonly = _a.readonly, getDomainValuesFromRange = _a.getDomainValuesFromRange, getSeriesValuesFromRange = _a.getSeriesValuesFromRange, getFormattingFromRange = _a.getFormattingFromRange, onDeleteChart = _a.onDeleteChart, onUpdateChart = _a.onUpdateChart, onRequestEdit = _a.onRequestEdit, onRequestCalculate = _a.onRequestCalculate, isSelected = _a.isSelected, fieldButtons = _a.fieldButtons, locale = _a.locale, enable3D = _a.enable3D;
260
260
  var spec = chart.spec;
261
261
  var explicitChartTitle = (_b = chart.spec.title) !== null && _b !== void 0 ? _b : undefined;
262
262
  var hierarchyTitleRef = (0, react_1.useRef)(explicitChartTitle);
@@ -430,14 +430,14 @@ var BasicChart = function (_a) {
430
430
  * Triggers a chart update
431
431
  */
432
432
  var updateChart = function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
433
- var threeDRenderKind, canRender3D, willRender3D, isRegionMap, regionSpec, geoScope, geo, labels, seriesEntry, values, _a, data, unmatched, min, max, textColor, ramp, noDataColor, borderColor, regionSeriesLabel, seriesName, boxplotOverlayAxis, chartDomains, chartSeries, legend, chartType, position, showAxis, isBubble, isHierarchy, skipHeaders_1, labelValues, perSeriesX, perSeriesSize, seriesInputs, i, seriesEntry, linkedLabel, 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, _h, values, e_1_1, seriesNames_1, contourPoints, _j, zMin, zMax, contourFormats_1, contourLabel, categories_3, threeDSeriesInputs, _k, _l, seriesEntry, dataLabel, _m, _o, _p, 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, _q, zMin, zMax, skipHeaders, categories, radarSeriesInputs, _r, _s, 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, _t, _u, _v, specSeriesIndex, series, e_3_1, labels, seriesEntry, rawValues, _w, 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, _x, _y, dp, connectors, primaryDomainSource_2, rawDomainValues, labels_1, seriesEntry, rawValues, funnelPalette, funnelColor_1, stageColors_1, _z, _0, 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, boxGap, boxPlotWidth, boxBand_1, boxWidthMax_1, boxCount_1, boxCentre_1, boxLegend_1, rawValues, histogramDomainSource, histogramCategories, _1, 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;
433
+ var threeDRenderKind, canRender3D, willRender3D, isRegionMap, regionSpec, geoScope, geo, labels, seriesEntry, values, _a, data, unmatched, min, max, textColor, ramp, noDataColor, borderColor, regionSeriesLabel, seriesName, boxplotOverlayAxis, chartDomains, chartSeries, legend, chartType, position, showAxis, isBubble, isHierarchy, skipHeaders_1, labelValues, perSeriesX, perSeriesSize, seriesInputs, i, seriesEntry, linkedLabel, 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, _h, values, e_1_1, seriesNames_1, contourPoints, _j, zMin, zMax, contourFormats_1, contourLabel, categories_3, threeDSeriesInputs, _k, _l, seriesEntry, dataLabel, _m, _o, _p, 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, _q, zMin, zMax, error_1, skipHeaders, categories, radarSeriesInputs, _r, _s, 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, _t, _u, _v, specSeriesIndex, series, e_3_1, labels, seriesEntry, rawValues, _w, 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, _x, _y, dp, connectors, primaryDomainSource_2, rawDomainValues, labels_1, seriesEntry, rawValues, funnelPalette, funnelColor_1, stageColors_1, _z, _0, 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, boxGap, boxPlotWidth, boxBand_1, boxWidthMax_1, boxCount_1, boxCentre_1, boxLegend_1, rawValues, histogramDomainSource, histogramCategories, _1, 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;
434
434
  var e_1, _2, e_2, _3, e_4, _4, e_5, _5, e_3, _6, e_6, _7, e_7, _8, e_8, _9, e_9, _10, e_10, _11;
435
- var _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, _181, _182, _183, _184, _185, _186, _187;
436
- return tslib_1.__generator(this, function (_188) {
437
- switch (_188.label) {
435
+ var _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, _181, _182, _183, _184, _185, _186, _187, _188;
436
+ return tslib_1.__generator(this, function (_189) {
437
+ switch (_189.label) {
438
438
  case 0:
439
439
  (0, utils_1.debug)("Updating chart", chart);
440
- threeDRenderKind = (0, three_d_1.resolve3DRenderKind)(spec.sourceChartType);
440
+ threeDRenderKind = (0, three_d_1.resolve3DRenderKind)(spec.sourceChartType, { enable3D: enable3D });
441
441
  canRender3D = threeDRenderKind !== null && (0, webgl_1.isWebGLAvailable)();
442
442
  willRender3D = canRender3D && (0, echarts_gl_loader_1.getEchartsGlState)() === "ready";
443
443
  if (canRender3D && !willRender3D && (0, echarts_gl_loader_1.getEchartsGlState)() !== "failed") {
@@ -485,7 +485,7 @@ var BasicChart = function (_a) {
485
485
  geoScope = (0, region_map_1.resolveGeoScope)(regionSpec.geoScope);
486
486
  return [4 /*yield*/, (0, region_map_loader_1.loadRegionMapGeo)(geoScope)];
487
487
  case 1:
488
- geo = _188.sent();
488
+ geo = _189.sent();
489
489
  // Entering the region map from a cartesian render: the previous
490
490
  // grid/axis option doesn't merge into the map one, so start from
491
491
  // a bare instance (theme options are re-applied after setOption).
@@ -600,7 +600,7 @@ var BasicChart = function (_a) {
600
600
  });
601
601
  seriesInputs = [];
602
602
  i = 0;
603
- _188.label = 3;
603
+ _189.label = 3;
604
604
  case 3:
605
605
  if (!(i < spec.series.length)) return [3 /*break*/, 7];
606
606
  seriesEntry = spec.series[i];
@@ -610,13 +610,13 @@ var BasicChart = function (_a) {
610
610
  _b = chart_spec_utils_1.coerceCalculatedLabel;
611
611
  return [4 /*yield*/, onRequestCalculate(resolvedLabel, (_21 = position.sheetId) !== null && _21 !== void 0 ? _21 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
612
612
  case 4:
613
- resolvedLabel = _b.apply(void 0, [_188.sent()]);
614
- _188.label = 5;
613
+ resolvedLabel = _b.apply(void 0, [_189.sent()]);
614
+ _189.label = 5;
615
615
  case 5:
616
616
  xValues = (_22 = perSeriesX[i]) !== null && _22 !== void 0 ? _22 : perSeriesX[0];
617
617
  sizeValues_1 = (_23 = perSeriesSize[i]) !== null && _23 !== void 0 ? _23 : perSeriesSize[0];
618
618
  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 } : {})));
619
- _188.label = 6;
619
+ _189.label = 6;
620
620
  case 6:
621
621
  i++;
622
622
  return [3 /*break*/, 3];
@@ -978,11 +978,11 @@ var BasicChart = function (_a) {
978
978
  if (!isContour) return [3 /*break*/, 21];
979
979
  categories_2 = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, false).map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
980
980
  contourSeriesInputs = [];
981
- _188.label = 9;
981
+ _189.label = 9;
982
982
  case 9:
983
- _188.trys.push([9, 18, 19, 20]);
983
+ _189.trys.push([9, 18, 19, 20]);
984
984
  _d = tslib_1.__values((_55 = spec.series) !== null && _55 !== void 0 ? _55 : []), _e = _d.next();
985
- _188.label = 10;
985
+ _189.label = 10;
986
986
  case 10:
987
987
  if (!!_e.done) return [3 /*break*/, 17];
988
988
  seriesEntry = _e.value;
@@ -994,25 +994,25 @@ var BasicChart = function (_a) {
994
994
  _h = chart_spec_utils_1.coerceCalculatedLabel;
995
995
  return [4 /*yield*/, onRequestCalculate(seriesEntry.dataLabel, (_57 = position.sheetId) !== null && _57 !== void 0 ? _57 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
996
996
  case 12:
997
- _g = _h.apply(void 0, [_188.sent()]);
997
+ _g = _h.apply(void 0, [_189.sent()]);
998
998
  return [3 /*break*/, 14];
999
999
  case 13:
1000
1000
  _g = (_58 = seriesEntry.dataLabel) !== null && _58 !== void 0 ? _58 : "";
1001
- _188.label = 14;
1001
+ _189.label = 14;
1002
1002
  case 14:
1003
1003
  _f = (_g);
1004
- _188.label = 15;
1004
+ _189.label = 15;
1005
1005
  case 15:
1006
1006
  dataLabel = _f;
1007
1007
  values = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(sanitizeChartValue);
1008
1008
  contourSeriesInputs.push({ name: dataLabel, values: values });
1009
- _188.label = 16;
1009
+ _189.label = 16;
1010
1010
  case 16:
1011
1011
  _e = _d.next();
1012
1012
  return [3 /*break*/, 10];
1013
1013
  case 17: return [3 /*break*/, 20];
1014
1014
  case 18:
1015
- e_1_1 = _188.sent();
1015
+ e_1_1 = _189.sent();
1016
1016
  e_1 = { error: e_1_1 };
1017
1017
  return [3 /*break*/, 20];
1018
1018
  case 19:
@@ -1117,14 +1117,14 @@ var BasicChart = function (_a) {
1117
1117
  previousSeriesCount.current = 1;
1118
1118
  return [2 /*return*/];
1119
1119
  case 21:
1120
- if (!(willRender3D && threeDRenderKind)) return [3 /*break*/, 34];
1120
+ if (!(willRender3D && threeDRenderKind)) return [3 /*break*/, 38];
1121
1121
  categories_3 = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, false).map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
1122
1122
  threeDSeriesInputs = [];
1123
- _188.label = 22;
1123
+ _189.label = 22;
1124
1124
  case 22:
1125
- _188.trys.push([22, 31, 32, 33]);
1125
+ _189.trys.push([22, 31, 32, 33]);
1126
1126
  _k = tslib_1.__values((_62 = spec.series) !== null && _62 !== void 0 ? _62 : []), _l = _k.next();
1127
- _188.label = 23;
1127
+ _189.label = 23;
1128
1128
  case 23:
1129
1129
  if (!!_l.done) return [3 /*break*/, 30];
1130
1130
  seriesEntry = _l.value;
@@ -1136,25 +1136,25 @@ var BasicChart = function (_a) {
1136
1136
  _p = chart_spec_utils_1.coerceCalculatedLabel;
1137
1137
  return [4 /*yield*/, onRequestCalculate(seriesEntry.dataLabel, (_64 = position.sheetId) !== null && _64 !== void 0 ? _64 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
1138
1138
  case 25:
1139
- _o = _p.apply(void 0, [_188.sent()]);
1139
+ _o = _p.apply(void 0, [_189.sent()]);
1140
1140
  return [3 /*break*/, 27];
1141
1141
  case 26:
1142
1142
  _o = (_65 = seriesEntry.dataLabel) !== null && _65 !== void 0 ? _65 : "";
1143
- _188.label = 27;
1143
+ _189.label = 27;
1144
1144
  case 27:
1145
1145
  _m = (_o);
1146
- _188.label = 28;
1146
+ _189.label = 28;
1147
1147
  case 28:
1148
1148
  dataLabel = _m;
1149
1149
  values = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(sanitizeChartValue);
1150
1150
  threeDSeriesInputs.push({ name: dataLabel, values: values });
1151
- _188.label = 29;
1151
+ _189.label = 29;
1152
1152
  case 29:
1153
1153
  _l = _k.next();
1154
1154
  return [3 /*break*/, 23];
1155
1155
  case 30: return [3 /*break*/, 33];
1156
1156
  case 31:
1157
- e_2_1 = _188.sent();
1157
+ e_2_1 = _189.sent();
1158
1158
  e_2 = { error: e_2_1 };
1159
1159
  return [3 /*break*/, 33];
1160
1160
  case 32:
@@ -1323,6 +1323,9 @@ var BasicChart = function (_a) {
1323
1323
  inRange: { color: tslib_1.__spreadArray([], tslib_1.__read(three_d_1.SURFACE_COLOR_RAMP), false) },
1324
1324
  };
1325
1325
  }
1326
+ _189.label = 34;
1327
+ case 34:
1328
+ _189.trys.push([34, 35, , 37]);
1326
1329
  (_66 = chartRef.current) === null || _66 === void 0 ? void 0 : _66.setOption(tslib_1.__assign(tslib_1.__assign({ tooltip: {
1327
1330
  textStyle: { fontSize: 12 },
1328
1331
  formatter: threeDTooltipFormatter,
@@ -1342,6 +1345,27 @@ var BasicChart = function (_a) {
1342
1345
  "tooltip",
1343
1346
  ],
1344
1347
  });
1348
+ return [3 /*break*/, 37];
1349
+ case 35:
1350
+ error_1 = _189.sent();
1351
+ (0, echarts_gl_loader_1.markEchartsGlFailed)(error_1);
1352
+ try {
1353
+ (_69 = chartRef.current) === null || _69 === void 0 ? void 0 : _69.dispose();
1354
+ }
1355
+ catch (_190) {
1356
+ // A GL instance that threw mid-build may not dispose cleanly.
1357
+ }
1358
+ chartRef.current = undefined;
1359
+ renderedIn3D.current = false;
1360
+ previousChartType.current = undefined;
1361
+ previousSeriesCount.current = undefined;
1362
+ initializeChart();
1363
+ applyThemeOptions();
1364
+ return [4 /*yield*/, updateChart()];
1365
+ case 36:
1366
+ _189.sent();
1367
+ return [2 /*return*/];
1368
+ case 37:
1345
1369
  // Re-apply theme-derived title / palette / tooltip colors — lost
1346
1370
  // when the instance was re-initialized on entry into 3-D.
1347
1371
  renderedIn3D.current = true;
@@ -1349,7 +1373,7 @@ var BasicChart = function (_a) {
1349
1373
  previousChartType.current = spec.chartType;
1350
1374
  previousSeriesCount.current = threeDSeries.length;
1351
1375
  return [2 /*return*/];
1352
- case 34:
1376
+ case 38:
1353
1377
  // ---------------------------- Radar ----------------------------
1354
1378
  // Radar is polar: a top-level `radar.indicator` list (one axis per
1355
1379
  // category) plus one `radar`-type series carrying every data series'
@@ -1359,9 +1383,9 @@ var BasicChart = function (_a) {
1359
1383
  categories = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, skipHeaders);
1360
1384
  radarSeriesInputs = [];
1361
1385
  try {
1362
- for (_r = tslib_1.__values((_69 = spec.series) !== null && _69 !== void 0 ? _69 : []), _s = _r.next(); !_s.done; _s = _r.next()) {
1386
+ for (_r = tslib_1.__values((_70 = spec.series) !== null && _70 !== void 0 ? _70 : []), _s = _r.next(); !_s.done; _s = _r.next()) {
1363
1387
  seriesEntry = _s.value;
1364
- label = (_70 = (0, series_name_1.linkedSeriesName)(seriesEntry, getDomainValuesFromRange)) !== null && _70 !== void 0 ? _70 : (seriesEntry.dataLabel && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
1388
+ label = (_71 = (0, series_name_1.linkedSeriesName)(seriesEntry, getDomainValuesFromRange)) !== null && _71 !== void 0 ? _71 : (seriesEntry.dataLabel && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
1365
1389
  ? seriesEntry.dataLabel
1366
1390
  : "");
1367
1391
  values = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); });
@@ -1378,7 +1402,7 @@ var BasicChart = function (_a) {
1378
1402
  radarAxisOptions_1 = spec.valueAxisOptions;
1379
1403
  indicators_1 = (0, radar_1.buildRadarIndicators)(categories, radarSeriesInputs, radarAxisOptions_1);
1380
1404
  radarData = (0, radar_1.buildRadarSeriesData)(radarSeriesInputs, indicators_1.length);
1381
- radarStyle_1 = (_71 = spec.radarStyle) !== null && _71 !== void 0 ? _71 : "standard";
1405
+ radarStyle_1 = (_72 = spec.radarStyle) !== null && _72 !== void 0 ? _72 : "standard";
1382
1406
  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; });
1383
1407
  radarFormats_1 = (0, axis_number_format_1.resolveSeriesNumberFormats)(spec.series, getFormattingFromRange, spec.hiddenDimensionStrategy);
1384
1408
  radarDataLabels_1 = spec.dataLabels;
@@ -1397,15 +1421,15 @@ var BasicChart = function (_a) {
1397
1421
  };
1398
1422
  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);
1399
1423
  radarBand = (0, legend_layout_1.reserveEchartsLegendBand)({
1400
- position: (_72 = spec.legend) === null || _72 === void 0 ? void 0 : _72.position,
1424
+ position: (_73 = spec.legend) === null || _73 === void 0 ? void 0 : _73.position,
1401
1425
  visible: radarLegend.show !== false,
1402
1426
  labels: radarData.map(function (d) { return d.name; }),
1403
- legendFontSize: (_77 = (_74 = (_73 = radarLegend.textStyle) === null || _73 === void 0 ? void 0 : _73.fontSize) !== null && _74 !== void 0 ? _74 : (_76 = (_75 = spec.legend) === null || _75 === void 0 ? void 0 : _75.textFormat) === null || _76 === void 0 ? void 0 : _76.fontSize) !== null && _77 !== void 0 ? _77 : 12,
1427
+ legendFontSize: (_78 = (_75 = (_74 = radarLegend.textStyle) === null || _74 === void 0 ? void 0 : _74.fontSize) !== null && _75 !== void 0 ? _75 : (_77 = (_76 = spec.legend) === null || _76 === void 0 ? void 0 : _76.textFormat) === null || _77 === void 0 ? void 0 : _77.fontSize) !== null && _78 !== void 0 ? _78 : 12,
1404
1428
  legendItemWidth: defaultLegendConfig.itemWidth,
1405
1429
  width: width !== null && width !== void 0 ? width : 0,
1406
1430
  height: height !== null && height !== void 0 ? height : 0,
1407
1431
  hasTitle: Boolean(explicitChartTitle),
1408
- titleFontSize: (_79 = (_78 = spec.titleTextFormat) === null || _78 === void 0 ? void 0 : _78.fontSize) !== null && _79 !== void 0 ? _79 : 16,
1432
+ titleFontSize: (_80 = (_79 = spec.titleTextFormat) === null || _79 === void 0 ? void 0 : _79.fontSize) !== null && _80 !== void 0 ? _80 : 16,
1409
1433
  hasBottomAxisTitle: false,
1410
1434
  bottomAxisNameGap: 0,
1411
1435
  hasLeftAxisTitle: false,
@@ -1421,7 +1445,7 @@ var BasicChart = function (_a) {
1421
1445
  radius: Math.max(10, Math.min(radarPlotWidth, radarPlotHeight) / 2 - 30),
1422
1446
  }
1423
1447
  : {};
1424
- (_80 = chartRef.current) === null || _80 === void 0 ? void 0 : _80.setOption({
1448
+ (_81 = chartRef.current) === null || _81 === void 0 ? void 0 : _81.setOption({
1425
1449
  radar: tslib_1.__assign(tslib_1.__assign({}, radarGeometry), {
1426
1450
  // The common scale's tick labels along ONE axis, as Excel draws
1427
1451
  // them: echarts labels every indicator axis, so each indicator
@@ -1475,9 +1499,9 @@ var BasicChart = function (_a) {
1475
1499
  // V-variants additionally get a volume column sub-pane below the
1476
1500
  // price plot.
1477
1501
  if (spec.chartType === "stock") {
1478
- variant_1 = ((_81 = spec.stockVariant) !== null && _81 !== void 0 ? _81 : "HLC");
1502
+ variant_1 = ((_82 = spec.stockVariant) !== null && _82 !== void 0 ? _82 : "HLC");
1479
1503
  categories = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, false).map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
1480
- seriesValues = ((_82 = spec.series) !== null && _82 !== void 0 ? _82 : []).map(function (seriesEntry) {
1504
+ seriesValues = ((_83 = spec.series) !== null && _83 !== void 0 ? _83 : []).map(function (seriesEntry) {
1481
1505
  return flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); });
1482
1506
  });
1483
1507
  stockFormats_1 = (0, axis_number_format_1.resolveSeriesNumberFormats)(spec.series, getFormattingFromRange, spec.hiddenDimensionStrategy);
@@ -1495,7 +1519,7 @@ var BasicChart = function (_a) {
1495
1519
  upColor_1 = theme.themeColors.accent1;
1496
1520
  downColor_1 = theme.themeColors.accent2;
1497
1521
  volumePoints = (0, stock_1.toVolumeSeries)(seriesValues, variant_1);
1498
- hasVolume = ((_83 = volumePoints === null || volumePoints === void 0 ? void 0 : volumePoints.length) !== null && _83 !== void 0 ? _83 : 0) > 0;
1522
+ hasVolume = ((_84 = volumePoints === null || volumePoints === void 0 ? void 0 : volumePoints.length) !== null && _84 !== void 0 ? _84 : 0) > 0;
1499
1523
  stockGrid = hasVolume
1500
1524
  ? [
1501
1525
  { left: "10%", right: "4%", top: "8%", height: "56%" },
@@ -1509,7 +1533,7 @@ var BasicChart = function (_a) {
1509
1533
  axisLine: { show: true },
1510
1534
  axisTick: { show: true },
1511
1535
  splitLine: { show: false },
1512
- name: (_84 = spec.horizontalAxisTitle) !== null && _84 !== void 0 ? _84 : "",
1536
+ name: (_85 = spec.horizontalAxisTitle) !== null && _85 !== void 0 ? _85 : "",
1513
1537
  nameLocation: "middle",
1514
1538
  nameGap: 30,
1515
1539
  }, spec.categoryAxisOptions);
@@ -1551,14 +1575,14 @@ var BasicChart = function (_a) {
1551
1575
  // (no open) fall through to the line-derived rendering below.
1552
1576
  if (variant_1 === "OHLC" || variant_1 === "VOHLC") {
1553
1577
  candleData = (0, stock_1.toCandlestick)(seriesValues, variant_1);
1554
- (_85 = chartRef.current) === null || _85 === void 0 ? void 0 : _85.setOption({
1578
+ (_86 = chartRef.current) === null || _86 === void 0 ? void 0 : _86.setOption({
1555
1579
  xAxis: stockXAxis,
1556
1580
  yAxis: tslib_1.__spreadArray([
1557
1581
  (0, overrides_1.applyAxisOverrides)({
1558
1582
  type: "value",
1559
1583
  show: true,
1560
1584
  scale: true,
1561
- name: (_86 = spec.verticalAxisTitle) !== null && _86 !== void 0 ? _86 : "",
1585
+ name: (_87 = spec.verticalAxisTitle) !== null && _87 !== void 0 ? _87 : "",
1562
1586
  nameLocation: "middle",
1563
1587
  nameGap: 50,
1564
1588
  gridIndex: 0,
@@ -1603,13 +1627,13 @@ var BasicChart = function (_a) {
1603
1627
  theme.themeColors.accent3,
1604
1628
  theme.themeColors.accent4,
1605
1629
  ]);
1606
- (_87 = chartRef.current) === null || _87 === void 0 ? void 0 : _87.setOption({
1630
+ (_88 = chartRef.current) === null || _88 === void 0 ? void 0 : _88.setOption({
1607
1631
  xAxis: stockXAxis,
1608
1632
  yAxis: tslib_1.__spreadArray([
1609
1633
  (0, overrides_1.applyAxisOverrides)({
1610
1634
  type: "value",
1611
1635
  show: true,
1612
- name: (_88 = spec.verticalAxisTitle) !== null && _88 !== void 0 ? _88 : "",
1636
+ name: (_89 = spec.verticalAxisTitle) !== null && _89 !== void 0 ? _89 : "",
1613
1637
  nameLocation: "middle",
1614
1638
  nameGap: 50,
1615
1639
  gridIndex: 0,
@@ -1648,14 +1672,14 @@ var BasicChart = function (_a) {
1648
1672
  ofPieLayout = null;
1649
1673
  isHorizontalBarChart = spec.chartType === "bar";
1650
1674
  shouldAggregate = (0, aggregation_1.shouldAggregateSeries)(spec.series);
1651
- primaryDomainSource = (_91 = (_90 = (_89 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _89 === void 0 ? void 0 : _89[0]) === null || _90 === void 0 ? void 0 : _90.sources) === null || _91 === void 0 ? void 0 : _91[0];
1675
+ primaryDomainSource = (_92 = (_91 = (_90 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _90 === void 0 ? void 0 : _90[0]) === null || _91 === void 0 ? void 0 : _91.sources) === null || _92 === void 0 ? void 0 : _92[0];
1652
1676
  rawPrimaryDomainValues = primaryDomainSource
1653
- ? (0, aggregation_1.sanitizeDomainValues)((_92 = getDomainValuesFromRange(primaryDomainSource, spec.hiddenDimensionStrategy)) !== null && _92 !== void 0 ? _92 : [])
1677
+ ? (0, aggregation_1.sanitizeDomainValues)((_93 = getDomainValuesFromRange(primaryDomainSource, spec.hiddenDimensionStrategy)) !== null && _93 !== void 0 ? _93 : [])
1654
1678
  : [];
1655
1679
  aggregateDomainValues = (0, aggregation_1.getDomainValuesForAxis)(rawPrimaryDomainValues, shouldAggregate);
1656
1680
  categoryLevels = isCircularChart
1657
1681
  ? undefined
1658
- : (0, category_levels_1.resolveCategoryLevels)((_93 = spec.categoryLevels) === null || _93 === void 0 ? void 0 : _93.map(function (level) {
1682
+ : (0, category_levels_1.resolveCategoryLevels)((_94 = spec.categoryLevels) === null || _94 === void 0 ? void 0 : _94.map(function (level) {
1659
1683
  return flattenChartDataValues([level], getDomainValuesFromRange, spec.hiddenDimensionStrategy, false);
1660
1684
  }));
1661
1685
  if (categoryLevels) {
@@ -1666,15 +1690,15 @@ var BasicChart = function (_a) {
1666
1690
  axisTick: { show: true },
1667
1691
  splitLine: { show: true },
1668
1692
  name: isHorizontalBarChart
1669
- ? (_94 = spec.verticalAxisTitle) !== null && _94 !== void 0 ? _94 : ""
1670
- : (_95 = spec.horizontalAxisTitle) !== null && _95 !== void 0 ? _95 : "",
1693
+ ? (_95 = spec.verticalAxisTitle) !== null && _95 !== void 0 ? _95 : ""
1694
+ : (_96 = spec.horizontalAxisTitle) !== null && _96 !== void 0 ? _96 : "",
1671
1695
  nameLocation: "middle",
1672
1696
  nameGap: CATEGORY_AXIS_NAME_GAP + 24 * categoryLevels.outer.length,
1673
1697
  })), false));
1674
1698
  }
1675
1699
  // One category axis per domain (Excel): a domain drawn from several
1676
1700
  // ranges lists their categories in sequence on that single axis.
1677
- (categoryLevels ? [] : (_96 = spec.domains) !== null && _96 !== void 0 ? _96 : []).forEach(function (domain, domainIndex) {
1701
+ (categoryLevels ? [] : (_97 = spec.domains) !== null && _97 !== void 0 ? _97 : []).forEach(function (domain, domainIndex) {
1678
1702
  var _a, _b;
1679
1703
  var axisData = domain.sources.flatMap(function (sheetRange, sourceIndex) {
1680
1704
  var _a;
@@ -1710,8 +1734,8 @@ var BasicChart = function (_a) {
1710
1734
  splitLine: { show: true },
1711
1735
  gridIndex: 0,
1712
1736
  name: isHorizontalBarChart
1713
- ? (_97 = spec.verticalAxisTitle) !== null && _97 !== void 0 ? _97 : ""
1714
- : (_98 = spec.horizontalAxisTitle) !== null && _98 !== void 0 ? _98 : "",
1737
+ ? (_98 = spec.verticalAxisTitle) !== null && _98 !== void 0 ? _98 : ""
1738
+ : (_99 = spec.horizontalAxisTitle) !== null && _99 !== void 0 ? _99 : "",
1715
1739
  nameLocation: "middle",
1716
1740
  nameGap: CATEGORY_AXIS_NAME_GAP,
1717
1741
  });
@@ -1743,7 +1767,7 @@ var BasicChart = function (_a) {
1743
1767
  };
1744
1768
  sideBySideBarCount = isStacked
1745
1769
  ? 1
1746
- : ((_99 = spec.series) !== null && _99 !== void 0 ? _99 : []).reduce(function (count, s) {
1770
+ : ((_100 = spec.series) !== null && _100 !== void 0 ? _100 : []).reduce(function (count, s) {
1747
1771
  var _a;
1748
1772
  var seriesType = (_a = s.seriesChartType) !== null && _a !== void 0 ? _a : spec.chartType;
1749
1773
  return seriesType === "bar" || seriesType === "column"
@@ -1767,36 +1791,36 @@ var BasicChart = function (_a) {
1767
1791
  return (0, utils_1.chartPaletteColorAt)(seriesPalette, index);
1768
1792
  };
1769
1793
  _loop_1 = function (specSeriesIndex, series) {
1770
- var dataLabel, _189, _190, _191, 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_3, _192, _193, dp, fallback_1, overrides_4, _194, _195, dp, positiveColor_1, negativeColor_1;
1771
- var e_12, _196, e_13, _197, e_14, _198;
1772
- return tslib_1.__generator(this, function (_199) {
1773
- switch (_199.label) {
1794
+ var dataLabel, _191, _192, _193, 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_3, _194, _195, dp, fallback_1, overrides_4, _196, _197, dp, positiveColor_1, negativeColor_1;
1795
+ var e_12, _198, e_13, _199, e_14, _200;
1796
+ return tslib_1.__generator(this, function (_201) {
1797
+ switch (_201.label) {
1774
1798
  case 0:
1775
- if (!((_101 = (0, series_name_1.linkedSeriesName)(series, getDomainValuesFromRange)) !== null && _101 !== void 0)) return [3 /*break*/, 1];
1776
- _189 = _101;
1799
+ if (!((_102 = (0, series_name_1.linkedSeriesName)(series, getDomainValuesFromRange)) !== null && _102 !== void 0)) return [3 /*break*/, 1];
1800
+ _191 = _102;
1777
1801
  return [3 /*break*/, 5];
1778
1802
  case 1:
1779
1803
  if (!(!(0, utils_1.isNil)(series.dataLabel) && (0, utils_1.isAFormula)(series.dataLabel))) return [3 /*break*/, 3];
1780
- _191 = chart_spec_utils_1.coerceCalculatedLabel;
1781
- return [4 /*yield*/, onRequestCalculate(series.dataLabel, (_102 = position.sheetId) !== null && _102 !== void 0 ? _102 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
1804
+ _193 = chart_spec_utils_1.coerceCalculatedLabel;
1805
+ return [4 /*yield*/, onRequestCalculate(series.dataLabel, (_103 = position.sheetId) !== null && _103 !== void 0 ? _103 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
1782
1806
  case 2:
1783
- _190 = _191.apply(void 0, [_199.sent()]);
1807
+ _192 = _193.apply(void 0, [_201.sent()]);
1784
1808
  return [3 /*break*/, 4];
1785
1809
  case 3:
1786
- _190 = (_103 = series.dataLabel) !== null && _103 !== void 0 ? _103 : "";
1787
- _199.label = 4;
1810
+ _192 = (_104 = series.dataLabel) !== null && _104 !== void 0 ? _104 : "";
1811
+ _201.label = 4;
1788
1812
  case 4:
1789
- _189 = (_190);
1790
- _199.label = 5;
1813
+ _191 = (_192);
1814
+ _201.label = 5;
1791
1815
  case 5:
1792
- dataLabel = _189;
1816
+ dataLabel = _191;
1793
1817
  // Label
1794
1818
  if (dataLabel) {
1795
- (_104 = legend.data) === null || _104 === void 0 ? void 0 : _104.push(dataLabel);
1819
+ (_105 = legend.data) === null || _105 === void 0 ? void 0 : _105.push(dataLabel);
1796
1820
  }
1797
- effectiveChartType = (_105 = series.seriesChartType) !== null && _105 !== void 0 ? _105 : spec.chartType;
1821
+ effectiveChartType = (_106 = series.seriesChartType) !== null && _106 !== void 0 ? _106 : spec.chartType;
1798
1822
  lineLike = (0, empty_cells_1.isLineLikeChartType)(effectiveChartType);
1799
- domainSources = (_108 = (_107 = (_106 = spec.domains) === null || _106 === void 0 ? void 0 : _106[0]) === null || _107 === void 0 ? void 0 : _107.sources) !== null && _108 !== void 0 ? _108 : [];
1823
+ domainSources = (_109 = (_108 = (_107 = spec.domains) === null || _107 === void 0 ? void 0 : _107[0]) === null || _108 === void 0 ? void 0 : _108.sources) !== null && _109 !== void 0 ? _109 : [];
1800
1824
  pieDomainLabels = isCircularChart &&
1801
1825
  (domainSources.length > 1 || series.sources.length > 1)
1802
1826
  ? domainSources.flatMap(function (sheetRange) {
@@ -1828,7 +1852,7 @@ var BasicChart = function (_a) {
1828
1852
  seriesEntry = tslib_1.__assign(tslib_1.__assign({ type: seriesEchartsType,
1829
1853
  // Ties the rendered series back to spec.series for click selection
1830
1854
  // One rendered series per spec series (source index 0).
1831
- id: (0, series_click_1.chartSeriesId)(specSeriesIndex, 0), name: dataLabel, data: data, stack: isStacked ? "dataLabel" : undefined, smooth: (_109 = spec.smooth) !== null && _109 !== void 0 ? _109 : undefined, radius: (_110 = spec.radius) !== null && _110 !== void 0 ? _110 : (isCircularChart ? [0, "75%"] : undefined) }, ((0, empty_cells_1.connectsAcrossEmptyCells)(spec, lineLike)
1855
+ id: (0, series_click_1.chartSeriesId)(specSeriesIndex, 0), name: dataLabel, data: data, stack: isStacked ? "dataLabel" : undefined, smooth: (_110 = spec.smooth) !== null && _110 !== void 0 ? _110 : undefined, radius: (_111 = spec.radius) !== null && _111 !== void 0 ? _111 : (isCircularChart ? [0, "75%"] : undefined) }, ((0, empty_cells_1.connectsAcrossEmptyCells)(spec, lineLike)
1832
1856
  ? { connectNulls: true }
1833
1857
  : {})), seriesStyleAttrs);
1834
1858
  // Plot this series against a secondary value axis. The 2nd
@@ -1853,17 +1877,17 @@ var BasicChart = function (_a) {
1853
1877
  }
1854
1878
  seriesAny = series;
1855
1879
  if (effectiveChartType === "line") {
1856
- markerSymbol = (_111 = seriesAny.marker) === null || _111 === void 0 ? void 0 : _111.symbol;
1880
+ markerSymbol = (_112 = seriesAny.marker) === null || _112 === void 0 ? void 0 : _112.symbol;
1857
1881
  wantsMarkers = markerSymbol === "none"
1858
1882
  ? false
1859
1883
  : Boolean(spec.showMarkers) || !(0, utils_1.isNil)(markerSymbol);
1860
1884
  labelsWithoutMarkers = !wantsMarkers &&
1861
- Boolean((_112 = (0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, seriesAny)) === null || _112 === void 0 ? void 0 : _112.show);
1885
+ Boolean((_113 = (0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, seriesAny)) === null || _113 === void 0 ? void 0 : _113.show);
1862
1886
  seriesEntry.showSymbol = wantsMarkers || labelsWithoutMarkers;
1863
1887
  if (wantsMarkers) {
1864
1888
  seriesEntry.symbol =
1865
- (_113 = (0, helpers_1.mapMarkerSymbolToEcharts)(markerSymbol)) !== null && _113 !== void 0 ? _113 : "circle";
1866
- seriesEntry.symbolSize = (_115 = (_114 = seriesAny.marker) === null || _114 === void 0 ? void 0 : _114.size) !== null && _115 !== void 0 ? _115 : 6;
1889
+ (_114 = (0, helpers_1.mapMarkerSymbolToEcharts)(markerSymbol)) !== null && _114 !== void 0 ? _114 : "circle";
1890
+ seriesEntry.symbolSize = (_116 = (_115 = seriesAny.marker) === null || _115 === void 0 ? void 0 : _115.size) !== null && _116 !== void 0 ? _116 : 6;
1867
1891
  }
1868
1892
  else {
1869
1893
  if (labelsWithoutMarkers) {
@@ -1886,7 +1910,7 @@ var BasicChart = function (_a) {
1886
1910
  catch (e_12_1) { e_12 = { error: e_12_1 }; }
1887
1911
  finally {
1888
1912
  try {
1889
- if (isolated_1_1 && !isolated_1_1.done && (_196 = isolated_1.return)) _196.call(isolated_1);
1913
+ if (isolated_1_1 && !isolated_1_1.done && (_198 = isolated_1.return)) _198.call(isolated_1);
1890
1914
  }
1891
1915
  finally { if (e_12) throw e_12.error; }
1892
1916
  }
@@ -1898,9 +1922,9 @@ var BasicChart = function (_a) {
1898
1922
  gradientArgs = (0, gradient_1.gradientToEcharts)(series.gradient);
1899
1923
  if (gradientArgs && !seriesAny.noFill) {
1900
1924
  gradient = new echarts.graphic.LinearGradient(gradientArgs.x, gradientArgs.y, gradientArgs.x2, gradientArgs.y2, gradientArgs.colorStops);
1901
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_116 = seriesEntry.itemStyle) !== null && _116 !== void 0 ? _116 : {})), { color: gradient });
1925
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_117 = seriesEntry.itemStyle) !== null && _117 !== void 0 ? _117 : {})), { color: gradient });
1902
1926
  if (effectiveChartType === "area") {
1903
- seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_117 = seriesEntry.areaStyle) !== null && _117 !== void 0 ? _117 : {})), { color: gradient });
1927
+ seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_118 = seriesEntry.areaStyle) !== null && _118 !== void 0 ? _118 : {})), { color: gradient });
1904
1928
  }
1905
1929
  }
1906
1930
  else if (seriesAny.noFill) {
@@ -1908,15 +1932,15 @@ var BasicChart = function (_a) {
1908
1932
  // with `transparent` so layout is preserved but nothing
1909
1933
  // paints. Legend entries are also suppressed via `name: ""`
1910
1934
  // since the series carries no semantic information.
1911
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_118 = seriesEntry.itemStyle) !== null && _118 !== void 0 ? _118 : {})), { color: "transparent", borderColor: "transparent" });
1935
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_119 = seriesEntry.itemStyle) !== null && _119 !== void 0 ? _119 : {})), { color: "transparent", borderColor: "transparent" });
1912
1936
  }
1913
1937
  else if (isBarOrColumn &&
1914
1938
  Array.isArray(seriesAny.dataPointColors) &&
1915
1939
  seriesAny.dataPointColors.length) {
1916
1940
  overrides_3 = new Map();
1917
1941
  try {
1918
- for (_192 = (e_13 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _193 = _192.next(); !_193.done; _193 = _192.next()) {
1919
- dp = _193.value;
1942
+ for (_194 = (e_13 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _195 = _194.next(); !_195.done; _195 = _194.next()) {
1943
+ dp = _195.value;
1920
1944
  if (typeof dp.idx === "number" && typeof dp.color === "string") {
1921
1945
  overrides_3.set(dp.idx, dp.color);
1922
1946
  }
@@ -1925,20 +1949,20 @@ var BasicChart = function (_a) {
1925
1949
  catch (e_13_1) { e_13 = { error: e_13_1 }; }
1926
1950
  finally {
1927
1951
  try {
1928
- if (_193 && !_193.done && (_197 = _192.return)) _197.call(_192);
1952
+ if (_195 && !_195.done && (_199 = _194.return)) _199.call(_194);
1929
1953
  }
1930
1954
  finally { if (e_13) throw e_13.error; }
1931
1955
  }
1932
- fallback_1 = (_119 = series.color) !== null && _119 !== void 0 ? _119 : paletteColorAt(specSeriesIndex);
1933
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_120 = seriesEntry.itemStyle) !== null && _120 !== void 0 ? _120 : {})), { color: function (params) { var _a; return (_a = overrides_3.get(params.dataIndex)) !== null && _a !== void 0 ? _a : fallback_1; } });
1956
+ fallback_1 = (_120 = series.color) !== null && _120 !== void 0 ? _120 : paletteColorAt(specSeriesIndex);
1957
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_121 = seriesEntry.itemStyle) !== null && _121 !== void 0 ? _121 : {})), { color: function (params) { var _a; return (_a = overrides_3.get(params.dataIndex)) !== null && _a !== void 0 ? _a : fallback_1; } });
1934
1958
  }
1935
1959
  else if (isCircularChart &&
1936
1960
  Array.isArray(seriesAny.dataPointColors) &&
1937
1961
  seriesAny.dataPointColors.length) {
1938
1962
  overrides_4 = new Map();
1939
1963
  try {
1940
- for (_194 = (e_14 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _195 = _194.next(); !_195.done; _195 = _194.next()) {
1941
- dp = _195.value;
1964
+ for (_196 = (e_14 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _197 = _196.next(); !_197.done; _197 = _196.next()) {
1965
+ dp = _197.value;
1942
1966
  if (typeof dp.idx === "number" && typeof dp.color === "string") {
1943
1967
  overrides_4.set(dp.idx, dp.color);
1944
1968
  }
@@ -1947,19 +1971,19 @@ var BasicChart = function (_a) {
1947
1971
  catch (e_14_1) { e_14 = { error: e_14_1 }; }
1948
1972
  finally {
1949
1973
  try {
1950
- if (_195 && !_195.done && (_198 = _194.return)) _198.call(_194);
1974
+ if (_197 && !_197.done && (_200 = _196.return)) _200.call(_196);
1951
1975
  }
1952
1976
  finally { if (e_14) throw e_14.error; }
1953
1977
  }
1954
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_121 = seriesEntry.itemStyle) !== null && _121 !== void 0 ? _121 : {})), { color: function (params) {
1978
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_122 = seriesEntry.itemStyle) !== null && _122 !== void 0 ? _122 : {})), { color: function (params) {
1955
1979
  var _a, _b;
1956
1980
  return (_b = (_a = overrides_4.get(params.dataIndex)) !== null && _a !== void 0 ? _a : series.color) !== null && _b !== void 0 ? _b : paletteColorAt(params.dataIndex);
1957
1981
  } });
1958
1982
  }
1959
1983
  else if (isBarOrColumn && series.invertIfNegative) {
1960
- positiveColor_1 = (_122 = series.color) !== null && _122 !== void 0 ? _122 : paletteColorAt(specSeriesIndex);
1961
- negativeColor_1 = (_123 = series.negativeColor) !== null && _123 !== void 0 ? _123 : "#FF0000";
1962
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_124 = seriesEntry.itemStyle) !== null && _124 !== void 0 ? _124 : {})), { color: function (params) {
1984
+ positiveColor_1 = (_123 = series.color) !== null && _123 !== void 0 ? _123 : paletteColorAt(specSeriesIndex);
1985
+ negativeColor_1 = (_124 = series.negativeColor) !== null && _124 !== void 0 ? _124 : "#FF0000";
1986
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_125 = seriesEntry.itemStyle) !== null && _125 !== void 0 ? _125 : {})), { color: function (params) {
1963
1987
  var _a, _b;
1964
1988
  var value = Array.isArray(params.data)
1965
1989
  ? params.data[1]
@@ -1970,10 +1994,10 @@ var BasicChart = function (_a) {
1970
1994
  } });
1971
1995
  }
1972
1996
  else if (series.color) {
1973
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_125 = seriesEntry.itemStyle) !== null && _125 !== void 0 ? _125 : {})), { color: series.color });
1974
- seriesEntry.lineStyle = tslib_1.__assign(tslib_1.__assign({}, ((_126 = seriesEntry.lineStyle) !== null && _126 !== void 0 ? _126 : {})), { color: series.color });
1997
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_126 = seriesEntry.itemStyle) !== null && _126 !== void 0 ? _126 : {})), { color: series.color });
1998
+ seriesEntry.lineStyle = tslib_1.__assign(tslib_1.__assign({}, ((_127 = seriesEntry.lineStyle) !== null && _127 !== void 0 ? _127 : {})), { color: series.color });
1975
1999
  if (effectiveChartType === "area") {
1976
- seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_127 = seriesEntry.areaStyle) !== null && _127 !== void 0 ? _127 : {})), { color: series.color });
2000
+ seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_128 = seriesEntry.areaStyle) !== null && _128 !== void 0 ? _128 : {})), { color: series.color });
1977
2001
  }
1978
2002
  }
1979
2003
  chartSeries.push(seriesEntry);
@@ -1982,33 +2006,33 @@ var BasicChart = function (_a) {
1982
2006
  }
1983
2007
  });
1984
2008
  };
1985
- _188.label = 35;
1986
- case 35:
1987
- _188.trys.push([35, 40, 41, 42]);
1988
- _t = tslib_1.__values(((_100 = spec.series) !== null && _100 !== void 0 ? _100 : []).entries()), _u = _t.next();
1989
- _188.label = 36;
1990
- case 36:
1991
- if (!!_u.done) return [3 /*break*/, 39];
2009
+ _189.label = 39;
2010
+ case 39:
2011
+ _189.trys.push([39, 44, 45, 46]);
2012
+ _t = tslib_1.__values(((_101 = spec.series) !== null && _101 !== void 0 ? _101 : []).entries()), _u = _t.next();
2013
+ _189.label = 40;
2014
+ case 40:
2015
+ if (!!_u.done) return [3 /*break*/, 43];
1992
2016
  _v = tslib_1.__read(_u.value, 2), specSeriesIndex = _v[0], series = _v[1];
1993
2017
  return [5 /*yield**/, _loop_1(specSeriesIndex, series)];
1994
- case 37:
1995
- _188.sent();
1996
- _188.label = 38;
1997
- case 38:
2018
+ case 41:
2019
+ _189.sent();
2020
+ _189.label = 42;
2021
+ case 42:
1998
2022
  _u = _t.next();
1999
- return [3 /*break*/, 36];
2000
- case 39: return [3 /*break*/, 42];
2001
- case 40:
2002
- e_3_1 = _188.sent();
2023
+ return [3 /*break*/, 40];
2024
+ case 43: return [3 /*break*/, 46];
2025
+ case 44:
2026
+ e_3_1 = _189.sent();
2003
2027
  e_3 = { error: e_3_1 };
2004
- return [3 /*break*/, 42];
2005
- case 41:
2028
+ return [3 /*break*/, 46];
2029
+ case 45:
2006
2030
  try {
2007
2031
  if (_u && !_u.done && (_6 = _t.return)) _6.call(_t);
2008
2032
  }
2009
2033
  finally { if (e_3) throw e_3.error; }
2010
2034
  return [7 /*endfinally*/];
2011
- case 42:
2035
+ case 46:
2012
2036
  if (isCircularChart && !isOfPie) {
2013
2037
  // Excel's pie / doughnut legend lists the categories, one entry per
2014
2038
  // slice — not the series name (the loop above collected those). The
@@ -2017,7 +2041,7 @@ var BasicChart = function (_a) {
2017
2041
  }
2018
2042
  if (isOfPie) {
2019
2043
  labels = rawPrimaryDomainValues.map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
2020
- seriesEntry = (_128 = spec.series) === null || _128 === void 0 ? void 0 : _128[0];
2044
+ seriesEntry = (_129 = spec.series) === null || _129 === void 0 ? void 0 : _129[0];
2021
2045
  rawValues = seriesEntry
2022
2046
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); })
2023
2047
  : [];
@@ -2064,7 +2088,7 @@ var BasicChart = function (_a) {
2064
2088
  };
2065
2089
  chartSeries.push({
2066
2090
  type: "pie",
2067
- name: (_129 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _129 !== void 0 ? _129 : "",
2091
+ name: (_130 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _130 !== void 0 ? _130 : "",
2068
2092
  center: ["".concat(MAIN_CX_1 * 100, "%"), "".concat(CY_1 * 100, "%")],
2069
2093
  radius: [0, "".concat(MAIN_RADIUS_PCT_1, "%")],
2070
2094
  // Rotate the pie so the "Other" slice's angular midpoint faces
@@ -2082,7 +2106,7 @@ var BasicChart = function (_a) {
2082
2106
  if (ofPieType_1 === "pie") {
2083
2107
  chartSeries.push({
2084
2108
  type: "pie",
2085
- name: (_130 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _130 !== void 0 ? _130 : "",
2109
+ name: (_131 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _131 !== void 0 ? _131 : "",
2086
2110
  center: ["".concat(SECONDARY_CX_1 * 100, "%"), "".concat(CY_1 * 100, "%")],
2087
2111
  radius: [0, "".concat(secondaryRadiusPct_1, "%")],
2088
2112
  data: secondary.map(function (s, i) { return ({
@@ -2177,16 +2201,16 @@ var BasicChart = function (_a) {
2177
2201
  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);
2178
2202
  }
2179
2203
  else if (spec.chartType === "waterfall") {
2180
- primaryDomainSource_1 = (_133 = (_132 = (_131 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _131 === void 0 ? void 0 : _131[0]) === null || _132 === void 0 ? void 0 : _132.sources) === null || _133 === void 0 ? void 0 : _133[0];
2204
+ primaryDomainSource_1 = (_134 = (_133 = (_132 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _132 === void 0 ? void 0 : _132[0]) === null || _133 === void 0 ? void 0 : _133.sources) === null || _134 === void 0 ? void 0 : _134[0];
2181
2205
  rawDomainValues = primaryDomainSource_1
2182
- ? (0, aggregation_1.sanitizeDomainValues)((_134 = getDomainValuesFromRange(primaryDomainSource_1, spec.hiddenDimensionStrategy)) !== null && _134 !== void 0 ? _134 : [])
2206
+ ? (0, aggregation_1.sanitizeDomainValues)((_135 = getDomainValuesFromRange(primaryDomainSource_1, spec.hiddenDimensionStrategy)) !== null && _135 !== void 0 ? _135 : [])
2183
2207
  : [];
2184
2208
  labels = rawDomainValues.map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
2185
- seriesEntry = (_135 = spec.series) === null || _135 === void 0 ? void 0 : _135[0];
2209
+ seriesEntry = (_136 = spec.series) === null || _136 === void 0 ? void 0 : _136[0];
2186
2210
  rawValues_1 = seriesEntry
2187
2211
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); })
2188
2212
  : [];
2189
- totalIndices = new Set((_136 = spec.totalIndices) !== null && _136 !== void 0 ? _136 : []);
2213
+ totalIndices = new Set((_137 = spec.totalIndices) !== null && _137 !== void 0 ? _137 : []);
2190
2214
  steps = (0, waterfall_1.computeWaterfall)(rawValues_1, labels, totalIndices);
2191
2215
  chartDomains.length = 0;
2192
2216
  chartDomains.push({
@@ -2196,7 +2220,7 @@ var BasicChart = function (_a) {
2196
2220
  axisLine: { show: true },
2197
2221
  axisTick: { show: true },
2198
2222
  splitLine: { show: false },
2199
- name: (_137 = spec.horizontalAxisTitle) !== null && _137 !== void 0 ? _137 : "",
2223
+ name: (_138 = spec.horizontalAxisTitle) !== null && _138 !== void 0 ? _138 : "",
2200
2224
  nameLocation: "middle",
2201
2225
  nameGap: 30,
2202
2226
  });
@@ -2213,12 +2237,12 @@ var BasicChart = function (_a) {
2213
2237
  label: { show: false },
2214
2238
  tooltip: { show: false },
2215
2239
  });
2216
- accent_1 = (_138 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _138 !== void 0 ? _138 : theme.themeColors.accent1;
2217
- decreaseColor_1 = (_140 = (_139 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.negativeColor) !== null && _139 !== void 0 ? _139 : theme.themeColors.accent2) !== null && _140 !== void 0 ? _140 : accent_1;
2218
- totalColor_1 = (_141 = theme.themeColors.accent3) !== null && _141 !== void 0 ? _141 : accent_1;
2240
+ accent_1 = (_139 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _139 !== void 0 ? _139 : theme.themeColors.accent1;
2241
+ decreaseColor_1 = (_141 = (_140 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.negativeColor) !== null && _140 !== void 0 ? _140 : theme.themeColors.accent2) !== null && _141 !== void 0 ? _141 : accent_1;
2242
+ totalColor_1 = (_142 = theme.themeColors.accent3) !== null && _142 !== void 0 ? _142 : accent_1;
2219
2243
  pointColors_1 = new Map();
2220
2244
  try {
2221
- for (_x = tslib_1.__values((_142 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataPointColors) !== null && _142 !== void 0 ? _142 : []), _y = _x.next(); !_y.done; _y = _x.next()) {
2245
+ 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()) {
2222
2246
  dp = _y.value;
2223
2247
  if (typeof (dp === null || dp === void 0 ? void 0 : dp.idx) === "number" && typeof (dp === null || dp === void 0 ? void 0 : dp.color) === "string") {
2224
2248
  pointColors_1.set(dp.idx, dp.color);
@@ -2240,7 +2264,7 @@ var BasicChart = function (_a) {
2240
2264
  type: "bar",
2241
2265
  id: (0, series_click_1.chartSeriesId)(0, 0),
2242
2266
  stack: "waterfall",
2243
- name: (_143 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _143 !== void 0 ? _143 : "",
2267
+ name: (_144 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _144 !== void 0 ? _144 : "",
2244
2268
  // A bar's height is the step's magnitude; the signed source value
2245
2269
  // rides along as `originalValue` so labels and tooltips read
2246
2270
  // "-90" for a decrease, like Excel.
@@ -2274,12 +2298,12 @@ var BasicChart = function (_a) {
2274
2298
  legend.data = [];
2275
2299
  }
2276
2300
  else if (spec.chartType === "funnel") {
2277
- primaryDomainSource_2 = (_146 = (_145 = (_144 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _144 === void 0 ? void 0 : _144[0]) === null || _145 === void 0 ? void 0 : _145.sources) === null || _146 === void 0 ? void 0 : _146[0];
2301
+ primaryDomainSource_2 = (_147 = (_146 = (_145 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _145 === void 0 ? void 0 : _145[0]) === null || _146 === void 0 ? void 0 : _146.sources) === null || _147 === void 0 ? void 0 : _147[0];
2278
2302
  rawDomainValues = primaryDomainSource_2
2279
- ? (0, aggregation_1.sanitizeDomainValues)((_147 = getDomainValuesFromRange(primaryDomainSource_2, spec.hiddenDimensionStrategy)) !== null && _147 !== void 0 ? _147 : [])
2303
+ ? (0, aggregation_1.sanitizeDomainValues)((_148 = getDomainValuesFromRange(primaryDomainSource_2, spec.hiddenDimensionStrategy)) !== null && _148 !== void 0 ? _148 : [])
2280
2304
  : [];
2281
2305
  labels_1 = rawDomainValues.map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
2282
- seriesEntry = (_148 = spec.series) === null || _148 === void 0 ? void 0 : _148[0];
2306
+ seriesEntry = (_149 = spec.series) === null || _149 === void 0 ? void 0 : _149[0];
2283
2307
  rawValues = seriesEntry
2284
2308
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : 0); })
2285
2309
  : [];
@@ -2293,10 +2317,10 @@ var BasicChart = function (_a) {
2293
2317
  theme.themeColors.accent5,
2294
2318
  theme.themeColors.accent6,
2295
2319
  ]);
2296
- funnelColor_1 = (_149 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _149 !== void 0 ? _149 : (0, utils_1.chartPaletteColorAt)(funnelPalette, 0);
2320
+ funnelColor_1 = (_150 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _150 !== void 0 ? _150 : (0, utils_1.chartPaletteColorAt)(funnelPalette, 0);
2297
2321
  stageColors_1 = new Map();
2298
2322
  try {
2299
- for (_z = tslib_1.__values((_150 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataPointColors) !== null && _150 !== void 0 ? _150 : []), _0 = _z.next(); !_0.done; _0 = _z.next()) {
2323
+ for (_z = tslib_1.__values((_151 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataPointColors) !== null && _151 !== void 0 ? _151 : []), _0 = _z.next(); !_0.done; _0 = _z.next()) {
2300
2324
  dp = _0.value;
2301
2325
  if (typeof (dp === null || dp === void 0 ? void 0 : dp.idx) === "number" && typeof (dp === null || dp === void 0 ? void 0 : dp.color) === "string") {
2302
2326
  stageColors_1.set(dp.idx, dp.color);
@@ -2324,9 +2348,9 @@ var BasicChart = function (_a) {
2324
2348
  top: 60,
2325
2349
  bottom: 20,
2326
2350
  };
2327
- funnelLabelsOff = ((_151 = (0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, seriesEntry)) === null || _151 === void 0 ? void 0 : _151.show) ===
2351
+ funnelLabelsOff = ((_152 = (0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, seriesEntry)) === null || _152 === void 0 ? void 0 : _152.show) ===
2328
2352
  false;
2329
- chartSeries.push(tslib_1.__assign(tslib_1.__assign({ type: "funnel", id: (0, series_click_1.chartSeriesId)(0, 0), name: (_152 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _152 !== void 0 ? _152 : "", data: funnelData }, funnelLayout), { itemStyle: {
2353
+ chartSeries.push(tslib_1.__assign(tslib_1.__assign({ type: "funnel", id: (0, series_click_1.chartSeriesId)(0, 0), name: (_153 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _153 !== void 0 ? _153 : "", data: funnelData }, funnelLayout), { itemStyle: {
2330
2354
  color: function (params) { var _a; return (_a = stageColors_1.get(params.dataIndex)) !== null && _a !== void 0 ? _a : funnelColor_1; },
2331
2355
  }, label: funnelLabelsOff
2332
2356
  ? { show: false }
@@ -2349,9 +2373,9 @@ var BasicChart = function (_a) {
2349
2373
  showMeanMarker_1 = spec.showMeanMarker === true;
2350
2374
  showInnerPoints_1 = spec.showInnerPoints === true;
2351
2375
  showMeanLine_1 = spec.showMeanLine === true;
2352
- boxDomainSource = (_155 = (_154 = (_153 = spec.domains) === null || _153 === void 0 ? void 0 : _153[0]) === null || _154 === void 0 ? void 0 : _154.sources) === null || _155 === void 0 ? void 0 : _155[0];
2376
+ boxDomainSource = (_156 = (_155 = (_154 = spec.domains) === null || _154 === void 0 ? void 0 : _154[0]) === null || _155 === void 0 ? void 0 : _155.sources) === null || _156 === void 0 ? void 0 : _156[0];
2353
2377
  boxCategories_2 = boxDomainSource
2354
- ? ((_156 = getDomainValuesFromRange(boxDomainSource, spec.hiddenDimensionStrategy)) !== null && _156 !== void 0 ? _156 : []).map(function (v) { return (v === null || v === undefined ? "" : "".concat(v).trim()); })
2378
+ ? ((_157 = getDomainValuesFromRange(boxDomainSource, spec.hiddenDimensionStrategy)) !== null && _157 !== void 0 ? _157 : []).map(function (v) { return (v === null || v === undefined ? "" : "".concat(v).trim()); })
2355
2379
  : [];
2356
2380
  grouped_1 = boxCategories_2.some(function (c) { return c !== ""; });
2357
2381
  groups_1 = [];
@@ -2371,7 +2395,7 @@ var BasicChart = function (_a) {
2371
2395
  finally { if (e_8) throw e_8.error; }
2372
2396
  }
2373
2397
  }
2374
- boxSeriesSpecs = (_157 = spec.series) !== null && _157 !== void 0 ? _157 : [];
2398
+ boxSeriesSpecs = (_158 = spec.series) !== null && _158 !== void 0 ? _158 : [];
2375
2399
  slots = grouped_1 ? groups_1 : ["1"];
2376
2400
  boxGap = typeof spec.gapWidth === "number" ? Math.max(0, spec.gapWidth) : 150;
2377
2401
  boxPlotWidth = Math.max(0, (width !== null && width !== void 0 ? width : 0) * 0.85 - 40);
@@ -2394,7 +2418,7 @@ var BasicChart = function (_a) {
2394
2418
  axisLine: { show: true },
2395
2419
  axisTick: { show: true },
2396
2420
  splitLine: { show: false },
2397
- name: (_158 = spec.horizontalAxisTitle) !== null && _158 !== void 0 ? _158 : "",
2421
+ name: (_159 = spec.horizontalAxisTitle) !== null && _159 !== void 0 ? _159 : "",
2398
2422
  nameLocation: "middle",
2399
2423
  nameGap: 30,
2400
2424
  });
@@ -2522,12 +2546,12 @@ var BasicChart = function (_a) {
2522
2546
  }
2523
2547
  else if (spec.chartType === "histogram") {
2524
2548
  rawValues = flattenChartDataValues(spec.series, getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); });
2525
- histogramDomainSource = (_161 = (_160 = (_159 = spec.domains) === null || _159 === void 0 ? void 0 : _159[0]) === null || _160 === void 0 ? void 0 : _160.sources) === null || _161 === void 0 ? void 0 : _161[0];
2549
+ histogramDomainSource = (_162 = (_161 = (_160 = spec.domains) === null || _160 === void 0 ? void 0 : _160[0]) === null || _161 === void 0 ? void 0 : _161.sources) === null || _162 === void 0 ? void 0 : _162[0];
2526
2550
  histogramCategories = histogramDomainSource
2527
- ? ((_162 = getDomainValuesFromRange(histogramDomainSource, spec.hiddenDimensionStrategy)) !== null && _162 !== void 0 ? _162 : [])
2551
+ ? ((_163 = getDomainValuesFromRange(histogramDomainSource, spec.hiddenDimensionStrategy)) !== null && _163 !== void 0 ? _163 : [])
2528
2552
  : [];
2529
2553
  _1 = histogramCategories.length
2530
- ? (0, histogram_1.aggregateByCategory)(histogramCategories, rawValues, (_165 = (_164 = (_163 = spec.series) === null || _163 === void 0 ? void 0 : _163[0]) === null || _164 === void 0 ? void 0 : _164.aggregateType) !== null && _165 !== void 0 ? _165 : "SUM")
2554
+ ? (0, histogram_1.aggregateByCategory)(histogramCategories, rawValues, (_166 = (_165 = (_164 = spec.series) === null || _164 === void 0 ? void 0 : _164[0]) === null || _165 === void 0 ? void 0 : _165.aggregateType) !== null && _166 !== void 0 ? _166 : "SUM")
2531
2555
  : (0, histogram_1.binHistogram)(rawValues, spec.binCount, {
2532
2556
  binSize: spec.binSize,
2533
2557
  intervalClosed: spec.intervalClosed,
@@ -2550,20 +2574,20 @@ var BasicChart = function (_a) {
2550
2574
  axisLine: { show: true },
2551
2575
  axisTick: { show: true },
2552
2576
  splitLine: { show: false },
2553
- name: (_166 = spec.horizontalAxisTitle) !== null && _166 !== void 0 ? _166 : "",
2577
+ name: (_167 = spec.horizontalAxisTitle) !== null && _167 !== void 0 ? _167 : "",
2554
2578
  nameLocation: "middle",
2555
2579
  nameGap: 30,
2556
2580
  });
2557
2581
  chartSeries.length = 0;
2558
2582
  histogramSeries = {
2559
2583
  type: "bar",
2560
- name: (_169 = (_168 = (_167 = spec.series) === null || _167 === void 0 ? void 0 : _167[0]) === null || _168 === void 0 ? void 0 : _168.dataLabel) !== null && _169 !== void 0 ? _169 : "",
2584
+ name: (_170 = (_169 = (_168 = spec.series) === null || _168 === void 0 ? void 0 : _168[0]) === null || _169 === void 0 ? void 0 : _169.dataLabel) !== null && _170 !== void 0 ? _170 : "",
2561
2585
  data: counts,
2562
2586
  // Excel's histogram columns touch unless `gapWidth` says otherwise
2563
2587
  // (#1087); the gap maps like a column chart's.
2564
- barCategoryGap: (_171 = (0, bar_layout_1.gapWidthToBarCategoryGap)((_170 = spec.gapWidth) !== null && _170 !== void 0 ? _170 : 0, { seriesCount: 1 })) !== null && _171 !== void 0 ? _171 : "0%",
2588
+ barCategoryGap: (_172 = (0, bar_layout_1.gapWidthToBarCategoryGap)((_171 = spec.gapWidth) !== null && _171 !== void 0 ? _171 : 0, { seriesCount: 1 })) !== null && _172 !== void 0 ? _172 : "0%",
2565
2589
  };
2566
- histogramColor = (_173 = (_172 = spec.series) === null || _172 === void 0 ? void 0 : _172[0]) === null || _173 === void 0 ? void 0 : _173.color;
2590
+ histogramColor = (_174 = (_173 = spec.series) === null || _173 === void 0 ? void 0 : _173[0]) === null || _174 === void 0 ? void 0 : _174.color;
2567
2591
  if (histogramColor) {
2568
2592
  histogramSeries.itemStyle = { color: histogramColor };
2569
2593
  }
@@ -2599,20 +2623,20 @@ var BasicChart = function (_a) {
2599
2623
  isPareto = spec.chartType === "histogram" && (0, histogram_1.isParetoSpec)(spec);
2600
2624
  hasSecondaryAxis = !isCircularChart &&
2601
2625
  !isHorizontalBarChart &&
2602
- (((_174 = spec.series) !== null && _174 !== void 0 ? _174 : []).some(function (s) { return s.useSecondaryAxis; }) || isPareto);
2626
+ (((_175 = spec.series) !== null && _175 !== void 0 ? _175 : []).some(function (s) { return s.useSecondaryAxis; }) || isPareto);
2603
2627
  isPercentStackedBars = spec.stackedType === "PERCENT_STACKED" &&
2604
2628
  (spec.chartType === "bar" || spec.chartType === "column");
2605
2629
  primaryAxisNumberFormat = isPercentStackedBars
2606
2630
  ? undefined
2607
2631
  : (0, axis_number_format_1.resolveValueAxisNumberFormat)({
2608
2632
  axisOptions: spec.valueAxisOptions,
2609
- series: ((_175 = spec.series) !== null && _175 !== void 0 ? _175 : []).filter(function (s) { return !s.useSecondaryAxis; }),
2633
+ series: ((_176 = spec.series) !== null && _176 !== void 0 ? _176 : []).filter(function (s) { return !s.useSecondaryAxis; }),
2610
2634
  getFormattingFromRange: getFormattingFromRange,
2611
2635
  hiddenDimensionStrategy: spec.hiddenDimensionStrategy,
2612
2636
  });
2613
2637
  secondaryAxisNumberFormat = (0, axis_number_format_1.resolveValueAxisNumberFormat)({
2614
2638
  axisOptions: spec.secondaryValueAxisOptions,
2615
- series: ((_176 = spec.series) !== null && _176 !== void 0 ? _176 : []).filter(function (s) { return s.useSecondaryAxis; }),
2639
+ series: ((_177 = spec.series) !== null && _177 !== void 0 ? _177 : []).filter(function (s) { return s.useSecondaryAxis; }),
2616
2640
  getFormattingFromRange: getFormattingFromRange,
2617
2641
  hiddenDimensionStrategy: spec.hiddenDimensionStrategy,
2618
2642
  });
@@ -2641,17 +2665,17 @@ var BasicChart = function (_a) {
2641
2665
  finalLegend = (0, overrides_1.applyLegendOverrides)(legend, spec.legend);
2642
2666
  bottomAxisNameGap = isHorizontalBarChart
2643
2667
  ? valueAxisBase.nameGap
2644
- : Number((_178 = (_177 = chartDomains[0]) === null || _177 === void 0 ? void 0 : _177.nameGap) !== null && _178 !== void 0 ? _178 : CATEGORY_AXIS_NAME_GAP);
2668
+ : Number((_179 = (_178 = chartDomains[0]) === null || _178 === void 0 ? void 0 : _178.nameGap) !== null && _179 !== void 0 ? _179 : CATEGORY_AXIS_NAME_GAP);
2645
2669
  legendBand = (0, legend_layout_1.reserveEchartsLegendBand)({
2646
- position: (_179 = spec.legend) === null || _179 === void 0 ? void 0 : _179.position,
2670
+ position: (_180 = spec.legend) === null || _180 === void 0 ? void 0 : _180.position,
2647
2671
  visible: finalLegend.show !== false,
2648
2672
  labels: (0, legend_layout_1.legendLabelsFrom)(finalLegend.data, chartSeries.map(function (s) { return s === null || s === void 0 ? void 0 : s.name; })),
2649
- legendFontSize: (_184 = (_181 = (_180 = finalLegend.textStyle) === null || _180 === void 0 ? void 0 : _180.fontSize) !== null && _181 !== void 0 ? _181 : (_183 = (_182 = spec.legend) === null || _182 === void 0 ? void 0 : _182.textFormat) === null || _183 === void 0 ? void 0 : _183.fontSize) !== null && _184 !== void 0 ? _184 : 12,
2673
+ legendFontSize: (_185 = (_182 = (_181 = finalLegend.textStyle) === null || _181 === void 0 ? void 0 : _181.fontSize) !== null && _182 !== void 0 ? _182 : (_184 = (_183 = spec.legend) === null || _183 === void 0 ? void 0 : _183.textFormat) === null || _184 === void 0 ? void 0 : _184.fontSize) !== null && _185 !== void 0 ? _185 : 12,
2650
2674
  legendItemWidth: defaultLegendConfig.itemWidth,
2651
2675
  width: width !== null && width !== void 0 ? width : 0,
2652
2676
  height: height !== null && height !== void 0 ? height : 0,
2653
2677
  hasTitle: Boolean(title),
2654
- titleFontSize: (_186 = (_185 = spec.titleTextFormat) === null || _185 === void 0 ? void 0 : _185.fontSize) !== null && _186 !== void 0 ? _186 : 16,
2678
+ titleFontSize: (_187 = (_186 = spec.titleTextFormat) === null || _186 === void 0 ? void 0 : _186.fontSize) !== null && _187 !== void 0 ? _187 : 16,
2655
2679
  hasBottomAxisTitle: !isCircularChart && Boolean(spec.horizontalAxisTitle),
2656
2680
  bottomAxisNameGap: bottomAxisNameGap,
2657
2681
  hasLeftAxisTitle: !isCircularChart && Boolean(spec.verticalAxisTitle),
@@ -2821,7 +2845,7 @@ var BasicChart = function (_a) {
2821
2845
  return next;
2822
2846
  });
2823
2847
  // Update charts
2824
- (_187 = chartRef.current) === null || _187 === void 0 ? void 0 : _187.setOption({
2848
+ (_188 = chartRef.current) === null || _188 === void 0 ? void 0 : _188.setOption({
2825
2849
  xAxis: (function () {
2826
2850
  var _a, _b;
2827
2851
  if (isOfPie) {