@rowsncolumns/charts 28.1.6 → 28.1.8

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 (43) hide show
  1. package/dist/cjs/basic-chart/basic-chart.d.ts +1 -1
  2. package/dist/cjs/basic-chart/basic-chart.d.ts.map +1 -1
  3. package/dist/cjs/basic-chart/basic-chart.js +207 -152
  4. package/dist/cjs/components/editors/chart-editor.d.ts.map +1 -1
  5. package/dist/cjs/components/editors/chart-editor.js +5 -1
  6. package/dist/cjs/plotly/basic-chart/basic-chart.d.ts +1 -1
  7. package/dist/cjs/plotly/basic-chart/basic-chart.d.ts.map +1 -1
  8. package/dist/cjs/plotly/basic-chart/basic-chart.js +169 -96
  9. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  10. package/dist/cjs/utils/axis-number-format.d.ts +26 -7
  11. package/dist/cjs/utils/axis-number-format.d.ts.map +1 -1
  12. package/dist/cjs/utils/axis-number-format.js +94 -16
  13. package/dist/cjs/utils/doughnut.d.ts +19 -0
  14. package/dist/cjs/utils/doughnut.d.ts.map +1 -0
  15. package/dist/cjs/utils/doughnut.js +28 -0
  16. package/dist/cjs/utils/overrides.d.ts +12 -3
  17. package/dist/cjs/utils/overrides.d.ts.map +1 -1
  18. package/dist/cjs/utils/overrides.js +41 -16
  19. package/dist/cjs/utils/radar.d.ts +31 -5
  20. package/dist/cjs/utils/radar.d.ts.map +1 -1
  21. package/dist/cjs/utils/radar.js +67 -27
  22. package/dist/esm/basic-chart/basic-chart.d.ts +1 -1
  23. package/dist/esm/basic-chart/basic-chart.d.ts.map +1 -1
  24. package/dist/esm/basic-chart/basic-chart.js +129 -63
  25. package/dist/esm/components/editors/chart-editor.d.ts.map +1 -1
  26. package/dist/esm/components/editors/chart-editor.js +5 -1
  27. package/dist/esm/plotly/basic-chart/basic-chart.d.ts +1 -1
  28. package/dist/esm/plotly/basic-chart/basic-chart.d.ts.map +1 -1
  29. package/dist/esm/plotly/basic-chart/basic-chart.js +99 -23
  30. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  31. package/dist/esm/utils/axis-number-format.d.ts +26 -7
  32. package/dist/esm/utils/axis-number-format.d.ts.map +1 -1
  33. package/dist/esm/utils/axis-number-format.js +83 -13
  34. package/dist/esm/utils/doughnut.d.ts +19 -0
  35. package/dist/esm/utils/doughnut.d.ts.map +1 -0
  36. package/dist/esm/utils/doughnut.js +21 -0
  37. package/dist/esm/utils/overrides.d.ts +12 -3
  38. package/dist/esm/utils/overrides.d.ts.map +1 -1
  39. package/dist/esm/utils/overrides.js +40 -16
  40. package/dist/esm/utils/radar.d.ts +31 -5
  41. package/dist/esm/utils/radar.d.ts.map +1 -1
  42. package/dist/esm/utils/radar.js +44 -16
  43. package/package.json +4 -4
@@ -31,6 +31,7 @@ var hierarchy_1 = require("../utils/hierarchy");
31
31
  var histogram_1 = require("../utils/histogram");
32
32
  var legend_layout_1 = require("../utils/legend-layout");
33
33
  var of_pie_1 = require("../utils/of-pie");
34
+ var doughnut_1 = require("../utils/doughnut");
34
35
  var overrides_1 = require("../utils/overrides");
35
36
  var radar_1 = require("../utils/radar");
36
37
  var region_map_1 = require("../utils/region-map");
