@oliasoft-open-source/charts-library 4.2.0 → 4.2.1
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/index.js +656 -197
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
8
8
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
9
9
|
import React, { forwardRef, useRef, useEffect, createContext as createContext$2, memo, useLayoutEffect, useState, useCallback, useMemo, isValidElement, cloneElement, useContext, useReducer } from "react";
|
|
10
10
|
import { produce } from "immer";
|
|
@@ -4914,6 +4914,130 @@ let PieController$1 = (_e = class extends DoughnutController$1 {
|
|
|
4914
4914
|
circumference: 360,
|
|
4915
4915
|
radius: "100%"
|
|
4916
4916
|
}), _e);
|
|
4917
|
+
let ScatterController$1 = (_f = class extends DatasetController$1 {
|
|
4918
|
+
getLabelAndValue(index2) {
|
|
4919
|
+
const meta = this._cachedMeta;
|
|
4920
|
+
const labels = this.chart.data.labels || [];
|
|
4921
|
+
const { xScale, yScale } = meta;
|
|
4922
|
+
const parsed = this.getParsed(index2);
|
|
4923
|
+
const x2 = xScale.getLabelForValue(parsed.x);
|
|
4924
|
+
const y2 = yScale.getLabelForValue(parsed.y);
|
|
4925
|
+
return {
|
|
4926
|
+
label: labels[index2] || "",
|
|
4927
|
+
value: "(" + x2 + ", " + y2 + ")"
|
|
4928
|
+
};
|
|
4929
|
+
}
|
|
4930
|
+
update(mode) {
|
|
4931
|
+
const meta = this._cachedMeta;
|
|
4932
|
+
const { data: points = [] } = meta;
|
|
4933
|
+
const animationsDisabled = this.chart._animationsDisabled;
|
|
4934
|
+
let { start, count } = _getStartAndCountOfVisiblePoints$1(meta, points, animationsDisabled);
|
|
4935
|
+
this._drawStart = start;
|
|
4936
|
+
this._drawCount = count;
|
|
4937
|
+
if (_scaleRangesChanged$1(meta)) {
|
|
4938
|
+
start = 0;
|
|
4939
|
+
count = points.length;
|
|
4940
|
+
}
|
|
4941
|
+
if (this.options.showLine) {
|
|
4942
|
+
if (!this.datasetElementType) {
|
|
4943
|
+
this.addElements();
|
|
4944
|
+
}
|
|
4945
|
+
const { dataset: line, _dataset } = meta;
|
|
4946
|
+
line._chart = this.chart;
|
|
4947
|
+
line._datasetIndex = this.index;
|
|
4948
|
+
line._decimated = !!_dataset._decimated;
|
|
4949
|
+
line.points = points;
|
|
4950
|
+
const options = this.resolveDatasetElementOptions(mode);
|
|
4951
|
+
options.segment = this.options.segment;
|
|
4952
|
+
this.updateElement(line, void 0, {
|
|
4953
|
+
animated: !animationsDisabled,
|
|
4954
|
+
options
|
|
4955
|
+
}, mode);
|
|
4956
|
+
} else if (this.datasetElementType) {
|
|
4957
|
+
delete meta.dataset;
|
|
4958
|
+
this.datasetElementType = false;
|
|
4959
|
+
}
|
|
4960
|
+
this.updateElements(points, start, count, mode);
|
|
4961
|
+
}
|
|
4962
|
+
addElements() {
|
|
4963
|
+
const { showLine } = this.options;
|
|
4964
|
+
if (!this.datasetElementType && showLine) {
|
|
4965
|
+
this.datasetElementType = this.chart.registry.getElement("line");
|
|
4966
|
+
}
|
|
4967
|
+
super.addElements();
|
|
4968
|
+
}
|
|
4969
|
+
updateElements(points, start, count, mode) {
|
|
4970
|
+
const reset = mode === "reset";
|
|
4971
|
+
const { iScale, vScale, _stacked, _dataset } = this._cachedMeta;
|
|
4972
|
+
const firstOpts = this.resolveDataElementOptions(start, mode);
|
|
4973
|
+
const sharedOptions = this.getSharedOptions(firstOpts);
|
|
4974
|
+
const includeOptions = this.includeOptions(mode, sharedOptions);
|
|
4975
|
+
const iAxis = iScale.axis;
|
|
4976
|
+
const vAxis = vScale.axis;
|
|
4977
|
+
const { spanGaps, segment } = this.options;
|
|
4978
|
+
const maxGapLength = isNumber$1(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;
|
|
4979
|
+
const directUpdate = this.chart._animationsDisabled || reset || mode === "none";
|
|
4980
|
+
let prevParsed = start > 0 && this.getParsed(start - 1);
|
|
4981
|
+
for (let i2 = start; i2 < start + count; ++i2) {
|
|
4982
|
+
const point = points[i2];
|
|
4983
|
+
const parsed = this.getParsed(i2);
|
|
4984
|
+
const properties = directUpdate ? point : {};
|
|
4985
|
+
const nullData = isNullOrUndef$1(parsed[vAxis]);
|
|
4986
|
+
const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i2);
|
|
4987
|
+
const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i2);
|
|
4988
|
+
properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;
|
|
4989
|
+
properties.stop = i2 > 0 && Math.abs(parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;
|
|
4990
|
+
if (segment) {
|
|
4991
|
+
properties.parsed = parsed;
|
|
4992
|
+
properties.raw = _dataset.data[i2];
|
|
4993
|
+
}
|
|
4994
|
+
if (includeOptions) {
|
|
4995
|
+
properties.options = sharedOptions || this.resolveDataElementOptions(i2, point.active ? "active" : mode);
|
|
4996
|
+
}
|
|
4997
|
+
if (!directUpdate) {
|
|
4998
|
+
this.updateElement(point, i2, properties, mode);
|
|
4999
|
+
}
|
|
5000
|
+
prevParsed = parsed;
|
|
5001
|
+
}
|
|
5002
|
+
this.updateSharedOptions(sharedOptions, mode, firstOpts);
|
|
5003
|
+
}
|
|
5004
|
+
getMaxOverflow() {
|
|
5005
|
+
const meta = this._cachedMeta;
|
|
5006
|
+
const data = meta.data || [];
|
|
5007
|
+
if (!this.options.showLine) {
|
|
5008
|
+
let max = 0;
|
|
5009
|
+
for (let i2 = data.length - 1; i2 >= 0; --i2) {
|
|
5010
|
+
max = Math.max(max, data[i2].size(this.resolveDataElementOptions(i2)) / 2);
|
|
5011
|
+
}
|
|
5012
|
+
return max > 0 && max;
|
|
5013
|
+
}
|
|
5014
|
+
const dataset = meta.dataset;
|
|
5015
|
+
const border = dataset.options && dataset.options.borderWidth || 0;
|
|
5016
|
+
if (!data.length) {
|
|
5017
|
+
return border;
|
|
5018
|
+
}
|
|
5019
|
+
const firstPoint = data[0].size(this.resolveDataElementOptions(0));
|
|
5020
|
+
const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));
|
|
5021
|
+
return Math.max(border, firstPoint, lastPoint) / 2;
|
|
5022
|
+
}
|
|
5023
|
+
}, __publicField(_f, "id", "scatter"), __publicField(_f, "defaults", {
|
|
5024
|
+
datasetElementType: false,
|
|
5025
|
+
dataElementType: "point",
|
|
5026
|
+
showLine: false,
|
|
5027
|
+
fill: false
|
|
5028
|
+
}), __publicField(_f, "overrides", {
|
|
5029
|
+
interaction: {
|
|
5030
|
+
mode: "point"
|
|
5031
|
+
},
|
|
5032
|
+
scales: {
|
|
5033
|
+
x: {
|
|
5034
|
+
type: "linear"
|
|
5035
|
+
},
|
|
5036
|
+
y: {
|
|
5037
|
+
type: "linear"
|
|
5038
|
+
}
|
|
5039
|
+
}
|
|
5040
|
+
}), _f);
|
|
4917
5041
|
function abstract$1() {
|
|
4918
5042
|
throw new Error("This method is not implemented: Check that a complete date adapter is provided.");
|
|
4919
5043
|
}
|
|
@@ -5803,7 +5927,7 @@ function _detectPlatform$1(canvas2) {
|
|
|
5803
5927
|
}
|
|
5804
5928
|
return DomPlatform$1;
|
|
5805
5929
|
}
|
|
5806
|
-
let Element$2 = (
|
|
5930
|
+
let Element$2 = (_g = class {
|
|
5807
5931
|
constructor() {
|
|
5808
5932
|
__publicField(this, "x");
|
|
5809
5933
|
__publicField(this, "y");
|
|
@@ -5835,7 +5959,7 @@ let Element$2 = (_f = class {
|
|
|
5835
5959
|
});
|
|
5836
5960
|
return ret;
|
|
5837
5961
|
}
|
|
5838
|
-
}, __publicField(
|
|
5962
|
+
}, __publicField(_g, "defaults", {}), __publicField(_g, "defaultRoutes"), _g);
|
|
5839
5963
|
function autoSkip$1(scale, ticks) {
|
|
5840
5964
|
const tickOpts = scale.options.ticks;
|
|
5841
5965
|
const determinedMaxTicks = determineMaxTicks$1(scale);
|
|
@@ -7922,7 +8046,7 @@ function getDatasetArea(meta, chartArea) {
|
|
|
7922
8046
|
}
|
|
7923
8047
|
return chartArea;
|
|
7924
8048
|
}
|
|
7925
|
-
let Chart$2 = (
|
|
8049
|
+
let Chart$2 = (_h = class {
|
|
7926
8050
|
static register(...items) {
|
|
7927
8051
|
registry$1.add(...items);
|
|
7928
8052
|
invalidatePlugins$1();
|
|
@@ -8742,7 +8866,7 @@ let Chart$2 = (_g = class {
|
|
|
8742
8866
|
const hoverOptions = this.options.hover;
|
|
8743
8867
|
return this.getElementsAtEventForMode(e2, hoverOptions.mode, hoverOptions, useFinalPosition);
|
|
8744
8868
|
}
|
|
8745
|
-
}, __publicField(
|
|
8869
|
+
}, __publicField(_h, "defaults", defaults$2), __publicField(_h, "instances", instances$1), __publicField(_h, "overrides", overrides$1), __publicField(_h, "registry", registry$1), __publicField(_h, "version", version$3), __publicField(_h, "getChart", getChart$1), _h);
|
|
8746
8870
|
function invalidatePlugins$1() {
|
|
8747
8871
|
return each$1(Chart$2.instances, (chart2) => chart2._plugins.invalidate());
|
|
8748
8872
|
}
|
|
@@ -8904,7 +9028,7 @@ function drawBorder$1(ctx, element, offset, spacing, circular) {
|
|
|
8904
9028
|
ctx.stroke();
|
|
8905
9029
|
}
|
|
8906
9030
|
}
|
|
8907
|
-
let ArcElement$1 = (
|
|
9031
|
+
let ArcElement$1 = (_i = class extends Element$2 {
|
|
8908
9032
|
constructor(cfg) {
|
|
8909
9033
|
super();
|
|
8910
9034
|
__publicField(this, "circumference");
|
|
@@ -8989,7 +9113,7 @@ let ArcElement$1 = (_h = class extends Element$2 {
|
|
|
8989
9113
|
drawBorder$1(ctx, this, radiusOffset, spacing, circular);
|
|
8990
9114
|
ctx.restore();
|
|
8991
9115
|
}
|
|
8992
|
-
}, __publicField(
|
|
9116
|
+
}, __publicField(_i, "id", "arc"), __publicField(_i, "defaults", {
|
|
8993
9117
|
borderAlign: "center",
|
|
8994
9118
|
borderColor: "#fff",
|
|
8995
9119
|
borderDash: [],
|
|
@@ -9001,12 +9125,12 @@ let ArcElement$1 = (_h = class extends Element$2 {
|
|
|
9001
9125
|
spacing: 0,
|
|
9002
9126
|
angle: void 0,
|
|
9003
9127
|
circular: true
|
|
9004
|
-
}), __publicField(
|
|
9128
|
+
}), __publicField(_i, "defaultRoutes", {
|
|
9005
9129
|
backgroundColor: "backgroundColor"
|
|
9006
|
-
}), __publicField(
|
|
9130
|
+
}), __publicField(_i, "descriptors", {
|
|
9007
9131
|
_scriptable: true,
|
|
9008
9132
|
_indexable: (name) => name !== "borderDash"
|
|
9009
|
-
}),
|
|
9133
|
+
}), _i);
|
|
9010
9134
|
function setStyle$1(ctx, options, style = options) {
|
|
9011
9135
|
ctx.lineCap = valueOrDefault$1(style.borderCapStyle, options.borderCapStyle);
|
|
9012
9136
|
ctx.setLineDash(valueOrDefault$1(style.borderDash, options.borderDash));
|
|
@@ -9159,7 +9283,7 @@ function draw$3(ctx, line, start, count) {
|
|
|
9159
9283
|
strokePathDirect$1(ctx, line, start, count);
|
|
9160
9284
|
}
|
|
9161
9285
|
}
|
|
9162
|
-
let LineElement$1 = (
|
|
9286
|
+
let LineElement$1 = (_j = class extends Element$2 {
|
|
9163
9287
|
constructor(cfg) {
|
|
9164
9288
|
super();
|
|
9165
9289
|
this.animated = true;
|
|
@@ -9269,7 +9393,7 @@ let LineElement$1 = (_i = class extends Element$2 {
|
|
|
9269
9393
|
this._path = void 0;
|
|
9270
9394
|
}
|
|
9271
9395
|
}
|
|
9272
|
-
}, __publicField(
|
|
9396
|
+
}, __publicField(_j, "id", "line"), __publicField(_j, "defaults", {
|
|
9273
9397
|
borderCapStyle: "butt",
|
|
9274
9398
|
borderDash: [],
|
|
9275
9399
|
borderDashOffset: 0,
|
|
@@ -9281,13 +9405,13 @@ let LineElement$1 = (_i = class extends Element$2 {
|
|
|
9281
9405
|
spanGaps: false,
|
|
9282
9406
|
stepped: false,
|
|
9283
9407
|
tension: 0
|
|
9284
|
-
}), __publicField(
|
|
9408
|
+
}), __publicField(_j, "defaultRoutes", {
|
|
9285
9409
|
backgroundColor: "backgroundColor",
|
|
9286
9410
|
borderColor: "borderColor"
|
|
9287
|
-
}), __publicField(
|
|
9411
|
+
}), __publicField(_j, "descriptors", {
|
|
9288
9412
|
_scriptable: true,
|
|
9289
9413
|
_indexable: (name) => name !== "borderDash" && name !== "fill"
|
|
9290
|
-
}),
|
|
9414
|
+
}), _j);
|
|
9291
9415
|
function inRange$1$1(el, pos, axis, useFinalPosition) {
|
|
9292
9416
|
const options = el.options;
|
|
9293
9417
|
const { [axis]: value } = el.getProps([
|
|
@@ -9295,7 +9419,7 @@ function inRange$1$1(el, pos, axis, useFinalPosition) {
|
|
|
9295
9419
|
], useFinalPosition);
|
|
9296
9420
|
return Math.abs(pos - value) < options.radius + options.hitRadius;
|
|
9297
9421
|
}
|
|
9298
|
-
let PointElement$1 = (
|
|
9422
|
+
let PointElement$1 = (_k = class extends Element$2 {
|
|
9299
9423
|
constructor(cfg) {
|
|
9300
9424
|
super();
|
|
9301
9425
|
__publicField(this, "parsed");
|
|
@@ -9354,10 +9478,10 @@ let PointElement$1 = (_j = class extends Element$2 {
|
|
|
9354
9478
|
const options = this.options || {};
|
|
9355
9479
|
return options.radius + options.hitRadius;
|
|
9356
9480
|
}
|
|
9357
|
-
}, __publicField(
|
|
9481
|
+
}, __publicField(_k, "id", "point"), /**
|
|
9358
9482
|
* @type {any}
|
|
9359
9483
|
*/
|
|
9360
|
-
__publicField(
|
|
9484
|
+
__publicField(_k, "defaults", {
|
|
9361
9485
|
borderWidth: 1,
|
|
9362
9486
|
hitRadius: 1,
|
|
9363
9487
|
hoverBorderWidth: 1,
|
|
@@ -9368,10 +9492,10 @@ __publicField(_j, "defaults", {
|
|
|
9368
9492
|
}), /**
|
|
9369
9493
|
* @type {any}
|
|
9370
9494
|
*/
|
|
9371
|
-
__publicField(
|
|
9495
|
+
__publicField(_k, "defaultRoutes", {
|
|
9372
9496
|
backgroundColor: "backgroundColor",
|
|
9373
9497
|
borderColor: "borderColor"
|
|
9374
|
-
}),
|
|
9498
|
+
}), _k);
|
|
9375
9499
|
function getBarBounds$1(bar, useFinalPosition) {
|
|
9376
9500
|
const { x: x2, y: y2, base, width, height } = bar.getProps([
|
|
9377
9501
|
"x",
|
|
@@ -9485,7 +9609,7 @@ function inflateRect$1(rect, amount, refRect = {}) {
|
|
|
9485
9609
|
radius: rect.radius
|
|
9486
9610
|
};
|
|
9487
9611
|
}
|
|
9488
|
-
let BarElement$1 = (
|
|
9612
|
+
let BarElement$1 = (_l = class extends Element$2 {
|
|
9489
9613
|
constructor(cfg) {
|
|
9490
9614
|
super();
|
|
9491
9615
|
this.options = void 0;
|
|
@@ -9541,16 +9665,16 @@ let BarElement$1 = (_k = class extends Element$2 {
|
|
|
9541
9665
|
getRange(axis) {
|
|
9542
9666
|
return axis === "x" ? this.width / 2 : this.height / 2;
|
|
9543
9667
|
}
|
|
9544
|
-
}, __publicField(
|
|
9668
|
+
}, __publicField(_l, "id", "bar"), __publicField(_l, "defaults", {
|
|
9545
9669
|
borderSkipped: "start",
|
|
9546
9670
|
borderWidth: 0,
|
|
9547
9671
|
borderRadius: 0,
|
|
9548
9672
|
inflateAmount: "auto",
|
|
9549
9673
|
pointStyle: void 0
|
|
9550
|
-
}), __publicField(
|
|
9674
|
+
}), __publicField(_l, "defaultRoutes", {
|
|
9551
9675
|
backgroundColor: "backgroundColor",
|
|
9552
9676
|
borderColor: "borderColor"
|
|
9553
|
-
}),
|
|
9677
|
+
}), _l);
|
|
9554
9678
|
function _segments(line, target, property) {
|
|
9555
9679
|
const segments = line.segments;
|
|
9556
9680
|
const points = line.points;
|
|
@@ -11119,7 +11243,7 @@ function invokeCallbackWithFallback(callbacks, name, ctx, arg) {
|
|
|
11119
11243
|
}
|
|
11120
11244
|
return result;
|
|
11121
11245
|
}
|
|
11122
|
-
let Tooltip$1 = (
|
|
11246
|
+
let Tooltip$1 = (_m = class extends Element$2 {
|
|
11123
11247
|
constructor(config2) {
|
|
11124
11248
|
super();
|
|
11125
11249
|
this.opacity = 0;
|
|
@@ -11658,7 +11782,7 @@ let Tooltip$1 = (_l = class extends Element$2 {
|
|
|
11658
11782
|
const position = positioners$2[options.position].call(this, active, e2);
|
|
11659
11783
|
return position !== false && (caretX !== position.x || caretY !== position.y);
|
|
11660
11784
|
}
|
|
11661
|
-
}, __publicField(
|
|
11785
|
+
}, __publicField(_m, "positioners", positioners$2), _m);
|
|
11662
11786
|
var plugin_tooltip = {
|
|
11663
11787
|
id: "tooltip",
|
|
11664
11788
|
_element: Tooltip$1,
|
|
@@ -11813,7 +11937,7 @@ function _getLabelForValue(value) {
|
|
|
11813
11937
|
}
|
|
11814
11938
|
return value;
|
|
11815
11939
|
}
|
|
11816
|
-
let CategoryScale$1 = (
|
|
11940
|
+
let CategoryScale$1 = (_n = class extends Scale$1 {
|
|
11817
11941
|
constructor(cfg) {
|
|
11818
11942
|
super(cfg);
|
|
11819
11943
|
this._startValue = void 0;
|
|
@@ -11899,11 +12023,11 @@ let CategoryScale$1 = (_m = class extends Scale$1 {
|
|
|
11899
12023
|
getBasePixel() {
|
|
11900
12024
|
return this.bottom;
|
|
11901
12025
|
}
|
|
11902
|
-
}, __publicField(
|
|
12026
|
+
}, __publicField(_n, "id", "category"), __publicField(_n, "defaults", {
|
|
11903
12027
|
ticks: {
|
|
11904
12028
|
callback: _getLabelForValue
|
|
11905
12029
|
}
|
|
11906
|
-
}),
|
|
12030
|
+
}), _n);
|
|
11907
12031
|
function generateTicks$1$1(generationOptions, dataRange) {
|
|
11908
12032
|
const ticks = [];
|
|
11909
12033
|
const MIN_SPACING = 1e-14;
|
|
@@ -12126,7 +12250,7 @@ let LinearScaleBase$1 = class LinearScaleBase extends Scale$1 {
|
|
|
12126
12250
|
return formatNumber$1(value, this.chart.options.locale, this.options.ticks.format);
|
|
12127
12251
|
}
|
|
12128
12252
|
};
|
|
12129
|
-
let LinearScale$1 = (
|
|
12253
|
+
let LinearScale$1 = (_o = class extends LinearScaleBase$1 {
|
|
12130
12254
|
determineDataLimits() {
|
|
12131
12255
|
const { min, max } = this.getMinMax(true);
|
|
12132
12256
|
this.min = isNumberFinite$1(min) ? min : 0;
|
|
@@ -12147,11 +12271,11 @@ let LinearScale$1 = (_n = class extends LinearScaleBase$1 {
|
|
|
12147
12271
|
getValueForPixel(pixel) {
|
|
12148
12272
|
return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;
|
|
12149
12273
|
}
|
|
12150
|
-
}, __publicField(
|
|
12274
|
+
}, __publicField(_o, "id", "linear"), __publicField(_o, "defaults", {
|
|
12151
12275
|
ticks: {
|
|
12152
12276
|
callback: Ticks$1.formatters.numeric
|
|
12153
12277
|
}
|
|
12154
|
-
}),
|
|
12278
|
+
}), _o);
|
|
12155
12279
|
const log10Floor = (v2) => Math.floor(log10$1(v2));
|
|
12156
12280
|
const changeExponent = (v2, m2) => Math.pow(10, log10Floor(v2) + m2);
|
|
12157
12281
|
function isMajor$1(tickVal) {
|
|
@@ -12213,7 +12337,7 @@ function generateTicks$2(generationOptions, { min, max }) {
|
|
|
12213
12337
|
});
|
|
12214
12338
|
return ticks;
|
|
12215
12339
|
}
|
|
12216
|
-
let LogarithmicScale$1 = (
|
|
12340
|
+
let LogarithmicScale$1 = (_p = class extends Scale$1 {
|
|
12217
12341
|
constructor(cfg) {
|
|
12218
12342
|
super(cfg);
|
|
12219
12343
|
this.start = void 0;
|
|
@@ -12310,14 +12434,14 @@ let LogarithmicScale$1 = (_o = class extends Scale$1 {
|
|
|
12310
12434
|
const decimal = this.getDecimalForPixel(pixel);
|
|
12311
12435
|
return Math.pow(10, this._startValue + decimal * this._valueRange);
|
|
12312
12436
|
}
|
|
12313
|
-
}, __publicField(
|
|
12437
|
+
}, __publicField(_p, "id", "logarithmic"), __publicField(_p, "defaults", {
|
|
12314
12438
|
ticks: {
|
|
12315
12439
|
callback: Ticks$1.formatters.logarithmic,
|
|
12316
12440
|
major: {
|
|
12317
12441
|
enabled: true
|
|
12318
12442
|
}
|
|
12319
12443
|
}
|
|
12320
|
-
}),
|
|
12444
|
+
}), _p);
|
|
12321
12445
|
const INTERVALS$1 = {
|
|
12322
12446
|
millisecond: {
|
|
12323
12447
|
common: true,
|
|
@@ -12453,7 +12577,7 @@ function ticksFromTimestamps$1(scale, values2, majorUnit) {
|
|
|
12453
12577
|
}
|
|
12454
12578
|
return ilen === 0 || !majorUnit ? ticks : setMajorTicks$1(scale, ticks, map2, majorUnit);
|
|
12455
12579
|
}
|
|
12456
|
-
let TimeScale$1 = (
|
|
12580
|
+
let TimeScale$1 = (_q = class extends Scale$1 {
|
|
12457
12581
|
constructor(props) {
|
|
12458
12582
|
super(props);
|
|
12459
12583
|
this._cache = {
|
|
@@ -12719,7 +12843,7 @@ let TimeScale$1 = (_p = class extends Scale$1 {
|
|
|
12719
12843
|
normalize(values2) {
|
|
12720
12844
|
return _arrayUnique$1(values2.sort(sorter$1));
|
|
12721
12845
|
}
|
|
12722
|
-
}, __publicField(
|
|
12846
|
+
}, __publicField(_q, "id", "time"), __publicField(_q, "defaults", {
|
|
12723
12847
|
bounds: "data",
|
|
12724
12848
|
adapters: {},
|
|
12725
12849
|
time: {
|
|
@@ -12737,7 +12861,7 @@ let TimeScale$1 = (_p = class extends Scale$1 {
|
|
|
12737
12861
|
enabled: false
|
|
12738
12862
|
}
|
|
12739
12863
|
}
|
|
12740
|
-
}),
|
|
12864
|
+
}), _q);
|
|
12741
12865
|
function interpolate$2(table2, val, reverse) {
|
|
12742
12866
|
let lo = 0;
|
|
12743
12867
|
let hi = table2.length - 1;
|
|
@@ -12758,7 +12882,7 @@ function interpolate$2(table2, val, reverse) {
|
|
|
12758
12882
|
const span = nextSource - prevSource;
|
|
12759
12883
|
return span ? prevTarget + (nextTarget - prevTarget) * (val - prevSource) / span : prevTarget;
|
|
12760
12884
|
}
|
|
12761
|
-
let TimeSeriesScale$1 = (
|
|
12885
|
+
let TimeSeriesScale$1 = (_r = class extends TimeScale$1 {
|
|
12762
12886
|
constructor(props) {
|
|
12763
12887
|
super(props);
|
|
12764
12888
|
this._table = [];
|
|
@@ -12843,7 +12967,7 @@ let TimeSeriesScale$1 = (_q = class extends TimeScale$1 {
|
|
|
12843
12967
|
const decimal = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;
|
|
12844
12968
|
return interpolate$2(this._table, decimal * this._tableRange + this._minPos, true);
|
|
12845
12969
|
}
|
|
12846
|
-
}, __publicField(
|
|
12970
|
+
}, __publicField(_r, "id", "timeseries"), __publicField(_r, "defaults", TimeScale$1.defaults), _r);
|
|
12847
12971
|
const defaultDatasetIdKey = "label";
|
|
12848
12972
|
function reforwardRef(ref, value) {
|
|
12849
12973
|
if (typeof ref === "function") {
|
|
@@ -12980,6 +13104,7 @@ function createTypedChart(type, registerables) {
|
|
|
12980
13104
|
const Line = /* @__PURE__ */ createTypedChart("line", LineController$1);
|
|
12981
13105
|
const Bar = /* @__PURE__ */ createTypedChart("bar", BarController$1);
|
|
12982
13106
|
const Pie = /* @__PURE__ */ createTypedChart("pie", PieController$1);
|
|
13107
|
+
const Scatter = /* @__PURE__ */ createTypedChart("scatter", ScatterController$1);
|
|
12983
13108
|
function getDefaultExportFromCjs(x2) {
|
|
12984
13109
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
12985
13110
|
}
|
|
@@ -22048,26 +22173,26 @@ class HTML5BackendImpl {
|
|
|
22048
22173
|
const HTML5Backend = function createBackend(manager, context, options) {
|
|
22049
22174
|
return new HTML5BackendImpl(manager, context, options);
|
|
22050
22175
|
};
|
|
22051
|
-
const chart$
|
|
22176
|
+
const chart$3 = "_chart_e3qdd_1";
|
|
22052
22177
|
const canvas$1 = "_canvas_e3qdd_11";
|
|
22053
|
-
const fixedHeight$
|
|
22054
|
-
const stretchHeight$
|
|
22178
|
+
const fixedHeight$3 = "_fixedHeight_e3qdd_20";
|
|
22179
|
+
const stretchHeight$3 = "_stretchHeight_e3qdd_26";
|
|
22055
22180
|
const squareAspectRatio = "_squareAspectRatio_e3qdd_32";
|
|
22056
|
-
const zoomForm$
|
|
22057
|
-
const zoomReset$
|
|
22058
|
-
const help$
|
|
22059
|
-
const autoWeight$
|
|
22181
|
+
const zoomForm$3 = "_zoomForm_e3qdd_43";
|
|
22182
|
+
const zoomReset$3 = "_zoomReset_e3qdd_51";
|
|
22183
|
+
const help$3 = "_help_e3qdd_54";
|
|
22184
|
+
const autoWeight$3 = "_autoWeight_e3qdd_58";
|
|
22060
22185
|
const table = "_table_e3qdd_62";
|
|
22061
|
-
const styles$
|
|
22062
|
-
chart: chart$
|
|
22186
|
+
const styles$5 = {
|
|
22187
|
+
chart: chart$3,
|
|
22063
22188
|
canvas: canvas$1,
|
|
22064
|
-
fixedHeight: fixedHeight$
|
|
22065
|
-
stretchHeight: stretchHeight$
|
|
22189
|
+
fixedHeight: fixedHeight$3,
|
|
22190
|
+
stretchHeight: stretchHeight$3,
|
|
22066
22191
|
squareAspectRatio,
|
|
22067
|
-
zoomForm: zoomForm$
|
|
22068
|
-
zoomReset: zoomReset$
|
|
22069
|
-
help: help$
|
|
22070
|
-
autoWeight: autoWeight$
|
|
22192
|
+
zoomForm: zoomForm$3,
|
|
22193
|
+
zoomReset: zoomReset$3,
|
|
22194
|
+
help: help$3,
|
|
22195
|
+
autoWeight: autoWeight$3,
|
|
22071
22196
|
table
|
|
22072
22197
|
};
|
|
22073
22198
|
const TOGGLE_ZOOM = "TOGGLE_ZOOM";
|
|
@@ -22191,10 +22316,10 @@ var ScaleType = /* @__PURE__ */ ((ScaleType2) => {
|
|
|
22191
22316
|
ScaleType2["Logarithmic"] = "logarithmic";
|
|
22192
22317
|
return ScaleType2;
|
|
22193
22318
|
})(ScaleType || {});
|
|
22194
|
-
var ChartDirection = /* @__PURE__ */ ((ChartDirection2) => {
|
|
22319
|
+
var ChartDirection$1 = /* @__PURE__ */ ((ChartDirection2) => {
|
|
22195
22320
|
ChartDirection2["Vertical"] = "vertical";
|
|
22196
22321
|
return ChartDirection2;
|
|
22197
|
-
})(ChartDirection || {});
|
|
22322
|
+
})(ChartDirection$1 || {});
|
|
22198
22323
|
var TooltipLabel = /* @__PURE__ */ ((TooltipLabel2) => {
|
|
22199
22324
|
TooltipLabel2["Y"] = "yLabel";
|
|
22200
22325
|
TooltipLabel2["X"] = "xLabel";
|
|
@@ -22413,7 +22538,7 @@ const getTitle = (options) => {
|
|
|
22413
22538
|
} : {};
|
|
22414
22539
|
};
|
|
22415
22540
|
const isVertical = (direction) => {
|
|
22416
|
-
return direction === ChartDirection.Vertical;
|
|
22541
|
+
return direction === ChartDirection$1.Vertical;
|
|
22417
22542
|
};
|
|
22418
22543
|
const getAxisPosition = (axisType, i2) => {
|
|
22419
22544
|
const [positionA, positionB] = axisType === AxisType.Y ? [Position.Left, Position.Right] : [Position.Top, Position.Bottom];
|
|
@@ -22868,7 +22993,7 @@ const DragOptions = ({
|
|
|
22868
22993
|
};
|
|
22869
22994
|
const controls = "_controls_gbo9q_1";
|
|
22870
22995
|
const buttons = "_buttons_gbo9q_7";
|
|
22871
|
-
const styles$
|
|
22996
|
+
const styles$4 = {
|
|
22872
22997
|
controls,
|
|
22873
22998
|
buttons
|
|
22874
22999
|
};
|
|
@@ -24327,10 +24452,10 @@ const Controls = ({
|
|
|
24327
24452
|
generatedDatasets
|
|
24328
24453
|
});
|
|
24329
24454
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24330
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
24455
|
+
/* @__PURE__ */ jsxs("div", { className: styles$4.controls, children: [
|
|
24331
24456
|
!!options.title && /* @__PURE__ */ jsx(Text, { bold: true, children: options.title }),
|
|
24332
24457
|
headerComponent,
|
|
24333
|
-
/* @__PURE__ */ jsx(ControlsPortal, { controlsPortalId: controlsPortalId ?? "", children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
24458
|
+
/* @__PURE__ */ jsx(ControlsPortal, { controlsPortalId: controlsPortalId ?? "", children: /* @__PURE__ */ jsxs("div", { className: styles$4.buttons, children: [
|
|
24334
24459
|
!showTable && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24335
24460
|
/* @__PURE__ */ jsx(
|
|
24336
24461
|
AxesOptions,
|
|
@@ -24432,11 +24557,11 @@ const defaultAxis = (position) => ({
|
|
|
24432
24557
|
}
|
|
24433
24558
|
}
|
|
24434
24559
|
});
|
|
24435
|
-
const defaultAxes$
|
|
24560
|
+
const defaultAxes$2 = (axes) => ({
|
|
24436
24561
|
x: (axes == null ? void 0 : axes.x) || [defaultAxis("bottom")],
|
|
24437
24562
|
y: (axes == null ? void 0 : axes.y) || [defaultAxis("left")]
|
|
24438
24563
|
});
|
|
24439
|
-
const defaultAdditionalAxesOptions$
|
|
24564
|
+
const defaultAdditionalAxesOptions$2 = (options) => ({
|
|
24440
24565
|
chartScaleType: (options == null ? void 0 : options.chartScaleType) || "linear",
|
|
24441
24566
|
reverse: (options == null ? void 0 : options.reverse) || false,
|
|
24442
24567
|
beginAtZero: (options == null ? void 0 : options.beginAtZero) ?? false,
|
|
@@ -24446,7 +24571,7 @@ const defaultAdditionalAxesOptions$1 = (options) => ({
|
|
|
24446
24571
|
range: options == null ? void 0 : options.range,
|
|
24447
24572
|
autoAxisPadding: (options == null ? void 0 : options.autoAxisPadding) ?? false
|
|
24448
24573
|
});
|
|
24449
|
-
const defaultChartStyling$
|
|
24574
|
+
const defaultChartStyling$3 = (options) => ({
|
|
24450
24575
|
width: options == null ? void 0 : options.width,
|
|
24451
24576
|
height: options == null ? void 0 : options.height,
|
|
24452
24577
|
maintainAspectRatio: (options == null ? void 0 : options.maintainAspectRatio) ?? false,
|
|
@@ -24460,22 +24585,22 @@ const defaultChartStyling$2 = (options) => ({
|
|
|
24460
24585
|
right: 0
|
|
24461
24586
|
}
|
|
24462
24587
|
});
|
|
24463
|
-
const defaultTooltip$
|
|
24588
|
+
const defaultTooltip$3 = (tooltip) => ({
|
|
24464
24589
|
tooltips: (tooltip == null ? void 0 : tooltip.tooltips) ?? true,
|
|
24465
24590
|
showLabelsInTooltips: (tooltip == null ? void 0 : tooltip.showLabelsInTooltips) ?? false,
|
|
24466
24591
|
hideSimulationName: (tooltip == null ? void 0 : tooltip.hideSimulationName) ?? false,
|
|
24467
24592
|
scientificNotation: (tooltip == null ? void 0 : tooltip.scientificNotation) ?? true
|
|
24468
24593
|
});
|
|
24469
|
-
const defaultGraph$
|
|
24594
|
+
const defaultGraph$3 = (graph) => ({
|
|
24470
24595
|
lineTension: (graph == null ? void 0 : graph.lineTension) ?? 0.01,
|
|
24471
24596
|
spanGaps: (graph == null ? void 0 : graph.spanGaps) ?? false,
|
|
24472
24597
|
showDataLabels: (graph == null ? void 0 : graph.showDataLabels) ?? false,
|
|
24473
24598
|
showMinorGridlines: (graph == null ? void 0 : graph.showMinorGridlines) ?? false
|
|
24474
24599
|
});
|
|
24475
|
-
const defaultAnnotationsData$
|
|
24600
|
+
const defaultAnnotationsData$2 = (annotationsData) => {
|
|
24476
24601
|
return annotationsData ? annotationsData.map((ann) => ({ ...ann, display: (ann == null ? void 0 : ann.display) ?? true })) : [];
|
|
24477
24602
|
};
|
|
24478
|
-
const defaultAnnotations$
|
|
24603
|
+
const defaultAnnotations$2 = (annotations) => {
|
|
24479
24604
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
24480
24605
|
return {
|
|
24481
24606
|
labelAnnotation: {
|
|
@@ -24490,10 +24615,10 @@ const defaultAnnotations$1 = (annotations) => {
|
|
|
24490
24615
|
},
|
|
24491
24616
|
showAnnotations: (annotations == null ? void 0 : annotations.showAnnotations) ?? false,
|
|
24492
24617
|
controlAnnotation: (annotations == null ? void 0 : annotations.controlAnnotation) ?? false,
|
|
24493
|
-
annotationsData: defaultAnnotationsData$
|
|
24618
|
+
annotationsData: defaultAnnotationsData$2(annotations == null ? void 0 : annotations.annotationsData)
|
|
24494
24619
|
};
|
|
24495
24620
|
};
|
|
24496
|
-
const defaultLegend$
|
|
24621
|
+
const defaultLegend$3 = (legend2) => ({
|
|
24497
24622
|
display: (legend2 == null ? void 0 : legend2.display) ?? true,
|
|
24498
24623
|
position: (legend2 == null ? void 0 : legend2.position) ?? Position.BottomLeft,
|
|
24499
24624
|
align: (legend2 == null ? void 0 : legend2.align) ?? AlignOptions.Center,
|
|
@@ -24503,14 +24628,14 @@ const defaultLegend$2 = (legend2) => ({
|
|
|
24503
24628
|
},
|
|
24504
24629
|
usePointStyle: (legend2 == null ? void 0 : legend2.usePointStyle) ?? true
|
|
24505
24630
|
});
|
|
24506
|
-
const defaultChartOptions$
|
|
24631
|
+
const defaultChartOptions$3 = (options) => ({
|
|
24507
24632
|
showPoints: (options == null ? void 0 : options.showPoints) ?? true,
|
|
24508
24633
|
enableZoom: (options == null ? void 0 : options.enableZoom) ?? true,
|
|
24509
24634
|
enablePan: (options == null ? void 0 : options.enablePan) ?? false,
|
|
24510
24635
|
showLine: (options == null ? void 0 : options.showLine) ?? true,
|
|
24511
24636
|
closeOnOutsideClick: (options == null ? void 0 : options.closeOnOutsideClick) ?? false
|
|
24512
24637
|
});
|
|
24513
|
-
const defaultInteractions$
|
|
24638
|
+
const defaultInteractions$3 = (interactions) => ({
|
|
24514
24639
|
onLegendClick: interactions == null ? void 0 : interactions.onLegendClick,
|
|
24515
24640
|
onHover: interactions == null ? void 0 : interactions.onHover,
|
|
24516
24641
|
onUnhover: interactions == null ? void 0 : interactions.onUnhover,
|
|
@@ -24526,7 +24651,7 @@ const defaultDragData$1 = (dragData) => ({
|
|
|
24526
24651
|
onDrag: dragData == null ? void 0 : dragData.onDrag,
|
|
24527
24652
|
onDragEnd: dragData == null ? void 0 : dragData.onDragEnd
|
|
24528
24653
|
});
|
|
24529
|
-
const getDefaultProps$
|
|
24654
|
+
const getDefaultProps$3 = (props) => {
|
|
24530
24655
|
const chart2 = (props == null ? void 0 : props.chart) || {};
|
|
24531
24656
|
const options = (chart2 == null ? void 0 : chart2.options) || {};
|
|
24532
24657
|
return {
|
|
@@ -24537,17 +24662,17 @@ const getDefaultProps$2 = (props) => {
|
|
|
24537
24662
|
options: {
|
|
24538
24663
|
title: (options == null ? void 0 : options.title) ?? "",
|
|
24539
24664
|
scales: (options == null ? void 0 : options.scales) ?? {},
|
|
24540
|
-
axes: defaultAxes$
|
|
24541
|
-
additionalAxesOptions: defaultAdditionalAxesOptions$
|
|
24665
|
+
axes: defaultAxes$2(options == null ? void 0 : options.axes),
|
|
24666
|
+
additionalAxesOptions: defaultAdditionalAxesOptions$2(
|
|
24542
24667
|
options == null ? void 0 : options.additionalAxesOptions
|
|
24543
24668
|
),
|
|
24544
|
-
chartStyling: defaultChartStyling$
|
|
24545
|
-
tooltip: defaultTooltip$
|
|
24546
|
-
graph: defaultGraph$
|
|
24547
|
-
annotations: defaultAnnotations$
|
|
24548
|
-
legend: defaultLegend$
|
|
24549
|
-
chartOptions: defaultChartOptions$
|
|
24550
|
-
interactions: defaultInteractions$
|
|
24669
|
+
chartStyling: defaultChartStyling$3(options == null ? void 0 : options.chartStyling),
|
|
24670
|
+
tooltip: defaultTooltip$3(options == null ? void 0 : options.tooltip),
|
|
24671
|
+
graph: defaultGraph$3(options == null ? void 0 : options.graph),
|
|
24672
|
+
annotations: defaultAnnotations$2(options == null ? void 0 : options.annotations),
|
|
24673
|
+
legend: defaultLegend$3(options == null ? void 0 : options.legend),
|
|
24674
|
+
chartOptions: defaultChartOptions$3(options == null ? void 0 : options.chartOptions),
|
|
24675
|
+
interactions: defaultInteractions$3(options == null ? void 0 : options.interactions),
|
|
24551
24676
|
dragData: defaultDragData$1(options == null ? void 0 : options.dragData),
|
|
24552
24677
|
depthType: (options == null ? void 0 : options.depthType) ?? {}
|
|
24553
24678
|
}
|
|
@@ -24990,7 +25115,7 @@ const getUnitsFromLabel = (label) => {
|
|
|
24990
25115
|
const units = matches && (matches == null ? void 0 : matches.length) > 0 ? matches == null ? void 0 : matches[0] : "";
|
|
24991
25116
|
return units;
|
|
24992
25117
|
};
|
|
24993
|
-
const customFormatNumber = (labelNumber, scientificNotation) => {
|
|
25118
|
+
const customFormatNumber$1 = (labelNumber, scientificNotation) => {
|
|
24994
25119
|
let roundOptions = {};
|
|
24995
25120
|
if (!scientificNotation) {
|
|
24996
25121
|
roundOptions = { scientific: false };
|
|
@@ -25026,21 +25151,21 @@ const getLineChartToolTips = (options) => {
|
|
|
25026
25151
|
};
|
|
25027
25152
|
}
|
|
25028
25153
|
};
|
|
25029
|
-
const
|
|
25154
|
+
const titleCallback2 = (tooltipItem) => {
|
|
25030
25155
|
const labels = getTooltipLabels(tooltipItem[0].dataset);
|
|
25031
25156
|
const { titleLabel, titleAxisLabel } = labels ?? {};
|
|
25032
25157
|
const formattedValue = titleLabel === TooltipLabel.Y ? tooltipItem[0].parsed.y : tooltipItem[0].parsed.x;
|
|
25033
|
-
const roundedValue = customFormatNumber(formattedValue, scientificNotation);
|
|
25158
|
+
const roundedValue = customFormatNumber$1(formattedValue, scientificNotation);
|
|
25034
25159
|
return `${roundedValue} ${titleAxisLabel}`;
|
|
25035
25160
|
};
|
|
25036
|
-
const
|
|
25161
|
+
const labelCallback2 = (tooltipItem) => {
|
|
25037
25162
|
const { showLabelsInTooltips } = options.tooltip;
|
|
25038
25163
|
let label = tooltipItem.dataset.label || "";
|
|
25039
25164
|
const labels = getTooltipLabels(tooltipItem.dataset);
|
|
25040
25165
|
const { valueLabel = "", valueAxisLabel = "" } = labels ?? {};
|
|
25041
25166
|
const getTooltipItemValue = () => {
|
|
25042
25167
|
const labelNumber = valueLabel === TooltipLabel.X ? tooltipItem.parsed.x : tooltipItem.parsed.y;
|
|
25043
|
-
return customFormatNumber(labelNumber, scientificNotation);
|
|
25168
|
+
return customFormatNumber$1(labelNumber, scientificNotation);
|
|
25044
25169
|
};
|
|
25045
25170
|
const tooltipItemValue = getTooltipItemValue();
|
|
25046
25171
|
const units = getUnitsFromLabel(valueAxisLabel);
|
|
@@ -25057,8 +25182,8 @@ const getLineChartToolTips = (options) => {
|
|
|
25057
25182
|
boxHeight: LEGEND_LABEL_BOX_SIZE,
|
|
25058
25183
|
boxPadding: TOOLTIP_BOX_PADDING,
|
|
25059
25184
|
callbacks: {
|
|
25060
|
-
title:
|
|
25061
|
-
label:
|
|
25185
|
+
title: titleCallback2,
|
|
25186
|
+
label: labelCallback2,
|
|
25062
25187
|
afterLabel: afterLabelCallback
|
|
25063
25188
|
}
|
|
25064
25189
|
};
|
|
@@ -25871,7 +25996,7 @@ const bottom = "_bottom_wpro0_161";
|
|
|
25871
25996
|
const dropzonePlaceholder = "_dropzonePlaceholder_wpro0_165";
|
|
25872
25997
|
const isActive = "_isActive_wpro0_173";
|
|
25873
25998
|
const resizeContainer = "_resizeContainer_wpro0_176";
|
|
25874
|
-
const styles$
|
|
25999
|
+
const styles$3 = {
|
|
25875
26000
|
legend,
|
|
25876
26001
|
isDragging,
|
|
25877
26002
|
legendItems,
|
|
@@ -25901,6 +26026,11 @@ var ChartType = /* @__PURE__ */ ((ChartType2) => {
|
|
|
25901
26026
|
ChartType2["SCATTER"] = "scatter";
|
|
25902
26027
|
return ChartType2;
|
|
25903
26028
|
})(ChartType || {});
|
|
26029
|
+
var ChartDirection = /* @__PURE__ */ ((ChartDirection2) => {
|
|
26030
|
+
ChartDirection2["VERTICAL"] = "vertical";
|
|
26031
|
+
ChartDirection2["HORIZONTAL"] = "horizontal";
|
|
26032
|
+
return ChartDirection2;
|
|
26033
|
+
})(ChartDirection || {});
|
|
25904
26034
|
const circleSvg = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTIiIGZpbGw9ImN1cnJlbnRDb2xvciIgLz48L3N2Zz4=";
|
|
25905
26035
|
const rectSvg = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHJlY3QgeD0iMiIgeT0iMiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiBmaWxsPSJjdXJyZW50Q29sb3IiIC8+PC9zdmc+";
|
|
25906
26036
|
const rectRotSvg = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHJlY3QgeD0iMyIgeT0iMyIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiBmaWxsPSJjdXJyZW50Q29sb3IiIHRyYW5zZm9ybT0ncm90YXRlKDQ1IDEyIDEyKScgLz48L3N2Zz4=";
|
|
@@ -25911,7 +26041,7 @@ const LineItem = ({ dataset }) => {
|
|
|
25911
26041
|
const { borderColor, borderDash, borderWidth } = dataset;
|
|
25912
26042
|
const offset = borderDash.length ? (LEGEND_SYMBOL_SIZE$1 - borderDash[0]) / 2 % (borderDash[0] + borderDash[1]) * -1 : 0;
|
|
25913
26043
|
const borderDashString = ((_a2 = dataset.borderDash) == null ? void 0 : _a2.join(" ")) || "";
|
|
25914
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
26044
|
+
return /* @__PURE__ */ jsx("span", { className: styles$3.legendItemLine, children: /* @__PURE__ */ jsx(
|
|
25915
26045
|
"svg",
|
|
25916
26046
|
{
|
|
25917
26047
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -25943,7 +26073,7 @@ const PointItem = ({ dataset }) => {
|
|
|
25943
26073
|
rectRot: rectRotSvg,
|
|
25944
26074
|
rect: rectSvg
|
|
25945
26075
|
};
|
|
25946
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
26076
|
+
return /* @__PURE__ */ jsx("span", { className: styles$3.legendItemPoint, children: /* @__PURE__ */ jsx(
|
|
25947
26077
|
Icon,
|
|
25948
26078
|
{
|
|
25949
26079
|
icon: icons[pointStyle] || circleSvg,
|
|
@@ -25955,7 +26085,7 @@ const PointItem = ({ dataset }) => {
|
|
|
25955
26085
|
const BoxItem = ({ dataset }) => {
|
|
25956
26086
|
const { backgroundColor } = dataset;
|
|
25957
26087
|
const style = { backgroundColor };
|
|
25958
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
26088
|
+
return /* @__PURE__ */ jsx("span", { className: styles$3.legendItemBox, style });
|
|
25959
26089
|
};
|
|
25960
26090
|
const LegendItemLine = ({ dataset }) => {
|
|
25961
26091
|
const { annotationType, showLine } = dataset;
|
|
@@ -25978,11 +26108,11 @@ const renderLegendItemSymbol = (dataset, chartType) => {
|
|
|
25978
26108
|
case ChartType.LINE:
|
|
25979
26109
|
return /* @__PURE__ */ jsx(LegendItemLine, { dataset });
|
|
25980
26110
|
case ChartType.BAR:
|
|
25981
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
26111
|
+
return /* @__PURE__ */ jsx("span", { className: styles$3.legendItemBox, children: /* @__PURE__ */ jsx(TbSquareFilled, { color: dataset.borderColor }) });
|
|
25982
26112
|
case ChartType.PIE:
|
|
25983
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
26113
|
+
return /* @__PURE__ */ jsx("span", { className: styles$3.legendItemPoint, children: /* @__PURE__ */ jsx(Icon, { icon: circleSvg }) });
|
|
25984
26114
|
case ChartType.SCATTER:
|
|
25985
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
26115
|
+
return /* @__PURE__ */ jsx("span", { className: styles$3.legendItemPoint, children: /* @__PURE__ */ jsx(TbCircleFilled, { color: dataset.borderColor }) });
|
|
25986
26116
|
default:
|
|
25987
26117
|
return null;
|
|
25988
26118
|
}
|
|
@@ -25996,18 +26126,18 @@ const LegendItem = ({
|
|
|
25996
26126
|
return /* @__PURE__ */ jsxs(
|
|
25997
26127
|
"div",
|
|
25998
26128
|
{
|
|
25999
|
-
className: cx(styles$
|
|
26129
|
+
className: cx(styles$3.legendItem, hidden && styles$3.isHidden),
|
|
26000
26130
|
onClick: handleClick,
|
|
26001
26131
|
children: [
|
|
26002
26132
|
/* @__PURE__ */ jsx(
|
|
26003
26133
|
"span",
|
|
26004
26134
|
{
|
|
26005
|
-
className: styles$
|
|
26135
|
+
className: styles$3.legendItemSymbol,
|
|
26006
26136
|
style: { width: LEGEND_SYMBOL_SIZE },
|
|
26007
26137
|
children: renderLegendItemSymbol(dataset, chartType)
|
|
26008
26138
|
}
|
|
26009
26139
|
),
|
|
26010
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
26140
|
+
/* @__PURE__ */ jsx("span", { className: styles$3.legendItemText, children: dataset.label })
|
|
26011
26141
|
]
|
|
26012
26142
|
}
|
|
26013
26143
|
);
|
|
@@ -26074,7 +26204,7 @@ const LegendItems = ({
|
|
|
26074
26204
|
datasets,
|
|
26075
26205
|
legendClick,
|
|
26076
26206
|
chartType
|
|
26077
|
-
}) => /* @__PURE__ */ jsx("div", { className: styles$
|
|
26207
|
+
}) => /* @__PURE__ */ jsx("div", { className: styles$3.legendItems, children: items.map((item) => {
|
|
26078
26208
|
if (datasets[item.datasetIndex].hideLegend) {
|
|
26079
26209
|
return null;
|
|
26080
26210
|
}
|
|
@@ -26107,13 +26237,13 @@ const LegendPanel = forwardRef(
|
|
|
26107
26237
|
{
|
|
26108
26238
|
ref,
|
|
26109
26239
|
className: cx(
|
|
26110
|
-
styles$
|
|
26111
|
-
!legendEnabled && styles$
|
|
26112
|
-
isDragging2 && styles$
|
|
26240
|
+
styles$3.legend,
|
|
26241
|
+
!legendEnabled && styles$3.isHidden,
|
|
26242
|
+
isDragging2 && styles$3.isDragging
|
|
26113
26243
|
),
|
|
26114
26244
|
style,
|
|
26115
26245
|
children: [
|
|
26116
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
26246
|
+
/* @__PURE__ */ jsx("div", { className: styles$3.legendToggle, children: /* @__PURE__ */ jsx(
|
|
26117
26247
|
Button,
|
|
26118
26248
|
{
|
|
26119
26249
|
onClick: () => setLegendEnabled(!legendEnabled),
|
|
@@ -26152,17 +26282,17 @@ const LegendDropZone = (legendDropZoneProps) => {
|
|
|
26152
26282
|
{
|
|
26153
26283
|
ref: dropRef,
|
|
26154
26284
|
className: cx(
|
|
26155
|
-
styles$
|
|
26156
|
-
isActive2 && styles$
|
|
26157
|
-
position.includes("left") && styles$
|
|
26158
|
-
position.includes("right") && styles$
|
|
26159
|
-
position.includes("top") && styles$
|
|
26160
|
-
position.includes("bottom") && styles$
|
|
26285
|
+
styles$3.dropzone,
|
|
26286
|
+
isActive2 && styles$3.isActive,
|
|
26287
|
+
position.includes("left") && styles$3.left,
|
|
26288
|
+
position.includes("right") && styles$3.right,
|
|
26289
|
+
position.includes("top") && styles$3.top,
|
|
26290
|
+
position.includes("bottom") && styles$3.bottom
|
|
26161
26291
|
),
|
|
26162
26292
|
children: /* @__PURE__ */ jsx(
|
|
26163
26293
|
"div",
|
|
26164
26294
|
{
|
|
26165
|
-
className: styles$
|
|
26295
|
+
className: styles$3.dropzonePlaceholder,
|
|
26166
26296
|
style: { ...placeholderSize, margin: LEGEND_MARGIN }
|
|
26167
26297
|
}
|
|
26168
26298
|
)
|
|
@@ -26181,7 +26311,7 @@ const LegendDropZones = (legendDropZonesProps) => {
|
|
|
26181
26311
|
return /* @__PURE__ */ jsx(
|
|
26182
26312
|
"div",
|
|
26183
26313
|
{
|
|
26184
|
-
className: styles$
|
|
26314
|
+
className: styles$3.dropzoneContainer,
|
|
26185
26315
|
style: {
|
|
26186
26316
|
top: top2,
|
|
26187
26317
|
left: left2,
|
|
@@ -26223,7 +26353,7 @@ const Legend2 = ({ chartRef, legendConfig }) => {
|
|
|
26223
26353
|
})
|
|
26224
26354
|
}));
|
|
26225
26355
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26226
|
-
/* @__PURE__ */ jsx("div", { ref: resizeRef, className: styles$
|
|
26356
|
+
/* @__PURE__ */ jsx("div", { ref: resizeRef, className: styles$3.resizeContainer }),
|
|
26227
26357
|
/* @__PURE__ */ jsx(
|
|
26228
26358
|
LegendPanel,
|
|
26229
26359
|
{
|
|
@@ -26269,7 +26399,7 @@ const LineChart = (props) => {
|
|
|
26269
26399
|
const chartRef = useRef(null);
|
|
26270
26400
|
const { table: table2 } = props;
|
|
26271
26401
|
const { translations, languageKey } = getConfig();
|
|
26272
|
-
const chart2 = getDefaultProps$
|
|
26402
|
+
const chart2 = getDefaultProps$3(props);
|
|
26273
26403
|
const {
|
|
26274
26404
|
data: { datasets } = { datasets: [] },
|
|
26275
26405
|
options,
|
|
@@ -26316,7 +26446,7 @@ const LineChart = (props) => {
|
|
|
26316
26446
|
return /* @__PURE__ */ jsxs(
|
|
26317
26447
|
"div",
|
|
26318
26448
|
{
|
|
26319
|
-
className: getClassName(chartStyling, styles$
|
|
26449
|
+
className: getClassName(chartStyling, styles$5),
|
|
26320
26450
|
style: {
|
|
26321
26451
|
width: chartStyling.width || AUTO,
|
|
26322
26452
|
height: chartStyling.height || AUTO
|
|
@@ -26339,7 +26469,7 @@ const LineChart = (props) => {
|
|
|
26339
26469
|
controlsPortalId
|
|
26340
26470
|
}
|
|
26341
26471
|
),
|
|
26342
|
-
table2 && state.showTable ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
26472
|
+
table2 && state.showTable ? /* @__PURE__ */ jsx("div", { className: styles$5.table, children: table2 }) : /* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, context: window, children: /* @__PURE__ */ jsxs("div", { className: styles$5.canvas, id: "canvas", children: [
|
|
26343
26473
|
/* @__PURE__ */ jsx(
|
|
26344
26474
|
Line,
|
|
26345
26475
|
{
|
|
@@ -26374,7 +26504,7 @@ const LineChart = (props) => {
|
|
|
26374
26504
|
);
|
|
26375
26505
|
};
|
|
26376
26506
|
const LineChartWithLegend = (props) => {
|
|
26377
|
-
const { options } = getDefaultProps$
|
|
26507
|
+
const { options } = getDefaultProps$3(props);
|
|
26378
26508
|
return /* @__PURE__ */ jsx(LegendProvider, { options, children: /* @__PURE__ */ jsx(LineChart, { ...props }) });
|
|
26379
26509
|
};
|
|
26380
26510
|
const initializeLineChart = ({ languageKey = "en", ...options }) => {
|
|
@@ -26388,73 +26518,73 @@ const initializeLineChart = ({ languageKey = "en", ...options }) => {
|
|
|
26388
26518
|
}
|
|
26389
26519
|
});
|
|
26390
26520
|
};
|
|
26391
|
-
const chart$
|
|
26392
|
-
const fixedHeight$
|
|
26393
|
-
const stretchHeight$
|
|
26394
|
-
const zoomForm$
|
|
26395
|
-
const zoomReset$
|
|
26396
|
-
const help$
|
|
26397
|
-
const autoWeight$
|
|
26398
|
-
const styles$
|
|
26399
|
-
chart: chart$
|
|
26400
|
-
fixedHeight: fixedHeight$
|
|
26401
|
-
stretchHeight: stretchHeight$
|
|
26402
|
-
zoomForm: zoomForm$
|
|
26403
|
-
zoomReset: zoomReset$
|
|
26404
|
-
help: help$
|
|
26405
|
-
autoWeight: autoWeight$
|
|
26521
|
+
const chart$2 = "_chart_1jdnu_1";
|
|
26522
|
+
const fixedHeight$2 = "_fixedHeight_1jdnu_13";
|
|
26523
|
+
const stretchHeight$2 = "_stretchHeight_1jdnu_19";
|
|
26524
|
+
const zoomForm$2 = "_zoomForm_1jdnu_32";
|
|
26525
|
+
const zoomReset$2 = "_zoomReset_1jdnu_40";
|
|
26526
|
+
const help$2 = "_help_1jdnu_43";
|
|
26527
|
+
const autoWeight$2 = "_autoWeight_1jdnu_47";
|
|
26528
|
+
const styles$2 = {
|
|
26529
|
+
chart: chart$2,
|
|
26530
|
+
fixedHeight: fixedHeight$2,
|
|
26531
|
+
stretchHeight: stretchHeight$2,
|
|
26532
|
+
zoomForm: zoomForm$2,
|
|
26533
|
+
zoomReset: zoomReset$2,
|
|
26534
|
+
help: help$2,
|
|
26535
|
+
autoWeight: autoWeight$2
|
|
26406
26536
|
};
|
|
26407
|
-
const defaultChartStyling$
|
|
26537
|
+
const defaultChartStyling$2 = (styling) => ({
|
|
26408
26538
|
width: styling == null ? void 0 : styling.width,
|
|
26409
26539
|
height: styling == null ? void 0 : styling.height,
|
|
26410
26540
|
maintainAspectRatio: (styling == null ? void 0 : styling.maintainAspectRatio) || false,
|
|
26411
26541
|
staticChartHeight: (styling == null ? void 0 : styling.staticChartHeight) || false,
|
|
26412
26542
|
performanceMode: (styling == null ? void 0 : styling.performanceMode) ?? true
|
|
26413
26543
|
});
|
|
26414
|
-
const defaultTooltip$
|
|
26544
|
+
const defaultTooltip$2 = (tooltip) => ({
|
|
26415
26545
|
tooltips: (tooltip == null ? void 0 : tooltip.tooltips) ?? true,
|
|
26416
26546
|
showLabelsInTooltips: (tooltip == null ? void 0 : tooltip.showLabelsInTooltips) || false
|
|
26417
26547
|
});
|
|
26418
|
-
const defaultGraph$
|
|
26548
|
+
const defaultGraph$2 = (graph) => ({
|
|
26419
26549
|
showDataLabels: (graph == null ? void 0 : graph.showDataLabels) || false,
|
|
26420
26550
|
stacked: (graph == null ? void 0 : graph.stacked) || false,
|
|
26421
26551
|
cutout: (graph == null ? void 0 : graph.cutout) || 0
|
|
26422
26552
|
});
|
|
26423
|
-
const defaultLegend$
|
|
26553
|
+
const defaultLegend$2 = (legend2) => ({
|
|
26424
26554
|
display: (legend2 == null ? void 0 : legend2.display) ?? true,
|
|
26425
26555
|
useDataset: (legend2 == null ? void 0 : legend2.useDataset) || false,
|
|
26426
26556
|
position: (legend2 == null ? void 0 : legend2.position) || Position.Bottom,
|
|
26427
26557
|
align: (legend2 == null ? void 0 : legend2.align) || AlignOptions.Center
|
|
26428
26558
|
});
|
|
26429
|
-
const defaultChartOptions$
|
|
26559
|
+
const defaultChartOptions$2 = (options) => ({
|
|
26430
26560
|
enableZoom: (options == null ? void 0 : options.enableZoom) || false,
|
|
26431
26561
|
enablePan: (options == null ? void 0 : options.enablePan) || false
|
|
26432
26562
|
});
|
|
26433
|
-
const defaultInteractions$
|
|
26563
|
+
const defaultInteractions$2 = (interactions) => ({
|
|
26434
26564
|
onLegendClick: interactions == null ? void 0 : interactions.onLegendClick,
|
|
26435
26565
|
onHover: interactions == null ? void 0 : interactions.onHover,
|
|
26436
26566
|
onUnhover: interactions == null ? void 0 : interactions.onUnhover
|
|
26437
26567
|
});
|
|
26438
|
-
const defaultChartData = (data) => {
|
|
26568
|
+
const defaultChartData$1 = (data) => {
|
|
26439
26569
|
return {
|
|
26440
26570
|
labels: (data == null ? void 0 : data.labels) || [],
|
|
26441
26571
|
datasets: (data == null ? void 0 : data.datasets) || []
|
|
26442
26572
|
};
|
|
26443
26573
|
};
|
|
26444
|
-
const getDefaultProps$
|
|
26574
|
+
const getDefaultProps$2 = (props) => {
|
|
26445
26575
|
const chart2 = (props == null ? void 0 : props.chart) || {};
|
|
26446
26576
|
const options = (chart2 == null ? void 0 : chart2.options) || {};
|
|
26447
26577
|
return {
|
|
26448
26578
|
testId: (chart2 == null ? void 0 : chart2.testId) ?? null,
|
|
26449
|
-
data: defaultChartData(chart2 == null ? void 0 : chart2.data),
|
|
26579
|
+
data: defaultChartData$1(chart2 == null ? void 0 : chart2.data),
|
|
26450
26580
|
options: {
|
|
26451
26581
|
title: (options == null ? void 0 : options.title) || "",
|
|
26452
|
-
chartStyling: defaultChartStyling$
|
|
26453
|
-
tooltip: defaultTooltip$
|
|
26454
|
-
graph: defaultGraph$
|
|
26455
|
-
legend: defaultLegend$
|
|
26456
|
-
chartOptions: defaultChartOptions$
|
|
26457
|
-
interactions: defaultInteractions$
|
|
26582
|
+
chartStyling: defaultChartStyling$2(options == null ? void 0 : options.chartStyling),
|
|
26583
|
+
tooltip: defaultTooltip$2(options == null ? void 0 : options.tooltip),
|
|
26584
|
+
graph: defaultGraph$2(options == null ? void 0 : options.graph),
|
|
26585
|
+
legend: defaultLegend$2(options == null ? void 0 : options.legend),
|
|
26586
|
+
chartOptions: defaultChartOptions$2(options == null ? void 0 : options.chartOptions),
|
|
26587
|
+
interactions: defaultInteractions$2(options == null ? void 0 : options.interactions)
|
|
26458
26588
|
}
|
|
26459
26589
|
};
|
|
26460
26590
|
};
|
|
@@ -26642,7 +26772,7 @@ Chart$2.register(
|
|
|
26642
26772
|
);
|
|
26643
26773
|
const PieChart = (props) => {
|
|
26644
26774
|
setDefaultTheme();
|
|
26645
|
-
const chart2 = getDefaultProps$
|
|
26775
|
+
const chart2 = getDefaultProps$2(props);
|
|
26646
26776
|
const chartRef = useRef(null);
|
|
26647
26777
|
const { data, options, testId } = chart2;
|
|
26648
26778
|
const {
|
|
@@ -26658,8 +26788,8 @@ const PieChart = (props) => {
|
|
|
26658
26788
|
"div",
|
|
26659
26789
|
{
|
|
26660
26790
|
className: cx(
|
|
26661
|
-
styles$
|
|
26662
|
-
!options.chartStyling.width || !options.chartStyling.height ? options.chartStyling.staticChartHeight ? styles$
|
|
26791
|
+
styles$2.chart,
|
|
26792
|
+
!options.chartStyling.width || !options.chartStyling.height ? options.chartStyling.staticChartHeight ? styles$2.fixedHeight : styles$2.stretchHeight : ""
|
|
26663
26793
|
),
|
|
26664
26794
|
style: {
|
|
26665
26795
|
width: options.chartStyling.width || "auto",
|
|
@@ -26703,7 +26833,7 @@ const PieChart = (props) => {
|
|
|
26703
26833
|
);
|
|
26704
26834
|
};
|
|
26705
26835
|
const PieChartWithLegend = (props) => {
|
|
26706
|
-
const { options } = getDefaultProps$
|
|
26836
|
+
const { options } = getDefaultProps$2(props);
|
|
26707
26837
|
return /* @__PURE__ */ jsx(LegendProvider, { options, children: /* @__PURE__ */ jsx(PieChart, { ...props }) });
|
|
26708
26838
|
};
|
|
26709
26839
|
/*!
|
|
@@ -39292,7 +39422,7 @@ const getBarChartToolTips = (options) => {
|
|
|
39292
39422
|
valueUnit: (yAxis == null ? void 0 : yAxis.unit) || ""
|
|
39293
39423
|
};
|
|
39294
39424
|
};
|
|
39295
|
-
const
|
|
39425
|
+
const titleCallback2 = (tooltipItems, _data) => {
|
|
39296
39426
|
var _a3, _b2;
|
|
39297
39427
|
const barLabel = ((_a3 = tooltipItems == null ? void 0 : tooltipItems[0]) == null ? void 0 : _a3.label) || "";
|
|
39298
39428
|
const labels = getTooltipLabels((_b2 = tooltipItems == null ? void 0 : tooltipItems[0]) == null ? void 0 : _b2.dataset);
|
|
@@ -39307,7 +39437,7 @@ const getBarChartToolTips = (options) => {
|
|
|
39307
39437
|
}
|
|
39308
39438
|
return displayNumber(roundByMagnitude(labelNumber), roundOptions);
|
|
39309
39439
|
};
|
|
39310
|
-
const
|
|
39440
|
+
const labelCallback2 = (tooltipItem) => {
|
|
39311
39441
|
var _a3;
|
|
39312
39442
|
const { showLabelsInTooltips = false } = (options == null ? void 0 : options.tooltip) || {};
|
|
39313
39443
|
let label = ((_a3 = tooltipItem.dataset) == null ? void 0 : _a3.label) || "";
|
|
@@ -39349,8 +39479,8 @@ const getBarChartToolTips = (options) => {
|
|
|
39349
39479
|
boxHeight: LEGEND_LABEL_BOX_SIZE,
|
|
39350
39480
|
boxPadding: TOOLTIP_BOX_PADDING,
|
|
39351
39481
|
callbacks: {
|
|
39352
|
-
title:
|
|
39353
|
-
label:
|
|
39482
|
+
title: titleCallback2,
|
|
39483
|
+
label: labelCallback2,
|
|
39354
39484
|
afterLabel: afterLabelCallback
|
|
39355
39485
|
}
|
|
39356
39486
|
};
|
|
@@ -39393,31 +39523,31 @@ const useBarChartOptions = ({
|
|
|
39393
39523
|
}
|
|
39394
39524
|
};
|
|
39395
39525
|
};
|
|
39396
|
-
const chart = "_chart_x1sru_1";
|
|
39526
|
+
const chart$1 = "_chart_x1sru_1";
|
|
39397
39527
|
const canvas = "_canvas_x1sru_10";
|
|
39398
|
-
const fixedHeight = "_fixedHeight_x1sru_19";
|
|
39399
|
-
const stretchHeight = "_stretchHeight_x1sru_25";
|
|
39400
|
-
const zoomForm = "_zoomForm_x1sru_38";
|
|
39401
|
-
const zoomReset = "_zoomReset_x1sru_46";
|
|
39402
|
-
const help = "_help_x1sru_49";
|
|
39403
|
-
const autoWeight = "_autoWeight_x1sru_53";
|
|
39528
|
+
const fixedHeight$1 = "_fixedHeight_x1sru_19";
|
|
39529
|
+
const stretchHeight$1 = "_stretchHeight_x1sru_25";
|
|
39530
|
+
const zoomForm$1 = "_zoomForm_x1sru_38";
|
|
39531
|
+
const zoomReset$1 = "_zoomReset_x1sru_46";
|
|
39532
|
+
const help$1 = "_help_x1sru_49";
|
|
39533
|
+
const autoWeight$1 = "_autoWeight_x1sru_53";
|
|
39404
39534
|
const actions = "_actions_x1sru_57";
|
|
39405
|
-
const styles = {
|
|
39406
|
-
chart,
|
|
39535
|
+
const styles$1 = {
|
|
39536
|
+
chart: chart$1,
|
|
39407
39537
|
canvas,
|
|
39408
|
-
fixedHeight,
|
|
39409
|
-
stretchHeight,
|
|
39410
|
-
zoomForm,
|
|
39411
|
-
zoomReset,
|
|
39412
|
-
help,
|
|
39413
|
-
autoWeight,
|
|
39538
|
+
fixedHeight: fixedHeight$1,
|
|
39539
|
+
stretchHeight: stretchHeight$1,
|
|
39540
|
+
zoomForm: zoomForm$1,
|
|
39541
|
+
zoomReset: zoomReset$1,
|
|
39542
|
+
help: help$1,
|
|
39543
|
+
autoWeight: autoWeight$1,
|
|
39414
39544
|
actions
|
|
39415
39545
|
};
|
|
39416
|
-
const defaultAxes = (axes) => ({
|
|
39546
|
+
const defaultAxes$1 = (axes) => ({
|
|
39417
39547
|
x: (axes == null ? void 0 : axes.x) || [{}],
|
|
39418
39548
|
y: (axes == null ? void 0 : axes.y) || [{}]
|
|
39419
39549
|
});
|
|
39420
|
-
const defaultAdditionalAxesOptions = (options) => ({
|
|
39550
|
+
const defaultAdditionalAxesOptions$1 = (options) => ({
|
|
39421
39551
|
chartScaleType: (options == null ? void 0 : options.chartScaleType) || "linear",
|
|
39422
39552
|
reverse: (options == null ? void 0 : options.reverse) || false,
|
|
39423
39553
|
stacked: (options == null ? void 0 : options.stacked) || false,
|
|
@@ -39428,30 +39558,30 @@ const defaultAdditionalAxesOptions = (options) => ({
|
|
|
39428
39558
|
min: options == null ? void 0 : options.min,
|
|
39429
39559
|
max: options == null ? void 0 : options.max
|
|
39430
39560
|
});
|
|
39431
|
-
const defaultChartStyling = (styling) => ({
|
|
39561
|
+
const defaultChartStyling$1 = (styling) => ({
|
|
39432
39562
|
width: styling == null ? void 0 : styling.width,
|
|
39433
39563
|
height: styling == null ? void 0 : styling.height,
|
|
39434
39564
|
maintainAspectRatio: (styling == null ? void 0 : styling.maintainAspectRatio) || false,
|
|
39435
39565
|
staticChartHeight: (styling == null ? void 0 : styling.staticChartHeight) || false,
|
|
39436
39566
|
performanceMode: (styling == null ? void 0 : styling.performanceMode) ?? true
|
|
39437
39567
|
});
|
|
39438
|
-
const defaultTooltip = (tooltip) => ({
|
|
39568
|
+
const defaultTooltip$1 = (tooltip) => ({
|
|
39439
39569
|
tooltips: (tooltip == null ? void 0 : tooltip.tooltips) ?? true,
|
|
39440
39570
|
showLabelsInTooltips: (tooltip == null ? void 0 : tooltip.showLabelsInTooltips) || false
|
|
39441
39571
|
});
|
|
39442
|
-
const defaultGraph = (graph) => ({
|
|
39572
|
+
const defaultGraph$1 = (graph) => ({
|
|
39443
39573
|
showDataLabels: (graph == null ? void 0 : graph.showDataLabels) || false,
|
|
39444
39574
|
showMinorGridlines: (graph == null ? void 0 : graph.showMinorGridlines) || false
|
|
39445
39575
|
});
|
|
39446
|
-
const defaultAnnotationsData = (annotationsData) => {
|
|
39576
|
+
const defaultAnnotationsData$1 = (annotationsData) => {
|
|
39447
39577
|
return annotationsData ? annotationsData.map((ann) => ({ ...ann, display: (ann == null ? void 0 : ann.display) ?? true })) : [];
|
|
39448
39578
|
};
|
|
39449
|
-
const defaultAnnotations = (annotations) => ({
|
|
39579
|
+
const defaultAnnotations$1 = (annotations) => ({
|
|
39450
39580
|
showAnnotations: (annotations == null ? void 0 : annotations.showAnnotations) ?? true,
|
|
39451
39581
|
controlAnnotation: (annotations == null ? void 0 : annotations.controlAnnotation) || false,
|
|
39452
|
-
annotationsData: defaultAnnotationsData(annotations == null ? void 0 : annotations.annotationsData)
|
|
39582
|
+
annotationsData: defaultAnnotationsData$1(annotations == null ? void 0 : annotations.annotationsData)
|
|
39453
39583
|
});
|
|
39454
|
-
const defaultLegend = (legend2) => ({
|
|
39584
|
+
const defaultLegend$1 = (legend2) => ({
|
|
39455
39585
|
display: (legend2 == null ? void 0 : legend2.display) ?? true,
|
|
39456
39586
|
position: (legend2 == null ? void 0 : legend2.position) || Position.TopLeft,
|
|
39457
39587
|
align: (legend2 == null ? void 0 : legend2.align) || AlignOptions.Center,
|
|
@@ -39460,11 +39590,11 @@ const defaultLegend = (legend2) => ({
|
|
|
39460
39590
|
customLegendContainerID: ""
|
|
39461
39591
|
}
|
|
39462
39592
|
});
|
|
39463
|
-
const defaultChartOptions = (options) => ({
|
|
39593
|
+
const defaultChartOptions$1 = (options) => ({
|
|
39464
39594
|
enableZoom: (options == null ? void 0 : options.enableZoom) || false,
|
|
39465
39595
|
enablePan: (options == null ? void 0 : options.enablePan) || false
|
|
39466
39596
|
});
|
|
39467
|
-
const defaultInteractions = (interactions) => ({
|
|
39597
|
+
const defaultInteractions$1 = (interactions) => ({
|
|
39468
39598
|
onLegendClick: interactions == null ? void 0 : interactions.onLegendClick,
|
|
39469
39599
|
onHover: interactions == null ? void 0 : interactions.onHover,
|
|
39470
39600
|
onUnhover: interactions == null ? void 0 : interactions.onUnhover
|
|
@@ -39479,7 +39609,7 @@ const defaultDragData = (dragData) => ({
|
|
|
39479
39609
|
onDrag: dragData == null ? void 0 : dragData.onDrag,
|
|
39480
39610
|
onDragEnd: dragData == null ? void 0 : dragData.onDragEnd
|
|
39481
39611
|
});
|
|
39482
|
-
const getDefaultProps = (props) => {
|
|
39612
|
+
const getDefaultProps$1 = (props) => {
|
|
39483
39613
|
const chart2 = (props == null ? void 0 : props.chart) || {};
|
|
39484
39614
|
const options = (chart2 == null ? void 0 : chart2.options) || {};
|
|
39485
39615
|
return {
|
|
@@ -39488,17 +39618,17 @@ const getDefaultProps = (props) => {
|
|
|
39488
39618
|
options: {
|
|
39489
39619
|
title: (options == null ? void 0 : options.title) || "",
|
|
39490
39620
|
direction: (options == null ? void 0 : options.direction) || "vertical",
|
|
39491
|
-
axes: defaultAxes(options == null ? void 0 : options.axes),
|
|
39492
|
-
additionalAxesOptions: defaultAdditionalAxesOptions(
|
|
39621
|
+
axes: defaultAxes$1(options == null ? void 0 : options.axes),
|
|
39622
|
+
additionalAxesOptions: defaultAdditionalAxesOptions$1(
|
|
39493
39623
|
options == null ? void 0 : options.additionalAxesOptions
|
|
39494
39624
|
),
|
|
39495
|
-
chartStyling: defaultChartStyling(options == null ? void 0 : options.chartStyling),
|
|
39496
|
-
tooltip: defaultTooltip(options == null ? void 0 : options.tooltip),
|
|
39497
|
-
graph: defaultGraph(options == null ? void 0 : options.graph),
|
|
39498
|
-
annotations: defaultAnnotations(options == null ? void 0 : options.annotations),
|
|
39499
|
-
legend: defaultLegend(options == null ? void 0 : options.legend),
|
|
39500
|
-
chartOptions: defaultChartOptions(options == null ? void 0 : options.chartOptions),
|
|
39501
|
-
interactions: defaultInteractions(options == null ? void 0 : options.interactions),
|
|
39625
|
+
chartStyling: defaultChartStyling$1(options == null ? void 0 : options.chartStyling),
|
|
39626
|
+
tooltip: defaultTooltip$1(options == null ? void 0 : options.tooltip),
|
|
39627
|
+
graph: defaultGraph$1(options == null ? void 0 : options.graph),
|
|
39628
|
+
annotations: defaultAnnotations$1(options == null ? void 0 : options.annotations),
|
|
39629
|
+
legend: defaultLegend$1(options == null ? void 0 : options.legend),
|
|
39630
|
+
chartOptions: defaultChartOptions$1(options == null ? void 0 : options.chartOptions),
|
|
39631
|
+
interactions: defaultInteractions$1(options == null ? void 0 : options.interactions),
|
|
39502
39632
|
dragData: defaultDragData(options == null ? void 0 : options.dragData)
|
|
39503
39633
|
}
|
|
39504
39634
|
};
|
|
@@ -39521,7 +39651,7 @@ const BarChart = (props) => {
|
|
|
39521
39651
|
var _a2, _b2, _c2, _d2;
|
|
39522
39652
|
setDefaultTheme();
|
|
39523
39653
|
const chartRef = useRef(null);
|
|
39524
|
-
const chart2 = getDefaultProps(props);
|
|
39654
|
+
const chart2 = getDefaultProps$1(props);
|
|
39525
39655
|
const { translations, languageKey } = getConfig();
|
|
39526
39656
|
const { options, testId } = chart2;
|
|
39527
39657
|
const { chartStyling, graph } = options;
|
|
@@ -39531,14 +39661,14 @@ const BarChart = (props) => {
|
|
|
39531
39661
|
return /* @__PURE__ */ jsxs(
|
|
39532
39662
|
"div",
|
|
39533
39663
|
{
|
|
39534
|
-
className: getClassName(chartStyling, styles),
|
|
39664
|
+
className: getClassName(chartStyling, styles$1),
|
|
39535
39665
|
style: {
|
|
39536
39666
|
width: chartStyling.width || AUTO,
|
|
39537
39667
|
height: chartStyling.height || AUTO
|
|
39538
39668
|
},
|
|
39539
39669
|
"data-testid": testId,
|
|
39540
39670
|
children: [
|
|
39541
|
-
/* @__PURE__ */ jsx("div", { className: styles.actions, children: /* @__PURE__ */ jsx(Tooltip$2, { text: translations.downloadAsPNG, placement: "bottom-end", children: /* @__PURE__ */ jsx(
|
|
39671
|
+
/* @__PURE__ */ jsx("div", { className: styles$1.actions, children: /* @__PURE__ */ jsx(Tooltip$2, { text: translations.downloadAsPNG, placement: "bottom-end", children: /* @__PURE__ */ jsx(
|
|
39542
39672
|
Button,
|
|
39543
39673
|
{
|
|
39544
39674
|
small: true,
|
|
@@ -39549,7 +39679,7 @@ const BarChart = (props) => {
|
|
|
39549
39679
|
onClick: () => downloadPgn(chartRef)
|
|
39550
39680
|
}
|
|
39551
39681
|
) }) }),
|
|
39552
|
-
/* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, context: window, children: /* @__PURE__ */ jsxs("div", { className: styles.canvas, id: "canvas", children: [
|
|
39682
|
+
/* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, context: window, children: /* @__PURE__ */ jsxs("div", { className: styles$1.canvas, id: "canvas", children: [
|
|
39553
39683
|
/* @__PURE__ */ jsx(
|
|
39554
39684
|
Bar,
|
|
39555
39685
|
{
|
|
@@ -39580,13 +39710,342 @@ const BarChart = (props) => {
|
|
|
39580
39710
|
);
|
|
39581
39711
|
};
|
|
39582
39712
|
const BarChartWithLegend = (props) => {
|
|
39583
|
-
const { options } = getDefaultProps(props);
|
|
39713
|
+
const { options } = getDefaultProps$1(props);
|
|
39584
39714
|
return /* @__PURE__ */ jsx(LegendProvider, { options, children: /* @__PURE__ */ jsx(BarChart, { ...props }) });
|
|
39585
39715
|
};
|
|
39716
|
+
const customFormatNumber = (labelNumber) => {
|
|
39717
|
+
let roundOptions = {};
|
|
39718
|
+
if (Math.abs(labelNumber) < DISPLAY_SCIENTIFIC_LOWER_BOUND || Math.abs(labelNumber) > DISPLAY_SCIENTIFIC_UPPER_BOUND) {
|
|
39719
|
+
roundOptions = { roundScientificCoefficient: 3 };
|
|
39720
|
+
}
|
|
39721
|
+
return displayNumber(roundByMagnitude(labelNumber), roundOptions);
|
|
39722
|
+
};
|
|
39723
|
+
const titleCallback = (tooltipItems, options) => {
|
|
39724
|
+
var _a2;
|
|
39725
|
+
if ((_a2 = options == null ? void 0 : options.tooltip) == null ? void 0 : _a2.showLabelsInTooltips) {
|
|
39726
|
+
const item = tooltipItems[0];
|
|
39727
|
+
const { label } = (item == null ? void 0 : item.dataset) ?? {};
|
|
39728
|
+
return label;
|
|
39729
|
+
}
|
|
39730
|
+
};
|
|
39731
|
+
const labelCallback = (tooltipItem) => {
|
|
39732
|
+
const { raw, dataset } = tooltipItem ?? {};
|
|
39733
|
+
return `${dataset == null ? void 0 : dataset.label} ( x: ${customFormatNumber(
|
|
39734
|
+
raw == null ? void 0 : raw.x
|
|
39735
|
+
)} , y: ${customFormatNumber(raw == null ? void 0 : raw.y)} )`;
|
|
39736
|
+
};
|
|
39737
|
+
const getTooltipsConfig = (options) => {
|
|
39738
|
+
var _a2, _b2, _c2;
|
|
39739
|
+
return {
|
|
39740
|
+
enabled: (_a2 = options == null ? void 0 : options.tooltip) == null ? void 0 : _a2.enabled,
|
|
39741
|
+
callbacks: {
|
|
39742
|
+
title: (tooltipItems) => titleCallback(tooltipItems, options),
|
|
39743
|
+
label: labelCallback
|
|
39744
|
+
},
|
|
39745
|
+
backgroundColor: (_b2 = options == null ? void 0 : options.tooltip) == null ? void 0 : _b2.backgroundColor,
|
|
39746
|
+
displayColors: (_c2 = options == null ? void 0 : options.tooltip) == null ? void 0 : _c2.displayColors,
|
|
39747
|
+
padding: 7
|
|
39748
|
+
};
|
|
39749
|
+
};
|
|
39750
|
+
const getScatterChartAxis = ({
|
|
39751
|
+
options,
|
|
39752
|
+
axisType = AxisType.X,
|
|
39753
|
+
currentScale
|
|
39754
|
+
}) => {
|
|
39755
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
39756
|
+
const isDirectionVertical = isVertical(options.direction);
|
|
39757
|
+
const axisData = currentScale || ((_b2 = (_a2 = options == null ? void 0 : options.axes) == null ? void 0 : _a2[axisType]) == null ? void 0 : _b2[0]);
|
|
39758
|
+
const isDirectionCompatibleWithAxisType = isDirectionVertical && axisType === AxisType.Y || !isDirectionVertical && axisType === AxisType.X;
|
|
39759
|
+
const grid = (axisData == null ? void 0 : axisData.gridLines) || {};
|
|
39760
|
+
const getReverse = () => {
|
|
39761
|
+
var _a3;
|
|
39762
|
+
const axisWithReverse = isDirectionVertical ? AxisType.Y : AxisType.X;
|
|
39763
|
+
return axisType === axisWithReverse ? (_a3 = options == null ? void 0 : options.additionalAxesOptions) == null ? void 0 : _a3.reverse : false;
|
|
39764
|
+
};
|
|
39765
|
+
const getTicks = () => {
|
|
39766
|
+
const additionalAxesOptions = options == null ? void 0 : options.additionalAxesOptions;
|
|
39767
|
+
const stepSize = {
|
|
39768
|
+
stepSize: (axisData == null ? void 0 : axisData.stepSize) ?? (axisType === AxisType.Y ? additionalAxesOptions == null ? void 0 : additionalAxesOptions.stepSize : void 0)
|
|
39769
|
+
};
|
|
39770
|
+
return {
|
|
39771
|
+
...stepSize,
|
|
39772
|
+
includeBounds: false,
|
|
39773
|
+
//OW-10088 disable irregular axis ticks
|
|
39774
|
+
font: {
|
|
39775
|
+
size: DEFAULT_FONT_SIZE
|
|
39776
|
+
}
|
|
39777
|
+
};
|
|
39778
|
+
};
|
|
39779
|
+
return {
|
|
39780
|
+
type: ScaleType.Linear,
|
|
39781
|
+
position: axisData == null ? void 0 : axisData.position,
|
|
39782
|
+
beginAtZero: (_c2 = options == null ? void 0 : options.additionalAxesOptions) == null ? void 0 : _c2.beginAtZero,
|
|
39783
|
+
reverse: getReverse(),
|
|
39784
|
+
suggestedMax: (_d2 = options == null ? void 0 : options.additionalAxesOptions) == null ? void 0 : _d2.suggestedMax,
|
|
39785
|
+
suggestedMin: (_e2 = options == null ? void 0 : options.additionalAxesOptions) == null ? void 0 : _e2.suggestedMin,
|
|
39786
|
+
min: isDirectionCompatibleWithAxisType ? (_f2 = options == null ? void 0 : options.additionalAxesOptions) == null ? void 0 : _f2.min : void 0,
|
|
39787
|
+
max: isDirectionCompatibleWithAxisType ? (_g2 = options == null ? void 0 : options.additionalAxesOptions) == null ? void 0 : _g2.max : void 0,
|
|
39788
|
+
title: {
|
|
39789
|
+
display: !!((_h2 = axisData == null ? void 0 : axisData.label) == null ? void 0 : _h2.length) || !!((_i2 = axisData == null ? void 0 : axisData.unit) == null ? void 0 : _i2.length),
|
|
39790
|
+
text: (axisData == null ? void 0 : axisData.label) || (axisData == null ? void 0 : axisData.unit),
|
|
39791
|
+
padding: 0
|
|
39792
|
+
},
|
|
39793
|
+
ticks: getTicks(),
|
|
39794
|
+
grid: {
|
|
39795
|
+
...grid
|
|
39796
|
+
}
|
|
39797
|
+
};
|
|
39798
|
+
};
|
|
39799
|
+
const getScatterChartScales = (options) => {
|
|
39800
|
+
const xAxis = getScatterChartAxis({ options, axisType: AxisType.X });
|
|
39801
|
+
const yAxis = getScatterChartAxis({ options, axisType: AxisType.Y });
|
|
39802
|
+
return {
|
|
39803
|
+
x: xAxis,
|
|
39804
|
+
y: yAxis
|
|
39805
|
+
};
|
|
39806
|
+
};
|
|
39807
|
+
const useScatterChartConfig = (chart2, chartRef) => {
|
|
39808
|
+
const { data, options: defaultOptions } = chart2;
|
|
39809
|
+
const { interactions, chartStyling } = defaultOptions;
|
|
39810
|
+
const [pointHover, setPointHover] = useState(false);
|
|
39811
|
+
const { legend: legend2, customLegendPlugin, legendClick } = useLegendState({
|
|
39812
|
+
chartRef,
|
|
39813
|
+
options: defaultOptions
|
|
39814
|
+
});
|
|
39815
|
+
const { state: legendState } = useLegend();
|
|
39816
|
+
const { annotation: annotation2 } = legendState;
|
|
39817
|
+
const generateDatasets = (datasets) => {
|
|
39818
|
+
return datasets.map(
|
|
39819
|
+
(scatterDataset, index2) => {
|
|
39820
|
+
const { borderWidth: inputBorderWidth = DEFAULT_BORDER_WIDTH } = scatterDataset ?? {};
|
|
39821
|
+
const borderWidth = parseFloat(String(inputBorderWidth)) || 1;
|
|
39822
|
+
const color2 = COLORS[index2];
|
|
39823
|
+
const borderColor = scatterDataset.borderColor ?? color2;
|
|
39824
|
+
const backgroundColor = scatterDataset.backgroundColor ?? color2;
|
|
39825
|
+
return {
|
|
39826
|
+
...scatterDataset,
|
|
39827
|
+
borderWidth,
|
|
39828
|
+
borderColor,
|
|
39829
|
+
backgroundColor
|
|
39830
|
+
};
|
|
39831
|
+
}
|
|
39832
|
+
);
|
|
39833
|
+
};
|
|
39834
|
+
const generatedDatasets = generateDatasets(
|
|
39835
|
+
data.datasets
|
|
39836
|
+
);
|
|
39837
|
+
const onClick = (_evt, _elements, chartInstance) => {
|
|
39838
|
+
chartInstance.resetZoom();
|
|
39839
|
+
};
|
|
39840
|
+
const onHover = (evt, hoveredItems) => {
|
|
39841
|
+
if (pointHover && !(hoveredItems == null ? void 0 : hoveredItems.length)) {
|
|
39842
|
+
setPointHover(false);
|
|
39843
|
+
if (interactions.onUnhover) {
|
|
39844
|
+
interactions.onUnhover(evt);
|
|
39845
|
+
}
|
|
39846
|
+
}
|
|
39847
|
+
if (!pointHover && (hoveredItems == null ? void 0 : hoveredItems.length)) {
|
|
39848
|
+
setPointHover(true);
|
|
39849
|
+
if (interactions.onHover) {
|
|
39850
|
+
const { index: index2, datasetIndex } = hoveredItems[0];
|
|
39851
|
+
interactions.onHover(evt, datasetIndex, index2, generatedDatasets);
|
|
39852
|
+
}
|
|
39853
|
+
}
|
|
39854
|
+
};
|
|
39855
|
+
const scatterOptions = {
|
|
39856
|
+
onClick,
|
|
39857
|
+
onHover,
|
|
39858
|
+
chartStyling,
|
|
39859
|
+
interactions: {
|
|
39860
|
+
onLegendClick: legendClick,
|
|
39861
|
+
onHover
|
|
39862
|
+
},
|
|
39863
|
+
scales: getScatterChartScales(chart2 == null ? void 0 : chart2.options),
|
|
39864
|
+
plugins: {
|
|
39865
|
+
legend: { ...legend2, display: false },
|
|
39866
|
+
// hide default legend
|
|
39867
|
+
customLegendPlugin,
|
|
39868
|
+
title: getTitle(defaultOptions),
|
|
39869
|
+
annotation: toAnnotationObject(annotation2),
|
|
39870
|
+
chartAreaBorder: {
|
|
39871
|
+
borderColor: BORDER_COLOR
|
|
39872
|
+
},
|
|
39873
|
+
datalabels: {
|
|
39874
|
+
display: defaultOptions.graph.showDataLabels
|
|
39875
|
+
},
|
|
39876
|
+
tooltip: getTooltipsConfig(defaultOptions)
|
|
39877
|
+
}
|
|
39878
|
+
};
|
|
39879
|
+
return {
|
|
39880
|
+
generatedDatasets,
|
|
39881
|
+
scatterOptions
|
|
39882
|
+
};
|
|
39883
|
+
};
|
|
39884
|
+
const defaultChartStyling = (styling) => ({
|
|
39885
|
+
width: (styling == null ? void 0 : styling.width) ?? AUTO,
|
|
39886
|
+
height: (styling == null ? void 0 : styling.height) ?? AUTO,
|
|
39887
|
+
maintainAspectRatio: (styling == null ? void 0 : styling.maintainAspectRatio) || false,
|
|
39888
|
+
staticChartHeight: (styling == null ? void 0 : styling.staticChartHeight) || false,
|
|
39889
|
+
performanceMode: (styling == null ? void 0 : styling.performanceMode) ?? true
|
|
39890
|
+
});
|
|
39891
|
+
const defaultTooltip = (tooltip) => ({
|
|
39892
|
+
enabled: (tooltip == null ? void 0 : tooltip.enabled) ?? true,
|
|
39893
|
+
tooltips: (tooltip == null ? void 0 : tooltip.tooltips) ?? true,
|
|
39894
|
+
showLabelsInTooltips: (tooltip == null ? void 0 : tooltip.showLabelsInTooltips) || false,
|
|
39895
|
+
backgroundColor: (tooltip == null ? void 0 : tooltip.backgroundColor) || "#333",
|
|
39896
|
+
displayColors: (tooltip == null ? void 0 : tooltip.displayColors) || false
|
|
39897
|
+
});
|
|
39898
|
+
const defaultGraph = (graph) => ({
|
|
39899
|
+
showMinorGridlines: (graph == null ? void 0 : graph.showMinorGridlines) ?? false,
|
|
39900
|
+
showDataLabels: (graph == null ? void 0 : graph.showDataLabels) ?? false
|
|
39901
|
+
});
|
|
39902
|
+
const defaultLegend = (legend2) => ({
|
|
39903
|
+
display: (legend2 == null ? void 0 : legend2.display) ?? true,
|
|
39904
|
+
useDataset: (legend2 == null ? void 0 : legend2.useDataset) || false,
|
|
39905
|
+
position: (legend2 == null ? void 0 : legend2.position) || Position.BottomLeft,
|
|
39906
|
+
align: (legend2 == null ? void 0 : legend2.align) || AlignOptions.Center
|
|
39907
|
+
});
|
|
39908
|
+
const defaultChartOptions = (options) => ({
|
|
39909
|
+
enableZoom: (options == null ? void 0 : options.enableZoom) || false,
|
|
39910
|
+
enablePan: (options == null ? void 0 : options.enablePan) || false
|
|
39911
|
+
});
|
|
39912
|
+
const defaultInteractions = (interactions) => ({
|
|
39913
|
+
onLegendClick: interactions == null ? void 0 : interactions.onLegendClick,
|
|
39914
|
+
onHover: interactions == null ? void 0 : interactions.onHover,
|
|
39915
|
+
onUnhover: interactions == null ? void 0 : interactions.onUnhover
|
|
39916
|
+
});
|
|
39917
|
+
const defaultChartData = (data) => {
|
|
39918
|
+
return {
|
|
39919
|
+
labels: (data == null ? void 0 : data.labels) || [],
|
|
39920
|
+
datasets: (data == null ? void 0 : data.datasets) || []
|
|
39921
|
+
};
|
|
39922
|
+
};
|
|
39923
|
+
const defaultAnnotationsData = (annotationsData) => {
|
|
39924
|
+
return annotationsData ? annotationsData.map((ann) => ({ ...ann, display: (ann == null ? void 0 : ann.display) ?? true })) : [];
|
|
39925
|
+
};
|
|
39926
|
+
const defaultAnnotations = (annotations) => ({
|
|
39927
|
+
showAnnotations: (annotations == null ? void 0 : annotations.showAnnotations) ?? true,
|
|
39928
|
+
controlAnnotation: (annotations == null ? void 0 : annotations.controlAnnotation) || false,
|
|
39929
|
+
annotationsData: defaultAnnotationsData(annotations == null ? void 0 : annotations.annotationsData)
|
|
39930
|
+
});
|
|
39931
|
+
const defaultAxes = (axes) => ({
|
|
39932
|
+
x: (axes == null ? void 0 : axes.x) || [{}],
|
|
39933
|
+
y: (axes == null ? void 0 : axes.y) || [{}]
|
|
39934
|
+
});
|
|
39935
|
+
const defaultAdditionalAxesOptions = (options) => ({
|
|
39936
|
+
reverse: (options == null ? void 0 : options.reverse) || false,
|
|
39937
|
+
stacked: (options == null ? void 0 : options.stacked) || false,
|
|
39938
|
+
beginAtZero: (options == null ? void 0 : options.beginAtZero) ?? true,
|
|
39939
|
+
stepSize: options == null ? void 0 : options.stepSize,
|
|
39940
|
+
suggestedMin: options == null ? void 0 : options.suggestedMin,
|
|
39941
|
+
suggestedMax: options == null ? void 0 : options.suggestedMax,
|
|
39942
|
+
min: options == null ? void 0 : options.min,
|
|
39943
|
+
max: options == null ? void 0 : options.max
|
|
39944
|
+
});
|
|
39945
|
+
const getDefaultProps = (props) => {
|
|
39946
|
+
const chart2 = (props == null ? void 0 : props.chart) || {};
|
|
39947
|
+
const options = (chart2 == null ? void 0 : chart2.options) || {};
|
|
39948
|
+
return {
|
|
39949
|
+
testId: (chart2 == null ? void 0 : chart2.testId) ?? null,
|
|
39950
|
+
data: defaultChartData(chart2 == null ? void 0 : chart2.data),
|
|
39951
|
+
options: {
|
|
39952
|
+
title: (options == null ? void 0 : options.title) || "",
|
|
39953
|
+
axes: defaultAxes(options == null ? void 0 : options.axes),
|
|
39954
|
+
additionalAxesOptions: defaultAdditionalAxesOptions(
|
|
39955
|
+
options == null ? void 0 : options.additionalAxesOptions
|
|
39956
|
+
),
|
|
39957
|
+
direction: (options == null ? void 0 : options.direction) || ChartDirection.VERTICAL,
|
|
39958
|
+
chartStyling: defaultChartStyling(options == null ? void 0 : options.chartStyling),
|
|
39959
|
+
tooltip: defaultTooltip(options == null ? void 0 : options.tooltip),
|
|
39960
|
+
graph: defaultGraph(options == null ? void 0 : options.graph),
|
|
39961
|
+
legend: defaultLegend(options == null ? void 0 : options.legend),
|
|
39962
|
+
annotations: defaultAnnotations(options == null ? void 0 : options.annotations),
|
|
39963
|
+
chartOptions: defaultChartOptions(options == null ? void 0 : options.chartOptions),
|
|
39964
|
+
interactions: defaultInteractions(options == null ? void 0 : options.interactions)
|
|
39965
|
+
}
|
|
39966
|
+
};
|
|
39967
|
+
};
|
|
39968
|
+
const chart = "_chart_1jdnu_1";
|
|
39969
|
+
const fixedHeight = "_fixedHeight_1jdnu_13";
|
|
39970
|
+
const stretchHeight = "_stretchHeight_1jdnu_19";
|
|
39971
|
+
const zoomForm = "_zoomForm_1jdnu_32";
|
|
39972
|
+
const zoomReset = "_zoomReset_1jdnu_40";
|
|
39973
|
+
const help = "_help_1jdnu_43";
|
|
39974
|
+
const autoWeight = "_autoWeight_1jdnu_47";
|
|
39975
|
+
const styles = {
|
|
39976
|
+
chart,
|
|
39977
|
+
fixedHeight,
|
|
39978
|
+
stretchHeight,
|
|
39979
|
+
zoomForm,
|
|
39980
|
+
zoomReset,
|
|
39981
|
+
help,
|
|
39982
|
+
autoWeight
|
|
39983
|
+
};
|
|
39984
|
+
Chart$2.register(
|
|
39985
|
+
LinearScale$1,
|
|
39986
|
+
PointElement$1,
|
|
39987
|
+
CategoryScale$1,
|
|
39988
|
+
plugin_legend,
|
|
39989
|
+
plugin_tooltip,
|
|
39990
|
+
plugin_title,
|
|
39991
|
+
plugin$1,
|
|
39992
|
+
plugin,
|
|
39993
|
+
annotation
|
|
39994
|
+
);
|
|
39995
|
+
const ScatterChart = (props) => {
|
|
39996
|
+
setDefaultTheme();
|
|
39997
|
+
const chartRef = useRef(null);
|
|
39998
|
+
const chart2 = getDefaultProps(props);
|
|
39999
|
+
const { options, testId } = chart2;
|
|
40000
|
+
const { scatterOptions, generatedDatasets } = useScatterChartConfig(
|
|
40001
|
+
chart2,
|
|
40002
|
+
chartRef
|
|
40003
|
+
);
|
|
40004
|
+
return /* @__PURE__ */ jsx(
|
|
40005
|
+
"div",
|
|
40006
|
+
{
|
|
40007
|
+
className: getClassName(options.chartStyling, styles),
|
|
40008
|
+
style: {
|
|
40009
|
+
width: options.chartStyling.width,
|
|
40010
|
+
height: options.chartStyling.height
|
|
40011
|
+
},
|
|
40012
|
+
"data-testid": testId,
|
|
40013
|
+
children: /* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, context: window, children: /* @__PURE__ */ jsxs("div", { className: styles.canvas, id: "canvas", children: [
|
|
40014
|
+
/* @__PURE__ */ jsx(
|
|
40015
|
+
Scatter,
|
|
40016
|
+
{
|
|
40017
|
+
ref: chartRef,
|
|
40018
|
+
data: {
|
|
40019
|
+
datasets: generatedDatasets
|
|
40020
|
+
},
|
|
40021
|
+
options: scatterOptions,
|
|
40022
|
+
plugins: getPlugins(options.graph, options.legend)
|
|
40023
|
+
}
|
|
40024
|
+
),
|
|
40025
|
+
!!generatedDatasets.length && /* @__PURE__ */ jsx(
|
|
40026
|
+
Legend2,
|
|
40027
|
+
{
|
|
40028
|
+
chartRef,
|
|
40029
|
+
legendConfig: {
|
|
40030
|
+
options,
|
|
40031
|
+
generatedDatasets,
|
|
40032
|
+
chartType: ChartType.SCATTER
|
|
40033
|
+
}
|
|
40034
|
+
}
|
|
40035
|
+
)
|
|
40036
|
+
] }) })
|
|
40037
|
+
}
|
|
40038
|
+
);
|
|
40039
|
+
};
|
|
40040
|
+
const ScatterChartWithLegend = (props) => {
|
|
40041
|
+
const { options } = getDefaultProps(props);
|
|
40042
|
+
return /* @__PURE__ */ jsx(LegendProvider, { options, children: /* @__PURE__ */ jsx(ScatterChart, { ...props }) });
|
|
40043
|
+
};
|
|
39586
40044
|
export {
|
|
39587
40045
|
BarChartWithLegend as BarChart,
|
|
39588
40046
|
LineChartWithLegend as LineChart,
|
|
39589
40047
|
PieChartWithLegend as PieChart,
|
|
40048
|
+
ScatterChartWithLegend as ScatterChart,
|
|
39590
40049
|
initializeLineChart
|
|
39591
40050
|
};
|
|
39592
40051
|
//# sourceMappingURL=index.js.map
|
|
@@ -39595,7 +40054,7 @@ export {
|
|
|
39595
40054
|
try {
|
|
39596
40055
|
if (typeof document != "undefined") {
|
|
39597
40056
|
var elementStyle = document.createElement("style");
|
|
39598
|
-
elementStyle.appendChild(document.createTextNode("html[data-theme='dark'] ._chart_e3qdd_1 canvas {\n filter: invert(1) hue-rotate(180deg);\n}\n._chart_e3qdd_1 {\n border: 1px solid rgba(255, 255, 255, 0);\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n._chart_e3qdd_1 ._canvas_e3qdd_11 {\n flex-grow: 1;\n min-height: 0;\n position: relative;\n}\n._chart_e3qdd_1 ._canvas_e3qdd_11 canvas {\n width: 100% !important;\n height: 100% !important;\n}\n._chart_e3qdd_1._fixedHeight_e3qdd_20 {\n display: flex;\n align-items: flex-start;\n justify-content: flex-start;\n height: auto;\n}\n._chart_e3qdd_1._stretchHeight_e3qdd_26 {\n display: flex;\n align-items: stretch;\n justify-content: stretch;\n height: 100%;\n}\n._chart_e3qdd_1._squareAspectRatio_e3qdd_32 {\n aspect-ratio: 1;\n min-height: 0;\n min-width: 0;\n}\n._chart_e3qdd_1:focus {\n outline: none;\n}\n._chart_e3qdd_1::-moz-focus-inner {\n border: 0;\n}\n._zoomForm_e3qdd_43 {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 0;\n right: 0;\n}\n._zoomForm_e3qdd_43 ._zoomReset_e3qdd_51 {\n margin-left: 10px;\n}\n._zoomForm_e3qdd_43 ._help_e3qdd_54 {\n margin-left: 5px;\n line-height: 0;\n}\n._autoWeight_e3qdd_58 {\n width: auto;\n height: auto;\n}\n._table_e3qdd_62 {\n overflow: auto;\n}\n._controls_gbo9q_1 {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--padding-xs);\n}\n._buttons_gbo9q_7 {\n display: flex;\n align-items: flex-start;\n margin-left: auto;\n gap: var(--padding-xxs);\n}\n._legend_wpro0_1 {\n position: absolute;\n opacity: 0.9;\n display: flex;\n flex-direction: column;\n z-index: 1;\n}\n._legend_wpro0_1._isDragging_wpro0_8 {\n opacity: 0;\n}\n._legendItems_wpro0_11 {\n background-color: var(--color-background-raised);\n border: 1px solid var(--color-border);\n padding: 4px 8px;\n border-radius: 2px;\n overflow-y: auto;\n max-height: 100%;\n overflow: overlay;\n --scrollbar-color: #00000040;\n}\n._legendItems_wpro0_11::-webkit-scrollbar {\n display: block;\n width: 16px;\n z-index: 2;\n}\n._legendItems_wpro0_11::-webkit-scrollbar-button {\n display: none;\n}\n._legendItems_wpro0_11::-webkit-scrollbar-track {\n background-color: #00000000;\n}\n._legendItems_wpro0_11::-webkit-scrollbar-track-piece {\n background-color: #00000000;\n}\n._legendItems_wpro0_11::-webkit-scrollbar-thumb {\n background-color: #00000000;\n border: 5px solid transparent;\n border-radius: 24px;\n box-shadow: 4px 0px 0px 4px var(--scrollbar-color) inset;\n}\n._legendItems_wpro0_11::-webkit-scrollbar-corner {\n background: rgba(0, 0, 0, 0);\n}\n._legend_wpro0_1._isDragging_wpro0_8 ._legendItems_wpro0_11._legendItems_wpro0_11 {\n pointer-events: none;\n}\n._legend_wpro0_1._isHidden_wpro0_47 ._legendItems_wpro0_11._legendItems_wpro0_11 {\n display: none;\n}\n._legendToggle_wpro0_50 {\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n display: none;\n}\n._legend_wpro0_1._isHidden_wpro0_47 ._legendToggle_wpro0_50._legendToggle_wpro0_50,\n._legend_wpro0_1:hover ._legendToggle_wpro0_50._legendToggle_wpro0_50 {\n display: block;\n}\n._legend_wpro0_1:active ._legendToggle_wpro0_50._legendToggle_wpro0_50:not(:hover) {\n display: none;\n}\n._legend_wpro0_1._isHidden_wpro0_47 ._legendToggle_wpro0_50._legendToggle_wpro0_50 {\n position: static;\n transform: none;\n}\n._legend_wpro0_1._isDragging_wpro0_8 ._legendToggle_wpro0_50._legendToggle_wpro0_50 {\n display: none;\n}\n._legendItem_wpro0_11 {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n user-select: none;\n cursor: pointer;\n font-size: 12px;\n line-height: 16px;\n}\n._legendItemSymbol_wpro0_80 {\n display: flex;\n align-items: center;\n height: 16px;\n position: relative;\n flex-shrink: 0;\n}\nhtml[data-theme='dark'] ._legendItemSymbol_wpro0_80._legendItemSymbol_wpro0_80 {\n filter: invert(1) hue-rotate(180deg);\n}\n._legendItemBox_wpro0_90 {\n width: 100%;\n height: 12px;\n display: block;\n}\n._legendItemLine_wpro0_95 {\n position: absolute;\n display: flex;\n top: 50%;\n left: 0;\n width: 100%;\n transform: translateY(-50%);\n}\n._legendItemPoint_wpro0_103 {\n position: absolute;\n display: flex;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n._isHidden_wpro0_47 ._legendItemText_wpro0_110._legendItemText_wpro0_110 {\n text-decoration: line-through;\n}\n._scrollbars_wpro0_113 {\n overflow: overlay;\n --scrollbar-color: #00000040;\n}\n._scrollbars_wpro0_113::-webkit-scrollbar {\n display: block;\n width: 16px;\n z-index: 2;\n}\n._scrollbars_wpro0_113::-webkit-scrollbar-button {\n display: none;\n}\n._scrollbars_wpro0_113::-webkit-scrollbar-track {\n background-color: #00000000;\n}\n._scrollbars_wpro0_113::-webkit-scrollbar-track-piece {\n background-color: #00000000;\n}\n._scrollbars_wpro0_113::-webkit-scrollbar-thumb {\n background-color: #00000000;\n border: 5px solid transparent;\n border-radius: 24px;\n box-shadow: 4px 0px 0px 4px var(--scrollbar-color) inset;\n}\n._scrollbars_wpro0_113::-webkit-scrollbar-corner {\n background: rgba(0, 0, 0, 0);\n}\n._dropzoneContainer_wpro0_140 {\n position: absolute;\n}\n._dropzone_wpro0_140 {\n position: absolute;\n width: 50%;\n height: 50%;\n display: flex;\n}\n._dropzone_wpro0_140._left_wpro0_149 {\n left: 0;\n justify-content: flex-start;\n}\n._dropzone_wpro0_140._right_wpro0_153 {\n right: 0;\n justify-content: flex-end;\n}\n._dropzone_wpro0_140._top_wpro0_157 {\n top: 0;\n align-items: flex-start;\n}\n._dropzone_wpro0_140._bottom_wpro0_161 {\n bottom: 0;\n align-items: flex-end;\n}\n._dropzonePlaceholder_wpro0_165 {\n position: absolute;\n background-color: rgba(0, 0, 0, 0.05);\n display: none;\n}\n[data-theme='dark'] ._dropzonePlaceholder_wpro0_165 {\n background-color: rgba(255, 255, 255, 0.05);\n}\n._isActive_wpro0_173 ._dropzonePlaceholder_wpro0_165._dropzonePlaceholder_wpro0_165 {\n display: block;\n}\n._resizeContainer_wpro0_176 {\n position: absolute;\n inset: 0;\n z-index: -1;\n}\nhtml[data-theme='dark'] ._chart_1jdnu_1 canvas {\n filter: invert(1) hue-rotate(180deg);\n}\n._chart_1jdnu_1 {\n border: 1px solid rgba(255, 255, 255, 0);\n padding-top: 10px;\n position: relative;\n}\n._chart_1jdnu_1 canvas {\n width: 100% !important;\n height: 100% !important;\n}\n._chart_1jdnu_1._fixedHeight_1jdnu_13 {\n display: flex;\n align-items: flex-start;\n justify-content: flex-start;\n height: auto;\n}\n._chart_1jdnu_1._stretchHeight_1jdnu_19 {\n display: flex;\n align-items: stretch;\n justify-content: stretch;\n height: 100%;\n}\n._chart_1jdnu_1:focus {\n border: 1px solid #85b7d9;\n outline: none;\n}\n._chart_1jdnu_1::-moz-focus-inner {\n border: 0;\n}\n._zoomForm_1jdnu_32 {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 0;\n right: 0;\n}\n._zoomForm_1jdnu_32 ._zoomReset_1jdnu_40 {\n margin-left: 10px;\n}\n._zoomForm_1jdnu_32 ._help_1jdnu_43 {\n margin-left: 5px;\n line-height: 0;\n}\n._autoWeight_1jdnu_47 {\n width: 'auto';\n height: 'auto';\n}\nhtml[data-theme='dark'] ._chart_x1sru_1 canvas {\n filter: invert(1) hue-rotate(180deg);\n}\n._chart_x1sru_1 {\n border: 1px solid rgba(255, 255, 255, 0);\n position: relative;\n display: flex;\n flex-direction: column;\n}\n._chart_x1sru_1 ._canvas_x1sru_10 {\n flex-grow: 1;\n min-height: 0;\n position: relative;\n}\n._chart_x1sru_1 ._canvas_x1sru_10 canvas {\n width: 100% !important;\n height: 100% !important;\n}\n._chart_x1sru_1._fixedHeight_x1sru_19 {\n display: flex;\n align-items: flex-start;\n justify-content: flex-start;\n height: auto;\n}\n._chart_x1sru_1._stretchHeight_x1sru_25 {\n display: flex;\n align-items: stretch;\n justify-content: stretch;\n height: 100%;\n}\n._chart_x1sru_1:focus {\n border: 1px solid #85b7d9;\n outline: none;\n}\n._chart_x1sru_1::-moz-focus-inner {\n border: 0;\n}\n._zoomForm_x1sru_38 {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 0;\n right: 0;\n}\n._zoomForm_x1sru_38 ._zoomReset_x1sru_46 {\n margin-left: 10px;\n}\n._zoomForm_x1sru_38 ._help_x1sru_49 {\n margin-left: 5px;\n line-height: 0;\n}\n._autoWeight_x1sru_53 {\n width: auto;\n height: auto;\n}\n._actions_x1sru_57 {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}"));
|
|
40057
|
+
elementStyle.appendChild(document.createTextNode("html[data-theme='dark'] ._chart_e3qdd_1 canvas {\n filter: invert(1) hue-rotate(180deg);\n}\n._chart_e3qdd_1 {\n border: 1px solid rgba(255, 255, 255, 0);\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n._chart_e3qdd_1 ._canvas_e3qdd_11 {\n flex-grow: 1;\n min-height: 0;\n position: relative;\n}\n._chart_e3qdd_1 ._canvas_e3qdd_11 canvas {\n width: 100% !important;\n height: 100% !important;\n}\n._chart_e3qdd_1._fixedHeight_e3qdd_20 {\n display: flex;\n align-items: flex-start;\n justify-content: flex-start;\n height: auto;\n}\n._chart_e3qdd_1._stretchHeight_e3qdd_26 {\n display: flex;\n align-items: stretch;\n justify-content: stretch;\n height: 100%;\n}\n._chart_e3qdd_1._squareAspectRatio_e3qdd_32 {\n aspect-ratio: 1;\n min-height: 0;\n min-width: 0;\n}\n._chart_e3qdd_1:focus {\n outline: none;\n}\n._chart_e3qdd_1::-moz-focus-inner {\n border: 0;\n}\n._zoomForm_e3qdd_43 {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 0;\n right: 0;\n}\n._zoomForm_e3qdd_43 ._zoomReset_e3qdd_51 {\n margin-left: 10px;\n}\n._zoomForm_e3qdd_43 ._help_e3qdd_54 {\n margin-left: 5px;\n line-height: 0;\n}\n._autoWeight_e3qdd_58 {\n width: auto;\n height: auto;\n}\n._table_e3qdd_62 {\n overflow: auto;\n}\n._controls_gbo9q_1 {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--padding-xs);\n}\n._buttons_gbo9q_7 {\n display: flex;\n align-items: flex-start;\n margin-left: auto;\n gap: var(--padding-xxs);\n}\n._legend_wpro0_1 {\n position: absolute;\n opacity: 0.9;\n display: flex;\n flex-direction: column;\n z-index: 1;\n}\n._legend_wpro0_1._isDragging_wpro0_8 {\n opacity: 0;\n}\n._legendItems_wpro0_11 {\n background-color: var(--color-background-raised);\n border: 1px solid var(--color-border);\n padding: 4px 8px;\n border-radius: 2px;\n overflow-y: auto;\n max-height: 100%;\n overflow: overlay;\n --scrollbar-color: #00000040;\n}\n._legendItems_wpro0_11::-webkit-scrollbar {\n display: block;\n width: 16px;\n z-index: 2;\n}\n._legendItems_wpro0_11::-webkit-scrollbar-button {\n display: none;\n}\n._legendItems_wpro0_11::-webkit-scrollbar-track {\n background-color: #00000000;\n}\n._legendItems_wpro0_11::-webkit-scrollbar-track-piece {\n background-color: #00000000;\n}\n._legendItems_wpro0_11::-webkit-scrollbar-thumb {\n background-color: #00000000;\n border: 5px solid transparent;\n border-radius: 24px;\n box-shadow: 4px 0px 0px 4px var(--scrollbar-color) inset;\n}\n._legendItems_wpro0_11::-webkit-scrollbar-corner {\n background: rgba(0, 0, 0, 0);\n}\n._legend_wpro0_1._isDragging_wpro0_8 ._legendItems_wpro0_11._legendItems_wpro0_11 {\n pointer-events: none;\n}\n._legend_wpro0_1._isHidden_wpro0_47 ._legendItems_wpro0_11._legendItems_wpro0_11 {\n display: none;\n}\n._legendToggle_wpro0_50 {\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n display: none;\n}\n._legend_wpro0_1._isHidden_wpro0_47 ._legendToggle_wpro0_50._legendToggle_wpro0_50,\n._legend_wpro0_1:hover ._legendToggle_wpro0_50._legendToggle_wpro0_50 {\n display: block;\n}\n._legend_wpro0_1:active ._legendToggle_wpro0_50._legendToggle_wpro0_50:not(:hover) {\n display: none;\n}\n._legend_wpro0_1._isHidden_wpro0_47 ._legendToggle_wpro0_50._legendToggle_wpro0_50 {\n position: static;\n transform: none;\n}\n._legend_wpro0_1._isDragging_wpro0_8 ._legendToggle_wpro0_50._legendToggle_wpro0_50 {\n display: none;\n}\n._legendItem_wpro0_11 {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n user-select: none;\n cursor: pointer;\n font-size: 12px;\n line-height: 16px;\n}\n._legendItemSymbol_wpro0_80 {\n display: flex;\n align-items: center;\n height: 16px;\n position: relative;\n flex-shrink: 0;\n}\nhtml[data-theme='dark'] ._legendItemSymbol_wpro0_80._legendItemSymbol_wpro0_80 {\n filter: invert(1) hue-rotate(180deg);\n}\n._legendItemBox_wpro0_90 {\n width: 100%;\n height: 12px;\n display: block;\n}\n._legendItemLine_wpro0_95 {\n position: absolute;\n display: flex;\n top: 50%;\n left: 0;\n width: 100%;\n transform: translateY(-50%);\n}\n._legendItemPoint_wpro0_103 {\n position: absolute;\n display: flex;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n._isHidden_wpro0_47 ._legendItemText_wpro0_110._legendItemText_wpro0_110 {\n text-decoration: line-through;\n}\n._scrollbars_wpro0_113 {\n overflow: overlay;\n --scrollbar-color: #00000040;\n}\n._scrollbars_wpro0_113::-webkit-scrollbar {\n display: block;\n width: 16px;\n z-index: 2;\n}\n._scrollbars_wpro0_113::-webkit-scrollbar-button {\n display: none;\n}\n._scrollbars_wpro0_113::-webkit-scrollbar-track {\n background-color: #00000000;\n}\n._scrollbars_wpro0_113::-webkit-scrollbar-track-piece {\n background-color: #00000000;\n}\n._scrollbars_wpro0_113::-webkit-scrollbar-thumb {\n background-color: #00000000;\n border: 5px solid transparent;\n border-radius: 24px;\n box-shadow: 4px 0px 0px 4px var(--scrollbar-color) inset;\n}\n._scrollbars_wpro0_113::-webkit-scrollbar-corner {\n background: rgba(0, 0, 0, 0);\n}\n._dropzoneContainer_wpro0_140 {\n position: absolute;\n}\n._dropzone_wpro0_140 {\n position: absolute;\n width: 50%;\n height: 50%;\n display: flex;\n}\n._dropzone_wpro0_140._left_wpro0_149 {\n left: 0;\n justify-content: flex-start;\n}\n._dropzone_wpro0_140._right_wpro0_153 {\n right: 0;\n justify-content: flex-end;\n}\n._dropzone_wpro0_140._top_wpro0_157 {\n top: 0;\n align-items: flex-start;\n}\n._dropzone_wpro0_140._bottom_wpro0_161 {\n bottom: 0;\n align-items: flex-end;\n}\n._dropzonePlaceholder_wpro0_165 {\n position: absolute;\n background-color: rgba(0, 0, 0, 0.05);\n display: none;\n}\n[data-theme='dark'] ._dropzonePlaceholder_wpro0_165 {\n background-color: rgba(255, 255, 255, 0.05);\n}\n._isActive_wpro0_173 ._dropzonePlaceholder_wpro0_165._dropzonePlaceholder_wpro0_165 {\n display: block;\n}\n._resizeContainer_wpro0_176 {\n position: absolute;\n inset: 0;\n z-index: -1;\n}\nhtml[data-theme='dark'] ._chart_1jdnu_1 canvas {\n filter: invert(1) hue-rotate(180deg);\n}\n._chart_1jdnu_1 {\n border: 1px solid rgba(255, 255, 255, 0);\n padding-top: 10px;\n position: relative;\n}\n._chart_1jdnu_1 canvas {\n width: 100% !important;\n height: 100% !important;\n}\n._chart_1jdnu_1._fixedHeight_1jdnu_13 {\n display: flex;\n align-items: flex-start;\n justify-content: flex-start;\n height: auto;\n}\n._chart_1jdnu_1._stretchHeight_1jdnu_19 {\n display: flex;\n align-items: stretch;\n justify-content: stretch;\n height: 100%;\n}\n._chart_1jdnu_1:focus {\n border: 1px solid #85b7d9;\n outline: none;\n}\n._chart_1jdnu_1::-moz-focus-inner {\n border: 0;\n}\n._zoomForm_1jdnu_32 {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 0;\n right: 0;\n}\n._zoomForm_1jdnu_32 ._zoomReset_1jdnu_40 {\n margin-left: 10px;\n}\n._zoomForm_1jdnu_32 ._help_1jdnu_43 {\n margin-left: 5px;\n line-height: 0;\n}\n._autoWeight_1jdnu_47 {\n width: 'auto';\n height: 'auto';\n}\nhtml[data-theme='dark'] ._chart_x1sru_1 canvas {\n filter: invert(1) hue-rotate(180deg);\n}\n._chart_x1sru_1 {\n border: 1px solid rgba(255, 255, 255, 0);\n position: relative;\n display: flex;\n flex-direction: column;\n}\n._chart_x1sru_1 ._canvas_x1sru_10 {\n flex-grow: 1;\n min-height: 0;\n position: relative;\n}\n._chart_x1sru_1 ._canvas_x1sru_10 canvas {\n width: 100% !important;\n height: 100% !important;\n}\n._chart_x1sru_1._fixedHeight_x1sru_19 {\n display: flex;\n align-items: flex-start;\n justify-content: flex-start;\n height: auto;\n}\n._chart_x1sru_1._stretchHeight_x1sru_25 {\n display: flex;\n align-items: stretch;\n justify-content: stretch;\n height: 100%;\n}\n._chart_x1sru_1:focus {\n border: 1px solid #85b7d9;\n outline: none;\n}\n._chart_x1sru_1::-moz-focus-inner {\n border: 0;\n}\n._zoomForm_x1sru_38 {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 0;\n right: 0;\n}\n._zoomForm_x1sru_38 ._zoomReset_x1sru_46 {\n margin-left: 10px;\n}\n._zoomForm_x1sru_38 ._help_x1sru_49 {\n margin-left: 5px;\n line-height: 0;\n}\n._autoWeight_x1sru_53 {\n width: auto;\n height: auto;\n}\n._actions_x1sru_57 {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}\nhtml[data-theme='dark'] ._chart_1jdnu_1 canvas {\n filter: invert(1) hue-rotate(180deg);\n}\n._chart_1jdnu_1 {\n border: 1px solid rgba(255, 255, 255, 0);\n padding-top: 10px;\n position: relative;\n}\n._chart_1jdnu_1 canvas {\n width: 100% !important;\n height: 100% !important;\n}\n._chart_1jdnu_1._fixedHeight_1jdnu_13 {\n display: flex;\n align-items: flex-start;\n justify-content: flex-start;\n height: auto;\n}\n._chart_1jdnu_1._stretchHeight_1jdnu_19 {\n display: flex;\n align-items: stretch;\n justify-content: stretch;\n height: 100%;\n}\n._chart_1jdnu_1:focus {\n border: 1px solid #85b7d9;\n outline: none;\n}\n._chart_1jdnu_1::-moz-focus-inner {\n border: 0;\n}\n._zoomForm_1jdnu_32 {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 0;\n right: 0;\n}\n._zoomForm_1jdnu_32 ._zoomReset_1jdnu_40 {\n margin-left: 10px;\n}\n._zoomForm_1jdnu_32 ._help_1jdnu_43 {\n margin-left: 5px;\n line-height: 0;\n}\n._autoWeight_1jdnu_47 {\n width: 'auto';\n height: 'auto';\n}"));
|
|
39599
40058
|
document.head.appendChild(elementStyle);
|
|
39600
40059
|
}
|
|
39601
40060
|
} catch (e) {
|