@axdspub/axiom-charts 0.0.29 → 0.0.30
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 +19 -18
- package/library/Libraries/axiom/index.js.map +1 -1
- package/library/axiom-charts.d.ts +5 -1
- package/library/browser.js +1 -0
- package/library/browser.js.map +1 -1
- package/library/cjs.js +1 -0
- package/library/cjs.js.map +1 -1
- package/library/index.js +1 -0
- package/library/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -80,6 +80,7 @@ class PlotRoot extends RequestItem {
|
|
|
80
80
|
this.onDataLoad = props.onDataLoad;
|
|
81
81
|
this.axisSettings = props.axisSettings;
|
|
82
82
|
this.scrubSettings = Object.assign(Object.assign({}, this.scrubSettingsDefaults), props.scrubSettings);
|
|
83
|
+
this.legendSettings = Object.assign({ hide: false }, props.legendSettings);
|
|
83
84
|
this.runtime = {};
|
|
84
85
|
}
|
|
85
86
|
getAxisSetting(axis) {
|
|
@@ -487,7 +488,7 @@ class AxiomLine extends AxiomPlotRoot {
|
|
|
487
488
|
const _super = Object.create(null, {
|
|
488
489
|
onLegendReady: { get: () => super.onLegendReady }
|
|
489
490
|
});
|
|
490
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
491
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
491
492
|
return __awaiter(this, void 0, void 0, function* () {
|
|
492
493
|
const style = this.style !== undefined ? this.style : {};
|
|
493
494
|
if (this.parsedData === undefined) {
|
|
@@ -546,10 +547,10 @@ class AxiomLine extends AxiomPlotRoot {
|
|
|
546
547
|
}
|
|
547
548
|
line$1(this.parsedData);
|
|
548
549
|
ctx.stroke();
|
|
549
|
-
if (((_m = this.axes) === null || _m === void 0 ? void 0 : _m.y) !== undefined) {
|
|
550
|
+
if (((_m = this.axes) === null || _m === void 0 ? void 0 : _m.y) !== undefined && !((_o = this.legendSettings.hide) !== null && _o !== void 0 ? _o : false)) {
|
|
550
551
|
_super.onLegendReady.call(this, [{
|
|
551
552
|
id: this.axes.y.key,
|
|
552
|
-
label: (
|
|
553
|
+
label: (_p = chart.getAxisLabel(this.axes.y, 'y')) !== null && _p !== void 0 ? _p : this.axes.y.key,
|
|
553
554
|
style: { backgroundColor: ctx.strokeStyle }
|
|
554
555
|
}]);
|
|
555
556
|
}
|
|
@@ -626,7 +627,7 @@ class AxiomArea extends AxiomPlotRoot {
|
|
|
626
627
|
const _super = Object.create(null, {
|
|
627
628
|
onLegendReady: { get: () => super.onLegendReady }
|
|
628
629
|
});
|
|
629
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
630
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
630
631
|
return __awaiter(this, void 0, void 0, function* () {
|
|
631
632
|
const style = this.style !== undefined ? this.style : {};
|
|
632
633
|
const data = yield this.getData();
|
|
@@ -694,10 +695,10 @@ class AxiomArea extends AxiomPlotRoot {
|
|
|
694
695
|
ctx.beginPath();
|
|
695
696
|
area$1(parsedData);
|
|
696
697
|
ctx.fill();
|
|
697
|
-
if (((_m = this.axes) === null || _m === void 0 ? void 0 : _m.y) !== undefined) {
|
|
698
|
+
if (((_m = this.axes) === null || _m === void 0 ? void 0 : _m.y) !== undefined && !((_o = this.legendSettings.hide) !== null && _o !== void 0 ? _o : false)) {
|
|
698
699
|
_super.onLegendReady.call(this, [{
|
|
699
700
|
id: this.axes.y.key,
|
|
700
|
-
label: (
|
|
701
|
+
label: (_p = chart.getAxisLabel(this.axes.y, 'y')) !== null && _p !== void 0 ? _p : this.axes.y.key,
|
|
701
702
|
style: { backgroundColor: ctx.fillStyle }
|
|
702
703
|
}]);
|
|
703
704
|
}
|
|
@@ -749,7 +750,7 @@ class AxiomScatter extends AxiomPlotRoot {
|
|
|
749
750
|
const _super = Object.create(null, {
|
|
750
751
|
onLegendReady: { get: () => super.onLegendReady }
|
|
751
752
|
});
|
|
752
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
753
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
753
754
|
return __awaiter(this, void 0, void 0, function* () {
|
|
754
755
|
const style = this.style !== undefined ? this.style : {};
|
|
755
756
|
const data = yield this.getData();
|
|
@@ -804,10 +805,10 @@ class AxiomScatter extends AxiomPlotRoot {
|
|
|
804
805
|
ctx.fill();
|
|
805
806
|
}
|
|
806
807
|
});
|
|
807
|
-
if (((_m = this.axes) === null || _m === void 0 ? void 0 : _m.y) !== undefined) {
|
|
808
|
+
if (((_m = this.axes) === null || _m === void 0 ? void 0 : _m.y) !== undefined && !((_o = this.legendSettings.hide) !== null && _o !== void 0 ? _o : false)) {
|
|
808
809
|
_super.onLegendReady.call(this, [{
|
|
809
810
|
id: this.axes.y.key,
|
|
810
|
-
label: (
|
|
811
|
+
label: (_p = chart.getAxisLabel(this.axes.y, 'y')) !== null && _p !== void 0 ? _p : this.axes.y.key,
|
|
811
812
|
style: {
|
|
812
813
|
backgroundColor: ctx.fillStyle,
|
|
813
814
|
border: `1px solid ${ctx.strokeStyle}`
|
|
@@ -1467,7 +1468,7 @@ class AxiomRadialLine extends AxiomLine {
|
|
|
1467
1468
|
const _super = Object.create(null, {
|
|
1468
1469
|
onLegendReady: { get: () => super.onLegendReady }
|
|
1469
1470
|
});
|
|
1470
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1471
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1471
1472
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1472
1473
|
const style = this.style !== undefined ? this.style : {};
|
|
1473
1474
|
const data = yield this.getData();
|
|
@@ -1520,10 +1521,10 @@ class AxiomRadialLine extends AxiomLine {
|
|
|
1520
1521
|
.attr('stroke', stroke)
|
|
1521
1522
|
.attr('stroke-width', style.strokeWidth !== undefined ? style.strokeWidth : 1)
|
|
1522
1523
|
.attr('d', line(radialData));
|
|
1523
|
-
if (((_f = this.axes) === null || _f === void 0 ? void 0 : _f.y) !== undefined) {
|
|
1524
|
+
if (((_f = this.axes) === null || _f === void 0 ? void 0 : _f.y) !== undefined && !((_g = this.legendSettings.hide) !== null && _g !== void 0 ? _g : false)) {
|
|
1524
1525
|
_super.onLegendReady.call(this, [{
|
|
1525
1526
|
id: this.axes.y.key,
|
|
1526
|
-
label: (
|
|
1527
|
+
label: (_h = chart.getAxisLabel(this.axes.y, 'y')) !== null && _h !== void 0 ? _h : this.axes.y.key,
|
|
1527
1528
|
style: { backgroundColor: stroke }
|
|
1528
1529
|
}]);
|
|
1529
1530
|
}
|
|
@@ -1536,7 +1537,7 @@ class AxiomRadialScatter extends AxiomLine {
|
|
|
1536
1537
|
const _super = Object.create(null, {
|
|
1537
1538
|
onLegendReady: { get: () => super.onLegendReady }
|
|
1538
1539
|
});
|
|
1539
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1540
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1540
1541
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1541
1542
|
// const style = this.style !== undefined ? this.style : {}
|
|
1542
1543
|
const data = yield this.getData();
|
|
@@ -1587,10 +1588,10 @@ class AxiomRadialScatter extends AxiomLine {
|
|
|
1587
1588
|
.attr('cx', pt[0] + chart.settings.margin.left)
|
|
1588
1589
|
.attr('cy', pt[1] + chart.settings.margin.top);
|
|
1589
1590
|
});
|
|
1590
|
-
if (((_f = this.axes) === null || _f === void 0 ? void 0 : _f.y) !== undefined) {
|
|
1591
|
+
if (((_f = this.axes) === null || _f === void 0 ? void 0 : _f.y) !== undefined && !((_g = this.legendSettings.hide) !== null && _g !== void 0 ? _g : false)) {
|
|
1591
1592
|
_super.onLegendReady.call(this, [{
|
|
1592
1593
|
id: this.axes.y.key,
|
|
1593
|
-
label: (
|
|
1594
|
+
label: (_h = chart.getAxisLabel(this.axes.y, 'y')) !== null && _h !== void 0 ? _h : this.axes.y.key,
|
|
1594
1595
|
style: {
|
|
1595
1596
|
backgroundColor: fill,
|
|
1596
1597
|
border: `1px solid ${stroke}`
|
|
@@ -1606,7 +1607,7 @@ class AxiomRadialArea extends AxiomArea {
|
|
|
1606
1607
|
const _super = Object.create(null, {
|
|
1607
1608
|
onLegendReady: { get: () => super.onLegendReady }
|
|
1608
1609
|
});
|
|
1609
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1610
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1610
1611
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1611
1612
|
const style = this.style !== undefined ? this.style : {};
|
|
1612
1613
|
const data = yield this.getData();
|
|
@@ -1669,10 +1670,10 @@ class AxiomRadialArea extends AxiomArea {
|
|
|
1669
1670
|
.attr('fill', fill)
|
|
1670
1671
|
.attr('stroke-width', style.strokeWidth !== undefined ? style.strokeWidth : 1)
|
|
1671
1672
|
.attr('d', area(radialData));
|
|
1672
|
-
if (((_f = this.axes) === null || _f === void 0 ? void 0 : _f.y) !== undefined) {
|
|
1673
|
+
if (((_f = this.axes) === null || _f === void 0 ? void 0 : _f.y) !== undefined && !((_g = this.legendSettings.hide) !== null && _g !== void 0 ? _g : false)) {
|
|
1673
1674
|
_super.onLegendReady.call(this, [{
|
|
1674
1675
|
id: this.axes.y.key,
|
|
1675
|
-
label: (
|
|
1676
|
+
label: (_h = chart.getAxisLabel(this.axes.y, 'y')) !== null && _h !== void 0 ? _h : this.axes.y.key,
|
|
1676
1677
|
style: { backgroundColor: fill }
|
|
1677
1678
|
}]);
|
|
1678
1679
|
}
|