@@ -193,7 +194,7 @@ var defaultLegendConfig = {
193
194
  var CATEGORY_AXIS_NAME_GAP = (0, legend_layout_1.categoryAxisNameGap)();
194
195
  var BasicChart = function (_a) {
195
196
  var _b;
196
- 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;
197
+ 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;
197
198
  var spec = chart.spec;
198
199
  var explicitChartTitle = (_b = chart.spec.title) !== null && _b !== void 0 ? _b : undefined;
199
200
  var hierarchyTitleRef = (0, react_1.useRef)(explicitChartTitle);
@@ -367,11 +368,11 @@ var BasicChart = function (_a) {
367
368
  * Triggers a chart update
368
369
  */
369
370
  var updateChart = function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
370
- 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, xAxisConfig, tooltipFormatter, bubbleSeriesLabel_1, hierarchyRows, headerTitle, hierarchyData, rootName, seriesDisplayName, hierarchyDepth, levels, sizeNumberFormat_1, tooltipFormatter, hierarchyDataLabels, hierarchySeriesLabel, 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, 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, connectors, primaryDomainSource_2, rawDomainValues, labels_1, seriesEntry, rawValues, quartileMethod, showOutliers, showMeanMarker, boxStats, boxLabels, outlierPoints, meanPoints, _v, _w, seriesEntry, label, rawValues, summary, boxIndex, lo, hi, _x, _y, outlier, boxSeries, boxColor, rawValues, _z, labels, counts, isPareto_1, cumulativePercents, pareto, histogramSeries, histogramColor, renderedSeriesCount, replaceMerge, valueAxisBase, isPareto, hasSecondaryAxis, isPercentStackedBars, primaryAxisNumberFormat, secondaryAxisNumberFormat, axisNumberFormatFor, seriesNumberFormats, seriesNumberFormatFor, tooltipConfig, finalLegend, bottomAxisNameGap, legendBand, positionedLegend, gridConfig, dataLabelOptions, seriesLabelOptionFor, isDoughnut, doughnutHoleSize, explosion, explosionOffset, barSeries, len, categoryTotals_2, barSeries_1, barSeries_1_1, s, i, raw, n, barSeries_2, barSeries_2_1, s, seriesWithLabels;
371
+ 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, xAxisConfig, tooltipFormatter, bubbleSeriesLabelFor_1, hierarchyRows, headerTitle, hierarchyData, rootName, seriesDisplayName, hierarchyDepth, levels, sizeNumberFormat_1, tooltipFormatter, hierarchyDataLabels, hierarchySeriesLabel, 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, 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, connectors, primaryDomainSource_2, rawDomainValues, labels_1, seriesEntry, rawValues, quartileMethod, showOutliers, showMeanMarker, boxStats, boxLabels, outlierPoints, meanPoints, _v, _w, seriesEntry, label, rawValues, summary, boxIndex, lo, hi, _x, _y, outlier, boxSeries, boxColor, rawValues, _z, labels, counts, isPareto_1, cumulativePercents, pareto, histogramSeries, histogramColor, 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;
371
372
  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;
372
- var _9, _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;
373
- return tslib_1.__generator(this, function (_139) {
374
- switch (_139.label) {
373
+ var _9, _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;
374
+ return tslib_1.__generator(this, function (_140) {
375
+ switch (_140.label) {
375
376
  case 0:
376
377
  (0, utils_1.debug)("Updating chart", chart);
377
378
  threeDRenderKind = (0, three_d_1.resolve3DRenderKind)(spec.sourceChartType);
@@ -422,7 +423,7 @@ var BasicChart = function (_a) {
422
423
  geoScope = (0, region_map_1.resolveGeoScope)(regionSpec.geoScope);
423
424
  return [4 /*yield*/, (0, region_map_loader_1.loadRegionMapGeo)(geoScope)];
424
425
  case 1:
425
- geo = _139.sent();
426
+ geo = _140.sent();
426
427
  // Entering the region map from a cartesian render: the previous
427
428
  // grid/axis option doesn't merge into the map one, so start from
428
429
  // a bare instance (theme options are re-applied after setOption).
@@ -457,7 +458,7 @@ var BasicChart = function (_a) {
457
458
  ? "rgba(255,255,255,0.08)"
458
459
  : "rgba(0,0,0,0.06)";
459
460
  borderColor = isDarkMode ? "rgba(255,255,255,0.3)" : "#FFFFFF";
460
- regionSeriesLabel = (0, overrides_1.buildSeriesLabelOption)(spec.dataLabels);
461
+ regionSeriesLabel = (0, overrides_1.buildSeriesLabelOption)(spec.dataLabels, undefined, locale);
461
462
  seriesName = (seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
462
463
  ? seriesEntry.dataLabel
463
464
  : "";
@@ -537,7 +538,7 @@ var BasicChart = function (_a) {
537
538
  });
538
539
  seriesInputs = [];
539
540
  i = 0;
540
- _139.label = 3;
541
+ _140.label = 3;
541
542
  case 3:
542
543
  if (!(i < spec.series.length)) return [3 /*break*/, 7];
543
544
  seriesEntry = spec.series[i];
@@ -546,13 +547,13 @@ var BasicChart = function (_a) {
546
547
  _b = chart_spec_utils_1.coerceCalculatedLabel;
547
548
  return [4 /*yield*/, onRequestCalculate(resolvedLabel, (_17 = position.sheetId) !== null && _17 !== void 0 ? _17 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
548
549
  case 4:
549
- resolvedLabel = _b.apply(void 0, [_139.sent()]);
550
- _139.label = 5;
550
+ resolvedLabel = _b.apply(void 0, [_140.sent()]);
551
+ _140.label = 5;
551
552
  case 5:
552
553
  xValues = (_18 = perSeriesX[i]) !== null && _18 !== void 0 ? _18 : perSeriesX[0];
553
554
  sizeValues_1 = (_19 = perSeriesSize[i]) !== null && _19 !== void 0 ? _19 : perSeriesSize[0];
554
555
  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 } : {})));
555
- _139.label = 6;
556
+ _140.label = 6;
556
557
  case 6:
557
558
  i++;
558
559
  return [3 /*break*/, 3];
@@ -590,7 +591,10 @@ var BasicChart = function (_a) {
590
591
  var seriesName = params.seriesName ? "".concat(params.seriesName, "<br/>") : "";
591
592
  return "".concat(seriesName).concat(bubbleName, "X: ").concat(label !== null && label !== void 0 ? label : "", "<br/>Y: ").concat(y !== null && y !== void 0 ? y : "", "<br/>Size: ").concat(size !== null && size !== void 0 ? size : "");
592
593
  };
593
- bubbleSeriesLabel_1 = (0, overrides_1.buildSeriesLabelOption)(spec.dataLabels);
594
+ bubbleSeriesLabelFor_1 = function (index) {
595
+ var _a;
596
+ return (0, overrides_1.buildSeriesLabelOption)((0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, (_a = spec.series) === null || _a === void 0 ? void 0 : _a[index]), undefined, locale);
597
+ };
594
598
  (_24 = chartRef.current) === null || _24 === void 0 ? void 0 : _24.setOption({
595
599
  xAxis: [
596
600
  (0, overrides_1.applyAxisOverrides)(tslib_1.__assign({}, xAxisConfig), spec.categoryAxisOptions),
@@ -601,7 +605,7 @@ var BasicChart = function (_a) {
601
605
  name: (_25 = spec.verticalAxisTitle) !== null && _25 !== void 0 ? _25 : "",
602
606
  nameLocation: "middle",
603
607
  nameGap: 45,
604
- }, spec.valueAxisOptions),
608
+ }, spec.valueAxisOptions, undefined, locale),
605
609
  ],
606
610
  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),
607
611
  grid: {
@@ -620,7 +624,7 @@ var BasicChart = function (_a) {
620
624
  // routed through the bubble code, producing Y-scaled giant
621
625
  // circles instead of Excel's small dots.
622
626
  series: preparedSeries.map(function (entry, index) {
623
- var _a, _b, _c, _d, _e, _f;
627
+ var _a, _b, _c, _d, _e, _f, _g;
624
628
  var isScatter = spec.chartType === "scatter";
625
629
  var scatterStyle = (_a = spec.scatterStyle) !== null && _a !== void 0 ? _a : (isScatter ? "lineMarker" : undefined);
626
630
  var seriesEntry = (_b = spec.series) === null || _b === void 0 ? void 0 : _b[index];
@@ -639,13 +643,19 @@ var BasicChart = function (_a) {
639
643
  scatterStyle === "smoothMarker" ||
640
644
  !scatterStyle);
641
645
  var smooth = scatterStyle === "smooth" || scatterStyle === "smoothMarker";
646
+ // Labels hang off the point symbols: a marker-less line keeps
647
+ // an invisible 0-size symbol per point when they show (#1049).
648
+ var labelsWithoutMarkers = !wantsMarkers &&
649
+ Boolean((_c = (0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, seriesEntry)) === null || _c === void 0 ? void 0 : _c.show);
642
650
  return wantsLine
643
- ? tslib_1.__assign({ type: "line", name: entry.name, data: entry.points, showSymbol: wantsMarkers, smooth: smooth, symbol: (_c = (0, helpers_1.mapMarkerSymbolToEcharts)(symbol)) !== null && _c !== void 0 ? _c : "circle", symbolSize: (_d = perMarker === null || perMarker === void 0 ? void 0 : perMarker.size) !== null && _d !== void 0 ? _d : 6 }, (seriesColor
651
+ ? tslib_1.__assign({ type: "line", name: entry.name, data: entry.points, showSymbol: wantsMarkers || labelsWithoutMarkers, smooth: smooth, symbol: (_d = (0, helpers_1.mapMarkerSymbolToEcharts)(symbol)) !== null && _d !== void 0 ? _d : "circle", symbolSize: labelsWithoutMarkers
652
+ ? 0
653
+ : (_e = perMarker === null || perMarker === void 0 ? void 0 : perMarker.size) !== null && _e !== void 0 ? _e : 6 }, (seriesColor
644
654
  ? {
645
655
  itemStyle: { color: seriesColor },
646
656
  lineStyle: { color: seriesColor },
647
657
  }
648
- : {})) : tslib_1.__assign({ type: "scatter", name: entry.name, data: entry.points, symbol: (_e = (0, helpers_1.mapMarkerSymbolToEcharts)(symbol)) !== null && _e !== void 0 ? _e : "circle", symbolSize: (_f = perMarker === null || perMarker === void 0 ? void 0 : perMarker.size) !== null && _f !== void 0 ? _f : 6 }, (seriesColor
658
+ : {})) : tslib_1.__assign({ type: "scatter", name: entry.name, data: entry.points, symbol: (_f = (0, helpers_1.mapMarkerSymbolToEcharts)(symbol)) !== null && _f !== void 0 ? _f : "circle", symbolSize: (_g = perMarker === null || perMarker === void 0 ? void 0 : perMarker.size) !== null && _g !== void 0 ? _g : 6 }, (seriesColor
649
659
  ? { itemStyle: { color: seriesColor } }
650
660
  : {}));
651
661
  }
@@ -653,10 +663,11 @@ var BasicChart = function (_a) {
653
663
  show: true,
654
664
  formatter: function (params) { var _a; return (_a = params.name) !== null && _a !== void 0 ? _a : ""; },
655
665
  } }, (seriesColor ? { itemStyle: { color: seriesColor } } : {}));
656
- }).map(function (s) {
666
+ }).map(function (s, index) {
657
667
  var _a;
658
- return bubbleSeriesLabel_1
659
- ? tslib_1.__assign(tslib_1.__assign({}, s), { label: tslib_1.__assign(tslib_1.__assign({}, ((_a = s.label) !== null && _a !== void 0 ? _a : {})), bubbleSeriesLabel_1) }) : s;
668
+ var bubbleSeriesLabel = bubbleSeriesLabelFor_1(index);
669
+ return bubbleSeriesLabel
670
+ ? tslib_1.__assign(tslib_1.__assign({}, s), { label: tslib_1.__assign(tslib_1.__assign({}, ((_a = s.label) !== null && _a !== void 0 ? _a : {})), bubbleSeriesLabel) }) : s;
660
671
  }),
661
672
  }, {
662
673
  replaceMerge: [
@@ -695,11 +706,11 @@ var BasicChart = function (_a) {
695
706
  var value = Array.isArray(params.value)
696
707
  ? params.value[params.value.length - 1]
697
708
  : (_a = params.value) !== null && _a !== void 0 ? _a : "";
698
- return "".concat(params.name, ": ").concat((0, axis_number_format_1.formatAxisValue)(sizeNumberFormat_1, value));
709
+ return "".concat(params.name, ": ").concat((0, axis_number_format_1.formatAxisValue)(sizeNumberFormat_1, value, locale));
699
710
  };
700
711
  hierarchyDataLabels = spec.dataLabels;
701
712
  hierarchySeriesLabel = (0, overrides_1.buildSeriesLabelOption)(hierarchyDataLabels && !hierarchyDataLabels.numberFormatPattern
702
- ? tslib_1.__assign(tslib_1.__assign({}, hierarchyDataLabels), { numberFormatPattern: sizeNumberFormat_1 }) : hierarchyDataLabels);
713
+ ? tslib_1.__assign(tslib_1.__assign({}, hierarchyDataLabels), { numberFormatPattern: sizeNumberFormat_1 }) : hierarchyDataLabels, undefined, locale);
703
714
  (_32 = chartRef.current) === null || _32 === void 0 ? void 0 : _32.setOption({
704
715
  xAxis: [
705
716
  {
@@ -775,11 +786,11 @@ var BasicChart = function (_a) {
775
786
  if (!isContour) return [3 /*break*/, 19];
776
787
  categories_2 = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, false).map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
777
788
  contourSeriesInputs = [];
778
- _139.label = 9;
789
+ _140.label = 9;
779
790
  case 9:
780
- _139.trys.push([9, 16, 17, 18]);
791
+ _140.trys.push([9, 16, 17, 18]);
781
792
  _d = tslib_1.__values((_34 = spec.series) !== null && _34 !== void 0 ? _34 : []), _e = _d.next();
782
- _139.label = 10;
793
+ _140.label = 10;
783
794
  case 10:
784
795
  if (!!_e.done) return [3 /*break*/, 15];
785
796
  seriesEntry = _e.value;
@@ -787,22 +798,22 @@ var BasicChart = function (_a) {
787
798
  _g = chart_spec_utils_1.coerceCalculatedLabel;
788
799
  return [4 /*yield*/, onRequestCalculate(seriesEntry.dataLabel, (_35 = position.sheetId) !== null && _35 !== void 0 ? _35 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
789
800
  case 11:
790
- _f = _g.apply(void 0, [_139.sent()]);
801
+ _f = _g.apply(void 0, [_140.sent()]);
791
802
  return [3 /*break*/, 13];
792
803
  case 12:
793
804
  _f = (_36 = seriesEntry.dataLabel) !== null && _36 !== void 0 ? _36 : "";
794
- _139.label = 13;
805
+ _140.label = 13;
795
806
  case 13:
796
807
  dataLabel = _f;
797
808
  values = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(sanitizeChartValue);
798
809
  contourSeriesInputs.push({ name: dataLabel, values: values });
799
- _139.label = 14;
810
+ _140.label = 14;
800
811
  case 14:
801
812
  _e = _d.next();
802
813
  return [3 /*break*/, 10];
803
814
  case 15: return [3 /*break*/, 18];
804
815
  case 16:
805
- e_1_1 = _139.sent();
816
+ e_1_1 = _140.sent();
806
817
  e_1 = { error: e_1_1 };
807
818
  return [3 /*break*/, 18];
808
819
  case 17:
@@ -818,7 +829,7 @@ var BasicChart = function (_a) {
818
829
  return typeof point[2] === "number";
819
830
  })), 2), zMin = _h[0], zMax = _h[1];
820
831
  contourFormats_1 = (0, axis_number_format_1.resolveSeriesNumberFormats)(spec.series, getFormattingFromRange, spec.hiddenDimensionStrategy);
821
- contourLabel = (0, overrides_1.buildSeriesLabelOption)(spec.dataLabels);
832
+ contourLabel = (0, overrides_1.buildSeriesLabelOption)(spec.dataLabels, undefined, locale);
822
833
  if (!renderedAsContour.current && chartRef.current) {
823
834
  chartRef.current.dispose();
824
835
  chartRef.current = undefined;
@@ -836,7 +847,7 @@ var BasicChart = function (_a) {
836
847
  var _d = tslib_1.__read(((_a = params === null || params === void 0 ? void 0 : params.value) !== null && _a !== void 0 ? _a : []), 3), x = _d[0], y = _d[1], z = _d[2];
837
848
  var value = z === "-" || z === undefined
838
849
  ? ""
839
- : (0, axis_number_format_1.formatAxisValue)(contourFormats_1[y], z);
850
+ : (0, axis_number_format_1.formatAxisValue)(contourFormats_1[y], z, locale);
840
851
  return "".concat((_b = seriesNames_1[y]) !== null && _b !== void 0 ? _b : "", "<br/>").concat((_c = categories_2[x]) !== null && _c !== void 0 ? _c : "", ": ").concat(value);
841
852
  },
842
853
  },
@@ -873,7 +884,7 @@ var BasicChart = function (_a) {
873
884
  top: "center",
874
885
  inRange: { color: tslib_1.__spreadArray([], tslib_1.__read(three_d_1.SURFACE_COLOR_RAMP), false) },
875
886
  formatter: function (value) {
876
- return (0, axis_number_format_1.formatAxisValue)(contourFormats_1[0], value);
887
+ return (0, axis_number_format_1.formatAxisValue)(contourFormats_1[0], value, locale);
877
888
  },
878
889
  },
879
890
  ],
@@ -885,7 +896,7 @@ var BasicChart = function (_a) {
885
896
  var _b = tslib_1.__read(((_a = params === null || params === void 0 ? void 0 : params.value) !== null && _a !== void 0 ? _a : []), 3), y = _b[1], z = _b[2];
886
897
  return z === "-" || z === undefined
887
898
  ? ""
888
- : (0, axis_number_format_1.formatAxisValue)(contourFormats_1[y], z);
899
+ : (0, axis_number_format_1.formatAxisValue)(contourFormats_1[y], z, locale);
889
900
  } }),
890
901
  }
891
902
  : {})),
@@ -910,11 +921,11 @@ var BasicChart = function (_a) {
910
921
  if (!(willRender3D && threeDRenderKind)) return [3 /*break*/, 30];
911
922
  categories_3 = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, false).map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
912
923
  threeDSeriesInputs = [];
913
- _139.label = 20;
924
+ _140.label = 20;
914
925
  case 20:
915
- _139.trys.push([20, 27, 28, 29]);
926
+ _140.trys.push([20, 27, 28, 29]);
916
927
  _j = tslib_1.__values((_40 = spec.series) !== null && _40 !== void 0 ? _40 : []), _k = _j.next();
917
- _139.label = 21;
928
+ _140.label = 21;
918
929
  case 21:
919
930
  if (!!_k.done) return [3 /*break*/, 26];
920
931
  seriesEntry = _k.value;
@@ -922,22 +933,22 @@ var BasicChart = function (_a) {
922
933
  _m = chart_spec_utils_1.coerceCalculatedLabel;
923
934
  return [4 /*yield*/, onRequestCalculate(seriesEntry.dataLabel, (_41 = position.sheetId) !== null && _41 !== void 0 ? _41 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
924
935
  case 22:
925
- _l = _m.apply(void 0, [_139.sent()]);
936
+ _l = _m.apply(void 0, [_140.sent()]);
926
937
  return [3 /*break*/, 24];
927
938
  case 23:
928
939
  _l = (_42 = seriesEntry.dataLabel) !== null && _42 !== void 0 ? _42 : "";
929
- _139.label = 24;
940
+ _140.label = 24;
930
941
  case 24:
931
942
  dataLabel = _l;
932
943
  values = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(sanitizeChartValue);
933
944
  threeDSeriesInputs.push({ name: dataLabel, values: values });
934
- _139.label = 25;
945
+ _140.label = 25;
935
946
  case 25:
936
947
  _k = _j.next();
937
948
  return [3 /*break*/, 21];
938
949
  case 26: return [3 /*break*/, 29];
939
950
  case 27:
940
- e_2_1 = _139.sent();
951
+ e_2_1 = _140.sent();
941
952
  e_2 = { error: e_2_1 };
942
953
  return [3 /*break*/, 29];
943
954
  case 28:
@@ -991,7 +1002,7 @@ var BasicChart = function (_a) {
991
1002
  : (_j = (_h = seriesNames_2[Math.round((_g = value[1]) !== null && _g !== void 0 ? _g : 0)]) !== null && _h !== void 0 ? _h : params === null || params === void 0 ? void 0 : params.seriesName) !== null && _j !== void 0 ? _j : "";
992
1003
  var valueLabel = spec.stackedType === "PERCENT_STACKED" && stackedBar3D_1
993
1004
  ? "".concat(Math.round(((_k = value[2]) !== null && _k !== void 0 ? _k : 0) * 10) / 10, "%")
994
- : (0, axis_number_format_1.formatAxisValue)(threeDFormats_1[seriesIndex], value[2]);
1005
+ : (0, axis_number_format_1.formatAxisValue)(threeDFormats_1[seriesIndex], value[2], locale);
995
1006
  return "".concat(seriesLabel ? "".concat(seriesLabel, "<br/>") : "").concat(categoryLabel, ": ").concat(valueLabel);
996
1007
  };
997
1008
  threeDSeries = void 0;
@@ -1158,7 +1169,8 @@ var BasicChart = function (_a) {
1158
1169
  }
1159
1170
  finally { if (e_5) throw e_5.error; }
1160
1171
  }
1161
- indicators_1 = (0, radar_1.buildRadarIndicators)(categories, radarSeriesInputs);
1172
+ radarAxisOptions = spec.valueAxisOptions;
1173
+ indicators_1 = (0, radar_1.buildRadarIndicators)(categories, radarSeriesInputs, radarAxisOptions);
1162
1174
  radarData = (0, radar_1.buildRadarSeriesData)(radarSeriesInputs, indicators_1.length);
1163
1175
  radarStyle_1 = (_47 = spec.radarStyle) !== null && _47 !== void 0 ? _47 : "standard";
1164
1176
  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; });
@@ -1166,14 +1178,14 @@ var BasicChart = function (_a) {
1166
1178
  radarDataLabels_1 = spec.dataLabels;
1167
1179
  radarSeriesLabelFor_1 = function (seriesIndex) {
1168
1180
  return (0, overrides_1.buildSeriesLabelOption)(radarDataLabels_1 && !radarDataLabels_1.numberFormatPattern
1169
- ? tslib_1.__assign(tslib_1.__assign({}, radarDataLabels_1), { numberFormatPattern: radarFormats_1[seriesIndex] }) : radarDataLabels_1);
1181
+ ? tslib_1.__assign(tslib_1.__assign({}, radarDataLabels_1), { numberFormatPattern: radarFormats_1[seriesIndex] }) : radarDataLabels_1, undefined, locale);
1170
1182
  };
1171
1183
  radarTooltipFormatter = function (params) {
1172
1184
  var _a, _b;
1173
1185
  var values = Array.isArray(params === null || params === void 0 ? void 0 : params.value) ? params.value : [];
1174
1186
  var pattern = radarFormats_1[(_a = params === null || params === void 0 ? void 0 : params.dataIndex) !== null && _a !== void 0 ? _a : 0];
1175
1187
  var lines = indicators_1.map(function (indicator, i) {
1176
- return "".concat(indicator.name, ": ").concat((0, axis_number_format_1.formatAxisValue)(pattern, values[i]));
1188
+ return "".concat(indicator.name, ": ").concat((0, axis_number_format_1.formatAxisValue)(pattern, values[i], locale));
1177
1189
  });
1178
1190
  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/>");
1179
1191
  };
@@ -1181,7 +1193,16 @@ var BasicChart = function (_a) {
1181
1193
  radar: {
1182
1194
  indicator: indicators_1.length
1183
1195
  ? indicators_1
1184
- : [{ name: "", max: 1 }],
1196
+ : [{ name: "", min: 0, max: 1 }],
1197
+ // The common scale's tick labels along one axis, as Excel draws
1198
+ // them (echarts labels the first indicator axis only); hidden
1199
+ // with the spec's value axis.
1200
+ axisLabel: {
1201
+ show: (radarAxisOptions === null || radarAxisOptions === void 0 ? void 0 : radarAxisOptions.visible) !== false,
1202
+ formatter: function (value) {
1203
+ return (0, axis_number_format_1.formatAxisValue)(radarFormats_1[0], value, locale);
1204
+ },
1205
+ },
1185
1206
  },
1186
1207
  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),
1187
1208
  tooltip: { trigger: "item", formatter: radarTooltipFormatter },
@@ -1235,7 +1256,7 @@ var BasicChart = function (_a) {
1235
1256
  stockDataLabels_1 = spec.dataLabels;
1236
1257
  stockSeriesLabelFor_1 = function (role) {
1237
1258
  return (0, overrides_1.buildSeriesLabelOption)(stockDataLabels_1 && !stockDataLabels_1.numberFormatPattern
1238
- ? tslib_1.__assign(tslib_1.__assign({}, stockDataLabels_1), { numberFormatPattern: stockFormatFor_1(role) }) : stockDataLabels_1);
1259
+ ? tslib_1.__assign(tslib_1.__assign({}, stockDataLabels_1), { numberFormatPattern: stockFormatFor_1(role) }) : stockDataLabels_1, undefined, locale);
1239
1260
  };
1240
1261
  upColor_1 = theme.themeColors.accent1;
1241
1262
  downColor_1 = theme.themeColors.accent2;
@@ -1279,10 +1300,10 @@ var BasicChart = function (_a) {
1279
1300
  tslib_1.__assign({ type: "bar", name: "Volume", xAxisIndex: 1, yAxisIndex: 1, data: (volumePoints !== null && volumePoints !== void 0 ? volumePoints : []).map(function (p) { return ({
1280
1301
  value: p.value,
1281
1302
  itemStyle: { color: p.up ? upColor_1 : downColor_1 },
1282
- }); }) }, ((0, axis_number_format_1.tooltipValueFormatter)(stockFormatFor_1("volume"))
1303
+ }); }) }, ((0, axis_number_format_1.tooltipValueFormatter)(stockFormatFor_1("volume"), locale)
1283
1304
  ? {
1284
1305
  tooltip: {
1285
- valueFormatter: (0, axis_number_format_1.tooltipValueFormatter)(stockFormatFor_1("volume")),
1306
+ valueFormatter: (0, axis_number_format_1.tooltipValueFormatter)(stockFormatFor_1("volume"), locale),
1286
1307
  },
1287
1308
  }
1288
1309
  : {})),
@@ -1307,7 +1328,7 @@ var BasicChart = function (_a) {
1307
1328
  nameLocation: "middle",
1308
1329
  nameGap: 50,
1309
1330
  gridIndex: 0,
1310
- }, spec.valueAxisOptions)
1331
+ }, spec.valueAxisOptions, undefined, locale)
1311
1332
  ], tslib_1.__read((hasVolume ? [volumeYAxis] : [])), false),
