@rowsncolumns/charts 28.1.14 → 28.1.15

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 (99) hide show
  1. package/dist/cjs/basic-chart/basic-chart.d.ts.map +1 -1
  2. package/dist/cjs/basic-chart/basic-chart.js +308 -270
  3. package/dist/cjs/components/editors/chart-editor-capabilities.d.ts +48 -0
  4. package/dist/cjs/components/editors/chart-editor-capabilities.d.ts.map +1 -0
  5. package/dist/cjs/components/editors/chart-editor-capabilities.js +62 -0
  6. package/dist/cjs/components/editors/chart-editor.d.ts.map +1 -1
  7. package/dist/cjs/components/editors/chart-editor.js +200 -534
  8. package/dist/cjs/components/editors/fields/axis-options-fields.d.ts +16 -0
  9. package/dist/cjs/components/editors/fields/axis-options-fields.d.ts.map +1 -0
  10. package/dist/cjs/components/editors/fields/axis-options-fields.js +31 -0
  11. package/dist/cjs/components/editors/fields/chart-type-options.d.ts +25 -0
  12. package/dist/cjs/components/editors/fields/chart-type-options.d.ts.map +1 -0
  13. package/dist/cjs/components/editors/fields/chart-type-options.js +170 -0
  14. package/dist/cjs/components/editors/fields/data-labels-fields.d.ts +15 -0
  15. package/dist/cjs/components/editors/fields/data-labels-fields.d.ts.map +1 -0
  16. package/dist/cjs/components/editors/fields/data-labels-fields.js +57 -0
  17. package/dist/cjs/components/editors/fields/primitives.d.ts +54 -0
  18. package/dist/cjs/components/editors/fields/primitives.d.ts.map +1 -0
  19. package/dist/cjs/components/editors/fields/primitives.js +52 -0
  20. package/dist/cjs/components/editors/fields/series-format-fields.d.ts +17 -0
  21. package/dist/cjs/components/editors/fields/series-format-fields.d.ts.map +1 -0
  22. package/dist/cjs/components/editors/fields/series-format-fields.js +165 -0
  23. package/dist/cjs/components/editors/fields/series-name-field.d.ts +16 -0
  24. package/dist/cjs/components/editors/fields/series-name-field.d.ts.map +1 -0
  25. package/dist/cjs/components/editors/fields/series-name-field.js +36 -0
  26. package/dist/cjs/components/editors/fields/text-format-fields.d.ts +20 -0
  27. package/dist/cjs/components/editors/fields/text-format-fields.d.ts.map +1 -0
  28. package/dist/cjs/components/editors/fields/text-format-fields.js +46 -0
  29. package/dist/cjs/config.d.ts.map +1 -1
  30. package/dist/cjs/config.js +3 -0
  31. package/dist/cjs/interface/create-chart.d.ts +3 -2
  32. package/dist/cjs/interface/create-chart.d.ts.map +1 -1
  33. package/dist/cjs/interface/create-chart.js +7 -0
  34. package/dist/cjs/plotly/basic-chart/basic-chart.d.ts.map +1 -1
  35. package/dist/cjs/plotly/basic-chart/basic-chart.js +255 -218
  36. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  37. package/dist/cjs/utils/chart-orientation.d.ts.map +1 -1
  38. package/dist/cjs/utils/chart-orientation.js +24 -12
  39. package/dist/cjs/utils/chart-spec-utils.d.ts.map +1 -1
  40. package/dist/cjs/utils/chart-spec-utils.js +120 -21
  41. package/dist/cjs/utils/echarts-overlays.d.ts +2 -0
  42. package/dist/cjs/utils/echarts-overlays.d.ts.map +1 -1
  43. package/dist/cjs/utils/echarts-overlays.js +25 -12
  44. package/dist/cjs/utils/series-name.d.ts +12 -0
  45. package/dist/cjs/utils/series-name.d.ts.map +1 -0
  46. package/dist/cjs/utils/series-name.js +26 -0
  47. package/dist/cjs/utils/trendline.d.ts +9 -0
  48. package/dist/cjs/utils/trendline.d.ts.map +1 -1
  49. package/dist/cjs/utils/trendline.js +16 -1
  50. package/dist/esm/basic-chart/basic-chart.d.ts.map +1 -1
  51. package/dist/esm/basic-chart/basic-chart.js +73 -37
  52. package/dist/esm/components/editors/chart-editor-capabilities.d.ts +48 -0
  53. package/dist/esm/components/editors/chart-editor-capabilities.d.ts.map +1 -0
  54. package/dist/esm/components/editors/chart-editor-capabilities.js +58 -0
  55. package/dist/esm/components/editors/chart-editor.d.ts.map +1 -1
  56. package/dist/esm/components/editors/chart-editor.js +166 -448
  57. package/dist/esm/components/editors/fields/axis-options-fields.d.ts +16 -0
  58. package/dist/esm/components/editors/fields/axis-options-fields.d.ts.map +1 -0
  59. package/dist/esm/components/editors/fields/axis-options-fields.js +22 -0
  60. package/dist/esm/components/editors/fields/chart-type-options.d.ts +25 -0
  61. package/dist/esm/components/editors/fields/chart-type-options.d.ts.map +1 -0
  62. package/dist/esm/components/editors/fields/chart-type-options.js +151 -0
  63. package/dist/esm/components/editors/fields/data-labels-fields.d.ts +15 -0
  64. package/dist/esm/components/editors/fields/data-labels-fields.d.ts.map +1 -0
  65. package/dist/esm/components/editors/fields/data-labels-fields.js +47 -0
  66. package/dist/esm/components/editors/fields/primitives.d.ts +54 -0
  67. package/dist/esm/components/editors/fields/primitives.d.ts.map +1 -0
  68. package/dist/esm/components/editors/fields/primitives.js +26 -0
  69. package/dist/esm/components/editors/fields/series-format-fields.d.ts +17 -0
  70. package/dist/esm/components/editors/fields/series-format-fields.d.ts.map +1 -0
  71. package/dist/esm/components/editors/fields/series-format-fields.js +143 -0
  72. package/dist/esm/components/editors/fields/series-name-field.d.ts +16 -0
  73. package/dist/esm/components/editors/fields/series-name-field.d.ts.map +1 -0
  74. package/dist/esm/components/editors/fields/series-name-field.js +31 -0
  75. package/dist/esm/components/editors/fields/text-format-fields.d.ts +20 -0
  76. package/dist/esm/components/editors/fields/text-format-fields.d.ts.map +1 -0
  77. package/dist/esm/components/editors/fields/text-format-fields.js +34 -0
  78. package/dist/esm/config.d.ts.map +1 -1
  79. package/dist/esm/config.js +3 -0
  80. package/dist/esm/interface/create-chart.d.ts +3 -2
  81. package/dist/esm/interface/create-chart.d.ts.map +1 -1
  82. package/dist/esm/interface/create-chart.js +8 -1
  83. package/dist/esm/plotly/basic-chart/basic-chart.d.ts.map +1 -1
  84. package/dist/esm/plotly/basic-chart/basic-chart.js +52 -30
  85. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  86. package/dist/esm/utils/chart-orientation.d.ts.map +1 -1
  87. package/dist/esm/utils/chart-orientation.js +20 -0
  88. package/dist/esm/utils/chart-spec-utils.d.ts.map +1 -1
  89. package/dist/esm/utils/chart-spec-utils.js +95 -8
  90. package/dist/esm/utils/echarts-overlays.d.ts +2 -0
  91. package/dist/esm/utils/echarts-overlays.d.ts.map +1 -1
  92. package/dist/esm/utils/echarts-overlays.js +15 -1
  93. package/dist/esm/utils/series-name.d.ts +12 -0
  94. package/dist/esm/utils/series-name.d.ts.map +1 -0
  95. package/dist/esm/utils/series-name.js +24 -0
  96. package/dist/esm/utils/trendline.d.ts +9 -0
  97. package/dist/esm/utils/trendline.d.ts.map +1 -1
  98. package/dist/esm/utils/trendline.js +14 -0
  99. package/package.json +3 -3
@@ -18,27 +18,28 @@ var axis_number_format_1 = require("../utils/axis-number-format");
18
18
  var bar_layout_1 = require("../utils/bar-layout");
19
19
  var boxplot_1 = require("../utils/boxplot");
20
20
  var bubble_1 = require("../utils/bubble");
21
- var chart_spec_utils_1 = require("../utils/chart-spec-utils");
22
- var chart_orientation_1 = require("../utils/chart-orientation");
21
+ var category_levels_1 = require("../utils/category-levels");
23
22
  var chart_image_1 = require("../utils/chart-image");
23
+ var chart_orientation_1 = require("../utils/chart-orientation");
24
+ var chart_spec_utils_1 = require("../utils/chart-spec-utils");
24
25
  var chart_styles_1 = require("../utils/chart-styles");
26
+ var doughnut_1 = require("../utils/doughnut");
27
+ var echarts_gl_loader_1 = require("../utils/echarts-gl-loader");
25
28
  var echarts_overlays_1 = require("../utils/echarts-overlays");
26
29
  var empty_cells_1 = require("../utils/empty-cells");
27
- var echarts_gl_loader_1 = require("../utils/echarts-gl-loader");
28
- var category_levels_1 = require("../utils/category-levels");
29
30
  var gradient_1 = require("../utils/gradient");
30
31
  var hierarchy_1 = require("../utils/hierarchy");
31
32
  var histogram_1 = require("../utils/histogram");
32
33
  var legend_layout_1 = require("../utils/legend-layout");
33
34
  var of_pie_1 = require("../utils/of-pie");
34
- var doughnut_1 = require("../utils/doughnut");
35
35
  var overrides_1 = require("../utils/overrides");
36
+ var pie_explosion_1 = require("../utils/pie-explosion");
36
37
  var radar_1 = require("../utils/radar");
37
38
  var region_map_1 = require("../utils/region-map");
38
39
  var region_map_loader_1 = require("../utils/region-map-loader");
39
- var stock_1 = require("../utils/stock");
40
- var pie_explosion_1 = require("../utils/pie-explosion");
41
40
  var series_click_1 = require("../utils/series-click");
41
+ var series_name_1 = require("../utils/series-name");
42
+ var stock_1 = require("../utils/stock");
42
43
  var three_d_1 = require("../utils/three-d");
43
44
  var waterfall_1 = require("../utils/waterfall");
44
45
  var webgl_1 = require("../utils/webgl");
