@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.
- package/dist/cjs/basic-chart/basic-chart.d.ts.map +1 -1
- package/dist/cjs/basic-chart/basic-chart.js +308 -270
- package/dist/cjs/components/editors/chart-editor-capabilities.d.ts +48 -0
- package/dist/cjs/components/editors/chart-editor-capabilities.d.ts.map +1 -0
- package/dist/cjs/components/editors/chart-editor-capabilities.js +62 -0
- package/dist/cjs/components/editors/chart-editor.d.ts.map +1 -1
- package/dist/cjs/components/editors/chart-editor.js +200 -534
- package/dist/cjs/components/editors/fields/axis-options-fields.d.ts +16 -0
- package/dist/cjs/components/editors/fields/axis-options-fields.d.ts.map +1 -0
- package/dist/cjs/components/editors/fields/axis-options-fields.js +31 -0
- package/dist/cjs/components/editors/fields/chart-type-options.d.ts +25 -0
- package/dist/cjs/components/editors/fields/chart-type-options.d.ts.map +1 -0
- package/dist/cjs/components/editors/fields/chart-type-options.js +170 -0
- package/dist/cjs/components/editors/fields/data-labels-fields.d.ts +15 -0
- package/dist/cjs/components/editors/fields/data-labels-fields.d.ts.map +1 -0
- package/dist/cjs/components/editors/fields/data-labels-fields.js +57 -0
- package/dist/cjs/components/editors/fields/primitives.d.ts +54 -0
- package/dist/cjs/components/editors/fields/primitives.d.ts.map +1 -0
- package/dist/cjs/components/editors/fields/primitives.js +52 -0
- package/dist/cjs/components/editors/fields/series-format-fields.d.ts +17 -0
- package/dist/cjs/components/editors/fields/series-format-fields.d.ts.map +1 -0
- package/dist/cjs/components/editors/fields/series-format-fields.js +165 -0
- package/dist/cjs/components/editors/fields/series-name-field.d.ts +16 -0
- package/dist/cjs/components/editors/fields/series-name-field.d.ts.map +1 -0
- package/dist/cjs/components/editors/fields/series-name-field.js +36 -0
- package/dist/cjs/components/editors/fields/text-format-fields.d.ts +20 -0
- package/dist/cjs/components/editors/fields/text-format-fields.d.ts.map +1 -0
- package/dist/cjs/components/editors/fields/text-format-fields.js +46 -0
- package/dist/cjs/config.d.ts.map +1 -1
- package/dist/cjs/config.js +3 -0
- package/dist/cjs/interface/create-chart.d.ts +3 -2
- package/dist/cjs/interface/create-chart.d.ts.map +1 -1
- package/dist/cjs/interface/create-chart.js +7 -0
- package/dist/cjs/plotly/basic-chart/basic-chart.d.ts.map +1 -1
- package/dist/cjs/plotly/basic-chart/basic-chart.js +255 -218
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/cjs/utils/chart-orientation.d.ts.map +1 -1
- package/dist/cjs/utils/chart-orientation.js +24 -12
- package/dist/cjs/utils/chart-spec-utils.d.ts.map +1 -1
- package/dist/cjs/utils/chart-spec-utils.js +120 -21
- package/dist/cjs/utils/echarts-overlays.d.ts +2 -0
- package/dist/cjs/utils/echarts-overlays.d.ts.map +1 -1
- package/dist/cjs/utils/echarts-overlays.js +25 -12
- package/dist/cjs/utils/series-name.d.ts +12 -0
- package/dist/cjs/utils/series-name.d.ts.map +1 -0
- package/dist/cjs/utils/series-name.js +26 -0
- package/dist/cjs/utils/trendline.d.ts +9 -0
- package/dist/cjs/utils/trendline.d.ts.map +1 -1
- package/dist/cjs/utils/trendline.js +16 -1
- package/dist/esm/basic-chart/basic-chart.d.ts.map +1 -1
- package/dist/esm/basic-chart/basic-chart.js +73 -37
- package/dist/esm/components/editors/chart-editor-capabilities.d.ts +48 -0
- package/dist/esm/components/editors/chart-editor-capabilities.d.ts.map +1 -0
- package/dist/esm/components/editors/chart-editor-capabilities.js +58 -0
- package/dist/esm/components/editors/chart-editor.d.ts.map +1 -1
- package/dist/esm/components/editors/chart-editor.js +166 -448
- package/dist/esm/components/editors/fields/axis-options-fields.d.ts +16 -0
- package/dist/esm/components/editors/fields/axis-options-fields.d.ts.map +1 -0
- package/dist/esm/components/editors/fields/axis-options-fields.js +22 -0
- package/dist/esm/components/editors/fields/chart-type-options.d.ts +25 -0
- package/dist/esm/components/editors/fields/chart-type-options.d.ts.map +1 -0
- package/dist/esm/components/editors/fields/chart-type-options.js +151 -0
- package/dist/esm/components/editors/fields/data-labels-fields.d.ts +15 -0
- package/dist/esm/components/editors/fields/data-labels-fields.d.ts.map +1 -0
- package/dist/esm/components/editors/fields/data-labels-fields.js +47 -0
- package/dist/esm/components/editors/fields/primitives.d.ts +54 -0
- package/dist/esm/components/editors/fields/primitives.d.ts.map +1 -0
- package/dist/esm/components/editors/fields/primitives.js +26 -0
- package/dist/esm/components/editors/fields/series-format-fields.d.ts +17 -0
- package/dist/esm/components/editors/fields/series-format-fields.d.ts.map +1 -0
- package/dist/esm/components/editors/fields/series-format-fields.js +143 -0
- package/dist/esm/components/editors/fields/series-name-field.d.ts +16 -0
- package/dist/esm/components/editors/fields/series-name-field.d.ts.map +1 -0
- package/dist/esm/components/editors/fields/series-name-field.js +31 -0
- package/dist/esm/components/editors/fields/text-format-fields.d.ts +20 -0
- package/dist/esm/components/editors/fields/text-format-fields.d.ts.map +1 -0
- package/dist/esm/components/editors/fields/text-format-fields.js +34 -0
- package/dist/esm/config.d.ts.map +1 -1
- package/dist/esm/config.js +3 -0
- package/dist/esm/interface/create-chart.d.ts +3 -2
- package/dist/esm/interface/create-chart.d.ts.map +1 -1
- package/dist/esm/interface/create-chart.js +8 -1
- package/dist/esm/plotly/basic-chart/basic-chart.d.ts.map +1 -1
- package/dist/esm/plotly/basic-chart/basic-chart.js +52 -30
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/utils/chart-orientation.d.ts.map +1 -1
- package/dist/esm/utils/chart-orientation.js +20 -0
- package/dist/esm/utils/chart-spec-utils.d.ts.map +1 -1
- package/dist/esm/utils/chart-spec-utils.js +95 -8
- package/dist/esm/utils/echarts-overlays.d.ts +2 -0
- package/dist/esm/utils/echarts-overlays.d.ts.map +1 -1
- package/dist/esm/utils/echarts-overlays.js +15 -1
- package/dist/esm/utils/series-name.d.ts +12 -0
- package/dist/esm/utils/series-name.d.ts.map +1 -0
- package/dist/esm/utils/series-name.js +24 -0
- package/dist/esm/utils/trendline.d.ts +9 -0
- package/dist/esm/utils/trendline.d.ts.map +1 -1
- package/dist/esm/utils/trendline.js +14 -0
- 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
|
|
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,
|
|
432
|
-
var e_1,
|
|
433
|
-
var
|
|
434
|
-
return tslib_1.__generator(this, function (
|
|
435
|
-
switch (
|
|
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
|
-
(
|
|
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
|
-
(
|
|
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 =
|
|
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
|
-
(
|
|
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 = (
|
|
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
|
-
(
|
|
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 = ((
|
|
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 = ((
|
|
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
|
-
|
|
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
|
-
|
|
606
|
-
|
|
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, (
|
|
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, [
|
|
611
|
-
|
|
612
|
+
resolvedLabel = _b.apply(void 0, [_188.sent()]);
|
|
613
|
+
_188.label = 5;
|
|
612
614
|
case 5:
|
|
613
|
-
xValues = (
|
|
614
|
-
sizeValues_1 = (
|
|
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
|
-
|
|
618
|
+
_188.label = 6;
|
|
617
619
|
case 6:
|
|
618
620
|
i++;
|
|
619
621
|
return [3 /*break*/, 3];
|
|
620
622
|
case 7:
|
|
621
|
-
sharedXValues = (
|
|
622
|
-
sharedSizeValues = (
|
|
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 = ((
|
|
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: (
|
|
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: (
|
|
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: (
|
|
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: (
|
|
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: (
|
|
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
|
-
(
|
|
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: (
|
|
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 ? (
|
|
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 = (
|
|
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)((
|
|
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: (
|
|
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: (
|
|
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: (
|
|
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
|
-
(
|
|
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
|
-
(
|
|
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*/,
|
|
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
|
-
|
|
980
|
+
_188.label = 9;
|
|
979
981
|
case 9:
|
|
980
|
-
|
|
981
|
-
_d = tslib_1.__values((
|
|
982
|
-
|
|
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*/,
|
|
986
|
+
if (!!_e.done) return [3 /*break*/, 17];
|
|
985
987
|
seriesEntry = _e.value;
|
|
986
|
-
if (!(
|
|
987
|
-
|
|
988
|
-
return [
|
|
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
|
-
|
|
991
|
-
|
|
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
|
-
|
|
994
|
-
|
|
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
|
-
|
|
1000
|
-
case
|
|
1008
|
+
_188.label = 16;
|
|
1009
|
+
case 16:
|
|
1001
1010
|
_e = _d.next();
|
|
1002
1011
|
return [3 /*break*/, 10];
|
|
1003
|
-
case
|
|
1004
|
-
case
|
|
1005
|
-
e_1_1 =
|
|
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*/,
|
|
1008
|
-
case
|
|
1016
|
+
return [3 /*break*/, 20];
|
|
1017
|
+
case 19:
|
|
1009
1018
|
try {
|
|
1010
|
-
if (_e && !_e.done && (
|
|
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
|
|
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
|
-
|
|
1026
|
+
_j = tslib_1.__read((0, three_d_1.getValueExtent)(contourPoints.filter(function (point) {
|
|
1018
1027
|
return typeof point[2] === "number";
|
|
1019
|
-
})), 2), zMin =
|
|
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
|
-
(
|
|
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: (
|
|
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: (
|
|
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
|
|
1110
|
-
if (!(willRender3D && threeDRenderKind)) return [3 /*break*/,
|
|
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
|
-
|
|
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
|
-
|
|
1126
|
-
|
|
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
|
-
|
|
1129
|
-
|
|
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
|
|
1132
|
-
|
|
1133
|
-
|
|
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
|
-
|
|
1137
|
-
return [3 /*break*/,
|
|
1138
|
-
case 26:
|
|
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
|
-
|
|
1141
|
-
|
|
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 (
|
|
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
|
|
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 && (
|
|
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
|
-
|
|
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
|
-
(
|
|
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: (
|
|
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
|
|
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 (
|
|
1346
|
-
seriesEntry =
|
|
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 (
|
|
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 = (
|
|
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: (
|
|
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: (
|
|
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: (
|
|
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
|
-
(
|
|
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 = ((
|
|
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 = ((
|
|
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 = ((
|
|
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: (
|
|
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
|
-
(
|
|
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: (
|
|
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
|
-
(
|
|
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: (
|
|
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 = (
|
|
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)((
|
|
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)((
|
|
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
|
-
? (
|
|
1653
|
-
: (
|
|
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 ? [] : (
|
|
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
|
-
? (
|
|
1697
|
-
: (
|
|
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
|
-
: ((
|
|
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,
|
|
1754
|
-
var e_12,
|
|
1755
|
-
return tslib_1.__generator(this, function (
|
|
1756
|
-
switch (
|
|
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 (!(
|
|
1759
|
-
|
|
1760
|
-
return [
|
|
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
|
-
|
|
1763
|
-
|
|
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
|
-
|
|
1766
|
-
|
|
1782
|
+
_190 = _191.apply(void 0, [_199.sent()]);
|
|
1783
|
+
return [3 /*break*/, 4];
|
|
1767
1784
|
case 3:
|
|
1768
|
-
|
|
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
|
-
(
|
|
1794
|
+
(_104 = legend.data) === null || _104 === void 0 ? void 0 : _104.push(dataLabel);
|
|
1772
1795
|
}
|
|
1773
|
-
effectiveChartType = (
|
|
1796
|
+
effectiveChartType = (_105 = series.seriesChartType) !== null && _105 !== void 0 ? _105 : spec.chartType;
|
|
1774
1797
|
lineLike = (0, empty_cells_1.isLineLikeChartType)(effectiveChartType);
|
|
1775
|
-
domainSources = (
|
|
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: (
|
|
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 = (
|
|
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((
|
|
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
|
-
(
|
|
1842
|
-
seriesEntry.symbolSize = (
|
|
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 && (
|
|
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({}, ((
|
|
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({}, ((
|
|
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({}, ((
|
|
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 (
|
|
1895
|
-
dp =
|
|
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 (
|
|
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 = (
|
|
1909
|
-
seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((
|
|
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 (
|
|
1917
|
-
dp =
|
|
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 (
|
|
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({}, ((
|
|
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 = (
|
|
1937
|
-
negativeColor_1 = (
|
|
1938
|
-
seriesEntry.itemStyle = tslib_1.__assign(tslib_1.__assign({}, ((
|
|
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({}, ((
|
|
1950
|
-
seriesEntry.lineStyle = tslib_1.__assign(tslib_1.__assign({}, ((
|
|
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({}, ((
|
|
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
|
-
|
|
1962
|
-
case
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
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
|
-
|
|
1979
|
-
|
|
1980
|
-
return [
|
|
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 (
|
|
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
|
|
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 = (
|
|
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
|
-
|
|
2023
|
+
_w = (0, of_pie_1.splitOfPie)(rawValues, labels, {
|
|
2001
2024
|
splitType: spec.splitType,
|
|
2002
2025
|
splitPos: spec.splitPos,
|
|
2003
|
-
}), main_1 =
|
|
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: (
|
|
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: (
|
|
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 = (
|
|
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)((
|
|
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 = (
|
|
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((
|
|
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: (
|
|
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 = (
|
|
2193
|
-
decreaseColor_1 = (
|
|
2194
|
-
totalColor_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 (
|
|
2198
|
-
dp =
|
|
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 (
|
|
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: (
|
|
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 = (
|
|
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)((
|
|
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 = (
|
|
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 = (
|
|
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 (
|
|
2276
|
-
dp =
|
|
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 (
|
|
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 = ((
|
|
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: (
|
|
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 = (
|
|
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
|
-
? ((
|
|
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 && (
|
|
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 = (
|
|
2351
|
-
|
|
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
|
-
|
|
2357
|
-
boxWidthMax_1 = Math.max(2, Math.round(
|
|
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
|
-
|
|
2360
|
-
|
|
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:
|
|
2391
|
+
data: slots,
|
|
2366
2392
|
show: showAxis,
|
|
2367
2393
|
axisLine: { show: true },
|
|
2368
2394
|
axisTick: { show: true },
|
|
2369
2395
|
splitLine: { show: false },
|
|
2370
|
-
name: (
|
|
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 = (
|
|
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
|
-
:
|
|
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 =
|
|
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 : [
|
|
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 = (
|
|
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
|
-
? ((
|
|
2526
|
+
? ((_162 = getDomainValuesFromRange(histogramDomainSource, spec.hiddenDimensionStrategy)) !== null && _162 !== void 0 ? _162 : [])
|
|
2490
2527
|
: [];
|
|
2491
|
-
|
|
2492
|
-
? (0, histogram_1.aggregateByCategory)(histogramCategories, rawValues, (
|
|
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 =
|
|
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: (
|
|
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: (
|
|
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: (
|
|
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 = (
|
|
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
|
-
(((
|
|
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: ((
|
|
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: ((
|
|
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((
|
|
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: (
|
|
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: (
|
|
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: (
|
|
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 && (
|
|
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 && (
|
|
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
|
-
(
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
2902
|
+
return axes_2;
|
|
2865
2903
|
}
|
|
2866
2904
|
if (isCircularChart) {
|
|
2867
2905
|
return [
|