1312
1333
  legend: (0, overrides_1.applyLegendOverrides)(tslib_1.__assign(tslib_1.__assign({}, legend), { show: false }), spec.legend),
1313
1334
  grid: stockGrid,
@@ -1319,10 +1340,10 @@ var BasicChart = function (_a) {
1319
1340
  color0: downColor_1,
1320
1341
  borderColor: upColor_1,
1321
1342
  borderColor0: downColor_1,
1322
- } }, ((0, axis_number_format_1.tooltipValueFormatter)(stockFormatFor_1("close"))
1343
+ } }, ((0, axis_number_format_1.tooltipValueFormatter)(stockFormatFor_1("close"), locale)
1323
1344
  ? {
1324
1345
  tooltip: {
1325
- valueFormatter: (0, axis_number_format_1.tooltipValueFormatter)(stockFormatFor_1("close")),
1346
+ valueFormatter: (0, axis_number_format_1.tooltipValueFormatter)(stockFormatFor_1("close"), locale),
1326
1347
  },
1327
1348
  }
1328
1349
  : {}))
@@ -1358,7 +1379,7 @@ var BasicChart = function (_a) {
1358
1379
  nameLocation: "middle",
1359
1380
  nameGap: 50,
1360
1381
  gridIndex: 0,
1361
- }, spec.valueAxisOptions)
1382
+ }, spec.valueAxisOptions, undefined, locale)
1362
1383
  ], tslib_1.__read((hasVolume ? [volumeYAxis] : [])), false),