@@ -428,11 +429,11 @@ var BasicChart = function (_a) {
428
429
  * Triggers a chart update
429
430
  */
430
431
  var updateChart = function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
431
- var threeDRenderKind, canRender3D, willRender3D, isRegionMap, regionSpec, geoScope, geo, labels, seriesEntry, values, _a, data, unmatched, min, max, textColor, ramp, noDataColor, borderColor, regionSeriesLabel, seriesName, chartDomains, chartSeries, legend, chartType, position, showAxis, isBubble, isHierarchy, skipHeaders_1, labelValues, perSeriesX, perSeriesSize, seriesInputs, i, seriesEntry, resolvedLabel, _b, xValues, sizeValues_1, sharedXValues, sharedSizeValues, _c, categories_1, preparedSeries, sizeValues, sizeScale_1, bubblePalette_1, bubbleItemColor_1, hasBubbleSecondaryAxis, xAxisConfig, tooltipFormatter, bubbleSeriesLabelFor_1, bubbleSeries, bubbleOverlays, bubbleLegend, bubbleBand, hierarchyRows, headerTitle, hierarchyPalette, isTreemap, banner, hierarchyData, rootName, drillDown, seriesDisplayName, hierarchyDepth, levels, hierarchyLegend, legendShown, categoryLegendSeries, sizeNumberFormat_1, tooltipFormatter, hierarchyDataLabels, hierarchyLabelOpts, hierarchyLabel, hierarchyBand, isContour, categories_2, contourSeriesInputs, _d, _e, seriesEntry, dataLabel, _f, _g, values, e_1_1, seriesNames_1, contourPoints, _h, zMin, zMax, contourFormats_1, contourLabel, categories_3, threeDSeriesInputs, _j, _k, seriesEntry, dataLabel, _l, _m, values, e_2_1, seriesNames_2, threeDPalette_1, seriesColorAt_1, categoryAxisLabel, seriesAxisLabel, stackedBar3D_1, threeDFormats_1, threeDTooltipFormatter, threeDSeries, visualMap, xAxis3D, yAxis3D, categoryCount, categoryTotals_1, threeDSeriesInputs_1, threeDSeriesInputs_1_1, entry, isPercent_1, surfacePoints, _o, zMin, zMax, skipHeaders, categories, radarSeriesInputs, _p, _q, seriesEntry, label, values, radarAxisOptions_1, indicators_1, radarData, radarStyle_1, radarColors_1, radarFormats_1, radarDataLabels_1, radarSeriesLabelFor_1, radarTooltipFormatter, radarLegend, radarBand, radarPlotWidth, radarPlotHeight, radarGeometry, variant_1, categories, seriesValues, stockFormats_1, stockRoleIndex_1, stockFormatFor_1, stockDataLabels_1, stockSeriesLabelFor_1, upColor_1, downColor_1, volumePoints, hasVolume, stockGrid, baseStockXAxis, stockXAxis, volumeYAxis, volumeSeries, stockAxisPointer, candleData, lineSeries, stockColors_1, isStacked, isCircularChart, isOfPie, ofPieLayout, isHorizontalBarChart, shouldAggregate, primaryDomainSource, rawPrimaryDomainValues, aggregateDomainValues, categoryLevels, pushSeriesOverlays, sideBySideBarCount, specBarGap, specBarCategoryGap, seriesPalette, paletteColorAt, _loop_1, _r, _s, _t, specSeriesIndex, series, e_3_1, labels, seriesEntry, rawValues, _u, main_1, secondary, otherTotal, total, ofPieType_1, secondScale, halfAngle_1, hasSecondary, MAIN_CX_1, CY_1, MAIN_RADIUS_PCT_1, SECONDARY_CX_1, secondaryRadiusPct_1, BAR_LEFT_1, BAR_RIGHT, barHalfFrac_1, ofPiePalette_1, paletteAt_1, connectorColor_1, primaryDomainSource_1, rawDomainValues, labels, seriesEntry, rawValues_1, totalIndices, steps, accent_1, decreaseColor_1, totalColor_1, pointColors_1, _v, _w, dp, connectors, primaryDomainSource_2, rawDomainValues, labels_1, seriesEntry, rawValues, funnelPalette, funnelColor_1, stageColors_1, _x, _y, dp, funnelData, funnelLayout, funnelLabelsOff, quartileMethod_1, showOutliers_1, showMeanMarker_1, showInnerPoints_1, showMeanLine_1, boxDomainSource, boxCategories_2, grouped_1, groups_1, boxCategories_1, boxCategories_1_1, c, boxSeriesSpecs, slots_1, boxGap, boxPlotWidth, boxBand, boxWidthMax_1, boxCount_1, slotX_1, boxLegend_1, rawValues, histogramDomainSource, histogramCategories, _z, labels, counts, isPareto_1, cumulativePercents, pareto, histogramSeries, histogramColor, paretoLineColor, renderedSeriesCount, replaceMerge, valueAxisBase, isPareto, hasSecondaryAxis, isPercentStackedBars, primaryAxisNumberFormat, secondaryAxisNumberFormat, axisNumberFormatFor, seriesNumberFormats, seriesNumberFormatFor, tooltipConfig, finalLegend, bottomAxisNameGap, legendBand, positionedLegend, gridConfig, chartDataLabels, seriesLabelOptionFor, isDoughnut, doughnutHoleSize, doughnutSeriesOrder, doughnutRingSet, explosion, explosionOffset, barSeries, len, categoryTotals_2, barSeries_1, barSeries_1_1, s, i, raw, n, barSeries_2, barSeries_2_1, s, seriesWithLabels;
432
- var e_1, _0, e_2, _1, e_4, _2, e_5, _3, e_3, _4, e_6, _5, e_7, _6, e_8, _7, e_9, _8, e_10, _9;
433
- var _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175, _176, _177, _178, _179, _180;
434
- return tslib_1.__generator(this, function (_181) {
435
- switch (_181.label) {
432
+ 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 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;
434
+ 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;
435
+ return tslib_1.__generator(this, function (_188) {
436
+ switch (_188.label) {
436
437
  case 0:
437
438
  (0, utils_1.debug)("Updating chart", chart);
438
439
  threeDRenderKind = (0, three_d_1.resolve3DRenderKind)(spec.sourceChartType);
@@ -456,7 +457,7 @@ var BasicChart = function (_a) {
456
457
  // Leaving 3-D (spec edit) — the grid3D option doesn't merge back
457
458
  // into a cartesian one, so re-initialize from a clean slate and
458
459
  // let the normal 2-D flow below do a full structural render.
459
- (_10 = chartRef.current) === null || _10 === void 0 ? void 0 : _10.dispose();
460
+ (_12 = chartRef.current) === null || _12 === void 0 ? void 0 : _12.dispose();
460
461
  chartRef.current = undefined;
461
462
  renderedIn3D.current = false;
462
463
  previousChartType.current = undefined;
@@ -470,7 +471,7 @@ var BasicChart = function (_a) {
470
471
  // doesn't merge back into a cartesian one, so re-initialize from
471
472
  // a clean slate and let the normal flow below do a full
472
473
  // structural render.
473
- (_11 = chartRef.current) === null || _11 === void 0 ? void 0 : _11.dispose();
474
+ (_13 = chartRef.current) === null || _13 === void 0 ? void 0 : _13.dispose();
474
475
  chartRef.current = undefined;
475
476
  renderedAsRegionMap.current = false;
476
477
  previousChartType.current = undefined;
@@ -483,7 +484,7 @@ var BasicChart = function (_a) {
483
484
  geoScope = (0, region_map_1.resolveGeoScope)(regionSpec.geoScope);
484
485
  return [4 /*yield*/, (0, region_map_loader_1.loadRegionMapGeo)(geoScope)];
485
486
  case 1:
486
- geo = _181.sent();
487
+ geo = _188.sent();
487
488
  // Entering the region map from a cartesian render: the previous
488
489
  // grid/axis option doesn't merge into the map one, so start from
489
490
  // a bare instance (theme options are re-applied after setOption).
@@ -498,7 +499,7 @@ var BasicChart = function (_a) {
498
499
  if (!geo) {
499
500
  // Map asset failed to load (or unknown scope) — the loader
500
501
  // already warned once; render an empty chart, never crash.
501
- (_12 = chartRef.current) === null || _12 === void 0 ? void 0 : _12.setOption({ series: [] }, { replaceMerge: ["series", "visualMap"] });
502
+ (_14 = chartRef.current) === null || _14 === void 0 ? void 0 : _14.setOption({ series: [] }, { replaceMerge: ["series", "visualMap"] });
502
503
  renderedAsRegionMap.current = true;
503
504
  applyThemeOptions();
504
505
  previousChartType.current = spec.chartType;
@@ -506,7 +507,7 @@ var BasicChart = function (_a) {
506
507
  return [2 /*return*/];
507
508
  }
508
509
  labels = flattenChartDataValues(regionSpec.domains, getDomainValuesFromRange, regionSpec.hiddenDimensionStrategy, false);
509
- seriesEntry = (_13 = regionSpec.series) === null || _13 === void 0 ? void 0 : _13[0];
510
+ seriesEntry = (_15 = regionSpec.series) === null || _15 === void 0 ? void 0 : _15[0];
510
511
  values = seriesEntry
511
512
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, regionSpec.hiddenDimensionStrategy)
512
513
  : [];
@@ -519,10 +520,10 @@ var BasicChart = function (_a) {
519
520
  : "rgba(0,0,0,0.06)";
520
521
  borderColor = isDarkMode ? "rgba(255,255,255,0.3)" : "#FFFFFF";
521
522
  regionSeriesLabel = (0, overrides_1.buildSeriesLabelOption)(spec.dataLabels, undefined, locale);
522
- seriesName = (seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
523
+ seriesName = (_16 = (0, series_name_1.linkedSeriesName)(seriesEntry, getDomainValuesFromRange)) !== null && _16 !== void 0 ? _16 : ((seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
523
524
  ? seriesEntry.dataLabel
524
- : "";
525
- (_14 = chartRef.current) === null || _14 === void 0 ? void 0 : _14.setOption({
525
+ : "");
526
+ (_17 = chartRef.current) === null || _17 === void 0 ? void 0 : _17.setOption({
526
527
  // The visualMap color scale is the value legend; the series
527
528
  // legend stays hidden unless an authored override turns it on.
528
529
  legend: (0, overrides_1.applyLegendOverrides)(tslib_1.__assign(tslib_1.__assign({}, defaultLegendConfig), { show: false }), spec.legend),
@@ -590,36 +591,37 @@ var BasicChart = function (_a) {
590
591
  hierarchyTitleRef.current = explicitChartTitle;
591
592
  skipHeaders_1 = spec.useFirstRowAsHeaders !== false;
592
593
  labelValues = flattenChartDataValues(spec.bubbleLabels, getDomainValuesFromRange, spec.hiddenDimensionStrategy, skipHeaders_1);
593
- perSeriesX = ((_15 = spec.domains) !== null && _15 !== void 0 ? _15 : []).map(function (dom) {
594
+ perSeriesX = ((_18 = spec.domains) !== null && _18 !== void 0 ? _18 : []).map(function (dom) {
594
595
  return flattenChartDataValues([dom], getSeriesValuesFromRange, spec.hiddenDimensionStrategy, skipHeaders_1);
595
596
  });
596
- perSeriesSize = ((_16 = spec.bubbleSizes) !== null && _16 !== void 0 ? _16 : []).map(function (sz) {
597
+ perSeriesSize = ((_19 = spec.bubbleSizes) !== null && _19 !== void 0 ? _19 : []).map(function (sz) {
597
598
  return flattenChartDataValues([sz], getSeriesValuesFromRange, spec.hiddenDimensionStrategy, skipHeaders_1);
598
599
  });
599
600
  seriesInputs = [];
600
601
  i = 0;
601
- _181.label = 3;
602
+ _188.label = 3;
602
603
  case 3:
603
604
  if (!(i < spec.series.length)) return [3 /*break*/, 7];
604
605
  seriesEntry = spec.series[i];
605
- resolvedLabel = (_17 = seriesEntry.dataLabel) !== null && _17 !== void 0 ? _17 : "";
606
- if (!(resolvedLabel && (0, utils_1.isAFormula)(resolvedLabel))) return [3 /*break*/, 5];
606
+ linkedLabel = (0, series_name_1.linkedSeriesName)(seriesEntry, getDomainValuesFromRange);
607
+ resolvedLabel = (_20 = linkedLabel !== null && linkedLabel !== void 0 ? linkedLabel : seriesEntry.dataLabel) !== null && _20 !== void 0 ? _20 : "";
608
+ if (!(linkedLabel === undefined && resolvedLabel && (0, utils_1.isAFormula)(resolvedLabel))) return [3 /*break*/, 5];
607
609
  _b = chart_spec_utils_1.coerceCalculatedLabel;
608
- return [4 /*yield*/, onRequestCalculate(resolvedLabel, (_18 = position.sheetId) !== null && _18 !== void 0 ? _18 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
610
+ return [4 /*yield*/, onRequestCalculate(resolvedLabel, (_21 = position.sheetId) !== null && _21 !== void 0 ? _21 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
609
611
  case 4:
610
- resolvedLabel = _b.apply(void 0, [_181.sent()]);
611
- _181.label = 5;
612
+ resolvedLabel = _b.apply(void 0, [_188.sent()]);
613
+ _188.label = 5;
612
614
  case 5:
613
- xValues = (_19 = perSeriesX[i]) !== null && _19 !== void 0 ? _19 : perSeriesX[0];
614
- sizeValues_1 = (_20 = perSeriesSize[i]) !== null && _20 !== void 0 ? _20 : perSeriesSize[0];
615
+ xValues = (_22 = perSeriesX[i]) !== null && _22 !== void 0 ? _22 : perSeriesX[0];
616
+ sizeValues_1 = (_23 = perSeriesSize[i]) !== null && _23 !== void 0 ? _23 : perSeriesSize[0];
615
617
  seriesInputs.push(tslib_1.__assign(tslib_1.__assign({ name: resolvedLabel, values: flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy, skipHeaders_1) }, (xValues ? { xValues: xValues } : {})), (sizeValues_1 ? { sizeValues: sizeValues_1 } : {})));
616
- _181.label = 6;
618
+ _188.label = 6;
617
619
  case 6:
618
620
  i++;
619
621
  return [3 /*break*/, 3];
620
622
  case 7:
621
- sharedXValues = (_21 = perSeriesX[0]) !== null && _21 !== void 0 ? _21 : [];
622
- sharedSizeValues = (_22 = perSeriesSize[0]) !== null && _22 !== void 0 ? _22 : [];
623
+ sharedXValues = (_24 = perSeriesX[0]) !== null && _24 !== void 0 ? _24 : [];
624
+ sharedSizeValues = (_25 = perSeriesSize[0]) !== null && _25 !== void 0 ? _25 : [];
623
625
  _c = (0, bubble_1.prepareBubbleSeriesData)({
624
626
  xValues: sharedXValues,
625
627
  labelValues: labelValues,
@@ -663,18 +665,18 @@ var BasicChart = function (_a) {
663
665
  ? function (params) { var _a, _b; return (_b = overrides.get((_a = params === null || params === void 0 ? void 0 : params.data) === null || _a === void 0 ? void 0 : _a.index)) !== null && _b !== void 0 ? _b : base; }
664
666
  : base;
665
667
  };
666
- hasBubbleSecondaryAxis = ((_23 = spec.series) !== null && _23 !== void 0 ? _23 : []).some(function (seriesEntry) { return seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.useSecondaryAxis; });
668
+ hasBubbleSecondaryAxis = ((_26 = spec.series) !== null && _26 !== void 0 ? _26 : []).some(function (seriesEntry) { return seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.useSecondaryAxis; });
667
669
  xAxisConfig = categories_1.length > 0
668
670
  ? {
669
671
  type: "category",
670
672
  data: categories_1,
671
- name: (_24 = spec.horizontalAxisTitle) !== null && _24 !== void 0 ? _24 : "",
673
+ name: (_27 = spec.horizontalAxisTitle) !== null && _27 !== void 0 ? _27 : "",
672
674
  nameLocation: "middle",
673
675
  nameGap: 30,
674
676
  }
675
677
  : {
676
678
  type: "value",
677
- name: (_25 = spec.horizontalAxisTitle) !== null && _25 !== void 0 ? _25 : "",
679
+ name: (_28 = spec.horizontalAxisTitle) !== null && _28 !== void 0 ? _28 : "",
678
680
  nameLocation: "middle",
679
681
  nameGap: 30,
680
682
  };
@@ -758,27 +760,27 @@ var BasicChart = function (_a) {
758
760
  });
759
761
  bubbleLegend = (0, overrides_1.applyLegendOverrides)(tslib_1.__assign(tslib_1.__assign({}, legend), { show: preparedSeries.length > 1, data: preparedSeries.map(function (entry) { return entry.name; }) }), spec.legend);
760
762
  bubbleBand = (0, legend_layout_1.reserveEchartsLegendBand)({
761
- position: (_26 = spec.legend) === null || _26 === void 0 ? void 0 : _26.position,
763
+ position: (_29 = spec.legend) === null || _29 === void 0 ? void 0 : _29.position,
762
764
  visible: bubbleLegend.show !== false,
763
765
  labels: preparedSeries.map(function (entry) { return entry.name; }),
764
- legendFontSize: (_31 = (_28 = (_27 = bubbleLegend.textStyle) === null || _27 === void 0 ? void 0 : _27.fontSize) !== null && _28 !== void 0 ? _28 : (_30 = (_29 = spec.legend) === null || _29 === void 0 ? void 0 : _29.textFormat) === null || _30 === void 0 ? void 0 : _30.fontSize) !== null && _31 !== void 0 ? _31 : 12,
766
+ legendFontSize: (_34 = (_31 = (_30 = bubbleLegend.textStyle) === null || _30 === void 0 ? void 0 : _30.fontSize) !== null && _31 !== void 0 ? _31 : (_33 = (_32 = spec.legend) === null || _32 === void 0 ? void 0 : _32.textFormat) === null || _33 === void 0 ? void 0 : _33.fontSize) !== null && _34 !== void 0 ? _34 : 12,
765
767
  legendItemWidth: defaultLegendConfig.itemWidth,
766
768
  width: width !== null && width !== void 0 ? width : 0,
767
769
  height: height !== null && height !== void 0 ? height : 0,
768
770
  hasTitle: Boolean(explicitChartTitle),
769
- titleFontSize: (_33 = (_32 = spec.titleTextFormat) === null || _32 === void 0 ? void 0 : _32.fontSize) !== null && _33 !== void 0 ? _33 : 16,
771
+ titleFontSize: (_36 = (_35 = spec.titleTextFormat) === null || _35 === void 0 ? void 0 : _35.fontSize) !== null && _36 !== void 0 ? _36 : 16,
770
772
  hasBottomAxisTitle: Boolean(spec.horizontalAxisTitle),
771
773
  bottomAxisNameGap: 30,
772
774
  hasLeftAxisTitle: Boolean(spec.verticalAxisTitle),
773
775
  });
774
- (_34 = chartRef.current) === null || _34 === void 0 ? void 0 : _34.setOption({
776
+ (_37 = chartRef.current) === null || _37 === void 0 ? void 0 : _37.setOption({
775
777
  xAxis: [
776
778
  (0, overrides_1.applyAxisOverrides)(tslib_1.__assign({}, xAxisConfig), spec.categoryAxisOptions),
777
779
  ],
778
780
  yAxis: tslib_1.__spreadArray([
779
781
  (0, overrides_1.applyAxisOverrides)({
780
782
  type: "value",
781
- name: (_35 = spec.verticalAxisTitle) !== null && _35 !== void 0 ? _35 : "",
783
+ name: (_38 = spec.verticalAxisTitle) !== null && _38 !== void 0 ? _38 : "",
782
784
  nameLocation: "middle",
783
785
  nameGap: 45,
784
786
  }, spec.valueAxisOptions, undefined, locale)
@@ -839,9 +841,9 @@ var BasicChart = function (_a) {
839
841
  isTreemap = spec.chartType === "treemap";
840
842
  banner = isTreemap && treemapBannerShown(spec.parentLabelLayout);
841
843
  hierarchyData = colorHierarchyNodes((0, hierarchy_1.buildHierarchyTree)(hierarchyRows), hierarchyPalette, { banner: banner });
842
- rootName = hierarchyData.length === 1 ? (_37 = (_36 = hierarchyData[0]) === null || _36 === void 0 ? void 0 : _36.name) !== null && _37 !== void 0 ? _37 : "" : "";
844
+ rootName = hierarchyData.length === 1 ? (_40 = (_39 = hierarchyData[0]) === null || _39 === void 0 ? void 0 : _39.name) !== null && _40 !== void 0 ? _40 : "" : "";
843
845
  drillDown = Boolean(spec.drillDown);
844
- seriesDisplayName = (_39 = (_38 = explicitChartTitle !== null && explicitChartTitle !== void 0 ? explicitChartTitle : headerTitle) !== null && _38 !== void 0 ? _38 : rootName) !== null && _39 !== void 0 ? _39 : "";
846
+ seriesDisplayName = (_42 = (_41 = explicitChartTitle !== null && explicitChartTitle !== void 0 ? explicitChartTitle : headerTitle) !== null && _41 !== void 0 ? _41 : rootName) !== null && _42 !== void 0 ? _42 : "";
845
847
  hierarchyDepth = getHierarchyDepth(hierarchyData);
846
848
  levels = buildHierarchyLevels(hierarchyDepth, {
847
849
  treemap: isTreemap,
@@ -863,7 +865,7 @@ var BasicChart = function (_a) {
863
865
  });
864
866
  })
865
867
  : [];
866
- sizeNumberFormat_1 = (0, axis_number_format_1.resolveSourceNumberFormat)((_41 = (_40 = spec.sizeData) === null || _40 === void 0 ? void 0 : _40[0]) === null || _41 === void 0 ? void 0 : _41.sources, getFormattingFromRange, spec.hiddenDimensionStrategy);
868
+ sizeNumberFormat_1 = (0, axis_number_format_1.resolveSourceNumberFormat)((_44 = (_43 = spec.sizeData) === null || _43 === void 0 ? void 0 : _43[0]) === null || _44 === void 0 ? void 0 : _44.sources, getFormattingFromRange, spec.hiddenDimensionStrategy);
867
869
  tooltipFormatter = function (params) {
868
870
  var _a;
869
871
  var value = Array.isArray(params.value)
@@ -879,20 +881,20 @@ var BasicChart = function (_a) {
879
881
  : (hierarchyLabelOpts === null || hierarchyLabelOpts === void 0 ? void 0 : hierarchyLabelOpts.show)
880
882
  ? tslib_1.__assign({ show: true, formatter: (0, overrides_1.dataLabelFormatter)(hierarchyLabelOpts, locale, isTreemap ? "\n" : ": ") }, (isTreemap ? { position: "insideBottomLeft" } : {})) : tslib_1.__assign({ show: true, formatter: "{b}" }, (isTreemap ? { position: "insideBottomLeft" } : {}));
881
883
  hierarchyBand = (0, legend_layout_1.reserveEchartsLegendBand)({
882
- position: (_42 = spec.legend) === null || _42 === void 0 ? void 0 : _42.position,
884
+ position: (_45 = spec.legend) === null || _45 === void 0 ? void 0 : _45.position,
883
885
  visible: legendShown && hierarchyData.length > 0,
884
886
  labels: hierarchyData.map(function (node) { return node.name; }),
885
- legendFontSize: (_47 = (_44 = (_43 = hierarchyLegend.textStyle) === null || _43 === void 0 ? void 0 : _43.fontSize) !== null && _44 !== void 0 ? _44 : (_46 = (_45 = spec.legend) === null || _45 === void 0 ? void 0 : _45.textFormat) === null || _46 === void 0 ? void 0 : _46.fontSize) !== null && _47 !== void 0 ? _47 : 12,
887
+ legendFontSize: (_50 = (_47 = (_46 = hierarchyLegend.textStyle) === null || _46 === void 0 ? void 0 : _46.fontSize) !== null && _47 !== void 0 ? _47 : (_49 = (_48 = spec.legend) === null || _48 === void 0 ? void 0 : _48.textFormat) === null || _49 === void 0 ? void 0 : _49.fontSize) !== null && _50 !== void 0 ? _50 : 12,
886
888
  legendItemWidth: defaultLegendConfig.itemWidth,
887
889
  width: width !== null && width !== void 0 ? width : 0,
888
890
  height: height !== null && height !== void 0 ? height : 0,
889
891
  hasTitle: Boolean(explicitChartTitle !== null && explicitChartTitle !== void 0 ? explicitChartTitle : headerTitle),
890
- titleFontSize: (_49 = (_48 = spec.titleTextFormat) === null || _48 === void 0 ? void 0 : _48.fontSize) !== null && _49 !== void 0 ? _49 : 16,
892
+ titleFontSize: (_52 = (_51 = spec.titleTextFormat) === null || _51 === void 0 ? void 0 : _51.fontSize) !== null && _52 !== void 0 ? _52 : 16,
891
893
  hasBottomAxisTitle: false,
892
894
  bottomAxisNameGap: 0,
893
895
  hasLeftAxisTitle: false,
894
896
  });
895
- (_50 = chartRef.current) === null || _50 === void 0 ? void 0 : _50.setOption({
897
+ (_53 = chartRef.current) === null || _53 === void 0 ? void 0 : _53.setOption({
896
898
  xAxis: [
897
899
  {
898
900
  type: "category",
@@ -964,7 +966,7 @@ var BasicChart = function (_a) {
964
966
  }
965
967
  isContour = (0, three_d_1.isContourSpec)(spec);
966
968
  if (renderedAsContour.current && !isContour) {
967
- (_51 = chartRef.current) === null || _51 === void 0 ? void 0 : _51.dispose();
969
+ (_54 = chartRef.current) === null || _54 === void 0 ? void 0 : _54.dispose();
968
970
  chartRef.current = undefined;
969
971
  renderedAsContour.current = false;
970
972
  previousChartType.current = undefined;
@@ -972,51 +974,58 @@ var BasicChart = function (_a) {
972
974
  initializeChart();
973
975
  applyThemeOptions();
974
976
  }
975
- if (!isContour) return [3 /*break*/, 19];
977
+ if (!isContour) return [3 /*break*/, 21];
976
978
  categories_2 = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, false).map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
977
979
  contourSeriesInputs = [];
978
- _181.label = 9;
980
+ _188.label = 9;
979
981
  case 9:
980
- _181.trys.push([9, 16, 17, 18]);
981
- _d = tslib_1.__values((_52 = spec.series) !== null && _52 !== void 0 ? _52 : []), _e = _d.next();
982
- _181.label = 10;
982
+ _188.trys.push([9, 18, 19, 20]);
983
+ _d = tslib_1.__values((_55 = spec.series) !== null && _55 !== void 0 ? _55 : []), _e = _d.next();
984
+ _188.label = 10;
983
985
  case 10:
984
- if (!!_e.done) return [3 /*break*/, 15];
986
+ if (!!_e.done) return [3 /*break*/, 17];
985
987
  seriesEntry = _e.value;
986
- if (!(!(0, utils_1.isNil)(seriesEntry.dataLabel) && (0, utils_1.isAFormula)(seriesEntry.dataLabel))) return [3 /*break*/, 12];
987
- _g = chart_spec_utils_1.coerceCalculatedLabel;
988
- return [4 /*yield*/, onRequestCalculate(seriesEntry.dataLabel, (_53 = position.sheetId) !== null && _53 !== void 0 ? _53 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
988
+ if (!((_56 = (0, series_name_1.linkedSeriesName)(seriesEntry, getDomainValuesFromRange)) !== null && _56 !== void 0)) return [3 /*break*/, 11];
989
+ _f = _56;
990
+ return [3 /*break*/, 15];
989
991
  case 11:
990
- _f = _g.apply(void 0, [_181.sent()]);
991
- return [3 /*break*/, 13];
992
+ if (!(!(0, utils_1.isNil)(seriesEntry.dataLabel) && (0, utils_1.isAFormula)(seriesEntry.dataLabel))) return [3 /*break*/, 13];
993
+ _h = chart_spec_utils_1.coerceCalculatedLabel;
994
+ return [4 /*yield*/, onRequestCalculate(seriesEntry.dataLabel, (_57 = position.sheetId) !== null && _57 !== void 0 ? _57 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
992
995
  case 12:
993
- _f = (_54 = seriesEntry.dataLabel) !== null && _54 !== void 0 ? _54 : "";
994
- _181.label = 13;
996
+ _g = _h.apply(void 0, [_188.sent()]);
997
+ return [3 /*break*/, 14];
995
998
  case 13:
999
+ _g = (_58 = seriesEntry.dataLabel) !== null && _58 !== void 0 ? _58 : "";
1000
+ _188.label = 14;
1001
+ case 14:
1002
+ _f = (_g);
1003
+ _188.label = 15;
1004
+ case 15:
996
1005
  dataLabel = _f;
997
1006
  values = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(sanitizeChartValue);
998
1007
  contourSeriesInputs.push({ name: dataLabel, values: values });
999
- _181.label = 14;
1000
- case 14:
1008
+ _188.label = 16;
1009
+ case 16:
1001
1010
  _e = _d.next();
1002
1011
  return [3 /*break*/, 10];
1003
- case 15: return [3 /*break*/, 18];
1004
- case 16:
1005
- e_1_1 = _181.sent();
1012
+ case 17: return [3 /*break*/, 20];
1013
+ case 18:
1014
+ e_1_1 = _188.sent();
1006
1015
  e_1 = { error: e_1_1 };
1007
- return [3 /*break*/, 18];
1008
- case 17:
1016
+ return [3 /*break*/, 20];
1017
+ case 19:
1009
1018
  try {
1010
- if (_e && !_e.done && (_0 = _d.return)) _0.call(_d);
1019
+ if (_e && !_e.done && (_2 = _d.return)) _2.call(_d);
1011
1020
  }
1012
1021
  finally { if (e_1) throw e_1.error; }
1013
1022
  return [7 /*endfinally*/];
1014
- case 18:
1023
+ case 20:
1015
1024
  seriesNames_1 = contourSeriesInputs.map(function (entry, index) { return entry.name || "Series ".concat(index + 1); });
1016
1025
  contourPoints = (0, three_d_1.buildContourData)(contourSeriesInputs);
1017
- _h = tslib_1.__read((0, three_d_1.getValueExtent)(contourPoints.filter(function (point) {
1026
+ _j = tslib_1.__read((0, three_d_1.getValueExtent)(contourPoints.filter(function (point) {
1018
1027
  return typeof point[2] === "number";
1019
- })), 2), zMin = _h[0], zMax = _h[1];
1028
+ })), 2), zMin = _j[0], zMax = _j[1];
1020
1029
  contourFormats_1 = (0, axis_number_format_1.resolveSeriesNumberFormats)(spec.series, getFormattingFromRange, spec.hiddenDimensionStrategy);
1021
1030
  contourLabel = (0, overrides_1.buildSeriesLabelOption)(spec.dataLabels, undefined, locale);
1022
1031
  if (!renderedAsContour.current && chartRef.current) {
@@ -1027,7 +1036,7 @@ var BasicChart = function (_a) {
1027
1036
  chartRef.current = echarts.init(el.current);
1028
1037
  bindSeriesSelection(chartRef.current);
1029
1038
  }
1030
- (_55 = chartRef.current) === null || _55 === void 0 ? void 0 : _55.setOption({
1039
+ (_59 = chartRef.current) === null || _59 === void 0 ? void 0 : _59.setOption({
1031
1040
  tooltip: {
1032
1041
  textStyle: { fontSize: 12 },
1033
1042
  trigger: "item",
@@ -1047,7 +1056,7 @@ var BasicChart = function (_a) {
1047
1056
  type: "category",
1048
1057
  data: categories_2,
1049
1058
  splitArea: { show: true },
1050
- name: (_56 = spec.horizontalAxisTitle) !== null && _56 !== void 0 ? _56 : "",
1059
+ name: (_60 = spec.horizontalAxisTitle) !== null && _60 !== void 0 ? _60 : "",
1051
1060
  nameLocation: "middle",
1052
1061
  nameGap: 30,
1053
1062
  }, spec.categoryAxisOptions),
@@ -1057,7 +1066,7 @@ var BasicChart = function (_a) {
1057
1066
  type: "category",
1058
1067
  data: seriesNames_1,
1059
1068
  splitArea: { show: true },
1060
- name: (_57 = spec.verticalAxisTitle) !== null && _57 !== void 0 ? _57 : "",
1069
+ name: (_61 = spec.verticalAxisTitle) !== null && _61 !== void 0 ? _61 : "",
1061
1070
  nameLocation: "middle",
1062
1071
  nameGap: 50,
1063
1072
  },
@@ -1106,47 +1115,54 @@ var BasicChart = function (_a) {
1106
1115
  previousChartType.current = spec.chartType;
1107
1116
  previousSeriesCount.current = 1;
1108
1117
  return [2 /*return*/];
1109
- case 19:
1110
- if (!(willRender3D && threeDRenderKind)) return [3 /*break*/, 30];
1118
+ case 21:
1119
+ if (!(willRender3D && threeDRenderKind)) return [3 /*break*/, 34];
1111
1120
  categories_3 = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, false).map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
1112
1121
  threeDSeriesInputs = [];
1113
- _181.label = 20;
1114
- case 20:
1115
- _181.trys.push([20, 27, 28, 29]);
1116
- _j = tslib_1.__values((_58 = spec.series) !== null && _58 !== void 0 ? _58 : []), _k = _j.next();
1117
- _181.label = 21;
1118
- case 21:
1119
- if (!!_k.done) return [3 /*break*/, 26];
1120
- seriesEntry = _k.value;
1121
- if (!(!(0, utils_1.isNil)(seriesEntry.dataLabel) && (0, utils_1.isAFormula)(seriesEntry.dataLabel))) return [3 /*break*/, 23];
1122
- _m = chart_spec_utils_1.coerceCalculatedLabel;
1123
- return [4 /*yield*/, onRequestCalculate(seriesEntry.dataLabel, (_59 = position.sheetId) !== null && _59 !== void 0 ? _59 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
1122
+ _188.label = 22;
1124
1123
  case 22:
1125
- _l = _m.apply(void 0, [_181.sent()]);
1126
- return [3 /*break*/, 24];
1124
+ _188.trys.push([22, 31, 32, 33]);
1125
+ _k = tslib_1.__values((_62 = spec.series) !== null && _62 !== void 0 ? _62 : []), _l = _k.next();
1126
+ _188.label = 23;
1127
1127
  case 23:
1128
- _l = (_60 = seriesEntry.dataLabel) !== null && _60 !== void 0 ? _60 : "";
1129
- _181.label = 24;
1128
+ if (!!_l.done) return [3 /*break*/, 30];
1129
+ seriesEntry = _l.value;
1130
+ if (!((_63 = (0, series_name_1.linkedSeriesName)(seriesEntry, getDomainValuesFromRange)) !== null && _63 !== void 0)) return [3 /*break*/, 24];
1131
+ _m = _63;
1132
+ return [3 /*break*/, 28];
1130
1133
  case 24:
1131
- dataLabel = _l;
1132
- values = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(sanitizeChartValue);
1133
- threeDSeriesInputs.push({ name: dataLabel, values: values });
1134
- _181.label = 25;
1134
+ if (!(!(0, utils_1.isNil)(seriesEntry.dataLabel) && (0, utils_1.isAFormula)(seriesEntry.dataLabel))) return [3 /*break*/, 26];
1135
+ _p = chart_spec_utils_1.coerceCalculatedLabel;
1136
+ return [4 /*yield*/, onRequestCalculate(seriesEntry.dataLabel, (_64 = position.sheetId) !== null && _64 !== void 0 ? _64 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
1135
1137
  case 25:
1136
- _k = _j.next();
1137
- return [3 /*break*/, 21];
1138
- case 26: return [3 /*break*/, 29];
1138
+ _o = _p.apply(void 0, [_188.sent()]);
1139
+ return [3 /*break*/, 27];
1140
+ case 26:
1141
+ _o = (_65 = seriesEntry.dataLabel) !== null && _65 !== void 0 ? _65 : "";
1142
+ _188.label = 27;
1139
1143
  case 27:
1140
- e_2_1 = _181.sent();
1141
- e_2 = { error: e_2_1 };
1142
- return [3 /*break*/, 29];
1144
+ _m = (_o);
1145
+ _188.label = 28;
1143
1146
  case 28:
1147
+ dataLabel = _m;
1148
+ values = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(sanitizeChartValue);
1149
+ threeDSeriesInputs.push({ name: dataLabel, values: values });
1150
+ _188.label = 29;
1151
+ case 29:
1152
+ _l = _k.next();
1153
+ return [3 /*break*/, 23];
1154
+ case 30: return [3 /*break*/, 33];
1155
+ case 31:
1156
+ e_2_1 = _188.sent();
1157
+ e_2 = { error: e_2_1 };
1158
+ return [3 /*break*/, 33];
1159
+ case 32:
1144
1160
  try {
1145
- if (_k && !_k.done && (_1 = _j.return)) _1.call(_j);
1161
+ if (_l && !_l.done && (_3 = _k.return)) _3.call(_k);
1146
1162
  }
1147
1163
  finally { if (e_2) throw e_2.error; }
1148
1164
  return [7 /*endfinally*/];
1149
- case 29:
1165
+ case 33:
1150
1166
  seriesNames_2 = threeDSeriesInputs.map(function (entry, index) { return entry.name || "Series ".concat(index + 1); });
1151
1167
  threeDPalette_1 = (0, chart_styles_1.getChartPalette)(spec, [
1152
1168
  theme.themeColors.accent1,
@@ -1216,7 +1232,7 @@ var BasicChart = function (_a) {
1216
1232
  catch (e_4_1) { e_4 = { error: e_4_1 }; }
1217
1233
  finally {
1218
1234
  try {
1219
- if (threeDSeriesInputs_1_1 && !threeDSeriesInputs_1_1.done && (_2 = threeDSeriesInputs_1.return)) _2.call(threeDSeriesInputs_1);
1235
+ if (threeDSeriesInputs_1_1 && !threeDSeriesInputs_1_1.done && (_4 = threeDSeriesInputs_1.return)) _4.call(threeDSeriesInputs_1);
1220
1236
  }
1221
1237
  finally { if (e_4) throw e_4.error; }
1222
1238
  }
@@ -1276,7 +1292,7 @@ var BasicChart = function (_a) {
1276
1292
  }
1277
1293
  else {
1278
1294
  surfacePoints = (0, three_d_1.buildSurfaceData)(threeDSeriesInputs);
1279
- _o = tslib_1.__read((0, three_d_1.getValueExtent)(surfacePoints), 2), zMin = _o[0], zMax = _o[1];
1295
+ _q = tslib_1.__read((0, three_d_1.getValueExtent)(surfacePoints), 2), zMin = _q[0], zMax = _q[1];
1280
1296
  xAxis3D = {
1281
1297
  type: "value",
1282
1298
  axisLabel: { formatter: categoryAxisLabel },
@@ -1306,12 +1322,12 @@ var BasicChart = function (_a) {
1306
1322
  inRange: { color: tslib_1.__spreadArray([], tslib_1.__read(three_d_1.SURFACE_COLOR_RAMP), false) },
1307
1323
  };
1308
1324
  }
1309
- (_61 = chartRef.current) === null || _61 === void 0 ? void 0 : _61.setOption(tslib_1.__assign(tslib_1.__assign({ tooltip: {
1325
+ (_66 = chartRef.current) === null || _66 === void 0 ? void 0 : _66.setOption(tslib_1.__assign(tslib_1.__assign({ tooltip: {
1310
1326
  textStyle: { fontSize: 12 },
1311
1327
  formatter: threeDTooltipFormatter,
1312
1328
  }, legend: threeDRenderKind === "line3D" || stackedBar3D_1
1313
1329
  ? (0, overrides_1.applyLegendOverrides)(tslib_1.__assign(tslib_1.__assign({}, defaultLegendConfig), { show: seriesNames_2.length > 1, data: seriesNames_2 }), spec.legend)
1314
- : { show: false }, xAxis3D: tslib_1.__assign(tslib_1.__assign({}, xAxis3D), { name: (_62 = spec.horizontalAxisTitle) !== null && _62 !== void 0 ? _62 : "" }), yAxis3D: tslib_1.__assign(tslib_1.__assign({}, yAxis3D), { name: "" }), zAxis3D: { type: "value", name: (_63 = spec.verticalAxisTitle) !== null && _63 !== void 0 ? _63 : "" }, grid3D: {
1330
+ : { show: false }, xAxis3D: tslib_1.__assign(tslib_1.__assign({}, xAxis3D), { name: (_67 = spec.horizontalAxisTitle) !== null && _67 !== void 0 ? _67 : "" }), yAxis3D: tslib_1.__assign(tslib_1.__assign({}, yAxis3D), { name: "" }), zAxis3D: { type: "value", name: (_68 = spec.verticalAxisTitle) !== null && _68 !== void 0 ? _68 : "" }, grid3D: {
1315
1331
  boxDepth: Math.max(20, Math.min(100, seriesNames_2.length * 20)),
1316
1332
  viewControl: { autoRotate: false },
1317
1333
  } }, (visualMap ? { visualMap: [visualMap] } : {})), { series: threeDSeries }), {
@@ -1332,7 +1348,7 @@ var BasicChart = function (_a) {
1332
1348
  previousChartType.current = spec.chartType;
1333
1349
  previousSeriesCount.current = threeDSeries.length;
1334
1350
  return [2 /*return*/];
1335
- case 30:
1351
+ case 34:
1336
1352
  // ---------------------------- Radar ----------------------------
1337
1353
  // Radar is polar: a top-level `radar.indicator` list (one axis per
1338
1354
  // category) plus one `radar`-type series carrying every data series'
@@ -1342,11 +1358,11 @@ var BasicChart = function (_a) {
1342
1358
  categories = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, skipHeaders);
1343
1359
  radarSeriesInputs = [];
1344
1360
  try {
1345
- for (_p = tslib_1.__values((_64 = spec.series) !== null && _64 !== void 0 ? _64 : []), _q = _p.next(); !_q.done; _q = _p.next()) {
1346
- seriesEntry = _q.value;
1347
- label = seriesEntry.dataLabel && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
1361
+ for (_r = tslib_1.__values((_69 = spec.series) !== null && _69 !== void 0 ? _69 : []), _s = _r.next(); !_s.done; _s = _r.next()) {
1362
+ seriesEntry = _s.value;
1363
+ label = (_70 = (0, series_name_1.linkedSeriesName)(seriesEntry, getDomainValuesFromRange)) !== null && _70 !== void 0 ? _70 : (seriesEntry.dataLabel && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
1348
1364
  ? seriesEntry.dataLabel
1349
- : "";
1365
+ : "");
1350
1366
  values = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); });
1351
1367
  radarSeriesInputs.push({ name: label, values: values });
1352
1368
  }
@@ -1354,14 +1370,14 @@ var BasicChart = function (_a) {
1354
1370
  catch (e_5_1) { e_5 = { error: e_5_1 }; }
1355
1371
  finally {
1356
1372
  try {
1357
- if (_q && !_q.done && (_3 = _p.return)) _3.call(_p);
1373
+ if (_s && !_s.done && (_5 = _r.return)) _5.call(_r);
1358
1374
  }
1359
1375
  finally { if (e_5) throw e_5.error; }
1360
1376
  }
1361
1377
  radarAxisOptions_1 = spec.valueAxisOptions;
1362
1378
  indicators_1 = (0, radar_1.buildRadarIndicators)(categories, radarSeriesInputs, radarAxisOptions_1);
1363
1379
  radarData = (0, radar_1.buildRadarSeriesData)(radarSeriesInputs, indicators_1.length);
1364
- radarStyle_1 = (_65 = spec.radarStyle) !== null && _65 !== void 0 ? _65 : "standard";
1380
+ radarStyle_1 = (_71 = spec.radarStyle) !== null && _71 !== void 0 ? _71 : "standard";
1365
1381
  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; });
1366
1382
  radarFormats_1 = (0, axis_number_format_1.resolveSeriesNumberFormats)(spec.series, getFormattingFromRange, spec.hiddenDimensionStrategy);
1367
1383
  radarDataLabels_1 = spec.dataLabels;
@@ -1380,15 +1396,15 @@ var BasicChart = function (_a) {
1380
1396
  };
1381
1397
  radarLegend = (0, overrides_1.applyLegendOverrides)(tslib_1.__assign(tslib_1.__assign({}, legend), { show: radarData.length > 1, data: radarData.map(function (d) { return d.name; }) }), spec.legend);
1382
1398
  radarBand = (0, legend_layout_1.reserveEchartsLegendBand)({
1383
- position: (_66 = spec.legend) === null || _66 === void 0 ? void 0 : _66.position,
1399
+ position: (_72 = spec.legend) === null || _72 === void 0 ? void 0 : _72.position,
1384
1400
  visible: radarLegend.show !== false,
1385
1401
  labels: radarData.map(function (d) { return d.name; }),
1386
- legendFontSize: (_71 = (_68 = (_67 = radarLegend.textStyle) === null || _67 === void 0 ? void 0 : _67.fontSize) !== null && _68 !== void 0 ? _68 : (_70 = (_69 = spec.legend) === null || _69 === void 0 ? void 0 : _69.textFormat) === null || _70 === void 0 ? void 0 : _70.fontSize) !== null && _71 !== void 0 ? _71 : 12,
1402
+ 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,
1387
1403
  legendItemWidth: defaultLegendConfig.itemWidth,
1388
1404
  width: width !== null && width !== void 0 ? width : 0,
1389
1405
  height: height !== null && height !== void 0 ? height : 0,
1390
1406
  hasTitle: Boolean(explicitChartTitle),
1391
- titleFontSize: (_73 = (_72 = spec.titleTextFormat) === null || _72 === void 0 ? void 0 : _72.fontSize) !== null && _73 !== void 0 ? _73 : 16,
1407
+ titleFontSize: (_79 = (_78 = spec.titleTextFormat) === null || _78 === void 0 ? void 0 : _78.fontSize) !== null && _79 !== void 0 ? _79 : 16,
1392
1408
  hasBottomAxisTitle: false,
1393
1409
  bottomAxisNameGap: 0,
1394
1410
  hasLeftAxisTitle: false,
@@ -1404,7 +1420,7 @@ var BasicChart = function (_a) {
1404
1420
  radius: Math.max(10, Math.min(radarPlotWidth, radarPlotHeight) / 2 - 30),
1405
1421
  }
1406
1422
  : {};
1407
- (_74 = chartRef.current) === null || _74 === void 0 ? void 0 : _74.setOption({
1423
+ (_80 = chartRef.current) === null || _80 === void 0 ? void 0 : _80.setOption({
1408
1424
  radar: tslib_1.__assign(tslib_1.__assign({}, radarGeometry), {
1409
1425
  // The common scale's tick labels along ONE axis, as Excel draws
1410
1426
  // them: echarts labels every indicator axis, so each indicator
@@ -1458,9 +1474,9 @@ var BasicChart = function (_a) {
1458
1474
  // V-variants additionally get a volume column sub-pane below the
1459
1475
  // price plot.
1460
1476
  if (spec.chartType === "stock") {
1461
- variant_1 = ((_75 = spec.stockVariant) !== null && _75 !== void 0 ? _75 : "HLC");
1477
+ variant_1 = ((_81 = spec.stockVariant) !== null && _81 !== void 0 ? _81 : "HLC");
1462
1478
  categories = flattenChartDataValues(spec.domains, getDomainValuesFromRange, spec.hiddenDimensionStrategy, false).map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
1463
- seriesValues = ((_76 = spec.series) !== null && _76 !== void 0 ? _76 : []).map(function (seriesEntry) {
1479
+ seriesValues = ((_82 = spec.series) !== null && _82 !== void 0 ? _82 : []).map(function (seriesEntry) {
1464
1480
  return flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); });
1465
1481
  });
1466
1482
  stockFormats_1 = (0, axis_number_format_1.resolveSeriesNumberFormats)(spec.series, getFormattingFromRange, spec.hiddenDimensionStrategy);
@@ -1478,7 +1494,7 @@ var BasicChart = function (_a) {
1478
1494
  upColor_1 = theme.themeColors.accent1;
1479
1495
  downColor_1 = theme.themeColors.accent2;
1480
1496
  volumePoints = (0, stock_1.toVolumeSeries)(seriesValues, variant_1);
1481
- hasVolume = ((_77 = volumePoints === null || volumePoints === void 0 ? void 0 : volumePoints.length) !== null && _77 !== void 0 ? _77 : 0) > 0;
1497
+ hasVolume = ((_83 = volumePoints === null || volumePoints === void 0 ? void 0 : volumePoints.length) !== null && _83 !== void 0 ? _83 : 0) > 0;
1482
1498
  stockGrid = hasVolume
1483
1499
  ? [
1484
1500
  { left: "10%", right: "4%", top: "8%", height: "56%" },
@@ -1492,7 +1508,7 @@ var BasicChart = function (_a) {
1492
1508
  axisLine: { show: true },
1493
1509
  axisTick: { show: true },
1494
1510
  splitLine: { show: false },
1495
- name: (_78 = spec.horizontalAxisTitle) !== null && _78 !== void 0 ? _78 : "",
1511
+ name: (_84 = spec.horizontalAxisTitle) !== null && _84 !== void 0 ? _84 : "",
1496
1512
  nameLocation: "middle",
1497
1513
  nameGap: 30,
1498
1514
  }, spec.categoryAxisOptions);
@@ -1534,14 +1550,14 @@ var BasicChart = function (_a) {
1534
1550
  // (no open) fall through to the line-derived rendering below.
1535
1551
  if (variant_1 === "OHLC" || variant_1 === "VOHLC") {
1536
1552
  candleData = (0, stock_1.toCandlestick)(seriesValues, variant_1);
1537
- (_79 = chartRef.current) === null || _79 === void 0 ? void 0 : _79.setOption({
1553
+ (_85 = chartRef.current) === null || _85 === void 0 ? void 0 : _85.setOption({
1538
1554
  xAxis: stockXAxis,
1539
1555
  yAxis: tslib_1.__spreadArray([
1540
1556
  (0, overrides_1.applyAxisOverrides)({
1541
1557
  type: "value",
1542
1558
  show: true,
1543
1559
  scale: true,
1544
- name: (_80 = spec.verticalAxisTitle) !== null && _80 !== void 0 ? _80 : "",
1560
+ name: (_86 = spec.verticalAxisTitle) !== null && _86 !== void 0 ? _86 : "",
1545
1561
  nameLocation: "middle",
1546
1562
  nameGap: 50,
1547
1563
  gridIndex: 0,
@@ -1586,13 +1602,13 @@ var BasicChart = function (_a) {
1586
1602
  theme.themeColors.accent3,
1587
1603
  theme.themeColors.accent4,
1588
1604
  ]);
1589
- (_81 = chartRef.current) === null || _81 === void 0 ? void 0 : _81.setOption({
1605
+ (_87 = chartRef.current) === null || _87 === void 0 ? void 0 : _87.setOption({
1590
1606
  xAxis: stockXAxis,
1591
1607
  yAxis: tslib_1.__spreadArray([
1592
1608
  (0, overrides_1.applyAxisOverrides)({
1593
1609
  type: "value",
1594
1610
  show: true,
1595
- name: (_82 = spec.verticalAxisTitle) !== null && _82 !== void 0 ? _82 : "",
1611
+ name: (_88 = spec.verticalAxisTitle) !== null && _88 !== void 0 ? _88 : "",
1596
1612
  nameLocation: "middle",
1597
1613
  nameGap: 50,
1598
1614
  gridIndex: 0,
@@ -1631,14 +1647,14 @@ var BasicChart = function (_a) {
1631
1647
  ofPieLayout = null;
1632
1648
  isHorizontalBarChart = spec.chartType === "bar";
1633
1649
  shouldAggregate = (0, aggregation_1.shouldAggregateSeries)(spec.series);
1634
- primaryDomainSource = (_85 = (_84 = (_83 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _83 === void 0 ? void 0 : _83[0]) === null || _84 === void 0 ? void 0 : _84.sources) === null || _85 === void 0 ? void 0 : _85[0];
1650
+ 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];
1635
1651
  rawPrimaryDomainValues = primaryDomainSource
1636
- ? (0, aggregation_1.sanitizeDomainValues)((_86 = getDomainValuesFromRange(primaryDomainSource, spec.hiddenDimensionStrategy)) !== null && _86 !== void 0 ? _86 : [])
1652
+ ? (0, aggregation_1.sanitizeDomainValues)((_92 = getDomainValuesFromRange(primaryDomainSource, spec.hiddenDimensionStrategy)) !== null && _92 !== void 0 ? _92 : [])
1637
1653
  : [];
1638
1654
  aggregateDomainValues = (0, aggregation_1.getDomainValuesForAxis)(rawPrimaryDomainValues, shouldAggregate);
1639
1655
  categoryLevels = isCircularChart
1640
1656
  ? undefined
1641
- : (0, category_levels_1.resolveCategoryLevels)((_87 = spec.categoryLevels) === null || _87 === void 0 ? void 0 : _87.map(function (level) {
1657
+ : (0, category_levels_1.resolveCategoryLevels)((_93 = spec.categoryLevels) === null || _93 === void 0 ? void 0 : _93.map(function (level) {
1642
1658
  return flattenChartDataValues([level], getDomainValuesFromRange, spec.hiddenDimensionStrategy, false);
1643
1659
  }));
1644
1660
  if (categoryLevels) {
@@ -1649,15 +1665,15 @@ var BasicChart = function (_a) {
1649
1665
  axisTick: { show: true },
1650
1666
  splitLine: { show: true },
1651
1667
  name: isHorizontalBarChart
1652
- ? (_88 = spec.verticalAxisTitle) !== null && _88 !== void 0 ? _88 : ""
1653
- : (_89 = spec.horizontalAxisTitle) !== null && _89 !== void 0 ? _89 : "",
1668
+ ? (_94 = spec.verticalAxisTitle) !== null && _94 !== void 0 ? _94 : ""
1669
+ : (_95 = spec.horizontalAxisTitle) !== null && _95 !== void 0 ? _95 : "",
1654
1670
  nameLocation: "middle",
1655
1671
  nameGap: CATEGORY_AXIS_NAME_GAP + 24 * categoryLevels.outer.length,
1656
1672
  })), false));
1657
1673
  }
1658
1674
  // One category axis per domain (Excel): a domain drawn from several
1659
1675
  // ranges lists their categories in sequence on that single axis.
1660
- (categoryLevels ? [] : (_90 = spec.domains) !== null && _90 !== void 0 ? _90 : []).forEach(function (domain, domainIndex) {
1676
+ (categoryLevels ? [] : (_96 = spec.domains) !== null && _96 !== void 0 ? _96 : []).forEach(function (domain, domainIndex) {
1661
1677
  var _a, _b;
1662
1678
  var axisData = domain.sources.flatMap(function (sheetRange, sourceIndex) {
1663
1679
  var _a;
@@ -1693,8 +1709,8 @@ var BasicChart = function (_a) {
1693
1709
  splitLine: { show: true },
1694
1710
  gridIndex: 0,
1695
1711
  name: isHorizontalBarChart
1696
- ? (_91 = spec.verticalAxisTitle) !== null && _91 !== void 0 ? _91 : ""
1697
- : (_92 = spec.horizontalAxisTitle) !== null && _92 !== void 0 ? _92 : "",
1712
+ ? (_97 = spec.verticalAxisTitle) !== null && _97 !== void 0 ? _97 : ""
1713
+ : (_98 = spec.horizontalAxisTitle) !== null && _98 !== void 0 ? _98 : "",
1698
1714
  nameLocation: "middle",
1699
1715
  nameGap: CATEGORY_AXIS_NAME_GAP,
1700
1716
  });
@@ -1726,7 +1742,7 @@ var BasicChart = function (_a) {
1726
1742
  };
1727
1743
  sideBySideBarCount = isStacked
1728
1744
  ? 1
1729
- : ((_93 = spec.series) !== null && _93 !== void 0 ? _93 : []).reduce(function (count, s) {
1745
+ : ((_99 = spec.series) !== null && _99 !== void 0 ? _99 : []).reduce(function (count, s) {
1730
1746
  var _a;
1731
1747
  var seriesType = (_a = s.seriesChartType) !== null && _a !== void 0 ? _a : spec.chartType;
1732
1748
  return seriesType === "bar" || seriesType === "column"
@@ -1750,29 +1766,36 @@ var BasicChart = function (_a) {
1750
1766
  return (0, utils_1.chartPaletteColorAt)(seriesPalette, index);
1751
1767
  };
1752
1768
  _loop_1 = function (specSeriesIndex, series) {
1753
- var dataLabel, _182, _183, effectiveChartType, lineLike, domainSources, pieDomainLabels, piePointOffset, data, seriesEchartsType, seriesStyleAttrs, seriesEntry, isBarOrColumn, seriesAny, markerSymbol, wantsMarkers, labelsWithoutMarkers, isolated, marked, isolated_1, isolated_1_1, i, gradientArgs, gradient, overrides_2, _184, _185, dp, fallback_1, overrides_3, _186, _187, dp, positiveColor_1, negativeColor_1;
1754
- var e_12, _188, e_13, _189, e_14, _190;
1755
- return tslib_1.__generator(this, function (_191) {
1756
- switch (_191.label) {
1769
+ 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_2, _192, _193, dp, fallback_1, overrides_3, _194, _195, dp, positiveColor_1, negativeColor_1;
1770
+ var e_12, _196, e_13, _197, e_14, _198;
1771
+ return tslib_1.__generator(this, function (_199) {
1772
+ switch (_199.label) {
1757
1773
  case 0:
1758
- if (!(!(0, utils_1.isNil)(series.dataLabel) && (0, utils_1.isAFormula)(series.dataLabel))) return [3 /*break*/, 2];
1759
- _183 = chart_spec_utils_1.coerceCalculatedLabel;
1760
- return [4 /*yield*/, onRequestCalculate(series.dataLabel, (_95 = position.sheetId) !== null && _95 !== void 0 ? _95 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
1774
+ if (!((_101 = (0, series_name_1.linkedSeriesName)(series, getDomainValuesFromRange)) !== null && _101 !== void 0)) return [3 /*break*/, 1];
1775
+ _189 = _101;
1776
+ return [3 /*break*/, 5];
1761
1777
  case 1:
1762
- _182 = _183.apply(void 0, [_191.sent()]);
1763
- return [3 /*break*/, 3];
1778
+ if (!(!(0, utils_1.isNil)(series.dataLabel) && (0, utils_1.isAFormula)(series.dataLabel))) return [3 /*break*/, 3];
1779
+ _191 = chart_spec_utils_1.coerceCalculatedLabel;
1780
+ return [4 /*yield*/, onRequestCalculate(series.dataLabel, (_102 = position.sheetId) !== null && _102 !== void 0 ? _102 : sheetId, position.overlayPosition.anchorCell.rowIndex, position.overlayPosition.anchorCell.columnIndex)];
1764
1781
  case 2:
1765
- _182 = (_96 = series.dataLabel) !== null && _96 !== void 0 ? _96 : "";
1766
- _191.label = 3;
1782
+ _190 = _191.apply(void 0, [_199.sent()]);
1783
+ return [3 /*break*/, 4];
1767
1784
  case 3:
1768
- dataLabel = _182;
1785
+ _190 = (_103 = series.dataLabel) !== null && _103 !== void 0 ? _103 : "";
1786
+ _199.label = 4;
1787
+ case 4:
1788
+ _189 = (_190);
1789
+ _199.label = 5;
1790
+ case 5:
1791
+ dataLabel = _189;
1769
1792
  // Label
1770
1793
  if (dataLabel) {
1771
- (_97 = legend.data) === null || _97 === void 0 ? void 0 : _97.push(dataLabel);
1794
+ (_104 = legend.data) === null || _104 === void 0 ? void 0 : _104.push(dataLabel);
1772
1795
  }
1773
- effectiveChartType = (_98 = series.seriesChartType) !== null && _98 !== void 0 ? _98 : spec.chartType;
1796
+ effectiveChartType = (_105 = series.seriesChartType) !== null && _105 !== void 0 ? _105 : spec.chartType;
1774
1797
  lineLike = (0, empty_cells_1.isLineLikeChartType)(effectiveChartType);
1775
- domainSources = (_101 = (_100 = (_99 = spec.domains) === null || _99 === void 0 ? void 0 : _99[0]) === null || _100 === void 0 ? void 0 : _100.sources) !== null && _101 !== void 0 ? _101 : [];
1798
+ 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 : [];
1776
1799
  pieDomainLabels = isCircularChart &&
1777
1800
  (domainSources.length > 1 || series.sources.length > 1)
1778
1801
  ? domainSources.flatMap(function (sheetRange) {
@@ -1804,7 +1827,7 @@ var BasicChart = function (_a) {
1804
1827
  seriesEntry = tslib_1.__assign(tslib_1.__assign({ type: seriesEchartsType,
1805
1828
  // Ties the rendered series back to spec.series for click selection
1806
1829
  // One rendered series per spec series (source index 0).
1807
- id: (0, series_click_1.chartSeriesId)(specSeriesIndex, 0), name: dataLabel, data: data, stack: isStacked ? "dataLabel" : undefined, smooth: (_102 = spec.smooth) !== null && _102 !== void 0 ? _102 : undefined, radius: (_103 = spec.radius) !== null && _103 !== void 0 ? _103 : (isCircularChart ? [0, "75%"] : undefined) }, ((0, empty_cells_1.connectsAcrossEmptyCells)(spec, lineLike)
1830
+ 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)
1808
1831
  ? { connectNulls: true }
1809
1832
  : {})), seriesStyleAttrs);
1810
1833
  // Plot this series against a secondary value axis. The 2nd
@@ -1829,17 +1852,17 @@ var BasicChart = function (_a) {
1829
1852
  }
1830
1853
  seriesAny = series;
1831
1854
  if (effectiveChartType === "line") {
1832
- markerSymbol = (_104 = seriesAny.marker) === null || _104 === void 0 ? void 0 : _104.symbol;
1855
+ markerSymbol = (_111 = seriesAny.marker) === null || _111 === void 0 ? void 0 : _111.symbol;
1833
1856
  wantsMarkers = markerSymbol === "none"
1834
1857
  ? false
1835
1858
  : Boolean(spec.showMarkers) || !(0, utils_1.isNil)(markerSymbol);
1836
1859
  labelsWithoutMarkers = !wantsMarkers &&
1837
- Boolean((_105 = (0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, seriesAny)) === null || _105 === void 0 ? void 0 : _105.show);
1860
+ Boolean((_112 = (0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, seriesAny)) === null || _112 === void 0 ? void 0 : _112.show);
1838
1861
  seriesEntry.showSymbol = wantsMarkers || labelsWithoutMarkers;
1839
1862
  if (wantsMarkers) {
1840
1863
  seriesEntry.symbol =
1841
- (_106 = (0, helpers_1.mapMarkerSymbolToEcharts)(markerSymbol)) !== null && _106 !== void 0 ? _106 : "circle";
1842
- seriesEntry.symbolSize = (_108 = (_107 = seriesAny.marker) === null || _107 === void 0 ? void 0 : _107.size) !== null && _108 !== void 0 ? _108 : 6;
1864
+ (_113 = (0, helpers_1.mapMarkerSymbolToEcharts)(markerSymbol)) !== null && _113 !== void 0 ? _113 : "circle";
1865
+ seriesEntry.symbolSize = (_115 = (_114 = seriesAny.marker) === null || _114 === void 0 ? void 0 : _114.size) !== null && _115 !== void 0 ? _115 : 6;
1843
1866
  }
1844
1867
  else {
1845
1868
  if (labelsWithoutMarkers) {
@@ -1862,7 +1885,7 @@ var BasicChart = function (_a) {
1862
1885
  catch (e_12_1) { e_12 = { error: e_12_1 }; }
1863
1886
  finally {
1864
1887
  try {
1865
- if (isolated_1_1 && !isolated_1_1.done && (_188 = isolated_1.return)) _188.call(isolated_1);
1888
+ if (isolated_1_1 && !isolated_1_1.done && (_196 = isolated_1.return)) _196.call(isolated_1);
1866
1889
  }
1867
1890
  finally { if (e_12) throw e_12.error; }
1868
1891
  }
@@ -1874,9 +1897,9 @@ var BasicChart = function (_a) {
1874
1897
  gradientArgs = (0, gradient_1.gradientToEcharts)(series.gradient);
1875
1898
  if (gradientArgs && !seriesAny.noFill) {
1876
1899
  gradient = new echarts.graphic.LinearGradient(gradientArgs.x, gradientArgs.y, gradientArgs.x2, gradientArgs.y2, gradientArgs.colorStops);
1877
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_109 = seriesEntry.itemStyle) !== null && _109 !== void 0 ? _109 : {})), { color: gradient });
1900
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_116 = seriesEntry.itemStyle) !== null && _116 !== void 0 ? _116 : {})), { color: gradient });
1878
1901
  if (effectiveChartType === "area") {
1879
- seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_110 = seriesEntry.areaStyle) !== null && _110 !== void 0 ? _110 : {})), { color: gradient });
1902
+ seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_117 = seriesEntry.areaStyle) !== null && _117 !== void 0 ? _117 : {})), { color: gradient });
1880
1903
  }
1881
1904
  }
1882
1905
  else if (seriesAny.noFill) {
@@ -1884,15 +1907,15 @@ var BasicChart = function (_a) {
1884
1907
  // with `transparent` so layout is preserved but nothing
1885
1908
  // paints. Legend entries are also suppressed via `name: ""`
1886
1909
  // since the series carries no semantic information.
1887
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_111 = seriesEntry.itemStyle) !== null && _111 !== void 0 ? _111 : {})), { color: "transparent", borderColor: "transparent" });
1910
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_118 = seriesEntry.itemStyle) !== null && _118 !== void 0 ? _118 : {})), { color: "transparent", borderColor: "transparent" });
1888
1911
  }
1889
1912
  else if (isBarOrColumn &&
1890
1913
  Array.isArray(seriesAny.dataPointColors) &&
1891
1914
  seriesAny.dataPointColors.length) {
1892
1915
  overrides_2 = new Map();
1893
1916
  try {
1894
- for (_184 = (e_13 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _185 = _184.next(); !_185.done; _185 = _184.next()) {
1895
- dp = _185.value;
1917
+ for (_192 = (e_13 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _193 = _192.next(); !_193.done; _193 = _192.next()) {
1918
+ dp = _193.value;
1896
1919
  if (typeof dp.idx === "number" && typeof dp.color === "string") {
1897
1920
  overrides_2.set(dp.idx, dp.color);
1898
1921
  }
@@ -1901,20 +1924,20 @@ var BasicChart = function (_a) {
1901
1924
  catch (e_13_1) { e_13 = { error: e_13_1 }; }
1902
1925
  finally {
1903
1926
  try {
1904
- if (_185 && !_185.done && (_189 = _184.return)) _189.call(_184);
1927
+ if (_193 && !_193.done && (_197 = _192.return)) _197.call(_192);
1905
1928
  }
1906
1929
  finally { if (e_13) throw e_13.error; }
1907
1930
  }
1908
- fallback_1 = (_112 = series.color) !== null && _112 !== void 0 ? _112 : paletteColorAt(specSeriesIndex);
1909
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_113 = seriesEntry.itemStyle) !== null && _113 !== void 0 ? _113 : {})), { color: function (params) { var _a; return (_a = overrides_2.get(params.dataIndex)) !== null && _a !== void 0 ? _a : fallback_1; } });
1931
+ fallback_1 = (_119 = series.color) !== null && _119 !== void 0 ? _119 : paletteColorAt(specSeriesIndex);
1932
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_120 = seriesEntry.itemStyle) !== null && _120 !== void 0 ? _120 : {})), { color: function (params) { var _a; return (_a = overrides_2.get(params.dataIndex)) !== null && _a !== void 0 ? _a : fallback_1; } });
1910
1933
  }
1911
1934
  else if (isCircularChart &&
1912
1935
  Array.isArray(seriesAny.dataPointColors) &&
1913
1936
  seriesAny.dataPointColors.length) {
1914
1937
  overrides_3 = new Map();
1915
1938
  try {
1916
- for (_186 = (e_14 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _187 = _186.next(); !_187.done; _187 = _186.next()) {
1917
- dp = _187.value;
1939
+ for (_194 = (e_14 = void 0, tslib_1.__values(seriesAny.dataPointColors)), _195 = _194.next(); !_195.done; _195 = _194.next()) {
1940
+ dp = _195.value;
1918
1941
  if (typeof dp.idx === "number" && typeof dp.color === "string") {
1919
1942
  overrides_3.set(dp.idx, dp.color);
1920
1943
  }
@@ -1923,19 +1946,19 @@ var BasicChart = function (_a) {
1923
1946
  catch (e_14_1) { e_14 = { error: e_14_1 }; }
1924
1947
  finally {
1925
1948
  try {
1926
- if (_187 && !_187.done && (_190 = _186.return)) _190.call(_186);
1949
+ if (_195 && !_195.done && (_198 = _194.return)) _198.call(_194);
1927
1950
  }
1928
1951
  finally { if (e_14) throw e_14.error; }
1929
1952
  }
1930
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_114 = seriesEntry.itemStyle) !== null && _114 !== void 0 ? _114 : {})), { color: function (params) {
1953
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_121 = seriesEntry.itemStyle) !== null && _121 !== void 0 ? _121 : {})), { color: function (params) {
1931
1954
  var _a, _b;
1932
1955
  return (_b = (_a = overrides_3.get(params.dataIndex)) !== null && _a !== void 0 ? _a : series.color) !== null && _b !== void 0 ? _b : paletteColorAt(params.dataIndex);
1933
1956
  } });
1934
1957
  }
1935
1958
  else if (isBarOrColumn && series.invertIfNegative) {
1936
- positiveColor_1 = (_115 = series.color) !== null && _115 !== void 0 ? _115 : paletteColorAt(specSeriesIndex);
1937
- negativeColor_1 = (_116 = series.negativeColor) !== null && _116 !== void 0 ? _116 : "#FF0000";
1938
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_117 = seriesEntry.itemStyle) !== null && _117 !== void 0 ? _117 : {})), { color: function (params) {
1959
+ positiveColor_1 = (_122 = series.color) !== null && _122 !== void 0 ? _122 : paletteColorAt(specSeriesIndex);
1960
+ negativeColor_1 = (_123 = series.negativeColor) !== null && _123 !== void 0 ? _123 : "#FF0000";
1961
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_124 = seriesEntry.itemStyle) !== null && _124 !== void 0 ? _124 : {})), { color: function (params) {
1939
1962
  var _a, _b;
1940
1963
  var value = Array.isArray(params.data)
1941
1964
  ? params.data[1]
@@ -1946,10 +1969,10 @@ var BasicChart = function (_a) {
1946
1969
  } });
1947
1970
  }
1948
1971
  else if (series.color) {
1949
- seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_118 = seriesEntry.itemStyle) !== null && _118 !== void 0 ? _118 : {})), { color: series.color });
1950
- seriesEntry.lineStyle = tslib_1.__assign(tslib_1.__assign({}, ((_119 = seriesEntry.lineStyle) !== null && _119 !== void 0 ? _119 : {})), { color: series.color });
1972
+ seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((_125 = seriesEntry.itemStyle) !== null && _125 !== void 0 ? _125 : {})), { color: series.color });
1973
+ seriesEntry.lineStyle = tslib_1.__assign(tslib_1.__assign({}, ((_126 = seriesEntry.lineStyle) !== null && _126 !== void 0 ? _126 : {})), { color: series.color });
1951
1974
  if (effectiveChartType === "area") {
1952
- seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_120 = seriesEntry.areaStyle) !== null && _120 !== void 0 ? _120 : {})), { color: series.color });
1975
+ seriesEntry.areaStyle = tslib_1.__assign(tslib_1.__assign({}, ((_127 = seriesEntry.areaStyle) !== null && _127 !== void 0 ? _127 : {})), { color: series.color });
1953
1976
  }
1954
1977
  }
1955
1978
  chartSeries.push(seriesEntry);
@@ -1958,33 +1981,33 @@ var BasicChart = function (_a) {
1958
1981
  }
1959
1982
  });
1960
1983
  };
1961
- _181.label = 31;
1962
- case 31:
1963
- _181.trys.push([31, 36, 37, 38]);
1964
- _r = tslib_1.__values(((_94 = spec.series) !== null && _94 !== void 0 ? _94 : []).entries()), _s = _r.next();
1965
- _181.label = 32;
1966
- case 32:
1967
- if (!!_s.done) return [3 /*break*/, 35];
1968
- _t = tslib_1.__read(_s.value, 2), specSeriesIndex = _t[0], series = _t[1];
1969
- return [5 /*yield**/, _loop_1(specSeriesIndex, series)];
1970
- case 33:
1971
- _181.sent();
1972
- _181.label = 34;
1973
- case 34:
1974
- _s = _r.next();
1975
- return [3 /*break*/, 32];
1976
- case 35: return [3 /*break*/, 38];
1984
+ _188.label = 35;
1985
+ case 35:
1986
+ _188.trys.push([35, 40, 41, 42]);
1987
+ _t = tslib_1.__values(((_100 = spec.series) !== null && _100 !== void 0 ? _100 : []).entries()), _u = _t.next();
1988
+ _188.label = 36;
1977
1989
  case 36:
1978
- e_3_1 = _181.sent();
1979
- e_3 = { error: e_3_1 };
1980
- return [3 /*break*/, 38];
1990
+ if (!!_u.done) return [3 /*break*/, 39];
1991
+ _v = tslib_1.__read(_u.value, 2), specSeriesIndex = _v[0], series = _v[1];
1992
+ return [5 /*yield**/, _loop_1(specSeriesIndex, series)];
1981
1993
  case 37:
1994
+ _188.sent();
1995
+ _188.label = 38;
1996
+ case 38:
1997
+ _u = _t.next();
1998
+ return [3 /*break*/, 36];
1999
+ case 39: return [3 /*break*/, 42];
2000
+ case 40:
2001
+ e_3_1 = _188.sent();
2002
+ e_3 = { error: e_3_1 };
2003
+ return [3 /*break*/, 42];
2004
+ case 41:
1982
2005
  try {
1983
- if (_s && !_s.done && (_4 = _r.return)) _4.call(_r);
2006
+ if (_u && !_u.done && (_6 = _t.return)) _6.call(_t);
1984
2007
  }
1985
2008
  finally { if (e_3) throw e_3.error; }
1986
2009
  return [7 /*endfinally*/];
1987
- case 38:
2010
+ case 42:
1988
2011
  if (isCircularChart && !isOfPie) {
1989
2012
  // Excel's pie / doughnut legend lists the categories, one entry per
1990
2013
  // slice — not the series name (the loop above collected those). The
@@ -1993,14 +2016,14 @@ var BasicChart = function (_a) {
1993
2016
  }
1994
2017
  if (isOfPie) {
1995
2018
  labels = rawPrimaryDomainValues.map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
1996
- seriesEntry = (_121 = spec.series) === null || _121 === void 0 ? void 0 : _121[0];
2019
+ seriesEntry = (_128 = spec.series) === null || _128 === void 0 ? void 0 : _128[0];
1997
2020
  rawValues = seriesEntry
1998
2021
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); })
1999
2022
  : [];
2000
- _u = (0, of_pie_1.splitOfPie)(rawValues, labels, {
2023
+ _w = (0, of_pie_1.splitOfPie)(rawValues, labels, {
2001
2024
  splitType: spec.splitType,
2002
2025
  splitPos: spec.splitPos,
2003
- }), main_1 = _u.main, secondary = _u.secondary, otherTotal = _u.otherTotal, total = _u.total;
2026
+ }), main_1 = _w.main, secondary = _w.secondary, otherTotal = _w.otherTotal, total = _w.total;
2004
2027
  ofPieType_1 = (0, of_pie_1.resolveOfPieType)(spec.ofPieType);
2005
2028
  secondScale = (0, of_pie_1.clampSecondPieSize)(spec.secondPieSize) / 100;
2006
2029
  halfAngle_1 = (0, of_pie_1.otherSliceHalfAngle)(otherTotal, total);
@@ -2040,7 +2063,7 @@ var BasicChart = function (_a) {
2040
2063
  };
2041
2064
  chartSeries.push({
2042
2065
  type: "pie",
2043
- name: (_122 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _122 !== void 0 ? _122 : "",
2066
+ name: (_129 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _129 !== void 0 ? _129 : "",
2044
2067
  center: ["".concat(MAIN_CX_1 * 100, "%"), "".concat(CY_1 * 100, "%")],
2045
2068
  radius: [0, "".concat(MAIN_RADIUS_PCT_1, "%")],
2046
2069
  // Rotate the pie so the "Other" slice's angular midpoint faces
@@ -2058,7 +2081,7 @@ var BasicChart = function (_a) {
2058
2081
  if (ofPieType_1 === "pie") {
2059
2082
  chartSeries.push({
2060
2083
  type: "pie",
2061
- name: (_123 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _123 !== void 0 ? _123 : "",
2084
+ name: (_130 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _130 !== void 0 ? _130 : "",
2062
2085
  center: ["".concat(SECONDARY_CX_1 * 100, "%"), "".concat(CY_1 * 100, "%")],
2063
2086
  radius: [0, "".concat(secondaryRadiusPct_1, "%")],
2064
2087
  data: secondary.map(function (s, i) { return ({
@@ -2153,16 +2176,16 @@ var BasicChart = function (_a) {
2153
2176
  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);
2154
2177
  }
2155
2178
  else if (spec.chartType === "waterfall") {
2156
- primaryDomainSource_1 = (_126 = (_125 = (_124 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _124 === void 0 ? void 0 : _124[0]) === null || _125 === void 0 ? void 0 : _125.sources) === null || _126 === void 0 ? void 0 : _126[0];
2179
+ 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];
2157
2180
  rawDomainValues = primaryDomainSource_1
2158
- ? (0, aggregation_1.sanitizeDomainValues)((_127 = getDomainValuesFromRange(primaryDomainSource_1, spec.hiddenDimensionStrategy)) !== null && _127 !== void 0 ? _127 : [])
2181
+ ? (0, aggregation_1.sanitizeDomainValues)((_134 = getDomainValuesFromRange(primaryDomainSource_1, spec.hiddenDimensionStrategy)) !== null && _134 !== void 0 ? _134 : [])
2159
2182
  : [];
2160
2183
  labels = rawDomainValues.map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
2161
- seriesEntry = (_128 = spec.series) === null || _128 === void 0 ? void 0 : _128[0];
2184
+ seriesEntry = (_135 = spec.series) === null || _135 === void 0 ? void 0 : _135[0];
2162
2185
  rawValues_1 = seriesEntry
2163
2186
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); })
2164
2187
  : [];
2165
- totalIndices = new Set((_129 = spec.totalIndices) !== null && _129 !== void 0 ? _129 : []);
2188
+ totalIndices = new Set((_136 = spec.totalIndices) !== null && _136 !== void 0 ? _136 : []);
2166
2189
  steps = (0, waterfall_1.computeWaterfall)(rawValues_1, labels, totalIndices);
2167
2190
  chartDomains.length = 0;
2168
2191
  chartDomains.push({
@@ -2172,7 +2195,7 @@ var BasicChart = function (_a) {
2172
2195
  axisLine: { show: true },
2173
2196
  axisTick: { show: true },
2174
2197
  splitLine: { show: false },
2175
- name: (_130 = spec.horizontalAxisTitle) !== null && _130 !== void 0 ? _130 : "",
2198
+ name: (_137 = spec.horizontalAxisTitle) !== null && _137 !== void 0 ? _137 : "",
2176
2199
  nameLocation: "middle",
2177
2200
  nameGap: 30,
2178
2201
  });
@@ -2189,13 +2212,13 @@ var BasicChart = function (_a) {
2189
2212
  label: { show: false },
2190
2213
  tooltip: { show: false },
2191
2214
  });
2192
- accent_1 = (_131 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _131 !== void 0 ? _131 : theme.themeColors.accent1;
2193
- decreaseColor_1 = (_133 = (_132 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.negativeColor) !== null && _132 !== void 0 ? _132 : theme.themeColors.accent2) !== null && _133 !== void 0 ? _133 : accent_1;
2194
- totalColor_1 = (_134 = theme.themeColors.accent3) !== null && _134 !== void 0 ? _134 : accent_1;
2215
+ accent_1 = (_138 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _138 !== void 0 ? _138 : theme.themeColors.accent1;
2216
+ 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;
2217
+ totalColor_1 = (_141 = theme.themeColors.accent3) !== null && _141 !== void 0 ? _141 : accent_1;
2195
2218
  pointColors_1 = new Map();
2196
2219
  try {
2197
- for (_v = tslib_1.__values((_135 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataPointColors) !== null && _135 !== void 0 ? _135 : []), _w = _v.next(); !_w.done; _w = _v.next()) {
2198
- dp = _w.value;
2220
+ 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()) {
2221
+ dp = _y.value;
2199
2222
  if (typeof (dp === null || dp === void 0 ? void 0 : dp.idx) === "number" && typeof (dp === null || dp === void 0 ? void 0 : dp.color) === "string") {
2200
2223
  pointColors_1.set(dp.idx, dp.color);
2201
2224
  }
@@ -2204,7 +2227,7 @@ var BasicChart = function (_a) {
2204
2227
  catch (e_6_1) { e_6 = { error: e_6_1 }; }
2205
2228
  finally {
2206
2229
  try {
2207
- if (_w && !_w.done && (_5 = _v.return)) _5.call(_v);
2230
+ if (_y && !_y.done && (_7 = _x.return)) _7.call(_x);
2208
2231
  }
2209
2232
  finally { if (e_6) throw e_6.error; }
2210
2233
  }
@@ -2216,7 +2239,7 @@ var BasicChart = function (_a) {
2216
2239
  type: "bar",
2217
2240
  id: (0, series_click_1.chartSeriesId)(0, 0),
2218
2241
  stack: "waterfall",
2219
- name: (_136 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _136 !== void 0 ? _136 : "",
2242
+ name: (_143 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _143 !== void 0 ? _143 : "",
2220
2243
  // A bar's height is the step's magnitude; the signed source value
2221
2244
  // rides along as `originalValue` so labels and tooltips read
2222
2245
  // "-90" for a decrease, like Excel.
@@ -2250,12 +2273,12 @@ var BasicChart = function (_a) {
2250
2273
  legend.data = [];
2251
2274
  }
2252
2275
  else if (spec.chartType === "funnel") {
2253
- primaryDomainSource_2 = (_139 = (_138 = (_137 = spec === null || spec === void 0 ? void 0 : spec.domains) === null || _137 === void 0 ? void 0 : _137[0]) === null || _138 === void 0 ? void 0 : _138.sources) === null || _139 === void 0 ? void 0 : _139[0];
2276
+ 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];
2254
2277
  rawDomainValues = primaryDomainSource_2
2255
- ? (0, aggregation_1.sanitizeDomainValues)((_140 = getDomainValuesFromRange(primaryDomainSource_2, spec.hiddenDimensionStrategy)) !== null && _140 !== void 0 ? _140 : [])
2278
+ ? (0, aggregation_1.sanitizeDomainValues)((_147 = getDomainValuesFromRange(primaryDomainSource_2, spec.hiddenDimensionStrategy)) !== null && _147 !== void 0 ? _147 : [])
2256
2279
  : [];
2257
2280
  labels_1 = rawDomainValues.map(function (v) { return String(v !== null && v !== void 0 ? v : ""); });
2258
- seriesEntry = (_141 = spec.series) === null || _141 === void 0 ? void 0 : _141[0];
2281
+ seriesEntry = (_148 = spec.series) === null || _148 === void 0 ? void 0 : _148[0];
2259
2282
  rawValues = seriesEntry
2260
2283
  ? flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : 0); })
2261
2284
  : [];
@@ -2269,11 +2292,11 @@ var BasicChart = function (_a) {
2269
2292
  theme.themeColors.accent5,
2270
2293
  theme.themeColors.accent6,
2271
2294
  ]);
2272
- funnelColor_1 = (_142 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _142 !== void 0 ? _142 : (0, utils_1.chartPaletteColorAt)(funnelPalette, 0);
2295
+ funnelColor_1 = (_149 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.color) !== null && _149 !== void 0 ? _149 : (0, utils_1.chartPaletteColorAt)(funnelPalette, 0);
2273
2296
  stageColors_1 = new Map();
2274
2297
  try {
2275
- for (_x = tslib_1.__values((_143 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataPointColors) !== null && _143 !== void 0 ? _143 : []), _y = _x.next(); !_y.done; _y = _x.next()) {
2276
- dp = _y.value;
2298
+ 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()) {
2299
+ dp = _0.value;
2277
2300
  if (typeof (dp === null || dp === void 0 ? void 0 : dp.idx) === "number" && typeof (dp === null || dp === void 0 ? void 0 : dp.color) === "string") {
2278
2301
  stageColors_1.set(dp.idx, dp.color);
2279
2302
  }
@@ -2282,7 +2305,7 @@ var BasicChart = function (_a) {
2282
2305
  catch (e_7_1) { e_7 = { error: e_7_1 }; }
2283
2306
  finally {
2284
2307
  try {
2285
- if (_y && !_y.done && (_6 = _x.return)) _6.call(_x);
2308
+ if (_0 && !_0.done && (_8 = _z.return)) _8.call(_z);
2286
2309
  }
2287
2310
  finally { if (e_7) throw e_7.error; }
2288
2311
  }
@@ -2300,9 +2323,9 @@ var BasicChart = function (_a) {
2300
2323
  top: 60,
2301
2324
  bottom: 20,
2302
2325
  };
2303
- funnelLabelsOff = ((_144 = (0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, seriesEntry)) === null || _144 === void 0 ? void 0 : _144.show) ===
2326
+ funnelLabelsOff = ((_151 = (0, overrides_1.resolveSeriesDataLabels)(spec.dataLabels, seriesEntry)) === null || _151 === void 0 ? void 0 : _151.show) ===
2304
2327
  false;
2305
- chartSeries.push(tslib_1.__assign(tslib_1.__assign({ type: "funnel", id: (0, series_click_1.chartSeriesId)(0, 0), name: (_145 = seriesEntry === null || seriesEntry === void 0 ? void 0 : seriesEntry.dataLabel) !== null && _145 !== void 0 ? _145 : "", data: funnelData }, funnelLayout), { itemStyle: {
2328
+ 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: {
2306
2329
  color: function (params) { var _a; return (_a = stageColors_1.get(params.dataIndex)) !== null && _a !== void 0 ? _a : funnelColor_1; },
2307
2330
  }, label: funnelLabelsOff
2308
2331
  ? { show: false }
@@ -2325,9 +2348,9 @@ var BasicChart = function (_a) {
2325
2348
  showMeanMarker_1 = spec.showMeanMarker === true;
2326
2349
  showInnerPoints_1 = spec.showInnerPoints === true;
2327
2350
  showMeanLine_1 = spec.showMeanLine === true;
2328
- boxDomainSource = (_148 = (_147 = (_146 = spec.domains) === null || _146 === void 0 ? void 0 : _146[0]) === null || _147 === void 0 ? void 0 : _147.sources) === null || _148 === void 0 ? void 0 : _148[0];
2351
+ 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];
2329
2352
  boxCategories_2 = boxDomainSource
2330
- ? ((_149 = getDomainValuesFromRange(boxDomainSource, spec.hiddenDimensionStrategy)) !== null && _149 !== void 0 ? _149 : []).map(function (v) { return (v === null || v === undefined ? "" : "".concat(v).trim()); })
2353
+ ? ((_156 = getDomainValuesFromRange(boxDomainSource, spec.hiddenDimensionStrategy)) !== null && _156 !== void 0 ? _156 : []).map(function (v) { return (v === null || v === undefined ? "" : "".concat(v).trim()); })
2331
2354
  : [];
2332
2355
  grouped_1 = boxCategories_2.some(function (c) { return c !== ""; });
2333
2356
  groups_1 = [];
@@ -2342,44 +2365,57 @@ var BasicChart = function (_a) {
2342
2365
  catch (e_8_1) { e_8 = { error: e_8_1 }; }
2343
2366
  finally {
2344
2367
  try {
2345
- if (boxCategories_1_1 && !boxCategories_1_1.done && (_7 = boxCategories_1.return)) _7.call(boxCategories_1);
2368
+ if (boxCategories_1_1 && !boxCategories_1_1.done && (_9 = boxCategories_1.return)) _9.call(boxCategories_1);
2346
2369
  }
2347
2370
  finally { if (e_8) throw e_8.error; }
2348
2371
  }
2349
2372
  }
2350
- boxSeriesSpecs = (_150 = spec.series) !== null && _150 !== void 0 ? _150 : [];
2351
- slots_1 = grouped_1 ? groups_1 : boxSeriesSpecs.map(function (s, i) {
2352
- return s.dataLabel && !(0, utils_1.isAFormula)(s.dataLabel) ? s.dataLabel : "Series ".concat(i + 1);
2353
- });
2373
+ boxSeriesSpecs = (_157 = spec.series) !== null && _157 !== void 0 ? _157 : [];
2374
+ slots = grouped_1 ? groups_1 : ["1"];
2354
2375
  boxGap = typeof spec.gapWidth === "number" ? Math.max(0, spec.gapWidth) : 150;
2355
2376
  boxPlotWidth = Math.max(0, (width !== null && width !== void 0 ? width : 0) * 0.85 - 40);
2356
- boxBand = slots_1.length ? boxPlotWidth / slots_1.length : boxPlotWidth;
2357
- boxWidthMax_1 = Math.max(2, Math.round(boxBand / (Math.max(1, boxSeriesSpecs.length) + boxGap / 100)));
2377
+ boxBand_1 = slots.length ? boxPlotWidth / slots.length : boxPlotWidth;
2378
+ boxWidthMax_1 = Math.max(2, Math.round(boxBand_1 / (Math.max(1, boxSeriesSpecs.length) + boxGap / 100)));
2358
2379
  boxCount_1 = Math.max(1, boxSeriesSpecs.length);
2359
- slotX_1 = function (slotIndex, seriesIndex) {
2360
- return slotIndex + ((seriesIndex + 0.5) / boxCount_1 - 0.5) * 0.8;
2380
+ boxCentre_1 = function (slotIndex, seriesIndex) {
2381
+ var band = Math.max(1, boxBand_1);
2382
+ var available = band * 0.8 - 2;
2383
+ var gap = (available / boxCount_1) * 0.3;
2384
+ var boxWidth = (available - gap * (boxCount_1 - 1)) / boxCount_1;
2385
+ var offset = boxWidth / 2 - available / 2 + seriesIndex * (gap + boxWidth);
2386
+ return slotIndex + offset / band;
2361
2387
  };
2362
2388
  chartDomains.length = 0;
2363
2389
  chartDomains.push({
2364
2390
  type: "category",
2365
- data: slots_1,
2391
+ data: slots,
2366
2392
  show: showAxis,
2367
2393
  axisLine: { show: true },
2368
2394
  axisTick: { show: true },
2369
2395
  splitLine: { show: false },
2370
- name: (_151 = spec.horizontalAxisTitle) !== null && _151 !== void 0 ? _151 : "",
2396
+ name: (_158 = spec.horizontalAxisTitle) !== null && _158 !== void 0 ? _158 : "",
2371
2397
  nameLocation: "middle",
2372
2398
  nameGap: 30,
2373
2399
  });
2400
+ boxplotOverlayAxis = {
2401
+ type: "value",
2402
+ min: -0.5,
2403
+ max: slots.length - 0.5,
2404
+ show: false,
2405
+ axisLine: { show: false },
2406
+ axisTick: { show: false },
2407
+ axisLabel: { show: false },
2408
+ splitLine: { show: false },
2409
+ };
2374
2410
  chartSeries.length = 0;
2375
2411
  boxLegend_1 = [];
2376
2412
  boxSeriesSpecs.forEach(function (seriesEntry, seriesIndex) {
2377
- var _a;
2378
- var label = seriesEntry.dataLabel && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
2413
+ var _a, _b;
2414
+ var label = (_a = (0, series_name_1.linkedSeriesName)(seriesEntry, getDomainValuesFromRange)) !== null && _a !== void 0 ? _a : (seriesEntry.dataLabel && !(0, utils_1.isAFormula)(seriesEntry.dataLabel)
2379
2415
  ? seriesEntry.dataLabel
2380
- : "";
2416
+ : "");
2381
2417
  var rawValues = flattenChartDataValues([seriesEntry], getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); });
2382
- var color = (_a = seriesEntry.color) !== null && _a !== void 0 ? _a : paletteColorAt(seriesIndex);
2418
+ var color = (_b = seriesEntry.color) !== null && _b !== void 0 ? _b : paletteColorAt(seriesIndex);
2383
2419
  var boxData = [];
2384
2420
  var outlierPoints = [];
2385
2421
  var innerPoints = [];
@@ -2387,7 +2423,7 @@ var BasicChart = function (_a) {
2387
2423
  var meanLine = [];
2388
2424
  var slotValues = grouped_1
2389
2425
  ? groups_1.map(function (g) { return rawValues.filter(function (_, i) { return boxCategories_2[i] === g; }); })
2390
- : slots_1.map(function (_, i) { return (i === seriesIndex ? rawValues : []); });
2426
+ : [rawValues];
2391
2427
  slotValues.forEach(function (values, slotIndex) {
2392
2428
  var e_15, _a, e_16, _b;
2393
2429
  var summary = (0, boxplot_1.computeBoxplotSummary)(values, { quartileMethod: quartileMethod_1 });
@@ -2406,7 +2442,7 @@ var BasicChart = function (_a) {
2406
2442
  summary.upperWhisker,
2407
2443
  ]);
2408
2444
  meanLine.push(summary.mean);
2409
- var x = slotX_1(slotIndex, seriesIndex);
2445
+ var x = boxCentre_1(slotIndex, seriesIndex);
2410
2446
  if (showOutliers_1) {
2411
2447
  try {
2412
2448
  for (var _c = tslib_1.__values(summary.outliers), _d = _c.next(); !_d.done; _d = _c.next()) {
@@ -2453,7 +2489,7 @@ var BasicChart = function (_a) {
2453
2489
  itemStyle: { color: color, borderColor: color },
2454
2490
  });
2455
2491
  var pointSeries = function (name, points, extra) {
2456
- return (tslib_1.__assign({ type: "scatter", name: name, data: points, itemStyle: { color: color }, tooltip: { show: false } }, extra));
2492
+ return (tslib_1.__assign({ type: "scatter", name: name, data: points, xAxisIndex: 1, itemStyle: { color: color }, tooltip: { show: false } }, extra));
2457
2493
  };
2458
2494
  if (outlierPoints.length > 0) {
2459
2495
  chartSeries.push(pointSeries("", outlierPoints, { symbolSize: 6 }));
@@ -2468,8 +2504,9 @@ var BasicChart = function (_a) {
2468
2504
  chartSeries.push({
2469
2505
  type: "line",
2470
2506
  name: "",
2507
+ xAxisIndex: 1,
2471
2508
  data: meanLine.map(function (m, slotIndex) {
2472
- return m === null ? null : [slotX_1(slotIndex, seriesIndex), m];
2509
+ return m === null ? null : [boxCentre_1(slotIndex, seriesIndex), m];
2473
2510
  }),
2474
2511
  showSymbol: false,
2475
2512
  lineStyle: { color: color, type: "dashed", width: 1 },
@@ -2484,18 +2521,18 @@ var BasicChart = function (_a) {
2484
2521
  }
2485
2522
  else if (spec.chartType === "histogram") {
2486
2523
  rawValues = flattenChartDataValues(spec.series, getSeriesValuesFromRange, spec.hiddenDimensionStrategy).map(function (v) { return (typeof v === "number" ? v : Number(v)); });
2487
- histogramDomainSource = (_154 = (_153 = (_152 = spec.domains) === null || _152 === void 0 ? void 0 : _152[0]) === null || _153 === void 0 ? void 0 : _153.sources) === null || _154 === void 0 ? void 0 : _154[0];
2524
+ 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];
2488
2525
  histogramCategories = histogramDomainSource
2489
- ? ((_155 = getDomainValuesFromRange(histogramDomainSource, spec.hiddenDimensionStrategy)) !== null && _155 !== void 0 ? _155 : [])
2526
+ ? ((_162 = getDomainValuesFromRange(histogramDomainSource, spec.hiddenDimensionStrategy)) !== null && _162 !== void 0 ? _162 : [])
2490
2527
  : [];
2491
- _z = histogramCategories.length
2492
- ? (0, histogram_1.aggregateByCategory)(histogramCategories, rawValues, (_158 = (_157 = (_156 = spec.series) === null || _156 === void 0 ? void 0 : _156[0]) === null || _157 === void 0 ? void 0 : _157.aggregateType) !== null && _158 !== void 0 ? _158 : "SUM")
2528
+ _1 = histogramCategories.length
2529
+ ? (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")
2493
2530
  : (0, histogram_1.binHistogram)(rawValues, spec.binCount, {
2494
2531
  binSize: spec.binSize,
2495
2532
  intervalClosed: spec.intervalClosed,
2496
2533
  overflow: spec.overflow,
2497
2534
  underflow: spec.underflow,
2498
- }), labels = _z.labels, counts = _z.counts;
2535
+ }), labels = _1.labels, counts = _1.counts;
2499
2536
  isPareto_1 = (0, histogram_1.isParetoSpec)(spec);
2500
2537
  cumulativePercents = [];
2501
2538
  if (isPareto_1) {
@@ -2512,20 +2549,20 @@ var BasicChart = function (_a) {
2512
2549
  axisLine: { show: true },
2513
2550
  axisTick: { show: true },
2514
2551
  splitLine: { show: false },
2515
- name: (_159 = spec.horizontalAxisTitle) !== null && _159 !== void 0 ? _159 : "",
2552
+ name: (_166 = spec.horizontalAxisTitle) !== null && _166 !== void 0 ? _166 : "",
2516
2553
  nameLocation: "middle",
2517
2554
  nameGap: 30,
2518
2555
  });
2519
2556
  chartSeries.length = 0;
2520
2557
  histogramSeries = {
2521
2558
  type: "bar",
2522
- name: (_162 = (_161 = (_160 = spec.series) === null || _160 === void 0 ? void 0 : _160[0]) === null || _161 === void 0 ? void 0 : _161.dataLabel) !== null && _162 !== void 0 ? _162 : "",
2559
+ 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 : "",
2523
2560
  data: counts,
2524
2561
  // Excel's histogram columns touch unless `gapWidth` says otherwise
2525
2562
  // (#1087); the gap maps like a column chart's.
2526
- barCategoryGap: (_164 = (0, bar_layout_1.gapWidthToBarCategoryGap)((_163 = spec.gapWidth) !== null && _163 !== void 0 ? _163 : 0, { seriesCount: 1 })) !== null && _164 !== void 0 ? _164 : "0%",
2563
+ barCategoryGap: (_171 = (0, bar_layout_1.gapWidthToBarCategoryGap)((_170 = spec.gapWidth) !== null && _170 !== void 0 ? _170 : 0, { seriesCount: 1 })) !== null && _171 !== void 0 ? _171 : "0%",
2527
2564
  };
2528
- histogramColor = (_166 = (_165 = spec.series) === null || _165 === void 0 ? void 0 : _165[0]) === null || _166 === void 0 ? void 0 : _166.color;
2565
+ histogramColor = (_173 = (_172 = spec.series) === null || _172 === void 0 ? void 0 : _172[0]) === null || _173 === void 0 ? void 0 : _173.color;
2529
2566
  if (histogramColor) {
2530
2567
  histogramSeries.itemStyle = { color: histogramColor };
2531
2568
  }
@@ -2558,20 +2595,20 @@ var BasicChart = function (_a) {
2558
2595
  isPareto = spec.chartType === "histogram" && (0, histogram_1.isParetoSpec)(spec);
2559
2596
  hasSecondaryAxis = !isCircularChart &&
2560
2597
  !isHorizontalBarChart &&
2561
- (((_167 = spec.series) !== null && _167 !== void 0 ? _167 : []).some(function (s) { return s.useSecondaryAxis; }) || isPareto);
2598
+ (((_174 = spec.series) !== null && _174 !== void 0 ? _174 : []).some(function (s) { return s.useSecondaryAxis; }) || isPareto);
2562
2599
  isPercentStackedBars = spec.stackedType === "PERCENT_STACKED" &&
2563
2600
  (spec.chartType === "bar" || spec.chartType === "column");
2564
2601
  primaryAxisNumberFormat = isPercentStackedBars
2565
2602
  ? undefined
2566
2603
  : (0, axis_number_format_1.resolveValueAxisNumberFormat)({
2567
2604
  axisOptions: spec.valueAxisOptions,
2568
- series: ((_168 = spec.series) !== null && _168 !== void 0 ? _168 : []).filter(function (s) { return !s.useSecondaryAxis; }),
2605
+ series: ((_175 = spec.series) !== null && _175 !== void 0 ? _175 : []).filter(function (s) { return !s.useSecondaryAxis; }),
2569
2606
  getFormattingFromRange: getFormattingFromRange,
2570
2607
  hiddenDimensionStrategy: spec.hiddenDimensionStrategy,
2571
2608
  });
2572
2609
  secondaryAxisNumberFormat = (0, axis_number_format_1.resolveValueAxisNumberFormat)({
2573
2610
  axisOptions: spec.secondaryValueAxisOptions,
2574
- series: ((_169 = spec.series) !== null && _169 !== void 0 ? _169 : []).filter(function (s) { return s.useSecondaryAxis; }),
2611
+ series: ((_176 = spec.series) !== null && _176 !== void 0 ? _176 : []).filter(function (s) { return s.useSecondaryAxis; }),
2575
2612
  getFormattingFromRange: getFormattingFromRange,
2576
2613
  hiddenDimensionStrategy: spec.hiddenDimensionStrategy,
2577
2614
  });
@@ -2600,17 +2637,17 @@ var BasicChart = function (_a) {
2600
2637
  finalLegend = (0, overrides_1.applyLegendOverrides)(legend, spec.legend);
2601
2638
  bottomAxisNameGap = isHorizontalBarChart
2602
2639
  ? valueAxisBase.nameGap
2603
- : Number((_171 = (_170 = chartDomains[0]) === null || _170 === void 0 ? void 0 : _170.nameGap) !== null && _171 !== void 0 ? _171 : CATEGORY_AXIS_NAME_GAP);
2640
+ : Number((_178 = (_177 = chartDomains[0]) === null || _177 === void 0 ? void 0 : _177.nameGap) !== null && _178 !== void 0 ? _178 : CATEGORY_AXIS_NAME_GAP);
2604
2641
  legendBand = (0, legend_layout_1.reserveEchartsLegendBand)({
2605
- position: (_172 = spec.legend) === null || _172 === void 0 ? void 0 : _172.position,
2642
+ position: (_179 = spec.legend) === null || _179 === void 0 ? void 0 : _179.position,
2606
2643
  visible: finalLegend.show !== false,
2607
2644
  labels: (0, legend_layout_1.legendLabelsFrom)(finalLegend.data, chartSeries.map(function (s) { return s === null || s === void 0 ? void 0 : s.name; })),
2608
- legendFontSize: (_177 = (_174 = (_173 = finalLegend.textStyle) === null || _173 === void 0 ? void 0 : _173.fontSize) !== null && _174 !== void 0 ? _174 : (_176 = (_175 = spec.legend) === null || _175 === void 0 ? void 0 : _175.textFormat) === null || _176 === void 0 ? void 0 : _176.fontSize) !== null && _177 !== void 0 ? _177 : 12,
2645
+ 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,
2609
2646
  legendItemWidth: defaultLegendConfig.itemWidth,
2610
2647
  width: width !== null && width !== void 0 ? width : 0,
2611
2648
  height: height !== null && height !== void 0 ? height : 0,
2612
2649
  hasTitle: Boolean(title),
2613
- titleFontSize: (_179 = (_178 = spec.titleTextFormat) === null || _178 === void 0 ? void 0 : _178.fontSize) !== null && _179 !== void 0 ? _179 : 16,
2650
+ titleFontSize: (_186 = (_185 = spec.titleTextFormat) === null || _185 === void 0 ? void 0 : _185.fontSize) !== null && _186 !== void 0 ? _186 : 16,
2614
2651
  hasBottomAxisTitle: !isCircularChart && Boolean(spec.horizontalAxisTitle),
2615
2652
  bottomAxisNameGap: bottomAxisNameGap,
2616
2653
  hasLeftAxisTitle: !isCircularChart && Boolean(spec.verticalAxisTitle),
@@ -2686,7 +2723,7 @@ var BasicChart = function (_a) {
2686
2723
  catch (e_9_1) { e_9 = { error: e_9_1 }; }
2687
2724
  finally {
2688
2725
  try {
2689
- if (barSeries_1_1 && !barSeries_1_1.done && (_8 = barSeries_1.return)) _8.call(barSeries_1);
2726
+ if (barSeries_1_1 && !barSeries_1_1.done && (_10 = barSeries_1.return)) _10.call(barSeries_1);
2690
2727
  }
2691
2728
  finally { if (e_9) throw e_9.error; }
2692
2729
  }
@@ -2708,7 +2745,7 @@ var BasicChart = function (_a) {
2708
2745
  catch (e_10_1) { e_10 = { error: e_10_1 }; }
2709
2746
  finally {
2710
2747
  try {
2711
- if (barSeries_2_1 && !barSeries_2_1.done && (_9 = barSeries_2.return)) _9.call(barSeries_2);
2748
+ if (barSeries_2_1 && !barSeries_2_1.done && (_11 = barSeries_2.return)) _11.call(barSeries_2);
2712
2749
  }
2713
2750
  finally { if (e_10) throw e_10.error; }
2714
2751
  }
@@ -2780,14 +2817,14 @@ var BasicChart = function (_a) {
2780
2817
  return next;
2781
2818
  });
2782
2819
  // Update charts
2783
- (_180 = chartRef.current) === null || _180 === void 0 ? void 0 : _180.setOption({
2820
+ (_187 = chartRef.current) === null || _187 === void 0 ? void 0 : _187.setOption({
2784
2821
  xAxis: (function () {
2785
2822
  var _a, _b;
2786
2823
  if (isOfPie) {
2787
2824
  // Hidden 0-1 value axis on the full-container grid for the
2788
2825
  // connector overlay, plus a hidden single-category axis on
2789
2826
  // the secondary grid for bar-of-pie.
2790
- var axes = [
2827
+ var axes_1 = [
2791
2828
  {
2792
2829
  type: "value",
2793
2830
  min: 0,
@@ -2799,7 +2836,7 @@ var BasicChart = function (_a) {
2799
2836
  },
2800
2837
  ];
2801
2838
  if (ofPieLayout === null || ofPieLayout === void 0 ? void 0 : ofPieLayout.barGrid) {
2802
- axes.push({
2839
+ axes_1.push({
2803
2840
  type: "category",
2804
2841
  data: [""],
2805
2842
  gridIndex: 1,
@@ -2809,7 +2846,7 @@ var BasicChart = function (_a) {
2809
2846
  splitLine: { show: false },
2810
2847
  });
2811
2848
  }
2812
- return axes;
2849
+ return axes_1;
2813
2850
  }
2814
2851
  if (isCircularChart) {
2815
2852
  return [
@@ -2841,18 +2878,19 @@ var BasicChart = function (_a) {
2841
2878
  nameGap: CATEGORY_AXIS_NAME_GAP,
2842
2879
  },
2843
2880
  ];
2844
- return base.map(function (axis) {
2881
+ var axes = base.map(function (axis) {
2845
2882
  return (0, overrides_1.applyAxisOverrides)(axis, spec.categoryAxisOptions);
2846
2883
  });
2884
+ return boxplotOverlayAxis ? tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(axes), false), [boxplotOverlayAxis], false) : axes;
2847
2885
  })(),
2848
2886
  yAxis: (function () {
2849
2887
  var _a, _b;
2850
2888
  if (isOfPie) {
2851
- var axes_1 = [
2889
+ var axes_2 = [
2852
2890
  tslib_1.__assign(tslib_1.__assign({}, valueAxisBase), { min: 0, max: 1, show: false, axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: false }, name: undefined }),
2853
2891
  ];
2854
2892
  if (ofPieLayout === null || ofPieLayout === void 0 ? void 0 : ofPieLayout.barGrid) {
2855
- axes_1.push({
2893
+ axes_2.push({
2856
2894
  type: "value",
2857
2895
  gridIndex: 1,
2858
2896
  show: false,
@@ -2861,7 +2899,7 @@ var BasicChart = function (_a) {
2861
2899
  splitLine: { show: false },
2862
2900
  });
2863
2901
  }
2864
- return axes_1;
2902
+ return axes_2;
2865
2903
  }
2866
2904
  if (isCircularChart) {
2867
2905
  return [