@axdspub/axiom-charts 0.0.30 → 0.0.31
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/library/Libraries/axiom/index.js +16 -7
- package/library/Libraries/axiom/index.js.map +1 -1
- package/library/axiom-charts.d.ts +1 -0
- package/library/browser.js +5 -1
- package/library/browser.js.map +1 -1
- package/library/cjs.js +5 -1
- package/library/cjs.js.map +1 -1
- package/library/index.js +5 -1
- package/library/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -71,6 +71,10 @@ class PlotRoot extends RequestItem {
|
|
|
71
71
|
enabled: true,
|
|
72
72
|
axis: EChartAxes.x
|
|
73
73
|
};
|
|
74
|
+
this.legendSettingsDefaults = {
|
|
75
|
+
hide: false,
|
|
76
|
+
axis: EChartAxes.y
|
|
77
|
+
};
|
|
74
78
|
this.id = props.id;
|
|
75
79
|
this.type = props.type;
|
|
76
80
|
this.chart = props.chart;
|
|
@@ -80,7 +84,7 @@ class PlotRoot extends RequestItem {
|
|
|
80
84
|
this.onDataLoad = props.onDataLoad;
|
|
81
85
|
this.axisSettings = props.axisSettings;
|
|
82
86
|
this.scrubSettings = Object.assign(Object.assign({}, this.scrubSettingsDefaults), props.scrubSettings);
|
|
83
|
-
this.legendSettings = Object.assign({
|
|
87
|
+
this.legendSettings = Object.assign(Object.assign({}, this.legendSettingsDefaults), props.legendSettings);
|
|
84
88
|
this.runtime = {};
|
|
85
89
|
}
|
|
86
90
|
getAxisSetting(axis) {
|
|
@@ -547,12 +551,17 @@ class AxiomLine extends AxiomPlotRoot {
|
|
|
547
551
|
}
|
|
548
552
|
line$1(this.parsedData);
|
|
549
553
|
ctx.stroke();
|
|
550
|
-
if (
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
554
|
+
if (this.legendSettings.axis !== undefined &&
|
|
555
|
+
this.axes !== undefined &&
|
|
556
|
+
!((_m = this.legendSettings.hide) !== null && _m !== void 0 ? _m : false)) {
|
|
557
|
+
const legendAxis = this.axes[this.legendSettings.axis];
|
|
558
|
+
if (legendAxis !== undefined) {
|
|
559
|
+
_super.onLegendReady.call(this, [{
|
|
560
|
+
id: legendAxis.key,
|
|
561
|
+
label: (_p = (_o = chart.getAxisLabel(legendAxis, this.legendSettings.axis)) !== null && _o !== void 0 ? _o : legendAxis.label) !== null && _p !== void 0 ? _p : legendAxis.key,
|
|
562
|
+
style: { backgroundColor: ctx.strokeStyle }
|
|
563
|
+
}]);
|
|
564
|
+
}
|
|
556
565
|
}
|
|
557
566
|
this.setupScrubbing();
|
|
558
567
|
});
|