1363
1384
  legend: (0, overrides_1.applyLegendOverrides)(tslib_1.__assign(tslib_1.__assign({}, legend), { show: lineSeries.length > 1, data: lineSeries.map(function (s) { return s.name; }) }), spec.legend),
1364
1385
  grid: stockGrid,
@@ -1366,10 +1387,10 @@ var BasicChart = function (_a) {
1366
1387
  axisPointer: stockAxisPointer,
1367
1388
  series: tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(lineSeries.map(function (s, i) { return (tslib_1.__assign(tslib_1.__assign({ type: "line", name: s.name, data: s.values, showSymbol: false, itemStyle: { color: (0, utils_1.chartPaletteColorAt)(stockColors_1, i) }, lineStyle: { color: (0, utils_1.chartPaletteColorAt)(stockColors_1, i) } }, (stockSeriesLabelFor_1(s.role)
1368
1389
  ? { label: stockSeriesLabelFor_1(s.role) }
1369
- : {})), ((0, axis_number_format_1.tooltipValueFormatter)(stockFormatFor_1(s.role))
1390
+ : {})), ((0, axis_number_format_1.tooltipValueFormatter)(stockFormatFor_1(s.role), locale)
1370
1391
  ? {
1371
1392
  tooltip: {
1372
- valueFormatter: (0, axis_number_format_1.tooltipValueFormatter)(stockFormatFor_1(s.role)),
1393
+ valueFormatter: (0, axis_number_format_1.tooltipValueFormatter)(stockFormatFor_1(s.role), locale),
1373
1394
  },
1374
1395
  }
1375
1396
  : {}))); })), false), tslib_1.__read(volumeSeries), false),
@@ -1627,22 +1648,22 @@ var BasicChart = function (_a) {
1627
1648
  return (0, utils_1.chartPaletteColorAt)(seriesPalette, index);
1628
1649
  };
1629
1650
  _loop_1 = function (specSeriesIndex, series) {
1630
- var dataLabel, _140, _141, effectiveChartType, lineLike, domainSources, pieDomainLabels, piePointOffset, data, seriesEchartsType, seriesStyleAttrs, seriesEntry, isBarOrColumn, seriesAny, markerSymbol, wantsMarkers, isolated, marked, isolated_1, isolated_1_1, i, gradientArgs, gradient, overrides_2, _142, _143, dp, fallback_1, overrides_3, _144, _145, dp, positiveColor_1, negativeColor_1;
1631
- var e_11, _146, e_12, _147, e_13, _148;
1632
- return tslib_1.__generator(this, function (_149) {
1633
- switch (_149.label) {
1651
+ var dataLabel, _141, _142, 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, _143, _144, dp, fallback_1, overrides_3, _145, _146, dp, positiveColor_1, negativeColor_1;
1652
+ var e_11, _147, e_12, _148, e_13, _149;
1653
+ return tslib_1.__generator(this, function (_150) {
1654
+ switch (_150.label) {
1634
1655
  case 0:
1635
1656
  if (!(!(0, utils_1.isNil)(series.dataLabel) && (0, utils_1.isAFormula)(series.dataLabel))) return [3 /*break*/, 2];
1636
- _141 = chart_spec_utils_1.coerceCalculatedLabel;
1657
+ _142 = chart_spec_utils_1.coerceCalculatedLabel;
1637
1658
  return [4 /*yield*/, onRequestCalculate(series.dataLabel, (_69 = position.sheetId) !== null && _69 !== void 0 ? _69 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
1638
1659
  case 1:
1639
- _140 = _141.apply(void 0, [_149.sent()]);
1660
+ _141 = _142.apply(void 0, [_150.sent()]);
1640
1661
  return [3 /*break*/, 3];
1641
1662
  case 2:
1642
- _140 = (_70 = series.dataLabel) !== null && _70 !== void 0 ? _70 : "";
1643
- _149.label = 3;
1663
+ _141 = (_70 = series.dataLabel) !== null && _70 !== void 0 ? _70 : "";
1664
+ _150.label = 3;
1644
1665
  case 3:
1645
- dataLabel = _140;
1666
+ dataLabel = _141;
1646
1667
  // Label
1647
1668
  if (dataLabel) {
1648
1669
  (_71 = legend.data) === null || _71 === void 0 ? void 0 : _71.push(dataLabel);
@@ -1710,41 +1731,50 @@ var BasicChart = function (_a) {
1710
1731
  wantsMarkers = markerSymbol === "none"
1711
1732
  ? false
1712
1733
  : Boolean(spec.showMarkers) || !(0, utils_1.isNil)(markerSymbol);
1713
- seriesEntry.showSymbol = wantsMarkers;
1734
+ labelsWithoutMarkers = !wantsMarkers &&
1735
+ Boolean((_79 = (0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, seriesAny)) === null || _79 === void 0 ? void 0 : _79.show);
1736
+ seriesEntry.showSymbol = wantsMarkers || labelsWithoutMarkers;
1714
1737
  if (wantsMarkers) {
1715
1738
  seriesEntry.symbol =
1716
- (_79 = (0, helpers_1.mapMarkerSymbolToEcharts)(markerSymbol)) !== null && _79 !== void 0 ? _79 : "circle";
1717
- seriesEntry.symbolSize = (_81 = (_80 = seriesAny.marker) === null || _80 === void 0 ? void 0 : _80.size) !== null && _81 !== void 0 ? _81 : 6;
1739
+ (_80 = (0, helpers_1.mapMarkerSymbolToEcharts)(markerSymbol)) !== null && _80 !== void 0 ? _80 : "circle";
1740
+ seriesEntry.symbolSize = (_82 = (_81 = seriesAny.marker) === null || _81 === void 0 ? void 0 : _81.size) !== null && _82 !== void 0 ? _82 : 6;
1718
1741
  }
1719
- else if (Array.isArray(data)) {
1720
- isolated = (0, empty_cells_1.isolatedPointIndexes)(data, (0, empty_cells_1.connectsAcrossEmptyCells)(spec, lineLike));
1721
- if (isolated.length) {
1722
- seriesEntry.showSymbol = true;
1723
- seriesEntry.symbol = "none";
1724
- marked = tslib_1.__spreadArray([], tslib_1.__read(data), false);
1725
- try {
1726
- for (isolated_1 = (e_11 = void 0, tslib_1.__values(isolated)), isolated_1_1 = isolated_1.next(); !isolated_1_1.done; isolated_1_1 = isolated_1.next()) {
1727
- i = isolated_1_1.value;
1728
- marked[i] = { value: marked[i], symbol: "circle", symbolSize: 6 };
1729
- }
1730
- }
1731
- catch (e_11_1) { e_11 = { error: e_11_1 }; }
1732
- finally {
1742
+ else {
1743
+ if (labelsWithoutMarkers) {
1744
+ seriesEntry.symbol = "circle";
1745
+ seriesEntry.symbolSize = 0;
1746
+ }
1747
+ if (Array.isArray(data)) {
1748
+ isolated = (0, empty_cells_1.isolatedPointIndexes)(data, (0, empty_cells_1.connectsAcrossEmptyCells)(spec, lineLike));
1749
+ if (isolated.length) {
1750
+ seriesEntry.showSymbol = true;
1751
+ if (!labelsWithoutMarkers)
1752
+ seriesEntry.symbol = "none";
1753
+ marked = tslib_1.__spreadArray([], tslib_1.__read(data), false);
1733
1754
  try {
1734
- if (isolated_1_1 && !isolated_1_1.done && (_146 = isolated_1.return)) _146.call(isolated_1);
1755
+ for (isolated_1 = (e_11 = void 0, tslib_1.__values(isolated)), isolated_1_1 = isolated_1.next(); !isolated_1_1.done; isolated_1_1 = isolated_1.next()) {
1756
+ i = isolated_1_1.value;
1757
+ marked[i] = { value: marked[i], symbol: "circle", symbolSize: 6 };
1758
+ }
1735
1759
  }
1736
- finally { if (e_11) throw e_11.error; }
1760
+ catch (e_11_1) { e_11 = { error: e_11_1 }; }
1761
+ finally {
1762
+ try {
1763
+ if (isolated_1_1 && !isolated_1_1.done && (_147 = isolated_1.return)) _147.call(isolated_1);
1764
+ }
1765
+ finally { if (e_11) throw e_11.error; }
1766
+ }
1767
+ seriesEntry.data = marked;
1737
1768
  }
1738
- seriesEntry.data = marked;
1739
1769
  }
1740
1770
  }
1741
1771
  }
1742
1772
  gradientArgs = (0, gradient_1.gradientToEcharts)(series.gradient);
1743
1773
  if (gradientArgs && !seriesAny.noFill) {
1744
1774
  gradient = new echarts.graphic.LinearGradient(gradientArgs.x, gradientArgs.y, gradientArgs.x2, gradientArgs.y2, gradientArgs.colorStops);
1745
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_82 = seriesEntry.itemStyle) !== null && _82 !== void 0 ? _82 : {})), { color: gradient });
1775
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_83 = seriesEntry.itemStyle) !== null && _83 !== void 0 ? _83 : {})), { color: gradient });
1746
1776
  if (effectiveChartType === "area") {
1747
- seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_83 = seriesEntry.areaStyle) !== null && _83 !== void 0 ? _83 : {})), { color: gradient });
1777
+ seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_84 = seriesEntry.areaStyle) !== null && _84 !== void 0 ? _84 : {})), { color: gradient });
1748
1778
  }
