@oliasoft-open-source/charts-library 4.3.0-beta-2 → 4.3.0-beta-4
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 +826 -231
- package/dist/index.js.map +1 -1
- package/dist/src/components/common/common.interface.d.ts +4 -3
- package/dist/src/components/common/helpers/chart-consts.d.ts +2 -0
- package/dist/src/components/common/helpers/enums.d.ts +5 -1
- package/dist/src/components/common/helpers/get-chart-annotation.d.ts +23 -8
- package/dist/src/components/common/plugins/annotation-dragger-plugin/helpers.test.d.ts +1 -0
- package/dist/src/components/common/plugins/annotation-dragger-plugin/point-annotation-label.d.ts +9 -0
- package/dist/src/components/line-chart/line-chart.stories.d.ts +11 -4
- 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";
|
|
@@ -22093,6 +22218,9 @@ const reducer$1 = (state, action) => {
|
|
|
22093
22218
|
if (draft.enableDragPoints) {
|
|
22094
22219
|
draft.enableDragPoints = false;
|
|
22095
22220
|
}
|
|
22221
|
+
if (draft.enableDragAnnotation) {
|
|
22222
|
+
draft.enableDragAnnotation = false;
|
|
22223
|
+
}
|
|
22096
22224
|
break;
|
|
22097
22225
|
}
|
|
22098
22226
|
case TOGGLE_PAN: {
|
|
@@ -22103,6 +22231,9 @@ const reducer$1 = (state, action) => {
|
|
|
22103
22231
|
if (draft.enableDragPoints) {
|
|
22104
22232
|
draft.enableDragPoints = false;
|
|
22105
22233
|
}
|
|
22234
|
+
if (draft.enableDragAnnotation) {
|
|
22235
|
+
draft.enableDragAnnotation = false;
|
|
22236
|
+
}
|
|
22106
22237
|
break;
|
|
22107
22238
|
}
|
|
22108
22239
|
case TOGGLE_POINTS: {
|
|
@@ -22147,6 +22278,9 @@ const reducer$1 = (state, action) => {
|
|
|
22147
22278
|
if (draft.zoomEnabled) {
|
|
22148
22279
|
draft.zoomEnabled = false;
|
|
22149
22280
|
}
|
|
22281
|
+
if (draft.enableDragAnnotation) {
|
|
22282
|
+
draft.enableDragAnnotation = false;
|
|
22283
|
+
}
|
|
22150
22284
|
break;
|
|
22151
22285
|
}
|
|
22152
22286
|
case TOGGLE_DRAG_ANNOTATION: {
|
|
@@ -22160,7 +22294,8 @@ const reducer$1 = (state, action) => {
|
|
|
22160
22294
|
break;
|
|
22161
22295
|
}
|
|
22162
22296
|
case DISABLE_DRAG_OPTIONS: {
|
|
22163
|
-
if (draft.enableDragPoints || draft.panEnabled || draft.zoomEnabled) {
|
|
22297
|
+
if (draft.enableDragAnnotation || draft.enableDragPoints || draft.panEnabled || draft.zoomEnabled) {
|
|
22298
|
+
draft.enableDragAnnotation = false;
|
|
22164
22299
|
draft.enableDragPoints = false;
|
|
22165
22300
|
draft.panEnabled = false;
|
|
22166
22301
|
draft.zoomEnabled = false;
|
|
@@ -22194,6 +22329,10 @@ var ChartType$1 = /* @__PURE__ */ ((ChartType2) => {
|
|
|
22194
22329
|
var CursorStyle = /* @__PURE__ */ ((CursorStyle2) => {
|
|
22195
22330
|
CursorStyle2["Pointer"] = "pointer";
|
|
22196
22331
|
CursorStyle2["Initial"] = "initial";
|
|
22332
|
+
CursorStyle2["Grab"] = "grab";
|
|
22333
|
+
CursorStyle2["Grabbing"] = "grabbing";
|
|
22334
|
+
CursorStyle2["Crosshair"] = "crosshair";
|
|
22335
|
+
CursorStyle2["Move"] = "move";
|
|
22197
22336
|
return CursorStyle2;
|
|
22198
22337
|
})(CursorStyle || {});
|
|
22199
22338
|
var ScaleType = /* @__PURE__ */ ((ScaleType2) => {
|
|
@@ -22202,10 +22341,10 @@ var ScaleType = /* @__PURE__ */ ((ScaleType2) => {
|
|
|
22202
22341
|
ScaleType2["Logarithmic"] = "logarithmic";
|
|
22203
22342
|
return ScaleType2;
|
|
22204
22343
|
})(ScaleType || {});
|
|
22205
|
-
var ChartDirection = /* @__PURE__ */ ((ChartDirection2) => {
|
|
22344
|
+
var ChartDirection$1 = /* @__PURE__ */ ((ChartDirection2) => {
|
|
22206
22345
|
ChartDirection2["Vertical"] = "vertical";
|
|
22207
22346
|
return ChartDirection2;
|
|
22208
|
-
})(ChartDirection || {});
|
|
22347
|
+
})(ChartDirection$1 || {});
|
|
22209
22348
|
var TooltipLabel = /* @__PURE__ */ ((TooltipLabel2) => {
|
|
22210
22349
|
TooltipLabel2["Y"] = "yLabel";
|
|
22211
22350
|
TooltipLabel2["X"] = "xLabel";
|
|
@@ -22329,7 +22468,8 @@ const chartMinorGridlinesPlugin = {
|
|
|
22329
22468
|
};
|
|
22330
22469
|
const BORDER_WIDTH = {
|
|
22331
22470
|
INITIAL: 2,
|
|
22332
|
-
HOVERED: 6
|
|
22471
|
+
HOVERED: 6,
|
|
22472
|
+
POINT_HOVERED: 8
|
|
22333
22473
|
};
|
|
22334
22474
|
const BORDER_COLOR = "rgba(0,0,0,0.1)";
|
|
22335
22475
|
const ANNOTATION_DASH = [10, 2];
|
|
@@ -22339,6 +22479,7 @@ const DEFAULT_COLOR = "hsl(60, 10.34482759%, 12.5%)";
|
|
|
22339
22479
|
const LEGEND_LABEL_BOX_SIZE = 12;
|
|
22340
22480
|
const TOOLTIP_PADDING = 8;
|
|
22341
22481
|
const TOOLTIP_BOX_PADDING = 4;
|
|
22482
|
+
const TRANSPARENT = "transparent";
|
|
22342
22483
|
const LOGARITHMIC_STEPS = [1, 10, 100, 1e3, 1e4];
|
|
22343
22484
|
const COLORS = [
|
|
22344
22485
|
"#3366cc",
|
|
@@ -22424,7 +22565,7 @@ const getTitle = (options) => {
|
|
|
22424
22565
|
} : {};
|
|
22425
22566
|
};
|
|
22426
22567
|
const isVertical = (direction) => {
|
|
22427
|
-
return direction === ChartDirection.Vertical;
|
|
22568
|
+
return direction === ChartDirection$1.Vertical;
|
|
22428
22569
|
};
|
|
22429
22570
|
const getAxisPosition = (axisType, i2) => {
|
|
22430
22571
|
const [positionA, positionB] = axisType === AxisType.Y ? [Position.Left, Position.Right] : [Position.Top, Position.Bottom];
|
|
@@ -22895,7 +23036,7 @@ const DragOptions = ({
|
|
|
22895
23036
|
};
|
|
22896
23037
|
const controls = "_controls_gbo9q_1";
|
|
22897
23038
|
const buttons = "_buttons_gbo9q_7";
|
|
22898
|
-
const styles$
|
|
23039
|
+
const styles$4 = {
|
|
22899
23040
|
controls,
|
|
22900
23041
|
buttons
|
|
22901
23042
|
};
|
|
@@ -24357,10 +24498,10 @@ const Controls = ({
|
|
|
24357
24498
|
generatedDatasets
|
|
24358
24499
|
});
|
|
24359
24500
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24360
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
24501
|
+
/* @__PURE__ */ jsxs("div", { className: styles$4.controls, children: [
|
|
24361
24502
|
!!options.title && /* @__PURE__ */ jsx(Text, { bold: true, children: options.title }),
|
|
24362
24503
|
headerComponent,
|
|
24363
|
-
/* @__PURE__ */ jsx(ControlsPortal, { controlsPortalId: controlsPortalId ?? "", children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
24504
|
+
/* @__PURE__ */ jsx(ControlsPortal, { controlsPortalId: controlsPortalId ?? "", children: /* @__PURE__ */ jsxs("div", { className: styles$4.buttons, children: [
|
|
24364
24505
|
!showTable && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24365
24506
|
/* @__PURE__ */ jsx(
|
|
24366
24507
|
AxesOptions,
|
|
@@ -24465,11 +24606,11 @@ const defaultAxis = (position) => ({
|
|
|
24465
24606
|
}
|
|
24466
24607
|
}
|
|
24467
24608
|
});
|
|
24468
|
-
const defaultAxes$
|
|
24609
|
+
const defaultAxes$2 = (axes) => ({
|
|
24469
24610
|
x: (axes == null ? void 0 : axes.x) || [defaultAxis("bottom")],
|
|
24470
24611
|
y: (axes == null ? void 0 : axes.y) || [defaultAxis("left")]
|
|
24471
24612
|
});
|
|
24472
|
-
const defaultAdditionalAxesOptions$
|
|
24613
|
+
const defaultAdditionalAxesOptions$2 = (options) => ({
|
|
24473
24614
|
chartScaleType: (options == null ? void 0 : options.chartScaleType) || "linear",
|
|
24474
24615
|
reverse: (options == null ? void 0 : options.reverse) || false,
|
|
24475
24616
|
beginAtZero: (options == null ? void 0 : options.beginAtZero) ?? false,
|
|
@@ -24479,7 +24620,7 @@ const defaultAdditionalAxesOptions$1 = (options) => ({
|
|
|
24479
24620
|
range: options == null ? void 0 : options.range,
|
|
24480
24621
|
autoAxisPadding: (options == null ? void 0 : options.autoAxisPadding) ?? false
|
|
24481
24622
|
});
|
|
24482
|
-
const defaultChartStyling$
|
|
24623
|
+
const defaultChartStyling$3 = (options) => ({
|
|
24483
24624
|
width: options == null ? void 0 : options.width,
|
|
24484
24625
|
height: options == null ? void 0 : options.height,
|
|
24485
24626
|
maintainAspectRatio: (options == null ? void 0 : options.maintainAspectRatio) ?? false,
|
|
@@ -24493,22 +24634,22 @@ const defaultChartStyling$2 = (options) => ({
|
|
|
24493
24634
|
right: 0
|
|
24494
24635
|
}
|
|
24495
24636
|
});
|
|
24496
|
-
const defaultTooltip$
|
|
24637
|
+
const defaultTooltip$3 = (tooltip) => ({
|
|
24497
24638
|
tooltips: (tooltip == null ? void 0 : tooltip.tooltips) ?? true,
|
|
24498
24639
|
showLabelsInTooltips: (tooltip == null ? void 0 : tooltip.showLabelsInTooltips) ?? false,
|
|
24499
24640
|
hideSimulationName: (tooltip == null ? void 0 : tooltip.hideSimulationName) ?? false,
|
|
24500
24641
|
scientificNotation: (tooltip == null ? void 0 : tooltip.scientificNotation) ?? true
|
|
24501
24642
|
});
|
|
24502
|
-
const defaultGraph$
|
|
24643
|
+
const defaultGraph$3 = (graph) => ({
|
|
24503
24644
|
lineTension: (graph == null ? void 0 : graph.lineTension) ?? 0.01,
|
|
24504
24645
|
spanGaps: (graph == null ? void 0 : graph.spanGaps) ?? false,
|
|
24505
24646
|
showDataLabels: (graph == null ? void 0 : graph.showDataLabels) ?? false,
|
|
24506
24647
|
showMinorGridlines: (graph == null ? void 0 : graph.showMinorGridlines) ?? false
|
|
24507
24648
|
});
|
|
24508
|
-
const defaultAnnotationsData$
|
|
24649
|
+
const defaultAnnotationsData$2 = (annotationsData) => {
|
|
24509
24650
|
return annotationsData ? annotationsData.map((ann) => ({ ...ann, display: (ann == null ? void 0 : ann.display) ?? true })) : [];
|
|
24510
24651
|
};
|
|
24511
|
-
const defaultAnnotations$
|
|
24652
|
+
const defaultAnnotations$2 = (annotations) => {
|
|
24512
24653
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
24513
24654
|
return {
|
|
24514
24655
|
labelAnnotation: {
|
|
@@ -24524,10 +24665,10 @@ const defaultAnnotations$1 = (annotations) => {
|
|
|
24524
24665
|
showAnnotations: (annotations == null ? void 0 : annotations.showAnnotations) ?? false,
|
|
24525
24666
|
controlAnnotation: (annotations == null ? void 0 : annotations.controlAnnotation) ?? false,
|
|
24526
24667
|
enableDragAnnotation: (annotations == null ? void 0 : annotations.enableDragAnnotation) ?? false,
|
|
24527
|
-
annotationsData: defaultAnnotationsData$
|
|
24668
|
+
annotationsData: defaultAnnotationsData$2(annotations == null ? void 0 : annotations.annotationsData)
|
|
24528
24669
|
};
|
|
24529
24670
|
};
|
|
24530
|
-
const defaultLegend$
|
|
24671
|
+
const defaultLegend$3 = (legend2) => ({
|
|
24531
24672
|
display: (legend2 == null ? void 0 : legend2.display) ?? true,
|
|
24532
24673
|
position: (legend2 == null ? void 0 : legend2.position) ?? Position.BottomLeft,
|
|
24533
24674
|
align: (legend2 == null ? void 0 : legend2.align) ?? AlignOptions.Center,
|
|
@@ -24537,14 +24678,14 @@ const defaultLegend$2 = (legend2) => ({
|
|
|
24537
24678
|
},
|
|
24538
24679
|
usePointStyle: (legend2 == null ? void 0 : legend2.usePointStyle) ?? true
|
|
24539
24680
|
});
|
|
24540
|
-
const defaultChartOptions$
|
|
24681
|
+
const defaultChartOptions$3 = (options) => ({
|
|
24541
24682
|
showPoints: (options == null ? void 0 : options.showPoints) ?? true,
|
|
24542
24683
|
enableZoom: (options == null ? void 0 : options.enableZoom) ?? true,
|
|
24543
24684
|
enablePan: (options == null ? void 0 : options.enablePan) ?? false,
|
|
24544
24685
|
showLine: (options == null ? void 0 : options.showLine) ?? true,
|
|
24545
24686
|
closeOnOutsideClick: (options == null ? void 0 : options.closeOnOutsideClick) ?? false
|
|
24546
24687
|
});
|
|
24547
|
-
const defaultInteractions$
|
|
24688
|
+
const defaultInteractions$3 = (interactions) => ({
|
|
24548
24689
|
onLegendClick: interactions == null ? void 0 : interactions.onLegendClick,
|
|
24549
24690
|
onHover: interactions == null ? void 0 : interactions.onHover,
|
|
24550
24691
|
onUnhover: interactions == null ? void 0 : interactions.onUnhover,
|
|
@@ -24560,7 +24701,7 @@ const defaultDragData$1 = (dragData) => ({
|
|
|
24560
24701
|
onDrag: dragData == null ? void 0 : dragData.onDrag,
|
|
24561
24702
|
onDragEnd: dragData == null ? void 0 : dragData.onDragEnd
|
|
24562
24703
|
});
|
|
24563
|
-
const getDefaultProps$
|
|
24704
|
+
const getDefaultProps$3 = (props) => {
|
|
24564
24705
|
const chart2 = (props == null ? void 0 : props.chart) || {};
|
|
24565
24706
|
const options = (chart2 == null ? void 0 : chart2.options) || {};
|
|
24566
24707
|
return {
|
|
@@ -24571,17 +24712,17 @@ const getDefaultProps$2 = (props) => {
|
|
|
24571
24712
|
options: {
|
|
24572
24713
|
title: (options == null ? void 0 : options.title) ?? "",
|
|
24573
24714
|
scales: (options == null ? void 0 : options.scales) ?? {},
|
|
24574
|
-
axes: defaultAxes$
|
|
24575
|
-
additionalAxesOptions: defaultAdditionalAxesOptions$
|
|
24715
|
+
axes: defaultAxes$2(options == null ? void 0 : options.axes),
|
|
24716
|
+
additionalAxesOptions: defaultAdditionalAxesOptions$2(
|
|
24576
24717
|
options == null ? void 0 : options.additionalAxesOptions
|
|
24577
24718
|
),
|
|
24578
|
-
chartStyling: defaultChartStyling$
|
|
24579
|
-
tooltip: defaultTooltip$
|
|
24580
|
-
graph: defaultGraph$
|
|
24581
|
-
annotations: defaultAnnotations$
|
|
24582
|
-
legend: defaultLegend$
|
|
24583
|
-
chartOptions: defaultChartOptions$
|
|
24584
|
-
interactions: defaultInteractions$
|
|
24719
|
+
chartStyling: defaultChartStyling$3(options == null ? void 0 : options.chartStyling),
|
|
24720
|
+
tooltip: defaultTooltip$3(options == null ? void 0 : options.tooltip),
|
|
24721
|
+
graph: defaultGraph$3(options == null ? void 0 : options.graph),
|
|
24722
|
+
annotations: defaultAnnotations$2(options == null ? void 0 : options.annotations),
|
|
24723
|
+
legend: defaultLegend$3(options == null ? void 0 : options.legend),
|
|
24724
|
+
chartOptions: defaultChartOptions$3(options == null ? void 0 : options.chartOptions),
|
|
24725
|
+
interactions: defaultInteractions$3(options == null ? void 0 : options.interactions),
|
|
24585
24726
|
dragData: defaultDragData$1(options == null ? void 0 : options.dragData),
|
|
24586
24727
|
depthType: (options == null ? void 0 : options.depthType) ?? {}
|
|
24587
24728
|
}
|
|
@@ -25024,7 +25165,7 @@ const getUnitsFromLabel = (label) => {
|
|
|
25024
25165
|
const units = matches && (matches == null ? void 0 : matches.length) > 0 ? matches == null ? void 0 : matches[0] : "";
|
|
25025
25166
|
return units;
|
|
25026
25167
|
};
|
|
25027
|
-
const customFormatNumber = (labelNumber, scientificNotation) => {
|
|
25168
|
+
const customFormatNumber$1 = (labelNumber, scientificNotation) => {
|
|
25028
25169
|
let roundOptions = {};
|
|
25029
25170
|
if (!scientificNotation) {
|
|
25030
25171
|
roundOptions = { scientific: false };
|
|
@@ -25060,21 +25201,21 @@ const getLineChartToolTips = (options) => {
|
|
|
25060
25201
|
};
|
|
25061
25202
|
}
|
|
25062
25203
|
};
|
|
25063
|
-
const
|
|
25204
|
+
const titleCallback2 = (tooltipItem) => {
|
|
25064
25205
|
const labels = getTooltipLabels(tooltipItem[0].dataset);
|
|
25065
25206
|
const { titleLabel, titleAxisLabel } = labels ?? {};
|
|
25066
25207
|
const formattedValue = titleLabel === TooltipLabel.Y ? tooltipItem[0].parsed.y : tooltipItem[0].parsed.x;
|
|
25067
|
-
const roundedValue = customFormatNumber(formattedValue, scientificNotation);
|
|
25208
|
+
const roundedValue = customFormatNumber$1(formattedValue, scientificNotation);
|
|
25068
25209
|
return `${roundedValue} ${titleAxisLabel}`;
|
|
25069
25210
|
};
|
|
25070
|
-
const
|
|
25211
|
+
const labelCallback2 = (tooltipItem) => {
|
|
25071
25212
|
const { showLabelsInTooltips } = options.tooltip;
|
|
25072
25213
|
let label = tooltipItem.dataset.label || "";
|
|
25073
25214
|
const labels = getTooltipLabels(tooltipItem.dataset);
|
|
25074
25215
|
const { valueLabel = "", valueAxisLabel = "" } = labels ?? {};
|
|
25075
25216
|
const getTooltipItemValue = () => {
|
|
25076
25217
|
const labelNumber = valueLabel === TooltipLabel.X ? tooltipItem.parsed.x : tooltipItem.parsed.y;
|
|
25077
|
-
return customFormatNumber(labelNumber, scientificNotation);
|
|
25218
|
+
return customFormatNumber$1(labelNumber, scientificNotation);
|
|
25078
25219
|
};
|
|
25079
25220
|
const tooltipItemValue = getTooltipItemValue();
|
|
25080
25221
|
const units = getUnitsFromLabel(valueAxisLabel);
|
|
@@ -25091,8 +25232,8 @@ const getLineChartToolTips = (options) => {
|
|
|
25091
25232
|
boxHeight: LEGEND_LABEL_BOX_SIZE,
|
|
25092
25233
|
boxPadding: TOOLTIP_BOX_PADDING,
|
|
25093
25234
|
callbacks: {
|
|
25094
|
-
title:
|
|
25095
|
-
label:
|
|
25235
|
+
title: titleCallback2,
|
|
25236
|
+
label: labelCallback2,
|
|
25096
25237
|
afterLabel: afterLabelCallback
|
|
25097
25238
|
}
|
|
25098
25239
|
};
|
|
@@ -25187,80 +25328,153 @@ var AnnotationType = /* @__PURE__ */ ((AnnotationType2) => {
|
|
|
25187
25328
|
AnnotationType2["ELLIPSE"] = "ellipse";
|
|
25188
25329
|
return AnnotationType2;
|
|
25189
25330
|
})(AnnotationType || {});
|
|
25190
|
-
const
|
|
25331
|
+
const handleLineEnter = (element, chart2, annotation2) => {
|
|
25191
25332
|
var _a2;
|
|
25333
|
+
chart2.canvas.style.cursor = CursorStyle.Pointer;
|
|
25192
25334
|
if ((_a2 = element.options.scaleID) == null ? void 0 : _a2.includes(AxisType.X)) {
|
|
25193
25335
|
if (element.options.label) {
|
|
25194
25336
|
element.options.label.xAdjust = chart2.chartArea.left;
|
|
25195
25337
|
}
|
|
25196
25338
|
}
|
|
25197
25339
|
element.options.borderWidth = BORDER_WIDTH.HOVERED;
|
|
25198
|
-
chart2.hoveredAnnotationId = element.options.id || null;
|
|
25199
25340
|
if (element.options.label) {
|
|
25200
25341
|
element.label.options.display = true;
|
|
25201
25342
|
element.options.label.enabled = true;
|
|
25202
25343
|
}
|
|
25344
|
+
if (annotation2 == null ? void 0 : annotation2.enableDrag) {
|
|
25345
|
+
chart2.hoveredAnnotationId = element.options.id || null;
|
|
25346
|
+
chart2.update();
|
|
25347
|
+
}
|
|
25203
25348
|
chart2.draw();
|
|
25204
|
-
chart2.update();
|
|
25205
|
-
chart2.canvas.style.cursor = CursorStyle.Pointer;
|
|
25206
|
-
return true;
|
|
25207
25349
|
};
|
|
25208
|
-
const
|
|
25350
|
+
const handleLineLeave = (element, chart2, annotation2) => {
|
|
25209
25351
|
element.options.borderWidth = BORDER_WIDTH.INITIAL;
|
|
25352
|
+
chart2.canvas.style.cursor = CursorStyle.Initial;
|
|
25210
25353
|
chart2.hoveredAnnotationId = null;
|
|
25211
25354
|
if (element.options.label) {
|
|
25212
25355
|
element.label.options.display = false;
|
|
25213
25356
|
element.options.label.enabled = false;
|
|
25214
25357
|
}
|
|
25358
|
+
if (annotation2 == null ? void 0 : annotation2.enableDrag) {
|
|
25359
|
+
chart2.hoveredAnnotationId = null;
|
|
25360
|
+
chart2.update();
|
|
25361
|
+
}
|
|
25362
|
+
chart2.draw();
|
|
25363
|
+
};
|
|
25364
|
+
const handleBoxEnter = (element, chart2, annotation2) => {
|
|
25365
|
+
if (annotation2 == null ? void 0 : annotation2.enableDrag) {
|
|
25366
|
+
chart2.hoveredAnnotationId = element.options.id || null;
|
|
25367
|
+
chart2.update();
|
|
25368
|
+
element.options.borderWidth = BORDER_WIDTH.HOVERED;
|
|
25369
|
+
chart2.canvas.style.cursor = CursorStyle.Pointer;
|
|
25370
|
+
}
|
|
25371
|
+
chart2.draw();
|
|
25372
|
+
};
|
|
25373
|
+
const handleBoxLeave = (element, chart2, annotation2) => {
|
|
25374
|
+
if (annotation2 == null ? void 0 : annotation2.enableDrag) {
|
|
25375
|
+
chart2.hoveredAnnotationId = null;
|
|
25376
|
+
element.options.borderWidth = BORDER_WIDTH.INITIAL;
|
|
25377
|
+
chart2.canvas.style.cursor = CursorStyle.Initial;
|
|
25378
|
+
chart2.update();
|
|
25379
|
+
}
|
|
25380
|
+
chart2.draw();
|
|
25381
|
+
};
|
|
25382
|
+
const handlePointEnter = (element, chart2, annotation2) => {
|
|
25383
|
+
if (annotation2 == null ? void 0 : annotation2.enableDrag) {
|
|
25384
|
+
chart2.hoveredAnnotationId = element.options.id || null;
|
|
25385
|
+
chart2.update();
|
|
25386
|
+
element.options.borderWidth = BORDER_WIDTH.POINT_HOVERED;
|
|
25387
|
+
chart2.canvas.style.cursor = CursorStyle.Pointer;
|
|
25388
|
+
}
|
|
25389
|
+
chart2.draw();
|
|
25390
|
+
};
|
|
25391
|
+
const handlePointLeave = (element, chart2, annotation2) => {
|
|
25392
|
+
if (annotation2 == null ? void 0 : annotation2.enableDrag) {
|
|
25393
|
+
chart2.hoveredAnnotationId = null;
|
|
25394
|
+
element.options.borderWidth = BORDER_WIDTH.INITIAL;
|
|
25395
|
+
chart2.canvas.style.cursor = CursorStyle.Initial;
|
|
25396
|
+
chart2.update();
|
|
25397
|
+
}
|
|
25215
25398
|
chart2.draw();
|
|
25216
|
-
chart2.update();
|
|
25217
|
-
chart2.canvas.style.cursor = CursorStyle.Initial;
|
|
25218
|
-
return true;
|
|
25219
25399
|
};
|
|
25220
25400
|
const generateAnnotations = (annotationsData) => {
|
|
25221
25401
|
return annotationsData == null ? void 0 : annotationsData.map((ann, idx) => {
|
|
25402
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
25222
25403
|
const scaleID = (ann == null ? void 0 : ann.annotationAxis) ?? void 0;
|
|
25223
|
-
const color2 = (ann == null ? void 0 : ann.color)
|
|
25224
|
-
const type = (ann == null ? void 0 : ann.type) ||
|
|
25404
|
+
const color2 = (ann == null ? void 0 : ann.color) ?? COLORS[idx];
|
|
25405
|
+
const type = (ann == null ? void 0 : ann.type) || AnnotationType.LINE;
|
|
25225
25406
|
const adjustScaleRange2 = ann == null ? void 0 : ann.adjustScaleRange;
|
|
25226
25407
|
const borderColor = {
|
|
25227
25408
|
[AnnotationType.LINE]: color2,
|
|
25228
25409
|
[AnnotationType.POINT]: color2,
|
|
25229
25410
|
[AnnotationType.BOX]: color2
|
|
25230
|
-
}[type] ||
|
|
25231
|
-
const borderWidth = type
|
|
25232
|
-
const borderDash = type
|
|
25233
|
-
const
|
|
25234
|
-
backgroundColor: color2,
|
|
25235
|
-
content: ann == null ? void 0 : ann.label,
|
|
25236
|
-
display: false,
|
|
25237
|
-
position: Position.Top
|
|
25238
|
-
} : {
|
|
25411
|
+
}[type] || TRANSPARENT;
|
|
25412
|
+
const borderWidth = type === AnnotationType.LINE ? BORDER_WIDTH.INITIAL : 0;
|
|
25413
|
+
const borderDash = type === AnnotationType.LINE ? ANNOTATION_DASH : void 0;
|
|
25414
|
+
const defLabel = {
|
|
25239
25415
|
content: ann == null ? void 0 : ann.label,
|
|
25240
25416
|
display: true,
|
|
25241
25417
|
font: { weight: "normal" }
|
|
25242
25418
|
};
|
|
25419
|
+
const label = {
|
|
25420
|
+
[AnnotationType.LINE]: {
|
|
25421
|
+
backgroundColor: color2,
|
|
25422
|
+
content: ann == null ? void 0 : ann.label,
|
|
25423
|
+
display: false,
|
|
25424
|
+
position: Position.Top
|
|
25425
|
+
},
|
|
25426
|
+
[AnnotationType.POINT]: {
|
|
25427
|
+
backgroundColor: ((_a2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _a2.backgroundColor) ?? TRANSPARENT,
|
|
25428
|
+
content: ann == null ? void 0 : ann.label,
|
|
25429
|
+
display: !!(ann == null ? void 0 : ann.label),
|
|
25430
|
+
position: ((_b2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _b2.position) ?? Position.Bottom,
|
|
25431
|
+
color: ((_c2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _c2.color) ?? DEFAULT_COLOR,
|
|
25432
|
+
font: ((_d2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _d2.font) ?? `12px ${DEFAULT_FONT_FAMILY}`,
|
|
25433
|
+
borderWidth: BORDER_WIDTH.INITIAL,
|
|
25434
|
+
padding: 5,
|
|
25435
|
+
borderRadius: 3,
|
|
25436
|
+
borderColor: ((_e2 = ann == null ? void 0 : ann.labelConfig) == null ? void 0 : _e2.borderColor) ?? TRANSPARENT
|
|
25437
|
+
},
|
|
25438
|
+
[AnnotationType.BOX]: defLabel,
|
|
25439
|
+
[AnnotationType.ELLIPSE]: defLabel
|
|
25440
|
+
}[type] || defLabel;
|
|
25243
25441
|
const enter = ({
|
|
25244
25442
|
element
|
|
25245
25443
|
}, {
|
|
25246
25444
|
chart: chart2
|
|
25247
25445
|
}) => {
|
|
25248
|
-
|
|
25249
|
-
|
|
25250
|
-
|
|
25446
|
+
switch (type) {
|
|
25447
|
+
case AnnotationType.LINE:
|
|
25448
|
+
handleLineEnter(element, chart2, ann);
|
|
25449
|
+
break;
|
|
25450
|
+
case AnnotationType.BOX:
|
|
25451
|
+
handleBoxEnter(element, chart2, ann);
|
|
25452
|
+
break;
|
|
25453
|
+
case AnnotationType.POINT:
|
|
25454
|
+
handlePointEnter(element, chart2, ann);
|
|
25455
|
+
break;
|
|
25456
|
+
}
|
|
25251
25457
|
};
|
|
25252
25458
|
const leave = ({
|
|
25253
25459
|
element
|
|
25254
25460
|
}, {
|
|
25255
25461
|
chart: chart2
|
|
25256
25462
|
}) => {
|
|
25257
|
-
|
|
25258
|
-
|
|
25259
|
-
|
|
25463
|
+
switch (type) {
|
|
25464
|
+
case AnnotationType.LINE:
|
|
25465
|
+
handleLineLeave(element, chart2, ann);
|
|
25466
|
+
break;
|
|
25467
|
+
case AnnotationType.BOX:
|
|
25468
|
+
handleBoxLeave(element, chart2, ann);
|
|
25469
|
+
break;
|
|
25470
|
+
case AnnotationType.POINT:
|
|
25471
|
+
handlePointLeave(element, chart2, ann);
|
|
25472
|
+
break;
|
|
25473
|
+
}
|
|
25260
25474
|
};
|
|
25261
|
-
const onDragStart = () => (cord) => (ann == null ? void 0 : ann.onDragStart) ? ann == null ? void 0 : ann.onDragStart(cord) : void 0;
|
|
25262
|
-
const onDrag = () => (cord) => (ann == null ? void 0 : ann.onDrag) ? ann == null ? void 0 : ann.onDrag(cord) : void 0;
|
|
25263
|
-
const onDragEnd = () => (cord) => (ann == null ? void 0 : ann.onDragEnd) ? ann == null ? void 0 : ann.onDragEnd(cord) : void 0;
|
|
25475
|
+
const onDragStart = () => (cord, annotation2) => (ann == null ? void 0 : ann.onDragStart) ? ann == null ? void 0 : ann.onDragStart(cord, annotation2) : void 0;
|
|
25476
|
+
const onDrag = () => (cord, annotation2) => (ann == null ? void 0 : ann.onDrag) ? ann == null ? void 0 : ann.onDrag(cord, annotation2) : void 0;
|
|
25477
|
+
const onDragEnd = () => (cord, annotation2) => (ann == null ? void 0 : ann.onDragEnd) ? ann == null ? void 0 : ann.onDragEnd(cord, annotation2) : void 0;
|
|
25264
25478
|
return {
|
|
25265
25479
|
...ann,
|
|
25266
25480
|
display: ann == null ? void 0 : ann.display,
|
|
@@ -25904,16 +26118,18 @@ const handleAnnotationMouseDown = (event, canvas2, scales, annotations, setDragg
|
|
|
25904
26118
|
return;
|
|
25905
26119
|
const metrics = calculateAnnotationMetricsInValues(annotation2);
|
|
25906
26120
|
if (annotation2 && annotation2.enableDrag && metrics.centerY && metrics.centerX) {
|
|
26121
|
+
canvas2.style.cursor = CursorStyle.Move;
|
|
25907
26122
|
const dragStartX = x2 - metrics.centerX;
|
|
25908
26123
|
const dragStartY = y2 - metrics.centerY;
|
|
25909
26124
|
setDraggingState(true, annotation2, dragStartX, dragStartY);
|
|
25910
26125
|
if (annotation2 == null ? void 0 : annotation2.onDragStart) {
|
|
25911
|
-
annotation2.onDragStart({ x: x2, y: y2 });
|
|
26126
|
+
annotation2.onDragStart({ x: x2, y: y2 }, cloneDeep(annotation2));
|
|
25912
26127
|
}
|
|
25913
26128
|
}
|
|
25914
26129
|
};
|
|
25915
26130
|
const handleAnnotationMouseMove = (event, canvas2, scales, isDragging2, activeAnnotation, dragStartX, dragStartY, chart2) => {
|
|
25916
26131
|
if (isDragging2 && activeAnnotation) {
|
|
26132
|
+
canvas2.style.cursor = CursorStyle.Move;
|
|
25917
26133
|
const { x: x2, y: y2 } = getMousePositionInCoordinates(event, canvas2, scales);
|
|
25918
26134
|
const metrics = calculateAnnotationMetricsInValues(activeAnnotation);
|
|
25919
26135
|
let newCenterX = x2 - dragStartX;
|
|
@@ -25933,7 +26149,7 @@ const handleAnnotationMouseMove = (event, canvas2, scales, isDragging2, activeAn
|
|
|
25933
26149
|
}
|
|
25934
26150
|
chart2.update();
|
|
25935
26151
|
if (activeAnnotation == null ? void 0 : activeAnnotation.onDrag) {
|
|
25936
|
-
activeAnnotation.onDrag({ x: x2, y: y2 });
|
|
26152
|
+
activeAnnotation.onDrag({ x: x2, y: y2 }, cloneDeep(activeAnnotation));
|
|
25937
26153
|
}
|
|
25938
26154
|
const { ctx, width, height } = chart2;
|
|
25939
26155
|
const { centerX, centerY } = calculateAnnotationMetricsInValues(activeAnnotation) ?? {};
|
|
@@ -25964,15 +26180,60 @@ const handleAnnotationMouseUp = (isDragging2, activeAnnotation, chart2, setDragg
|
|
|
25964
26180
|
if (activeAnnotation) {
|
|
25965
26181
|
const { centerX = -1, centerY = -1 } = calculateAnnotationMetricsInValues(activeAnnotation) ?? {};
|
|
25966
26182
|
if (activeAnnotation == null ? void 0 : activeAnnotation.onDragEnd) {
|
|
25967
|
-
activeAnnotation.onDragEnd(
|
|
26183
|
+
activeAnnotation.onDragEnd(
|
|
26184
|
+
{ x: centerX, y: centerY },
|
|
26185
|
+
cloneDeep(activeAnnotation)
|
|
26186
|
+
);
|
|
25968
26187
|
}
|
|
26188
|
+
chart2.canvas.style.cursor = CursorStyle.Pointer;
|
|
25969
26189
|
setDraggingState(false, null);
|
|
25970
26190
|
}
|
|
25971
26191
|
chart2.update();
|
|
25972
26192
|
}
|
|
25973
26193
|
};
|
|
26194
|
+
const annotationLabel = (ctx, annotations, scales) => {
|
|
26195
|
+
Object.values(annotations).forEach((annotation2) => {
|
|
26196
|
+
var _a2;
|
|
26197
|
+
if (annotation2.type === AnnotationType.POINT && !isNil(annotation2 == null ? void 0 : annotation2.label) && ((_a2 = annotation2 == null ? void 0 : annotation2.label) == null ? void 0 : _a2.display)) {
|
|
26198
|
+
const { content, font, color: color2, position, padding } = (annotation2 == null ? void 0 : annotation2.label) ?? {};
|
|
26199
|
+
ctx.save();
|
|
26200
|
+
ctx.font = font;
|
|
26201
|
+
ctx.fillStyle = color2;
|
|
26202
|
+
const { centerX = -1, centerY = -1 } = calculateAnnotationMetricsInValuesInPixels(annotation2, scales);
|
|
26203
|
+
const textWidth = ctx.measureText(content).width;
|
|
26204
|
+
let textX = centerX - textWidth / 2;
|
|
26205
|
+
let textY = centerY + 20;
|
|
26206
|
+
switch (position) {
|
|
26207
|
+
case Position.Top:
|
|
26208
|
+
textY = centerY - 20;
|
|
26209
|
+
break;
|
|
26210
|
+
case Position.Left:
|
|
26211
|
+
textX = centerX - textWidth - padding;
|
|
26212
|
+
textY = centerY;
|
|
26213
|
+
break;
|
|
26214
|
+
case Position.Right:
|
|
26215
|
+
textX = centerX + padding;
|
|
26216
|
+
textY = centerY;
|
|
26217
|
+
break;
|
|
26218
|
+
}
|
|
26219
|
+
ctx.fillText(content, textX, textY);
|
|
26220
|
+
ctx.restore();
|
|
26221
|
+
}
|
|
26222
|
+
});
|
|
26223
|
+
};
|
|
25974
26224
|
const annotationDraggerPlugin = {
|
|
25975
26225
|
id: "annotationDraggerPlugin",
|
|
26226
|
+
beforeDraw(chart2) {
|
|
26227
|
+
var _a2, _b2;
|
|
26228
|
+
let annotations = ((_b2 = (_a2 = chart2.options.plugins) == null ? void 0 : _a2.annotation) == null ? void 0 : _b2.annotations) ?? {};
|
|
26229
|
+
if (!annotations)
|
|
26230
|
+
return;
|
|
26231
|
+
annotationLabel(
|
|
26232
|
+
chart2.ctx,
|
|
26233
|
+
annotations,
|
|
26234
|
+
chart2.scales
|
|
26235
|
+
);
|
|
26236
|
+
},
|
|
25976
26237
|
afterUpdate(chart2) {
|
|
25977
26238
|
var _a2, _b2, _c2, _d2;
|
|
25978
26239
|
const { canvas: canvas2, scales, hoveredAnnotationId } = chart2;
|
|
@@ -26141,7 +26402,7 @@ const bottom = "_bottom_wpro0_161";
|
|
|
26141
26402
|
const dropzonePlaceholder = "_dropzonePlaceholder_wpro0_165";
|
|
26142
26403
|
const isActive = "_isActive_wpro0_173";
|
|
26143
26404
|
const resizeContainer = "_resizeContainer_wpro0_176";
|
|
26144
|
-
const styles$
|
|
26405
|
+
const styles$3 = {
|
|
26145
26406
|
legend,
|
|
26146
26407
|
isDragging,
|
|
26147
26408
|
legendItems,
|
|
@@ -26171,6 +26432,11 @@ var ChartType = /* @__PURE__ */ ((ChartType2) => {
|
|
|
26171
26432
|
ChartType2["SCATTER"] = "scatter";
|
|
26172
26433
|
return ChartType2;
|
|
26173
26434
|
})(ChartType || {});
|
|
26435
|
+
var ChartDirection = /* @__PURE__ */ ((ChartDirection2) => {
|
|
26436
|
+
ChartDirection2["VERTICAL"] = "vertical";
|
|
26437
|
+
ChartDirection2["HORIZONTAL"] = "horizontal";
|
|
26438
|
+
return ChartDirection2;
|
|
26439
|
+
})(ChartDirection || {});
|
|
26174
26440
|
const circleSvg = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTIiIGZpbGw9ImN1cnJlbnRDb2xvciIgLz48L3N2Zz4=";
|
|
26175
26441
|
const rectSvg = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHJlY3QgeD0iMiIgeT0iMiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiBmaWxsPSJjdXJyZW50Q29sb3IiIC8+PC9zdmc+";
|
|
26176
26442
|
const rectRotSvg = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHJlY3QgeD0iMyIgeT0iMyIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiBmaWxsPSJjdXJyZW50Q29sb3IiIHRyYW5zZm9ybT0ncm90YXRlKDQ1IDEyIDEyKScgLz48L3N2Zz4=";
|
|
@@ -26181,7 +26447,7 @@ const LineItem = ({ dataset }) => {
|
|
|
26181
26447
|
const { borderColor, borderDash, borderWidth } = dataset;
|
|
26182
26448
|
const offset = borderDash.length ? (LEGEND_SYMBOL_SIZE$1 - borderDash[0]) / 2 % (borderDash[0] + borderDash[1]) * -1 : 0;
|
|
26183
26449
|
const borderDashString = ((_a2 = dataset.borderDash) == null ? void 0 : _a2.join(" ")) || "";
|
|
26184
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
26450
|
+
return /* @__PURE__ */ jsx("span", { className: styles$3.legendItemLine, children: /* @__PURE__ */ jsx(
|
|
26185
26451
|
"svg",
|
|
26186
26452
|
{
|
|
26187
26453
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -26213,7 +26479,7 @@ const PointItem = ({ dataset }) => {
|
|
|
26213
26479
|
rectRot: rectRotSvg,
|
|
26214
26480
|
rect: rectSvg
|
|
26215
26481
|
};
|
|
26216
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
26482
|
+
return /* @__PURE__ */ jsx("span", { className: styles$3.legendItemPoint, children: /* @__PURE__ */ jsx(
|
|
26217
26483
|
Icon,
|
|
26218
26484
|
{
|
|
26219
26485
|
icon: icons[pointStyle] || circleSvg,
|
|
@@ -26225,7 +26491,7 @@ const PointItem = ({ dataset }) => {
|
|
|
26225
26491
|
const BoxItem = ({ dataset }) => {
|
|
26226
26492
|
const { backgroundColor } = dataset;
|
|
26227
26493
|
const style = { backgroundColor };
|
|
26228
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
26494
|
+
return /* @__PURE__ */ jsx("span", { className: styles$3.legendItemBox, style });
|
|
26229
26495
|
};
|
|
26230
26496
|
const LegendItemLine = ({ dataset }) => {
|
|
26231
26497
|
const { annotationType, showLine } = dataset;
|
|
@@ -26248,11 +26514,11 @@ const renderLegendItemSymbol = (dataset, chartType) => {
|
|
|
26248
26514
|
case ChartType.LINE:
|
|
26249
26515
|
return /* @__PURE__ */ jsx(LegendItemLine, { dataset });
|
|
26250
26516
|
case ChartType.BAR:
|
|
26251
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
26517
|
+
return /* @__PURE__ */ jsx("span", { className: styles$3.legendItemBox, children: /* @__PURE__ */ jsx(TbSquareFilled, { color: dataset.borderColor }) });
|
|
26252
26518
|
case ChartType.PIE:
|
|
26253
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
26519
|
+
return /* @__PURE__ */ jsx("span", { className: styles$3.legendItemPoint, children: /* @__PURE__ */ jsx(Icon, { icon: circleSvg }) });
|
|
26254
26520
|
case ChartType.SCATTER:
|
|
26255
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
26521
|
+
return /* @__PURE__ */ jsx("span", { className: styles$3.legendItemPoint, children: /* @__PURE__ */ jsx(TbCircleFilled, { color: dataset.borderColor }) });
|
|
26256
26522
|
default:
|
|
26257
26523
|
return null;
|
|
26258
26524
|
}
|
|
@@ -26266,18 +26532,18 @@ const LegendItem = ({
|
|
|
26266
26532
|
return /* @__PURE__ */ jsxs(
|
|
26267
26533
|
"div",
|
|
26268
26534
|
{
|
|
26269
|
-
className: cx(styles$
|
|
26535
|
+
className: cx(styles$3.legendItem, hidden && styles$3.isHidden),
|
|
26270
26536
|
onClick: handleClick,
|
|
26271
26537
|
children: [
|
|
26272
26538
|
/* @__PURE__ */ jsx(
|
|
26273
26539
|
"span",
|
|
26274
26540
|
{
|
|
26275
|
-
className: styles$
|
|
26541
|
+
className: styles$3.legendItemSymbol,
|
|
26276
26542
|
style: { width: LEGEND_SYMBOL_SIZE },
|
|
26277
26543
|
children: renderLegendItemSymbol(dataset, chartType)
|
|
26278
26544
|
}
|
|
26279
26545
|
),
|
|
26280
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
26546
|
+
/* @__PURE__ */ jsx("span", { className: styles$3.legendItemText, children: dataset.label })
|
|
26281
26547
|
]
|
|
26282
26548
|
}
|
|
26283
26549
|
);
|
|
@@ -26344,7 +26610,7 @@ const LegendItems = ({
|
|
|
26344
26610
|
datasets,
|
|
26345
26611
|
legendClick,
|
|
26346
26612
|
chartType
|
|
26347
|
-
}) => /* @__PURE__ */ jsx("div", { className: styles$
|
|
26613
|
+
}) => /* @__PURE__ */ jsx("div", { className: styles$3.legendItems, children: items.map((item) => {
|
|
26348
26614
|
if (datasets[item.datasetIndex].hideLegend) {
|
|
26349
26615
|
return null;
|
|
26350
26616
|
}
|
|
@@ -26377,13 +26643,13 @@ const LegendPanel = forwardRef(
|
|
|
26377
26643
|
{
|
|
26378
26644
|
ref,
|
|
26379
26645
|
className: cx(
|
|
26380
|
-
styles$
|
|
26381
|
-
!legendEnabled && styles$
|
|
26382
|
-
isDragging2 && styles$
|
|
26646
|
+
styles$3.legend,
|
|
26647
|
+
!legendEnabled && styles$3.isHidden,
|
|
26648
|
+
isDragging2 && styles$3.isDragging
|
|
26383
26649
|
),
|
|
26384
26650
|
style,
|
|
26385
26651
|
children: [
|
|
26386
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
26652
|
+
/* @__PURE__ */ jsx("div", { className: styles$3.legendToggle, children: /* @__PURE__ */ jsx(
|
|
26387
26653
|
Button,
|
|
26388
26654
|
{
|
|
26389
26655
|
onClick: () => setLegendEnabled(!legendEnabled),
|
|
@@ -26422,17 +26688,17 @@ const LegendDropZone = (legendDropZoneProps) => {
|
|
|
26422
26688
|
{
|
|
26423
26689
|
ref: dropRef,
|
|
26424
26690
|
className: cx(
|
|
26425
|
-
styles$
|
|
26426
|
-
isActive2 && styles$
|
|
26427
|
-
position.includes("left") && styles$
|
|
26428
|
-
position.includes("right") && styles$
|
|
26429
|
-
position.includes("top") && styles$
|
|
26430
|
-
position.includes("bottom") && styles$
|
|
26691
|
+
styles$3.dropzone,
|
|
26692
|
+
isActive2 && styles$3.isActive,
|
|
26693
|
+
position.includes("left") && styles$3.left,
|
|
26694
|
+
position.includes("right") && styles$3.right,
|
|
26695
|
+
position.includes("top") && styles$3.top,
|
|
26696
|
+
position.includes("bottom") && styles$3.bottom
|
|
26431
26697
|
),
|
|
26432
26698
|
children: /* @__PURE__ */ jsx(
|
|
26433
26699
|
"div",
|
|
26434
26700
|
{
|
|
26435
|
-
className: styles$
|
|
26701
|
+
className: styles$3.dropzonePlaceholder,
|
|
26436
26702
|
style: { ...placeholderSize, margin: LEGEND_MARGIN }
|
|
26437
26703
|
}
|
|
26438
26704
|
)
|
|
@@ -26451,7 +26717,7 @@ const LegendDropZones = (legendDropZonesProps) => {
|
|
|
26451
26717
|
return /* @__PURE__ */ jsx(
|
|
26452
26718
|
"div",
|
|
26453
26719
|
{
|
|
26454
|
-
className: styles$
|
|
26720
|
+
className: styles$3.dropzoneContainer,
|
|
26455
26721
|
style: {
|
|
26456
26722
|
top: top2,
|
|
26457
26723
|
left: left2,
|
|
@@ -26493,7 +26759,7 @@ const Legend2 = ({ chartRef, legendConfig }) => {
|
|
|
26493
26759
|
})
|
|
26494
26760
|
}));
|
|
26495
26761
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26496
|
-
/* @__PURE__ */ jsx("div", { ref: resizeRef, className: styles$
|
|
26762
|
+
/* @__PURE__ */ jsx("div", { ref: resizeRef, className: styles$3.resizeContainer }),
|
|
26497
26763
|
/* @__PURE__ */ jsx(
|
|
26498
26764
|
LegendPanel,
|
|
26499
26765
|
{
|
|
@@ -26540,7 +26806,7 @@ const LineChart = (props) => {
|
|
|
26540
26806
|
const chartRef = useRef(null);
|
|
26541
26807
|
const { table: table2 } = props;
|
|
26542
26808
|
const { translations, languageKey } = getConfig();
|
|
26543
|
-
const chart2 = getDefaultProps$
|
|
26809
|
+
const chart2 = getDefaultProps$3(props);
|
|
26544
26810
|
const {
|
|
26545
26811
|
data: { datasets } = { datasets: [] },
|
|
26546
26812
|
options,
|
|
@@ -26587,7 +26853,7 @@ const LineChart = (props) => {
|
|
|
26587
26853
|
return /* @__PURE__ */ jsxs(
|
|
26588
26854
|
"div",
|
|
26589
26855
|
{
|
|
26590
|
-
className: getClassName(chartStyling, styles$
|
|
26856
|
+
className: getClassName(chartStyling, styles$5),
|
|
26591
26857
|
style: {
|
|
26592
26858
|
width: chartStyling.width || AUTO,
|
|
26593
26859
|
height: chartStyling.height || AUTO
|
|
@@ -26610,7 +26876,7 @@ const LineChart = (props) => {
|
|
|
26610
26876
|
controlsPortalId
|
|
26611
26877
|
}
|
|
26612
26878
|
),
|
|
26613
|
-
table2 && state.showTable ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
26879
|
+
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: [
|
|
26614
26880
|
/* @__PURE__ */ jsx(
|
|
26615
26881
|
Line,
|
|
26616
26882
|
{
|
|
@@ -26646,7 +26912,7 @@ const LineChart = (props) => {
|
|
|
26646
26912
|
);
|
|
26647
26913
|
};
|
|
26648
26914
|
const LineChartWithLegend = (props) => {
|
|
26649
|
-
const { options } = getDefaultProps$
|
|
26915
|
+
const { options } = getDefaultProps$3(props);
|
|
26650
26916
|
return /* @__PURE__ */ jsx(LegendProvider, { options, children: /* @__PURE__ */ jsx(LineChart, { ...props }) });
|
|
26651
26917
|
};
|
|
26652
26918
|
const initializeLineChart = ({ languageKey = "en", ...options }) => {
|
|
@@ -26660,73 +26926,73 @@ const initializeLineChart = ({ languageKey = "en", ...options }) => {
|
|
|
26660
26926
|
}
|
|
26661
26927
|
});
|
|
26662
26928
|
};
|
|
26663
|
-
const chart$
|
|
26664
|
-
const fixedHeight$
|
|
26665
|
-
const stretchHeight$
|
|
26666
|
-
const zoomForm$
|
|
26667
|
-
const zoomReset$
|
|
26668
|
-
const help$
|
|
26669
|
-
const autoWeight$
|
|
26670
|
-
const styles$
|
|
26671
|
-
chart: chart$
|
|
26672
|
-
fixedHeight: fixedHeight$
|
|
26673
|
-
stretchHeight: stretchHeight$
|
|
26674
|
-
zoomForm: zoomForm$
|
|
26675
|
-
zoomReset: zoomReset$
|
|
26676
|
-
help: help$
|
|
26677
|
-
autoWeight: autoWeight$
|
|
26929
|
+
const chart$2 = "_chart_1jdnu_1";
|
|
26930
|
+
const fixedHeight$2 = "_fixedHeight_1jdnu_13";
|
|
26931
|
+
const stretchHeight$2 = "_stretchHeight_1jdnu_19";
|
|
26932
|
+
const zoomForm$2 = "_zoomForm_1jdnu_32";
|
|
26933
|
+
const zoomReset$2 = "_zoomReset_1jdnu_40";
|
|
26934
|
+
const help$2 = "_help_1jdnu_43";
|
|
26935
|
+
const autoWeight$2 = "_autoWeight_1jdnu_47";
|
|
26936
|
+
const styles$2 = {
|
|
26937
|
+
chart: chart$2,
|
|
26938
|
+
fixedHeight: fixedHeight$2,
|
|
26939
|
+
stretchHeight: stretchHeight$2,
|
|
26940
|
+
zoomForm: zoomForm$2,
|
|
26941
|
+
zoomReset: zoomReset$2,
|
|
26942
|
+
help: help$2,
|
|
26943
|
+
autoWeight: autoWeight$2
|
|
26678
26944
|
};
|
|
26679
|
-
const defaultChartStyling$
|
|
26945
|
+
const defaultChartStyling$2 = (styling) => ({
|
|
26680
26946
|
width: styling == null ? void 0 : styling.width,
|
|
26681
26947
|
height: styling == null ? void 0 : styling.height,
|
|
26682
26948
|
maintainAspectRatio: (styling == null ? void 0 : styling.maintainAspectRatio) || false,
|
|
26683
26949
|
staticChartHeight: (styling == null ? void 0 : styling.staticChartHeight) || false,
|
|
26684
26950
|
performanceMode: (styling == null ? void 0 : styling.performanceMode) ?? true
|
|
26685
26951
|
});
|
|
26686
|
-
const defaultTooltip$
|
|
26952
|
+
const defaultTooltip$2 = (tooltip) => ({
|
|
26687
26953
|
tooltips: (tooltip == null ? void 0 : tooltip.tooltips) ?? true,
|
|
26688
26954
|
showLabelsInTooltips: (tooltip == null ? void 0 : tooltip.showLabelsInTooltips) || false
|
|
26689
26955
|
});
|
|
26690
|
-
const defaultGraph$
|
|
26956
|
+
const defaultGraph$2 = (graph) => ({
|
|
26691
26957
|
showDataLabels: (graph == null ? void 0 : graph.showDataLabels) || false,
|
|
26692
26958
|
stacked: (graph == null ? void 0 : graph.stacked) || false,
|
|
26693
26959
|
cutout: (graph == null ? void 0 : graph.cutout) || 0
|
|
26694
26960
|
});
|
|
26695
|
-
const defaultLegend$
|
|
26961
|
+
const defaultLegend$2 = (legend2) => ({
|
|
26696
26962
|
display: (legend2 == null ? void 0 : legend2.display) ?? true,
|
|
26697
26963
|
useDataset: (legend2 == null ? void 0 : legend2.useDataset) || false,
|
|
26698
26964
|
position: (legend2 == null ? void 0 : legend2.position) || Position.Bottom,
|
|
26699
26965
|
align: (legend2 == null ? void 0 : legend2.align) || AlignOptions.Center
|
|
26700
26966
|
});
|
|
26701
|
-
const defaultChartOptions$
|
|
26967
|
+
const defaultChartOptions$2 = (options) => ({
|
|
26702
26968
|
enableZoom: (options == null ? void 0 : options.enableZoom) || false,
|
|
26703
26969
|
enablePan: (options == null ? void 0 : options.enablePan) || false
|
|
26704
26970
|
});
|
|
26705
|
-
const defaultInteractions$
|
|
26971
|
+
const defaultInteractions$2 = (interactions) => ({
|
|
26706
26972
|
onLegendClick: interactions == null ? void 0 : interactions.onLegendClick,
|
|
26707
26973
|
onHover: interactions == null ? void 0 : interactions.onHover,
|
|
26708
26974
|
onUnhover: interactions == null ? void 0 : interactions.onUnhover
|
|
26709
26975
|
});
|
|
26710
|
-
const defaultChartData = (data) => {
|
|
26976
|
+
const defaultChartData$1 = (data) => {
|
|
26711
26977
|
return {
|
|
26712
26978
|
labels: (data == null ? void 0 : data.labels) || [],
|
|
26713
26979
|
datasets: (data == null ? void 0 : data.datasets) || []
|
|
26714
26980
|
};
|
|
26715
26981
|
};
|
|
26716
|
-
const getDefaultProps$
|
|
26982
|
+
const getDefaultProps$2 = (props) => {
|
|
26717
26983
|
const chart2 = (props == null ? void 0 : props.chart) || {};
|
|
26718
26984
|
const options = (chart2 == null ? void 0 : chart2.options) || {};
|
|
26719
26985
|
return {
|
|
26720
26986
|
testId: (chart2 == null ? void 0 : chart2.testId) ?? null,
|
|
26721
|
-
data: defaultChartData(chart2 == null ? void 0 : chart2.data),
|
|
26987
|
+
data: defaultChartData$1(chart2 == null ? void 0 : chart2.data),
|
|
26722
26988
|
options: {
|
|
26723
26989
|
title: (options == null ? void 0 : options.title) || "",
|
|
26724
|
-
chartStyling: defaultChartStyling$
|
|
26725
|
-
tooltip: defaultTooltip$
|
|
26726
|
-
graph: defaultGraph$
|
|
26727
|
-
legend: defaultLegend$
|
|
26728
|
-
chartOptions: defaultChartOptions$
|
|
26729
|
-
interactions: defaultInteractions$
|
|
26990
|
+
chartStyling: defaultChartStyling$2(options == null ? void 0 : options.chartStyling),
|
|
26991
|
+
tooltip: defaultTooltip$2(options == null ? void 0 : options.tooltip),
|
|
26992
|
+
graph: defaultGraph$2(options == null ? void 0 : options.graph),
|
|
26993
|
+
legend: defaultLegend$2(options == null ? void 0 : options.legend),
|
|
26994
|
+
chartOptions: defaultChartOptions$2(options == null ? void 0 : options.chartOptions),
|
|
26995
|
+
interactions: defaultInteractions$2(options == null ? void 0 : options.interactions)
|
|
26730
26996
|
}
|
|
26731
26997
|
};
|
|
26732
26998
|
};
|
|
@@ -26914,7 +27180,7 @@ Chart$2.register(
|
|
|
26914
27180
|
);
|
|
26915
27181
|
const PieChart = (props) => {
|
|
26916
27182
|
setDefaultTheme();
|
|
26917
|
-
const chart2 = getDefaultProps$
|
|
27183
|
+
const chart2 = getDefaultProps$2(props);
|
|
26918
27184
|
const chartRef = useRef(null);
|
|
26919
27185
|
const { data, options, testId } = chart2;
|
|
26920
27186
|
const {
|
|
@@ -26930,8 +27196,8 @@ const PieChart = (props) => {
|
|
|
26930
27196
|
"div",
|
|
26931
27197
|
{
|
|
26932
27198
|
className: cx(
|
|
26933
|
-
styles$
|
|
26934
|
-
!options.chartStyling.width || !options.chartStyling.height ? options.chartStyling.staticChartHeight ? styles$
|
|
27199
|
+
styles$2.chart,
|
|
27200
|
+
!options.chartStyling.width || !options.chartStyling.height ? options.chartStyling.staticChartHeight ? styles$2.fixedHeight : styles$2.stretchHeight : ""
|
|
26935
27201
|
),
|
|
26936
27202
|
style: {
|
|
26937
27203
|
width: options.chartStyling.width || "auto",
|
|
@@ -26975,7 +27241,7 @@ const PieChart = (props) => {
|
|
|
26975
27241
|
);
|
|
26976
27242
|
};
|
|
26977
27243
|
const PieChartWithLegend = (props) => {
|
|
26978
|
-
const { options } = getDefaultProps$
|
|
27244
|
+
const { options } = getDefaultProps$2(props);
|
|
26979
27245
|
return /* @__PURE__ */ jsx(LegendProvider, { options, children: /* @__PURE__ */ jsx(PieChart, { ...props }) });
|
|
26980
27246
|
};
|
|
26981
27247
|
/*!
|
|
@@ -39564,7 +39830,7 @@ const getBarChartToolTips = (options) => {
|
|
|
39564
39830
|
valueUnit: (yAxis == null ? void 0 : yAxis.unit) || ""
|
|
39565
39831
|
};
|
|
39566
39832
|
};
|
|
39567
|
-
const
|
|
39833
|
+
const titleCallback2 = (tooltipItems, _data) => {
|
|
39568
39834
|
var _a3, _b2;
|
|
39569
39835
|
const barLabel = ((_a3 = tooltipItems == null ? void 0 : tooltipItems[0]) == null ? void 0 : _a3.label) || "";
|
|
39570
39836
|
const labels = getTooltipLabels((_b2 = tooltipItems == null ? void 0 : tooltipItems[0]) == null ? void 0 : _b2.dataset);
|
|
@@ -39579,7 +39845,7 @@ const getBarChartToolTips = (options) => {
|
|
|
39579
39845
|
}
|
|
39580
39846
|
return displayNumber(roundByMagnitude(labelNumber), roundOptions);
|
|
39581
39847
|
};
|
|
39582
|
-
const
|
|
39848
|
+
const labelCallback2 = (tooltipItem) => {
|
|
39583
39849
|
var _a3;
|
|
39584
39850
|
const { showLabelsInTooltips = false } = (options == null ? void 0 : options.tooltip) || {};
|
|
39585
39851
|
let label = ((_a3 = tooltipItem.dataset) == null ? void 0 : _a3.label) || "";
|
|
@@ -39621,8 +39887,8 @@ const getBarChartToolTips = (options) => {
|
|
|
39621
39887
|
boxHeight: LEGEND_LABEL_BOX_SIZE,
|
|
39622
39888
|
boxPadding: TOOLTIP_BOX_PADDING,
|
|
39623
39889
|
callbacks: {
|
|
39624
|
-
title:
|
|
39625
|
-
label:
|
|
39890
|
+
title: titleCallback2,
|
|
39891
|
+
label: labelCallback2,
|
|
39626
39892
|
afterLabel: afterLabelCallback
|
|
39627
39893
|
}
|
|
39628
39894
|
};
|
|
@@ -39665,31 +39931,31 @@ const useBarChartOptions = ({
|
|
|
39665
39931
|
}
|
|
39666
39932
|
};
|
|
39667
39933
|
};
|
|
39668
|
-
const chart = "_chart_x1sru_1";
|
|
39934
|
+
const chart$1 = "_chart_x1sru_1";
|
|
39669
39935
|
const canvas = "_canvas_x1sru_10";
|
|
39670
|
-
const fixedHeight = "_fixedHeight_x1sru_19";
|
|
39671
|
-
const stretchHeight = "_stretchHeight_x1sru_25";
|
|
39672
|
-
const zoomForm = "_zoomForm_x1sru_38";
|
|
39673
|
-
const zoomReset = "_zoomReset_x1sru_46";
|
|
39674
|
-
const help = "_help_x1sru_49";
|
|
39675
|
-
const autoWeight = "_autoWeight_x1sru_53";
|
|
39936
|
+
const fixedHeight$1 = "_fixedHeight_x1sru_19";
|
|
39937
|
+
const stretchHeight$1 = "_stretchHeight_x1sru_25";
|
|
39938
|
+
const zoomForm$1 = "_zoomForm_x1sru_38";
|
|
39939
|
+
const zoomReset$1 = "_zoomReset_x1sru_46";
|
|
39940
|
+
const help$1 = "_help_x1sru_49";
|
|
39941
|
+
const autoWeight$1 = "_autoWeight_x1sru_53";
|
|
39676
39942
|
const actions = "_actions_x1sru_57";
|
|
39677
|
-
const styles = {
|
|
39678
|
-
chart,
|
|
39943
|
+
const styles$1 = {
|
|
39944
|
+
chart: chart$1,
|
|
39679
39945
|
canvas,
|
|
39680
|
-
fixedHeight,
|
|
39681
|
-
stretchHeight,
|
|
39682
|
-
zoomForm,
|
|
39683
|
-
zoomReset,
|
|
39684
|
-
help,
|
|
39685
|
-
autoWeight,
|
|
39946
|
+
fixedHeight: fixedHeight$1,
|
|
39947
|
+
stretchHeight: stretchHeight$1,
|
|
39948
|
+
zoomForm: zoomForm$1,
|
|
39949
|
+
zoomReset: zoomReset$1,
|
|
39950
|
+
help: help$1,
|
|
39951
|
+
autoWeight: autoWeight$1,
|
|
39686
39952
|
actions
|
|
39687
39953
|
};
|
|
39688
|
-
const defaultAxes = (axes) => ({
|
|
39954
|
+
const defaultAxes$1 = (axes) => ({
|
|
39689
39955
|
x: (axes == null ? void 0 : axes.x) || [{}],
|
|
39690
39956
|
y: (axes == null ? void 0 : axes.y) || [{}]
|
|
39691
39957
|
});
|
|
39692
|
-
const defaultAdditionalAxesOptions = (options) => ({
|
|
39958
|
+
const defaultAdditionalAxesOptions$1 = (options) => ({
|
|
39693
39959
|
chartScaleType: (options == null ? void 0 : options.chartScaleType) || "linear",
|
|
39694
39960
|
reverse: (options == null ? void 0 : options.reverse) || false,
|
|
39695
39961
|
stacked: (options == null ? void 0 : options.stacked) || false,
|
|
@@ -39700,30 +39966,30 @@ const defaultAdditionalAxesOptions = (options) => ({
|
|
|
39700
39966
|
min: options == null ? void 0 : options.min,
|
|
39701
39967
|
max: options == null ? void 0 : options.max
|
|
39702
39968
|
});
|
|
39703
|
-
const defaultChartStyling = (styling) => ({
|
|
39969
|
+
const defaultChartStyling$1 = (styling) => ({
|
|
39704
39970
|
width: styling == null ? void 0 : styling.width,
|
|
39705
39971
|
height: styling == null ? void 0 : styling.height,
|
|
39706
39972
|
maintainAspectRatio: (styling == null ? void 0 : styling.maintainAspectRatio) || false,
|
|
39707
39973
|
staticChartHeight: (styling == null ? void 0 : styling.staticChartHeight) || false,
|
|
39708
39974
|
performanceMode: (styling == null ? void 0 : styling.performanceMode) ?? true
|
|
39709
39975
|
});
|
|
39710
|
-
const defaultTooltip = (tooltip) => ({
|
|
39976
|
+
const defaultTooltip$1 = (tooltip) => ({
|
|
39711
39977
|
tooltips: (tooltip == null ? void 0 : tooltip.tooltips) ?? true,
|
|
39712
39978
|
showLabelsInTooltips: (tooltip == null ? void 0 : tooltip.showLabelsInTooltips) || false
|
|
39713
39979
|
});
|
|
39714
|
-
const defaultGraph = (graph) => ({
|
|
39980
|
+
const defaultGraph$1 = (graph) => ({
|
|
39715
39981
|
showDataLabels: (graph == null ? void 0 : graph.showDataLabels) || false,
|
|
39716
39982
|
showMinorGridlines: (graph == null ? void 0 : graph.showMinorGridlines) || false
|
|
39717
39983
|
});
|
|
39718
|
-
const defaultAnnotationsData = (annotationsData) => {
|
|
39984
|
+
const defaultAnnotationsData$1 = (annotationsData) => {
|
|
39719
39985
|
return annotationsData ? annotationsData.map((ann) => ({ ...ann, display: (ann == null ? void 0 : ann.display) ?? true })) : [];
|
|
39720
39986
|
};
|
|
39721
|
-
const defaultAnnotations = (annotations) => ({
|
|
39987
|
+
const defaultAnnotations$1 = (annotations) => ({
|
|
39722
39988
|
showAnnotations: (annotations == null ? void 0 : annotations.showAnnotations) ?? true,
|
|
39723
39989
|
controlAnnotation: (annotations == null ? void 0 : annotations.controlAnnotation) || false,
|
|
39724
|
-
annotationsData: defaultAnnotationsData(annotations == null ? void 0 : annotations.annotationsData)
|
|
39990
|
+
annotationsData: defaultAnnotationsData$1(annotations == null ? void 0 : annotations.annotationsData)
|
|
39725
39991
|
});
|
|
39726
|
-
const defaultLegend = (legend2) => ({
|
|
39992
|
+
const defaultLegend$1 = (legend2) => ({
|
|
39727
39993
|
display: (legend2 == null ? void 0 : legend2.display) ?? true,
|
|
39728
39994
|
position: (legend2 == null ? void 0 : legend2.position) || Position.TopLeft,
|
|
39729
39995
|
align: (legend2 == null ? void 0 : legend2.align) || AlignOptions.Center,
|
|
@@ -39732,11 +39998,11 @@ const defaultLegend = (legend2) => ({
|
|
|
39732
39998
|
customLegendContainerID: ""
|
|
39733
39999
|
}
|
|
39734
40000
|
});
|
|
39735
|
-
const defaultChartOptions = (options) => ({
|
|
40001
|
+
const defaultChartOptions$1 = (options) => ({
|
|
39736
40002
|
enableZoom: (options == null ? void 0 : options.enableZoom) || false,
|
|
39737
40003
|
enablePan: (options == null ? void 0 : options.enablePan) || false
|
|
39738
40004
|
});
|
|
39739
|
-
const defaultInteractions = (interactions) => ({
|
|
40005
|
+
const defaultInteractions$1 = (interactions) => ({
|
|
39740
40006
|
onLegendClick: interactions == null ? void 0 : interactions.onLegendClick,
|
|
39741
40007
|
onHover: interactions == null ? void 0 : interactions.onHover,
|
|
39742
40008
|
onUnhover: interactions == null ? void 0 : interactions.onUnhover
|
|
@@ -39751,7 +40017,7 @@ const defaultDragData = (dragData) => ({
|
|
|
39751
40017
|
onDrag: dragData == null ? void 0 : dragData.onDrag,
|
|
39752
40018
|
onDragEnd: dragData == null ? void 0 : dragData.onDragEnd
|
|
39753
40019
|
});
|
|
39754
|
-
const getDefaultProps = (props) => {
|
|
40020
|
+
const getDefaultProps$1 = (props) => {
|
|
39755
40021
|
const chart2 = (props == null ? void 0 : props.chart) || {};
|
|
39756
40022
|
const options = (chart2 == null ? void 0 : chart2.options) || {};
|
|
39757
40023
|
return {
|
|
@@ -39760,17 +40026,17 @@ const getDefaultProps = (props) => {
|
|
|
39760
40026
|
options: {
|
|
39761
40027
|
title: (options == null ? void 0 : options.title) || "",
|
|
39762
40028
|
direction: (options == null ? void 0 : options.direction) || "vertical",
|
|
39763
|
-
axes: defaultAxes(options == null ? void 0 : options.axes),
|
|
39764
|
-
additionalAxesOptions: defaultAdditionalAxesOptions(
|
|
40029
|
+
axes: defaultAxes$1(options == null ? void 0 : options.axes),
|
|
40030
|
+
additionalAxesOptions: defaultAdditionalAxesOptions$1(
|
|
39765
40031
|
options == null ? void 0 : options.additionalAxesOptions
|
|
39766
40032
|
),
|
|
39767
|
-
chartStyling: defaultChartStyling(options == null ? void 0 : options.chartStyling),
|
|
39768
|
-
tooltip: defaultTooltip(options == null ? void 0 : options.tooltip),
|
|
39769
|
-
graph: defaultGraph(options == null ? void 0 : options.graph),
|
|
39770
|
-
annotations: defaultAnnotations(options == null ? void 0 : options.annotations),
|
|
39771
|
-
legend: defaultLegend(options == null ? void 0 : options.legend),
|
|
39772
|
-
chartOptions: defaultChartOptions(options == null ? void 0 : options.chartOptions),
|
|
39773
|
-
interactions: defaultInteractions(options == null ? void 0 : options.interactions),
|
|
40033
|
+
chartStyling: defaultChartStyling$1(options == null ? void 0 : options.chartStyling),
|
|
40034
|
+
tooltip: defaultTooltip$1(options == null ? void 0 : options.tooltip),
|
|
40035
|
+
graph: defaultGraph$1(options == null ? void 0 : options.graph),
|
|
40036
|
+
annotations: defaultAnnotations$1(options == null ? void 0 : options.annotations),
|
|
40037
|
+
legend: defaultLegend$1(options == null ? void 0 : options.legend),
|
|
40038
|
+
chartOptions: defaultChartOptions$1(options == null ? void 0 : options.chartOptions),
|
|
40039
|
+
interactions: defaultInteractions$1(options == null ? void 0 : options.interactions),
|
|
39774
40040
|
dragData: defaultDragData(options == null ? void 0 : options.dragData)
|
|
39775
40041
|
}
|
|
39776
40042
|
};
|
|
@@ -39793,7 +40059,7 @@ const BarChart = (props) => {
|
|
|
39793
40059
|
var _a2, _b2, _c2, _d2;
|
|
39794
40060
|
setDefaultTheme();
|
|
39795
40061
|
const chartRef = useRef(null);
|
|
39796
|
-
const chart2 = getDefaultProps(props);
|
|
40062
|
+
const chart2 = getDefaultProps$1(props);
|
|
39797
40063
|
const { translations, languageKey } = getConfig();
|
|
39798
40064
|
const { options, testId } = chart2;
|
|
39799
40065
|
const { chartStyling, graph } = options;
|
|
@@ -39803,14 +40069,14 @@ const BarChart = (props) => {
|
|
|
39803
40069
|
return /* @__PURE__ */ jsxs(
|
|
39804
40070
|
"div",
|
|
39805
40071
|
{
|
|
39806
|
-
className: getClassName(chartStyling, styles),
|
|
40072
|
+
className: getClassName(chartStyling, styles$1),
|
|
39807
40073
|
style: {
|
|
39808
40074
|
width: chartStyling.width || AUTO,
|
|
39809
40075
|
height: chartStyling.height || AUTO
|
|
39810
40076
|
},
|
|
39811
40077
|
"data-testid": testId,
|
|
39812
40078
|
children: [
|
|
39813
|
-
/* @__PURE__ */ jsx("div", { className: styles.actions, children: /* @__PURE__ */ jsx(Tooltip$2, { text: translations.downloadAsPNG, placement: "bottom-end", children: /* @__PURE__ */ jsx(
|
|
40079
|
+
/* @__PURE__ */ jsx("div", { className: styles$1.actions, children: /* @__PURE__ */ jsx(Tooltip$2, { text: translations.downloadAsPNG, placement: "bottom-end", children: /* @__PURE__ */ jsx(
|
|
39814
40080
|
Button,
|
|
39815
40081
|
{
|
|
39816
40082
|
small: true,
|
|
@@ -39821,7 +40087,7 @@ const BarChart = (props) => {
|
|
|
39821
40087
|
onClick: () => downloadPgn(chartRef)
|
|
39822
40088
|
}
|
|
39823
40089
|
) }) }),
|
|
39824
|
-
/* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, context: window, children: /* @__PURE__ */ jsxs("div", { className: styles.canvas, id: "canvas", children: [
|
|
40090
|
+
/* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, context: window, children: /* @__PURE__ */ jsxs("div", { className: styles$1.canvas, id: "canvas", children: [
|
|
39825
40091
|
/* @__PURE__ */ jsx(
|
|
39826
40092
|
Bar,
|
|
39827
40093
|
{
|
|
@@ -39852,13 +40118,342 @@ const BarChart = (props) => {
|
|
|
39852
40118
|
);
|
|
39853
40119
|
};
|
|
39854
40120
|
const BarChartWithLegend = (props) => {
|
|
39855
|
-
const { options } = getDefaultProps(props);
|
|
40121
|
+
const { options } = getDefaultProps$1(props);
|
|
39856
40122
|
return /* @__PURE__ */ jsx(LegendProvider, { options, children: /* @__PURE__ */ jsx(BarChart, { ...props }) });
|
|
39857
40123
|
};
|
|
40124
|
+
const customFormatNumber = (labelNumber) => {
|
|
40125
|
+
let roundOptions = {};
|
|
40126
|
+
if (Math.abs(labelNumber) < DISPLAY_SCIENTIFIC_LOWER_BOUND || Math.abs(labelNumber) > DISPLAY_SCIENTIFIC_UPPER_BOUND) {
|
|
40127
|
+
roundOptions = { roundScientificCoefficient: 3 };
|
|
40128
|
+
}
|
|
40129
|
+
return displayNumber(roundByMagnitude(labelNumber), roundOptions);
|
|
40130
|
+
};
|
|
40131
|
+
const titleCallback = (tooltipItems, options) => {
|
|
40132
|
+
var _a2;
|
|
40133
|
+
if ((_a2 = options == null ? void 0 : options.tooltip) == null ? void 0 : _a2.showLabelsInTooltips) {
|
|
40134
|
+
const item = tooltipItems[0];
|
|
40135
|
+
const { label } = (item == null ? void 0 : item.dataset) ?? {};
|
|
40136
|
+
return label;
|
|
40137
|
+
}
|
|
40138
|
+
};
|
|
40139
|
+
const labelCallback = (tooltipItem) => {
|
|
40140
|
+
const { raw, dataset } = tooltipItem ?? {};
|
|
40141
|
+
return `${dataset == null ? void 0 : dataset.label} ( x: ${customFormatNumber(
|
|
40142
|
+
raw == null ? void 0 : raw.x
|
|
40143
|
+
)} , y: ${customFormatNumber(raw == null ? void 0 : raw.y)} )`;
|
|
40144
|
+
};
|
|
40145
|
+
const getTooltipsConfig = (options) => {
|
|
40146
|
+
var _a2, _b2, _c2;
|
|
40147
|
+
return {
|
|
40148
|
+
enabled: (_a2 = options == null ? void 0 : options.tooltip) == null ? void 0 : _a2.enabled,
|
|
40149
|
+
callbacks: {
|
|
40150
|
+
title: (tooltipItems) => titleCallback(tooltipItems, options),
|
|
40151
|
+
label: labelCallback
|
|
40152
|
+
},
|
|
40153
|
+
backgroundColor: (_b2 = options == null ? void 0 : options.tooltip) == null ? void 0 : _b2.backgroundColor,
|
|
40154
|
+
displayColors: (_c2 = options == null ? void 0 : options.tooltip) == null ? void 0 : _c2.displayColors,
|
|
40155
|
+
padding: 7
|
|
40156
|
+
};
|
|
40157
|
+
};
|
|
40158
|
+
const getScatterChartAxis = ({
|
|
40159
|
+
options,
|
|
40160
|
+
axisType = AxisType.X,
|
|
40161
|
+
currentScale
|
|
40162
|
+
}) => {
|
|
40163
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
40164
|
+
const isDirectionVertical = isVertical(options.direction);
|
|
40165
|
+
const axisData = currentScale || ((_b2 = (_a2 = options == null ? void 0 : options.axes) == null ? void 0 : _a2[axisType]) == null ? void 0 : _b2[0]);
|
|
40166
|
+
const isDirectionCompatibleWithAxisType = isDirectionVertical && axisType === AxisType.Y || !isDirectionVertical && axisType === AxisType.X;
|
|
40167
|
+
const grid = (axisData == null ? void 0 : axisData.gridLines) || {};
|
|
40168
|
+
const getReverse = () => {
|
|
40169
|
+
var _a3;
|
|
40170
|
+
const axisWithReverse = isDirectionVertical ? AxisType.Y : AxisType.X;
|
|
40171
|
+
return axisType === axisWithReverse ? (_a3 = options == null ? void 0 : options.additionalAxesOptions) == null ? void 0 : _a3.reverse : false;
|
|
40172
|
+
};
|
|
40173
|
+
const getTicks = () => {
|
|
40174
|
+
const additionalAxesOptions = options == null ? void 0 : options.additionalAxesOptions;
|
|
40175
|
+
const stepSize = {
|
|
40176
|
+
stepSize: (axisData == null ? void 0 : axisData.stepSize) ?? (axisType === AxisType.Y ? additionalAxesOptions == null ? void 0 : additionalAxesOptions.stepSize : void 0)
|
|
40177
|
+
};
|
|
40178
|
+
return {
|
|
40179
|
+
...stepSize,
|
|
40180
|
+
includeBounds: false,
|
|
40181
|
+
//OW-10088 disable irregular axis ticks
|
|
40182
|
+
font: {
|
|
40183
|
+
size: DEFAULT_FONT_SIZE
|
|
40184
|
+
}
|
|
40185
|
+
};
|
|
40186
|
+
};
|
|
40187
|
+
return {
|
|
40188
|
+
type: ScaleType.Linear,
|
|
40189
|
+
position: axisData == null ? void 0 : axisData.position,
|
|
40190
|
+
beginAtZero: (_c2 = options == null ? void 0 : options.additionalAxesOptions) == null ? void 0 : _c2.beginAtZero,
|
|
40191
|
+
reverse: getReverse(),
|
|
40192
|
+
suggestedMax: (_d2 = options == null ? void 0 : options.additionalAxesOptions) == null ? void 0 : _d2.suggestedMax,
|
|
40193
|
+
suggestedMin: (_e2 = options == null ? void 0 : options.additionalAxesOptions) == null ? void 0 : _e2.suggestedMin,
|
|
40194
|
+
min: isDirectionCompatibleWithAxisType ? (_f2 = options == null ? void 0 : options.additionalAxesOptions) == null ? void 0 : _f2.min : void 0,
|
|
40195
|
+
max: isDirectionCompatibleWithAxisType ? (_g2 = options == null ? void 0 : options.additionalAxesOptions) == null ? void 0 : _g2.max : void 0,
|
|
40196
|
+
title: {
|
|
40197
|
+
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),
|
|
40198
|
+
text: (axisData == null ? void 0 : axisData.label) || (axisData == null ? void 0 : axisData.unit),
|
|
40199
|
+
padding: 0
|
|
40200
|
+
},
|
|
40201
|
+
ticks: getTicks(),
|
|
40202
|
+
grid: {
|
|
40203
|
+
...grid
|
|
40204
|
+
}
|
|
40205
|
+
};
|
|
40206
|
+
};
|
|
40207
|
+
const getScatterChartScales = (options) => {
|
|
40208
|
+
const xAxis = getScatterChartAxis({ options, axisType: AxisType.X });
|
|
40209
|
+
const yAxis = getScatterChartAxis({ options, axisType: AxisType.Y });
|
|
40210
|
+
return {
|
|
40211
|
+
x: xAxis,
|
|
40212
|
+
y: yAxis
|
|
40213
|
+
};
|
|
40214
|
+
};
|
|
40215
|
+
const useScatterChartConfig = (chart2, chartRef) => {
|
|
40216
|
+
const { data, options: defaultOptions } = chart2;
|
|
40217
|
+
const { interactions, chartStyling } = defaultOptions;
|
|
40218
|
+
const [pointHover, setPointHover] = useState(false);
|
|
40219
|
+
const { legend: legend2, customLegendPlugin, legendClick } = useLegendState({
|
|
40220
|
+
chartRef,
|
|
40221
|
+
options: defaultOptions
|
|
40222
|
+
});
|
|
40223
|
+
const { state: legendState } = useLegend();
|
|
40224
|
+
const { annotation: annotation2 } = legendState;
|
|
40225
|
+
const generateDatasets = (datasets) => {
|
|
40226
|
+
return datasets.map(
|
|
40227
|
+
(scatterDataset, index2) => {
|
|
40228
|
+
const { borderWidth: inputBorderWidth = DEFAULT_BORDER_WIDTH } = scatterDataset ?? {};
|
|
40229
|
+
const borderWidth = parseFloat(String(inputBorderWidth)) || 1;
|
|
40230
|
+
const color2 = COLORS[index2];
|
|
40231
|
+
const borderColor = scatterDataset.borderColor ?? color2;
|
|
40232
|
+
const backgroundColor = scatterDataset.backgroundColor ?? color2;
|
|
40233
|
+
return {
|
|
40234
|
+
...scatterDataset,
|
|
40235
|
+
borderWidth,
|
|
40236
|
+
borderColor,
|
|
40237
|
+
backgroundColor
|
|
40238
|
+
};
|
|
40239
|
+
}
|
|
40240
|
+
);
|
|
40241
|
+
};
|
|
40242
|
+
const generatedDatasets = generateDatasets(
|
|
40243
|
+
data.datasets
|
|
40244
|
+
);
|
|
40245
|
+
const onClick = (_evt, _elements, chartInstance) => {
|
|
40246
|
+
chartInstance.resetZoom();
|
|
40247
|
+
};
|
|
40248
|
+
const onHover = (evt, hoveredItems) => {
|
|
40249
|
+
if (pointHover && !(hoveredItems == null ? void 0 : hoveredItems.length)) {
|
|
40250
|
+
setPointHover(false);
|
|
40251
|
+
if (interactions.onUnhover) {
|
|
40252
|
+
interactions.onUnhover(evt);
|
|
40253
|
+
}
|
|
40254
|
+
}
|
|
40255
|
+
if (!pointHover && (hoveredItems == null ? void 0 : hoveredItems.length)) {
|
|
40256
|
+
setPointHover(true);
|
|
40257
|
+
if (interactions.onHover) {
|
|
40258
|
+
const { index: index2, datasetIndex } = hoveredItems[0];
|
|
40259
|
+
interactions.onHover(evt, datasetIndex, index2, generatedDatasets);
|
|
40260
|
+
}
|
|
40261
|
+
}
|
|
40262
|
+
};
|
|
40263
|
+
const scatterOptions = {
|
|
40264
|
+
onClick,
|
|
40265
|
+
onHover,
|
|
40266
|
+
chartStyling,
|
|
40267
|
+
interactions: {
|
|
40268
|
+
onLegendClick: legendClick,
|
|
40269
|
+
onHover
|
|
40270
|
+
},
|
|
40271
|
+
scales: getScatterChartScales(chart2 == null ? void 0 : chart2.options),
|
|
40272
|
+
plugins: {
|
|
40273
|
+
legend: { ...legend2, display: false },
|
|
40274
|
+
// hide default legend
|
|
40275
|
+
customLegendPlugin,
|
|
40276
|
+
title: getTitle(defaultOptions),
|
|
40277
|
+
annotation: toAnnotationObject(annotation2),
|
|
40278
|
+
chartAreaBorder: {
|
|
40279
|
+
borderColor: BORDER_COLOR
|
|
40280
|
+
},
|
|
40281
|
+
datalabels: {
|
|
40282
|
+
display: defaultOptions.graph.showDataLabels
|
|
40283
|
+
},
|
|
40284
|
+
tooltip: getTooltipsConfig(defaultOptions)
|
|
40285
|
+
}
|
|
40286
|
+
};
|
|
40287
|
+
return {
|
|
40288
|
+
generatedDatasets,
|
|
40289
|
+
scatterOptions
|
|
40290
|
+
};
|
|
40291
|
+
};
|
|
40292
|
+
const defaultChartStyling = (styling) => ({
|
|
40293
|
+
width: (styling == null ? void 0 : styling.width) ?? AUTO,
|
|
40294
|
+
height: (styling == null ? void 0 : styling.height) ?? AUTO,
|
|
40295
|
+
maintainAspectRatio: (styling == null ? void 0 : styling.maintainAspectRatio) || false,
|
|
40296
|
+
staticChartHeight: (styling == null ? void 0 : styling.staticChartHeight) || false,
|
|
40297
|
+
performanceMode: (styling == null ? void 0 : styling.performanceMode) ?? true
|
|
40298
|
+
});
|
|
40299
|
+
const defaultTooltip = (tooltip) => ({
|
|
40300
|
+
enabled: (tooltip == null ? void 0 : tooltip.enabled) ?? true,
|
|
40301
|
+
tooltips: (tooltip == null ? void 0 : tooltip.tooltips) ?? true,
|
|
40302
|
+
showLabelsInTooltips: (tooltip == null ? void 0 : tooltip.showLabelsInTooltips) || false,
|
|
40303
|
+
backgroundColor: (tooltip == null ? void 0 : tooltip.backgroundColor) || "#333",
|
|
40304
|
+
displayColors: (tooltip == null ? void 0 : tooltip.displayColors) || false
|
|
40305
|
+
});
|
|
40306
|
+
const defaultGraph = (graph) => ({
|
|
40307
|
+
showMinorGridlines: (graph == null ? void 0 : graph.showMinorGridlines) ?? false,
|
|
40308
|
+
showDataLabels: (graph == null ? void 0 : graph.showDataLabels) ?? false
|
|
40309
|
+
});
|
|
40310
|
+
const defaultLegend = (legend2) => ({
|
|
40311
|
+
display: (legend2 == null ? void 0 : legend2.display) ?? true,
|
|
40312
|
+
useDataset: (legend2 == null ? void 0 : legend2.useDataset) || false,
|
|
40313
|
+
position: (legend2 == null ? void 0 : legend2.position) || Position.BottomLeft,
|
|
40314
|
+
align: (legend2 == null ? void 0 : legend2.align) || AlignOptions.Center
|
|
40315
|
+
});
|
|
40316
|
+
const defaultChartOptions = (options) => ({
|
|
40317
|
+
enableZoom: (options == null ? void 0 : options.enableZoom) || false,
|
|
40318
|
+
enablePan: (options == null ? void 0 : options.enablePan) || false
|
|
40319
|
+
});
|
|
40320
|
+
const defaultInteractions = (interactions) => ({
|
|
40321
|
+
onLegendClick: interactions == null ? void 0 : interactions.onLegendClick,
|
|
40322
|
+
onHover: interactions == null ? void 0 : interactions.onHover,
|
|
40323
|
+
onUnhover: interactions == null ? void 0 : interactions.onUnhover
|
|
40324
|
+
});
|
|
40325
|
+
const defaultChartData = (data) => {
|
|
40326
|
+
return {
|
|
40327
|
+
labels: (data == null ? void 0 : data.labels) || [],
|
|
40328
|
+
datasets: (data == null ? void 0 : data.datasets) || []
|
|
40329
|
+
};
|
|
40330
|
+
};
|
|
40331
|
+
const defaultAnnotationsData = (annotationsData) => {
|
|
40332
|
+
return annotationsData ? annotationsData.map((ann) => ({ ...ann, display: (ann == null ? void 0 : ann.display) ?? true })) : [];
|
|
40333
|
+
};
|
|
40334
|
+
const defaultAnnotations = (annotations) => ({
|
|
40335
|
+
showAnnotations: (annotations == null ? void 0 : annotations.showAnnotations) ?? true,
|
|
40336
|
+
controlAnnotation: (annotations == null ? void 0 : annotations.controlAnnotation) || false,
|
|
40337
|
+
annotationsData: defaultAnnotationsData(annotations == null ? void 0 : annotations.annotationsData)
|
|
40338
|
+
});
|
|
40339
|
+
const defaultAxes = (axes) => ({
|
|
40340
|
+
x: (axes == null ? void 0 : axes.x) || [{}],
|
|
40341
|
+
y: (axes == null ? void 0 : axes.y) || [{}]
|
|
40342
|
+
});
|
|
40343
|
+
const defaultAdditionalAxesOptions = (options) => ({
|
|
40344
|
+
reverse: (options == null ? void 0 : options.reverse) || false,
|
|
40345
|
+
stacked: (options == null ? void 0 : options.stacked) || false,
|
|
40346
|
+
beginAtZero: (options == null ? void 0 : options.beginAtZero) ?? true,
|
|
40347
|
+
stepSize: options == null ? void 0 : options.stepSize,
|
|
40348
|
+
suggestedMin: options == null ? void 0 : options.suggestedMin,
|
|
40349
|
+
suggestedMax: options == null ? void 0 : options.suggestedMax,
|
|
40350
|
+
min: options == null ? void 0 : options.min,
|
|
40351
|
+
max: options == null ? void 0 : options.max
|
|
40352
|
+
});
|
|
40353
|
+
const getDefaultProps = (props) => {
|
|
40354
|
+
const chart2 = (props == null ? void 0 : props.chart) || {};
|
|
40355
|
+
const options = (chart2 == null ? void 0 : chart2.options) || {};
|
|
40356
|
+
return {
|
|
40357
|
+
testId: (chart2 == null ? void 0 : chart2.testId) ?? null,
|
|
40358
|
+
data: defaultChartData(chart2 == null ? void 0 : chart2.data),
|
|
40359
|
+
options: {
|
|
40360
|
+
title: (options == null ? void 0 : options.title) || "",
|
|
40361
|
+
axes: defaultAxes(options == null ? void 0 : options.axes),
|
|
40362
|
+
additionalAxesOptions: defaultAdditionalAxesOptions(
|
|
40363
|
+
options == null ? void 0 : options.additionalAxesOptions
|
|
40364
|
+
),
|
|
40365
|
+
direction: (options == null ? void 0 : options.direction) || ChartDirection.VERTICAL,
|
|
40366
|
+
chartStyling: defaultChartStyling(options == null ? void 0 : options.chartStyling),
|
|
40367
|
+
tooltip: defaultTooltip(options == null ? void 0 : options.tooltip),
|
|
40368
|
+
graph: defaultGraph(options == null ? void 0 : options.graph),
|
|
40369
|
+
legend: defaultLegend(options == null ? void 0 : options.legend),
|
|
40370
|
+
annotations: defaultAnnotations(options == null ? void 0 : options.annotations),
|
|
40371
|
+
chartOptions: defaultChartOptions(options == null ? void 0 : options.chartOptions),
|
|
40372
|
+
interactions: defaultInteractions(options == null ? void 0 : options.interactions)
|
|
40373
|
+
}
|
|
40374
|
+
};
|
|
40375
|
+
};
|
|
40376
|
+
const chart = "_chart_1jdnu_1";
|
|
40377
|
+
const fixedHeight = "_fixedHeight_1jdnu_13";
|
|
40378
|
+
const stretchHeight = "_stretchHeight_1jdnu_19";
|
|
40379
|
+
const zoomForm = "_zoomForm_1jdnu_32";
|
|
40380
|
+
const zoomReset = "_zoomReset_1jdnu_40";
|
|
40381
|
+
const help = "_help_1jdnu_43";
|
|
40382
|
+
const autoWeight = "_autoWeight_1jdnu_47";
|
|
40383
|
+
const styles = {
|
|
40384
|
+
chart,
|
|
40385
|
+
fixedHeight,
|
|
40386
|
+
stretchHeight,
|
|
40387
|
+
zoomForm,
|
|
40388
|
+
zoomReset,
|
|
40389
|
+
help,
|
|
40390
|
+
autoWeight
|
|
40391
|
+
};
|
|
40392
|
+
Chart$2.register(
|
|
40393
|
+
LinearScale$1,
|
|
40394
|
+
PointElement$1,
|
|
40395
|
+
CategoryScale$1,
|
|
40396
|
+
plugin_legend,
|
|
40397
|
+
plugin_tooltip,
|
|
40398
|
+
plugin_title,
|
|
40399
|
+
plugin$1,
|
|
40400
|
+
plugin,
|
|
40401
|
+
annotation
|
|
40402
|
+
);
|
|
40403
|
+
const ScatterChart = (props) => {
|
|
40404
|
+
setDefaultTheme();
|
|
40405
|
+
const chartRef = useRef(null);
|
|
40406
|
+
const chart2 = getDefaultProps(props);
|
|
40407
|
+
const { options, testId } = chart2;
|
|
40408
|
+
const { scatterOptions, generatedDatasets } = useScatterChartConfig(
|
|
40409
|
+
chart2,
|
|
40410
|
+
chartRef
|
|
40411
|
+
);
|
|
40412
|
+
return /* @__PURE__ */ jsx(
|
|
40413
|
+
"div",
|
|
40414
|
+
{
|
|
40415
|
+
className: getClassName(options.chartStyling, styles),
|
|
40416
|
+
style: {
|
|
40417
|
+
width: options.chartStyling.width,
|
|
40418
|
+
height: options.chartStyling.height
|
|
40419
|
+
},
|
|
40420
|
+
"data-testid": testId,
|
|
40421
|
+
children: /* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, context: window, children: /* @__PURE__ */ jsxs("div", { className: styles.canvas, id: "canvas", children: [
|
|
40422
|
+
/* @__PURE__ */ jsx(
|
|
40423
|
+
Scatter,
|
|
40424
|
+
{
|
|
40425
|
+
ref: chartRef,
|
|
40426
|
+
data: {
|
|
40427
|
+
datasets: generatedDatasets
|
|
40428
|
+
},
|
|
40429
|
+
options: scatterOptions,
|
|
40430
|
+
plugins: getPlugins(options.graph, options.legend)
|
|
40431
|
+
}
|
|
40432
|
+
),
|
|
40433
|
+
!!generatedDatasets.length && /* @__PURE__ */ jsx(
|
|
40434
|
+
Legend2,
|
|
40435
|
+
{
|
|
40436
|
+
chartRef,
|
|
40437
|
+
legendConfig: {
|
|
40438
|
+
options,
|
|
40439
|
+
generatedDatasets,
|
|
40440
|
+
chartType: ChartType.SCATTER
|
|
40441
|
+
}
|
|
40442
|
+
}
|
|
40443
|
+
)
|
|
40444
|
+
] }) })
|
|
40445
|
+
}
|
|
40446
|
+
);
|
|
40447
|
+
};
|
|
40448
|
+
const ScatterChartWithLegend = (props) => {
|
|
40449
|
+
const { options } = getDefaultProps(props);
|
|
40450
|
+
return /* @__PURE__ */ jsx(LegendProvider, { options, children: /* @__PURE__ */ jsx(ScatterChart, { ...props }) });
|
|
40451
|
+
};
|
|
39858
40452
|
export {
|
|
39859
40453
|
BarChartWithLegend as BarChart,
|
|
39860
40454
|
LineChartWithLegend as LineChart,
|
|
39861
40455
|
PieChartWithLegend as PieChart,
|
|
40456
|
+
ScatterChartWithLegend as ScatterChart,
|
|
39862
40457
|
initializeLineChart
|
|
39863
40458
|
};
|
|
39864
40459
|
//# sourceMappingURL=index.js.map
|
|
@@ -39867,7 +40462,7 @@ export {
|
|
|
39867
40462
|
try {
|
|
39868
40463
|
if (typeof document != "undefined") {
|
|
39869
40464
|
var elementStyle = document.createElement("style");
|
|
39870
|
-
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}"));
|
|
40465
|
+
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}"));
|
|
39871
40466
|
document.head.appendChild(elementStyle);
|
|
39872
40467
|
}
|
|
39873
40468
|
} catch (e) {
|