1749
1779
  }
1750
1780
  else if (seriesAny.noFill) {
@@ -1752,15 +1782,15 @@ var BasicChart = function (_a) {
1752
1782
  // with `transparent` so layout is preserved but nothing
1753
1783
  // paints. Legend entries are also suppressed via `name: ""`
1754
1784
  // since the series carries no semantic information.
1755
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_84 = seriesEntry.itemStyle) !== null && _84 !== void 0 ? _84 : {})), { color: "transparent", borderColor: "transparent" });
1785
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_85 = seriesEntry.itemStyle) !== null && _85 !== void 0 ? _85 : {})), { color: "transparent", borderColor: "transparent" });
1756
1786
  }
1757
1787
  else if (isBarOrColumn &&
1758
1788
  Array.isArray(seriesAny.dataPointColors) &&
1759
1789
  seriesAny.dataPointColors.length) {
1760
1790
  overrides_2 = new Map();
1761
1791
  try {
1762
- for (_142 = (e_12 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _143 = _142.next(); !_143.done; _143 = _142.next()) {
1763
- dp = _143.value;
1792
+ for (_143 = (e_12 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _144 = _143.next(); !_144.done; _144 = _143.next()) {
1793
+ dp = _144.value;
1764
1794
  if (typeof dp.idx === "number" && typeof dp.color === "string") {
1765
1795
  overrides_2.set(dp.idx, dp.color);
1766
1796
  }
@@ -1769,20 +1799,20 @@ var BasicChart = function (_a) {
1769
1799
  catch (e_12_1) { e_12 = { error: e_12_1 }; }
1770
1800
  finally {
1771
1801
  try {
1772
- if (_143 && !_143.done && (_147 = _142.return)) _147.call(_142);
1802
+ if (_144 && !_144.done && (_148 = _143.return)) _148.call(_143);
1773
1803
  }
1774
1804
  finally { if (e_12) throw e_12.error; }
1775
1805
  }
1776
- fallback_1 = (_85 = series.color) !== null && _85 !== void 0 ? _85 : paletteColorAt(specSeriesIndex);
1777
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_86 = seriesEntry.itemStyle) !== null && _86 !== void 0 ? _86 : {})), { color: function (params) { var _a; return (_a = overrides_2.get(params.dataIndex)) !== null && _a !== void 0 ? _a : fallback_1; } });
1806
+ fallback_1 = (_86 = series.color) !== null && _86 !== void 0 ? _86 : paletteColorAt(specSeriesIndex);
1807
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_87 = seriesEntry.itemStyle) !== null && _87 !== void 0 ? _87 : {})), { color: function (params) { var _a; return (_a = overrides_2.get(params.dataIndex)) !== null && _a !== void 0 ? _a : fallback_1; } });
1778
1808
  }
1779
1809
  else if (isCircularChart &&
1780
1810
  Array.isArray(seriesAny.dataPointColors) &&
1781
1811
  seriesAny.dataPointColors.length) {
1782
1812
  overrides_3 = new Map();
1783
1813
  try {
1784
- for (_144 = (e_13 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _145 = _144.next(); !_145.done; _145 = _144.next()) {
1785
- dp = _145.value;
1814
+ for (_145 = (e_13 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _146 = _145.next(); !_146.done; _146 = _145.next()) {
1815
+ dp = _146.value;
1786
1816
  if (typeof dp.idx === "number" && typeof dp.color === "string") {
1787
1817
  overrides_3.set(dp.idx, dp.color);
1788
1818
  }
@@ -1791,19 +1821,19 @@ var BasicChart = function (_a) {
1791
1821
  catch (e_13_1) { e_13 = { error: e_13_1 }; }
1792
1822
  finally {
1793
1823
  try {
1794
- if (_145 && !_145.done && (_148 = _144.return)) _148.call(_144);
1824
+ if (_146 && !_146.done && (_149 = _145.return)) _149.call(_145);
1795
1825
  }
1796
1826
  finally { if (e_13) throw e_13.error; }
1797
1827
  }
1798
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_87 = seriesEntry.itemStyle) !== null && _87 !== void 0 ? _87 : {})), { color: function (params) {
1828
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_88 = seriesEntry.itemStyle) !== null && _88 !== void 0 ? _88 : {})), { color: function (params) {
1799
1829
  var _a, _b;
1800
1830
  return (_b = (_a = overrides_3.get(params.dataIndex)) !== null && _a !== void 0 ? _a : series.color) !== null && _b !== void 0 ? _b : paletteColorAt(params.dataIndex);
1801
1831
  } });
1802
1832
  }
1803
1833
  else if (isBarOrColumn && series.invertIfNegative) {
1804
- positiveColor_1 = (_88 = series.color) !== null && _88 !== void 0 ? _88 : paletteColorAt(specSeriesIndex);
1805
- negativeColor_1 = (_89 = series.negativeColor) !== null && _89 !== void 0 ? _89 : "#FF0000";
1806
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_90 = seriesEntry.itemStyle) !== null && _90 !== void 0 ? _90 : {})), { color: function (params) {
1834
+ positiveColor_1 = (_89 = series.color) !== null && _89 !== void 0 ? _89 : paletteColorAt(specSeriesIndex);
1835
+ negativeColor_1 = (_90 = series.negativeColor) !== null && _90 !== void 0 ? _90 : "#FF0000";
1836
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_91 = seriesEntry.itemStyle) !== null && _91 !== void 0 ? _91 : {})), { color: function (params) {
1807
1837
  var _a, _b;
1808
1838
  var value = Array.isArray(params.data)
1809
1839
  ? params.data[1]
@@ -1814,10 +1844,10 @@ var BasicChart = function (_a) {
1814
1844
  } });
1815
1845
  }
1816
1846
  else if (series.color) {
1817
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_91 = seriesEntry.itemStyle) !== null && _91 !== void 0 ? _91 : {})), { color: series.color });
1818
- seriesEntry.lineStyle = tslib_1.__assign(tslib_1.__assign({}, ((_92 = seriesEntry.lineStyle) !== null && _92 !== void 0 ? _92 : {})), { color: series.color });
1847
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_92 = seriesEntry.itemStyle) !== null && _92 !== void 0 ? _92 : {})), { color: series.color });
1848
+ seriesEntry.lineStyle = tslib_1.__assign(tslib_1.__assign({}, ((_93 = seriesEntry.lineStyle) !== null && _93 !== void 0 ? _93 : {})), { color: series.color });
1819
1849
  if (effectiveChartType === "area") {
1820
- seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_93 = seriesEntry.areaStyle) !== null && _93 !== void 0 ? _93 : {})), { color: series.color });
1850
+ seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_94 = seriesEntry.areaStyle) !== null && _94 !== void 0 ? _94 : {})), { color: series.color });
1821
1851
  }
1822
1852
  }
1823
1853
  chartSeries.push(seriesEntry);
@@ -1826,24 +1856,24 @@ var BasicChart = function (_a) {
1826
1856
  }
1827
1857
  });
1828
1858
  };
1829
- _139.label = 31;
1859
+ _140.label = 31;
1830
1860
  case 31:
1831
- _139.trys.push([31, 36, 37, 38]);
1861
+ _140.trys.push([31, 36, 37, 38]);
1832
1862
  _r = tslib_1.__values(((_68 = spec.series) !== null && _68 !== void 0 ? _68 : []).entries()), _s = _r.next();
1833
- _139.label = 32;
1863
+ _140.label = 32;
1834
1864
  case 32:
1835
1865
  if (!!_s.done) return [3 /*break*/, 35];
1836
1866
  _t = tslib_1.__read(_s.value, 2), specSeriesIndex = _t[0], series = _t[1];
1837
1867
  return [5 /*yield**/, _loop_1(specSeriesIndex, series)];
1838
1868
  case 33:
1839
- _139.sent();
1840
- _139.label = 34;
1869
+ _140.sent();
1870
+ _140.label = 34;
1841
1871
  case 34:
1842
1872
  _s = _r.next();
1843
1873
  return [3 /*break*/, 32];
1844
1874
  case 35: return [3 /*break*/, 38];
1845
1875
  case 36:
1846
- e_3_1 = _139.sent();
1876
+ e_3_1 = _140.sent();
1847
1877
  e_3 = { error: e_3_1 };
1848
1878
  return [3 /*break*/, 38];
1849
1879
  case 37:
@@ -1861,7 +1891,7 @@ var BasicChart = function (_a) {
1861
1891
  }
1862
1892
  if (isOfPie) {
1863
1893
  labels = rawPrimaryDomainValues.map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
1864
- seriesEntry = (_94 = spec.series) === null || _94 === void 0 ? void 0 : _94[0];
1894
+ seriesEntry = (_95 = spec.series) === null || _95 === void 0 ? void 0 : _95[0];
1865
1895
  rawValues = seriesEntry
1866
1896
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); })
1867
1897
  : [];
@@ -1908,7 +1938,7 @@ var BasicChart = function (_a) {
1908
1938
  };
1909
1939
  chartSeries.push({
1910
1940
  type: "pie",
1911
- name: (_95 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _95 !== void 0 ? _95 : "",
1941
+ name: (_96 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _96 !== void 0 ? _96 : "",
1912
1942
  center: ["".concat(MAIN_CX_1 * 100, "%"), "".concat(CY_1 * 100, "%")],
1913
1943
  radius: [0, "".concat(MAIN_RADIUS_PCT_1, "%")],
1914
1944
  // Rotate the pie so the "Other" slice's angular midpoint faces
@@ -1926,7 +1956,7 @@ var BasicChart = function (_a) {
1926
1956
  if (ofPieType_1 === "pie") {
1927
1957
  chartSeries.push({
1928
1958
  type: "pie",
1929
- name: (_96 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _96 !== void 0 ? _96 : "",
1959
+ name: (_97 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _97 !== void 0 ? _97 : "",
1930
1960
  center: ["".concat(SECONDARY_CX_1 * 100, "%"), "".concat(CY_1 * 100, "%")],
1931
1961
  radius: [0, "".concat(secondaryRadiusPct_1, "%")],
1932
1962
  data: secondary.map(function (s, i) { return ({
@@ -2021,16 +2051,16 @@ var BasicChart = function (_a) {
2021
2051
  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);
2022
2052
  }
2023
2053
  else if (spec.chartType === "waterfall") {
2024
- primaryDomainSource_1 = (_99 = (_98 = (_97 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _97 === void 0 ? void 0 : _97[0]) === null || _98 === void 0 ? void 0 : _98.sources) === null || _99 === void 0 ? void 0 : _99[0];
2054
+ primaryDomainSource_1 = (_100 = (_99 = (_98 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _98 === void 0 ? void 0 : _98[0]) === null || _99 === void 0 ? void 0 : _99.sources) === null || _100 === void 0 ? void 0 : _100[0];
2025
2055
  rawDomainValues = primaryDomainSource_1
2026
- ? (0, aggregation_1.sanitizeDomainValues)((_100 = getDomainValuesFromRange(primaryDomainSource_1, spec.hiddenDimensionStrategy)) !== null && _100 !== void 0 ? _100 : [])
2056
+ ? (0, aggregation_1.sanitizeDomainValues)((_101 = getDomainValuesFromRange(primaryDomainSource_1, spec.hiddenDimensionStrategy)) !== null && _101 !== void 0 ? _101 : [])
2027
2057
  : [];
2028
2058
  labels = rawDomainValues.map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
2029
- seriesEntry = (_101 = spec.series) === null || _101 === void 0 ? void 0 : _101[0];
2059
+ seriesEntry = (_102 = spec.series) === null || _102 === void 0 ? void 0 : _102[0];
2030
2060
  rawValues_1 = seriesEntry
2031
2061
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); })
2032
2062
  : [];
2033
- totalIndices = new Set((_102 = spec.totalIndices) !== null && _102 !== void 0 ? _102 : []);
2063
+ totalIndices = new Set((_103 = spec.totalIndices) !== null && _103 !== void 0 ? _103 : []);
2034
2064
  steps = (0, waterfall_1.computeWaterfall)(rawValues_1, labels, totalIndices);
2035
2065
  chartDomains.length = 0;
2036
2066
  chartDomains.push({
@@ -2040,7 +2070,7 @@ var BasicChart = function (_a) {
2040
2070
  axisLine: { show: true },
2041
2071
  axisTick: { show: true },
2042
2072
  splitLine: { show: false },
2043
- name: (_103 = spec.horizontalAxisTitle) !== null && _103 !== void 0 ? _103 : "",
2073
+ name: (_104 = spec.horizontalAxisTitle) !== null && _104 !== void 0 ? _104 : "",
2044
2074
  nameLocation: "middle",
2045
2075
  nameGap: 30,
2046
2076
  });
@@ -2053,9 +2083,9 @@ var BasicChart = function (_a) {
2053
2083
  data: steps.map(function (s) { return s.placeholder; }),
2054
2084
  silent: true,
2055
2085
  });
2056
- accent_1 = (_104 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _104 !== void 0 ? _104 : theme.themeColors.accent1;
2057
- decreaseColor_1 = (_106 = (_105 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.negativeColor) !== null && _105 !== void 0 ? _105 : theme.themeColors.accent2) !== null && _106 !== void 0 ? _106 : accent_1;
2058
- totalColor_1 = (_107 = theme.themeColors.accent3) !== null && _107 !== void 0 ? _107 : accent_1;
2086
+ accent_1 = (_105 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _105 !== void 0 ? _105 : theme.themeColors.accent1;
2087
+ decreaseColor_1 = (_107 = (_106 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.negativeColor) !== null && _106 !== void 0 ? _106 : theme.themeColors.accent2) !== null && _107 !== void 0 ? _107 : accent_1;
2088
+ totalColor_1 = (_108 = theme.themeColors.accent3) !== null && _108 !== void 0 ? _108 : accent_1;
2059
2089
  connectors = steps.slice(0, -1).map(function (s, i) { return [
2060
2090
  { coord: [i, s.cumulative] },
2061
2091
  { coord: [i + 1, s.cumulative] },
@@ -2063,7 +2093,7 @@ var BasicChart = function (_a) {
2063
2093
  chartSeries.push({
2064
2094
  type: "bar",
2065
2095
  stack: "waterfall",
2066
- name: (_108 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _108 !== void 0 ? _108 : "",
2096
+ name: (_109 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _109 !== void 0 ? _109 : "",
2067
2097
  data: steps.map(function (s, i) { return ({
2068
2098
  value: s.value,
2069
2099
  itemStyle: {
@@ -2090,12 +2120,12 @@ var BasicChart = function (_a) {
2090
2120
  legend.data = [];
2091
2121
  }
2092
2122
  else if (spec.chartType === "funnel") {
2093
- primaryDomainSource_2 = (_111 = (_110 = (_109 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _109 === void 0 ? void 0 : _109[0]) === null || _110 === void 0 ? void 0 : _110.sources) === null || _111 === void 0 ? void 0 : _111[0];
2123
+ primaryDomainSource_2 = (_112 = (_111 = (_110 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _110 === void 0 ? void 0 : _110[0]) === null || _111 === void 0 ? void 0 : _111.sources) === null || _112 === void 0 ? void 0 : _112[0];
2094
2124
  rawDomainValues = primaryDomainSource_2
2095
- ? (0, aggregation_1.sanitizeDomainValues)((_112 = getDomainValuesFromRange(primaryDomainSource_2, spec.hiddenDimensionStrategy)) !== null && _112 !== void 0 ? _112 : [])
2125
+ ? (0, aggregation_1.sanitizeDomainValues)((_113 = getDomainValuesFromRange(primaryDomainSource_2, spec.hiddenDimensionStrategy)) !== null && _113 !== void 0 ? _113 : [])
2096
2126
  : [];
2097
2127
  labels_1 = rawDomainValues.map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
2098
- seriesEntry = (_113 = spec.series) === null || _113 === void 0 ? void 0 : _113[0];
2128
+ seriesEntry = (_114 = spec.series) === null || _114 === void 0 ? void 0 : _114[0];
2099
2129
  rawValues = seriesEntry
2100
2130
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : 0); })
2101
2131
  : [];
@@ -2103,7 +2133,7 @@ var BasicChart = function (_a) {
2103
2133
  chartSeries.length = 0;
2104
2134
  chartSeries.push({
2105
2135
  type: "funnel",
2106
- name: (_114 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _114 !== void 0 ? _114 : "",
2136
+ name: (_115 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _115 !== void 0 ? _115 : "",
2107
2137
  data: rawValues.map(function (value, i) {
2108
2138
  var _a;
2109
2139
  return ({
@@ -2124,7 +2154,7 @@ var BasicChart = function (_a) {
2124
2154
  outlierPoints = [];
2125
2155
  meanPoints = [];
2126
2156
  try {
2127
- for (_v = tslib_1.__values((_115 = spec.series) !== null && _115 !== void 0 ? _115 : []), _w = _v.next(); !_w.done; _w = _v.next()) {
2157
+ for (_v = tslib_1.__values((_116 = spec.series) !== null && _116 !== void 0 ? _116 : []), _w = _v.next(); !_w.done; _w = _v.next()) {
2128
2158
  seriesEntry = _w.value;
2129
2159
  label = seriesEntry.dataLabel && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
2130
2160
  ? seriesEntry.dataLabel
@@ -2173,7 +2203,7 @@ var BasicChart = function (_a) {
2173
2203
  axisLine: { show: true },
2174
2204
  axisTick: { show: true },
2175
2205
  splitLine: { show: false },
2176
- name: (_116 = spec.horizontalAxisTitle) !== null && _116 !== void 0 ? _116 : "",
2206
+ name: (_117 = spec.horizontalAxisTitle) !== null && _117 !== void 0 ? _117 : "",
2177
2207
  nameLocation: "middle",
2178
2208
  nameGap: 30,
2179
2209
  });
@@ -2183,7 +2213,7 @@ var BasicChart = function (_a) {
2183
2213
  name: "",
2184
2214
  data: boxStats,
2185
2215
  };
2186
- boxColor = (_118 = (_117 = spec.series) === null || _117 === void 0 ? void 0 : _117[0]) === null || _118 === void 0 ? void 0 : _118.color;
2216
+ boxColor = (_119 = (_118 = spec.series) === null || _118 === void 0 ? void 0 : _118[0]) === null || _119 === void 0 ? void 0 : _119.color;
2187
2217
  if (boxColor) {
2188
2218
  boxSeries.itemStyle = { color: boxColor, borderColor: boxColor };
2189
2219
  }
@@ -2215,18 +2245,18 @@ var BasicChart = function (_a) {
2215
2245
  axisLine: { show: true },
2216
2246
  axisTick: { show: true },
2217
2247
  splitLine: { show: false },
2218
- name: (_119 = spec.horizontalAxisTitle) !== null && _119 !== void 0 ? _119 : "",
2248
+ name: (_120 = spec.horizontalAxisTitle) !== null && _120 !== void 0 ? _120 : "",
2219
2249
  nameLocation: "middle",
2220
2250
  nameGap: 30,
2221
2251
  });
2222
2252
  chartSeries.length = 0;
2223
2253
  histogramSeries = {
2224
2254
  type: "bar",
2225
- name: (_122 = (_121 = (_120 = spec.series) === null || _120 === void 0 ? void 0 : _120[0]) === null || _121 === void 0 ? void 0 : _121.dataLabel) !== null && _122 !== void 0 ? _122 : "",
2255
+ name: (_123 = (_122 = (_121 = spec.series) === null || _121 === void 0 ? void 0 : _121[0]) === null || _122 === void 0 ? void 0 : _122.dataLabel) !== null && _123 !== void 0 ? _123 : "",
2226
2256
  data: counts,
2227
2257
  barCategoryGap: "1%",
2228
2258
  };
2229
- histogramColor = (_124 = (_123 = spec.series) === null || _123 === void 0 ? void 0 : _123[0]) === null || _124 === void 0 ? void 0 : _124.color;
2259
+ histogramColor = (_125 = (_124 = spec.series) === null || _124 === void 0 ? void 0 : _124[0]) === null || _125 === void 0 ? void 0 : _125.color;
2230
2260
  if (histogramColor) {
2231
2261
  histogramSeries.itemStyle = { color: histogramColor };
2232
2262
  }
@@ -2263,20 +2293,20 @@ var BasicChart = function (_a) {
2263
2293
  isPareto = spec.chartType === "histogram" && (0, histogram_1.isParetoSpec)(spec);
2264
2294
  hasSecondaryAxis = !isCircularChart &&
2265
2295
  !isHorizontalBarChart &&
2266
- (((_125 = spec.series) !== null && _125 !== void 0 ? _125 : []).some(function (s) { return s.useSecondaryAxis; }) || isPareto);
2296
+ (((_126 = spec.series) !== null && _126 !== void 0 ? _126 : []).some(function (s) { return s.useSecondaryAxis; }) || isPareto);
2267
2297
  isPercentStackedBars = spec.stackedType === "PERCENT_STACKED" &&
2268
2298
  (spec.chartType === "bar" || spec.chartType === "column");
2269
2299
  primaryAxisNumberFormat = isPercentStackedBars
2270
2300
  ? undefined
2271
2301
  : (0, axis_number_format_1.resolveValueAxisNumberFormat)({
2272
2302
  axisOptions: spec.valueAxisOptions,
2273
- series: ((_126 = spec.series) !== null && _126 !== void 0 ? _126 : []).filter(function (s) { return !s.useSecondaryAxis; }),
2303
+ series: ((_127 = spec.series) !== null && _127 !== void 0 ? _127 : []).filter(function (s) { return !s.useSecondaryAxis; }),
2274
2304
  getFormattingFromRange: getFormattingFromRange,
2275
2305
  hiddenDimensionStrategy: spec.hiddenDimensionStrategy,
2276
2306
  });
2277
2307
  secondaryAxisNumberFormat = (0, axis_number_format_1.resolveValueAxisNumberFormat)({
2278
2308
  axisOptions: spec.secondaryValueAxisOptions,
2279
- series: ((_127 = spec.series) !== null && _127 !== void 0 ? _127 : []).filter(function (s) { return s.useSecondaryAxis; }),
2309
+ series: ((_128 = spec.series) !== null && _128 !== void 0 ? _128 : []).filter(function (s) { return s.useSecondaryAxis; }),
2280
2310
  getFormattingFromRange: getFormattingFromRange,
2281
2311
  hiddenDimensionStrategy: spec.hiddenDimensionStrategy,
2282
2312
  });
@@ -2298,24 +2328,24 @@ var BasicChart = function (_a) {
2298
2328
  trigger: isCircularChart ? "item" : "axis",
2299
2329
  formatter: isCircularChart
2300
2330
  ? primaryAxisNumberFormat
2301
- ? (0, axis_number_format_1.circularTooltipFormatter)(primaryAxisNumberFormat)
2331
+ ? (0, axis_number_format_1.circularTooltipFormatter)(primaryAxisNumberFormat, locale)
2302
2332
  : "{b}: {c} ({d}%)"
2303
2333
  : undefined,
2304
2334
  };
2305
2335
  finalLegend = (0, overrides_1.applyLegendOverrides)(legend, spec.legend);
2306
2336
  bottomAxisNameGap = isHorizontalBarChart
2307
2337
  ? valueAxisBase.nameGap
2308
- : Number((_129 = (_128 = chartDomains[0]) === null || _128 === void 0 ? void 0 : _128.nameGap) !== null && _129 !== void 0 ? _129 : CATEGORY_AXIS_NAME_GAP);
2338
+ : Number((_130 = (_129 = chartDomains[0]) === null || _129 === void 0 ? void 0 : _129.nameGap) !== null && _130 !== void 0 ? _130 : CATEGORY_AXIS_NAME_GAP);
2309
2339
  legendBand = (0, legend_layout_1.reserveEchartsLegendBand)({
2310
- position: (_130 = spec.legend) === null || _130 === void 0 ? void 0 : _130.position,
2340
+ position: (_131 = spec.legend) === null || _131 === void 0 ? void 0 : _131.position,
2311
2341
  visible: finalLegend.show !== false,
2312
2342
  labels: (0, legend_layout_1.legendLabelsFrom)(finalLegend.data, chartSeries.map(function (s) { return s === null || s === void 0 ? void 0 : s.name; })),
2313
- legendFontSize: (_135 = (_132 = (_131 = finalLegend.textStyle) === null || _131 === void 0 ? void 0 : _131.fontSize) !== null && _132 !== void 0 ? _132 : (_134 = (_133 = spec.legend) === null || _133 === void 0 ? void 0 : _133.textFormat) === null || _134 === void 0 ? void 0 : _134.fontSize) !== null && _135 !== void 0 ? _135 : 12,
2343
+ legendFontSize: (_136 = (_133 = (_132 = finalLegend.textStyle) === null || _132 === void 0 ? void 0 : _132.fontSize) !== null && _133 !== void 0 ? _133 : (_135 = (_134 = spec.legend) === null || _134 === void 0 ? void 0 : _134.textFormat) === null || _135 === void 0 ? void 0 : _135.fontSize) !== null && _136 !== void 0 ? _136 : 12,
2314
2344
  legendItemWidth: defaultLegendConfig.itemWidth,
2315
2345
  width: width !== null && width !== void 0 ? width : 0,
2316
2346
  height: height !== null && height !== void 0 ? height : 0,
2317
2347
  hasTitle: Boolean(title),
2318
- titleFontSize: (_137 = (_136 = spec.titleTextFormat) === null || _136 === void 0 ? void 0 : _136.fontSize) !== null && _137 !== void 0 ? _137 : 16,
2348
+ titleFontSize: (_138 = (_137 = spec.titleTextFormat) === null || _137 === void 0 ? void 0 : _137.fontSize) !== null && _138 !== void 0 ? _138 : 16,
2319
2349
  hasBottomAxisTitle: !isCircularChart && Boolean(spec.horizontalAxisTitle),
2320
2350
  bottomAxisNameGap: bottomAxisNameGap,
2321
2351
  hasLeftAxisTitle: !isCircularChart && Boolean(spec.verticalAxisTitle),
@@ -2335,13 +2365,26 @@ var BasicChart = function (_a) {
2335
2365
  bottom: 0,
2336
2366
  }
2337
2367
  : legendBand.grid;
2338
- dataLabelOptions = spec.dataLabels;
2368
+ chartDataLabels = spec.dataLabels;
2339
2369
  seriesLabelOptionFor = function (s) {
2370
+ var _a;
2371
+ var specIndex = (0, series_click_1.chartSeriesSpecIndex)(s === null || s === void 0 ? void 0 : s.id);
2372
+ var dataLabelOptions = (0, overrides_1.resolveSeriesDataLabels)(chartDataLabels, specIndex === undefined ? undefined : (_a = spec.series) === null || _a === void 0 ? void 0 : _a[specIndex]);
2340
2373
  return (0, overrides_1.buildSeriesLabelOption)(dataLabelOptions && !dataLabelOptions.numberFormatPattern
2341
- ? tslib_1.__assign(tslib_1.__assign({}, dataLabelOptions), { numberFormatPattern: seriesNumberFormatFor(s) }) : dataLabelOptions);
2374
+ ? tslib_1.__assign(tslib_1.__assign({}, dataLabelOptions), { numberFormatPattern: seriesNumberFormatFor(s) }) : dataLabelOptions, s === null || s === void 0 ? void 0 : s.type, locale);
2342
2375
  };
2343
2376
  isDoughnut = spec.chartType === "doughnut";
2344
2377
  doughnutHoleSize = spec.doughnutHoleSize;
2378
+ doughnutSeriesOrder = isDoughnut
2379
+ ? chartSeries
2380
+ .filter(function (s) { return (s === null || s === void 0 ? void 0 : s.type) === "pie"; })
2381
+ .map(function (s) { return (0, series_click_1.chartSeriesSpecIndex)(s === null || s === void 0 ? void 0 : s.id); })
2382
+ .filter(function (i) { return i !== undefined; })
2383
+ .sort(function (a, b) { return a - b; })
2384
+ : [];
2385
+ doughnutRingSet = isDoughnut
2386
+ ? (0, doughnut_1.doughnutRings)((0, doughnut_1.clampDoughnutHole)(doughnutHoleSize), doughnutSeriesOrder.length)
2387
+ : [];
2345
2388
  explosion = isCircularChart && !isOfPie ? (0, pie_explosion_1.resolveExplosion)(spec) : 0;
2346
2389
  explodedRef.current = explosion > 0;
2347
2390
  explosionOffset = (0, pie_explosion_1.explosionOffsetPx)(explosion, (0, pie_explosion_1.pieRadiusPx)(isDoughnut ? [0, "75%"] : spec.radius, width !== null && width !== void 0 ? width : 0, height !== null && height !== void 0 ? height : 0));
@@ -2406,24 +2449,30 @@ var BasicChart = function (_a) {
2406
2449
  }
2407
2450
  }
2408
2451
  seriesWithLabels = chartSeries.map(function (s) {
2409
- var _a, _b, _c, _d, _e;
2452
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2410
2453
  var next = tslib_1.__assign({}, s);
2411
2454
  var seriesLabelOption = seriesLabelOptionFor(s);
2412
2455
  if (seriesLabelOption) {
2413
2456
  next.label = tslib_1.__assign(tslib_1.__assign({}, ((_a = s === null || s === void 0 ? void 0 : s.label) !== null && _a !== void 0 ? _a : {})), seriesLabelOption);
2414
2457
  }
2458
+ else if ((s === null || s === void 0 ? void 0 : s.type) === "pie") {
2459
+ // echarts labels every pie slice by default (category name on a
2460
+ // leader line); Excel draws nothing until data labels are on (#1062).
2461
+ next.label = tslib_1.__assign(tslib_1.__assign({}, ((_b = s === null || s === void 0 ? void 0 : s.label) !== null && _b !== void 0 ? _b : {})), { show: false });
2462
+ next.labelLine = tslib_1.__assign(tslib_1.__assign({}, ((_c = s === null || s === void 0 ? void 0 : s.labelLine) !== null && _c !== void 0 ? _c : {})), { show: false });
2463
+ }
2415
2464
  // Tooltip values of the value-axis series (a boxplot / candlestick
2416
2465
  // tooltip lists its own statistics and keeps echarts' default).
2417
2466
  var seriesTooltipValueFormatter = VALUE_TOOLTIP_SERIES_TYPES.has(s === null || s === void 0 ? void 0 : s.type)
2418
- ? (0, axis_number_format_1.valueAxisLabelFormatter)(seriesNumberFormatFor(s))
2467
+ ? (0, axis_number_format_1.valueAxisLabelFormatter)(seriesNumberFormatFor(s), locale)
2419
2468
  : undefined;
2420
- if (seriesTooltipValueFormatter && ((_b = s === null || s === void 0 ? void 0 : s.tooltip) === null || _b === void 0 ? void 0 : _b.show) !== false) {
2421
- next.tooltip = tslib_1.__assign(tslib_1.__assign({}, ((_c = s === null || s === void 0 ? void 0 : s.tooltip) !== null && _c !== void 0 ? _c : {})), { valueFormatter: seriesTooltipValueFormatter });
2469
+ if (seriesTooltipValueFormatter && ((_d = s === null || s === void 0 ? void 0 : s.tooltip) === null || _d === void 0 ? void 0 : _d.show) !== false) {
2470
+ next.tooltip = tslib_1.__assign(tslib_1.__assign({}, ((_e = s === null || s === void 0 ? void 0 : s.tooltip) !== null && _e !== void 0 ? _e : {})), { valueFormatter: seriesTooltipValueFormatter });
2422
2471
  }
2423
2472
  if (next.type === "pie") {
2424
2473
  var pieNumberFormat = seriesNumberFormatFor(s);
2425
- if (pieNumberFormat && ((_d = s === null || s === void 0 ? void 0 : s.tooltip) === null || _d === void 0 ? void 0 : _d.show) !== false) {
2426
- next.tooltip = tslib_1.__assign(tslib_1.__assign({}, ((_e = s === null || s === void 0 ? void 0 : s.tooltip) !== null && _e !== void 0 ? _e : {})), { formatter: (0, axis_number_format_1.circularTooltipFormatter)(pieNumberFormat) });
2474
+ if (pieNumberFormat && ((_f = s === null || s === void 0 ? void 0 : s.tooltip) === null || _f === void 0 ? void 0 : _f.show) !== false) {
2475
+ next.tooltip = tslib_1.__assign(tslib_1.__assign({}, ((_g = s === null || s === void 0 ? void 0 : s.tooltip) !== null && _g !== void 0 ? _g : {})), { formatter: (0, axis_number_format_1.circularTooltipFormatter)(pieNumberFormat, locale) });
2427
2476
  }
2428
2477
  if (explosionOffset > 0 && Array.isArray(next.data)) {
2429
2478
  next.selectedMode = "multiple";
@@ -2435,15 +2484,19 @@ var BasicChart = function (_a) {
2435
2484
  }
2436
2485
  }
2437
2486
  if (isDoughnut && next.type === "pie") {
2438
- var inner = typeof doughnutHoleSize === "number"
2439
- ? Math.round(Math.max(0, Math.min(0.9, doughnutHoleSize)) * 100)
2440
- : 50;
2441
- next.radius = ["".concat(inner, "%"), "75%"];
2487
+ // The hole is a fraction of the OUTER radius (Excel's `<c:holeSize>`),
2488
+ // and the doughnut's outer edge sits at 75% of the chart — so every
2489
+ // ring edge is its fraction of 75%, not of the whole chart (#1064:
2490
+ // Excel's default 0.75 used to meet the outer edge, an empty ring).
2491
+ var rank = doughnutSeriesOrder.indexOf((0, series_click_1.chartSeriesSpecIndex)(s === null || s === void 0 ? void 0 : s.id));
2492
+ var ring = (_h = doughnutRingSet[rank]) !== null && _h !== void 0 ? _h : (0, doughnut_1.doughnutRings)((0, doughnut_1.clampDoughnutHole)(doughnutHoleSize), 1)[0];
2493
+ var pct = function (fraction) { return "".concat(Math.round(fraction * 75 * 100) / 100, "%"); };
2494
+ next.radius = [pct(ring.inner), pct(ring.outer)];
2442
2495
  }
2443
2496
  return next;
2444
2497
  });
2445
2498
  // Update charts
2446
- (_138 = chartRef.current) === null || _138 === void 0 ? void 0 : _138.setOption({
2499
+ (_139 = chartRef.current) === null || _139 === void 0 ? void 0 : _139.setOption({
2447
2500
  xAxis: (function () {
2448
2501
  var _a, _b;
2449
2502
  if (isOfPie) {
@@ -2487,7 +2540,7 @@ var BasicChart = function (_a) {
2487
2540
  }
2488
2541
  if (isHorizontalBarChart) {
2489
2542
  return [
2490
- (0, overrides_1.applyAxisOverrides)(tslib_1.__assign(tslib_1.__assign({}, valueAxisBase), { name: (_a = spec.horizontalAxisTitle) !== null && _a !== void 0 ? _a : "" }), spec.valueAxisOptions, primaryAxisNumberFormat),
2543
+ (0, overrides_1.applyAxisOverrides)(tslib_1.__assign(tslib_1.__assign({}, valueAxisBase), { name: (_a = spec.horizontalAxisTitle) !== null && _a !== void 0 ? _a : "" }), spec.valueAxisOptions, primaryAxisNumberFormat, locale),
2491
2544
  ];
2492
2545
  }
2493
2546
  var base = chartDomains.length > 0
@@ -2565,7 +2618,8 @@ var BasicChart = function (_a) {
2565
2618
  : [];
2566
2619
  }),
2567
2620
  pattern: primaryAxisNumberFormat,
2568
- }) }), spec.valueAxisOptions, primaryAxisNumberFormat),
2621
+ locale: locale,
2622
+ }) }), spec.valueAxisOptions, primaryAxisNumberFormat, locale),
2569
2623
  ];
2570
2624
  if (hasSecondaryAxis) {
2571
2625
  axes.push((0, overrides_1.applyAxisOverrides)(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, valueAxisBase), { name: "", splitLine: { show: false } }), (isPareto
@@ -2574,7 +2628,7 @@ var BasicChart = function (_a) {
2574
2628
  max: 100,
2575
2629
  axisLabel: { formatter: "{value}%" },
2576
2630
  }
2577
- : {})), spec.secondaryValueAxisOptions, secondaryAxisNumberFormat));
2631
+ : {})), spec.secondaryValueAxisOptions, secondaryAxisNumberFormat, locale));
2578
2632
  }
2579
2633
  return axes;
2580
2634
  })(),
@@ -2716,6 +2770,7 @@ var BasicChart = function (_a) {
2716
2770
  getDomainValuesFromRange,
2717
2771
  getSeriesValuesFromRange,
2718
2772
  getFormattingFromRange,
2773
+ locale,
2719
2774
  glUpgradeTick,
2720
2775
  ]);
2721
2776
  // Resize chart