@gpa-gemstone/react-graph 1.0.51 → 1.0.52
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/lib/AggregatingCircles.d.ts +16 -17
- package/lib/AggregatingCircles.js +180 -173
- package/lib/Button.d.ts +7 -7
- package/lib/Button.js +33 -33
- package/lib/Circle.d.ts +19 -20
- package/lib/Circle.js +125 -118
- package/lib/GraphContext.d.ts +89 -89
- package/lib/GraphContext.js +140 -140
- package/lib/HeatLegend.d.ts +10 -11
- package/lib/HeatLegend.js +109 -106
- package/lib/HeatMapChart.d.ts +14 -15
- package/lib/HeatMapChart.js +119 -119
- package/lib/HorizontalMarker.d.ts +13 -14
- package/lib/HorizontalMarker.js +110 -110
- package/lib/Infobox.d.ts +17 -17
- package/lib/Infobox.js +180 -180
- package/lib/InteractiveButtons.d.ts +21 -21
- package/lib/InteractiveButtons.js +218 -218
- package/lib/Legend.d.ts +14 -14
- package/lib/Legend.js +117 -117
- package/lib/LegendContext.d.ts +14 -14
- package/lib/LegendContext.js +34 -34
- package/lib/Line.d.ts +14 -15
- package/lib/Line.js +144 -144
- package/lib/LineLegend.d.ts +11 -12
- package/lib/LineLegend.js +97 -97
- package/lib/LineWithThreshold.d.ts +12 -13
- package/lib/LineWithThreshold.js +144 -144
- package/lib/LogAxis.d.ts +20 -20
- package/lib/LogAxis.js +165 -165
- package/lib/Plot.d.ts +38 -37
- package/lib/Plot.js +802 -802
- package/lib/PointNode.d.ts +31 -31
- package/lib/PointNode.js +254 -254
- package/lib/SymbolicMarker.d.ts +17 -17
- package/lib/SymbolicMarker.js +119 -119
- package/lib/TimeAxis.d.ts +18 -18
- package/lib/TimeAxis.js +433 -433
- package/lib/ValueAxis.d.ts +21 -21
- package/lib/ValueAxis.js +196 -192
- package/lib/VerticalMarker.d.ts +14 -15
- package/lib/VerticalMarker.js +111 -111
- package/lib/index.d.ts +13 -13
- package/lib/index.js +27 -27
- package/package.json +4 -4
package/lib/Legend.js
CHANGED
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// ******************************************************************************************************
|
|
3
|
-
// Legend.tsx - Gbtc
|
|
4
|
-
//
|
|
5
|
-
// Copyright © 2021, Grid Protection Alliance. All Rights Reserved.
|
|
6
|
-
//
|
|
7
|
-
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
|
|
8
|
-
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
|
|
9
|
-
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
|
|
10
|
-
// file except in compliance with the License. You may obtain a copy of the License at:
|
|
11
|
-
//
|
|
12
|
-
// http://opensource.org/licenses/MIT
|
|
13
|
-
//
|
|
14
|
-
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
|
|
15
|
-
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
|
|
16
|
-
// License for the specific language governing permissions and limitations.
|
|
17
|
-
//
|
|
18
|
-
// Code Modification History:
|
|
19
|
-
// ----------------------------------------------------------------------------------------------------
|
|
20
|
-
// 03/19/2021 - C. lackner
|
|
21
|
-
// Generated original version of source code.
|
|
22
|
-
//
|
|
23
|
-
// ******************************************************************************************************
|
|
24
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
25
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
26
|
-
if (!m) return o;
|
|
27
|
-
var i = m.call(o), r, ar = [], e;
|
|
28
|
-
try {
|
|
29
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
30
|
-
}
|
|
31
|
-
catch (error) { e = { error: error }; }
|
|
32
|
-
finally {
|
|
33
|
-
try {
|
|
34
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
35
|
-
}
|
|
36
|
-
finally { if (e) throw e.error; }
|
|
37
|
-
}
|
|
38
|
-
return ar;
|
|
39
|
-
};
|
|
40
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
41
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
42
|
-
if (ar || !(i in from)) {
|
|
43
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
44
|
-
ar[i] = from[i];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
48
|
-
};
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
var React = require("react");
|
|
51
|
-
var GraphContext_1 = require("./GraphContext");
|
|
52
|
-
var LegendContext_1 = require("./LegendContext");
|
|
53
|
-
var itemHeight = 25;
|
|
54
|
-
var itemsWhenBottom = 3;
|
|
55
|
-
function Legend(props) {
|
|
56
|
-
var graphContext = React.useContext(GraphContext_1.GraphContext);
|
|
57
|
-
var _a = __read(React.useState(props.location === 'bottom' ? props.graphWidth : props.width), 2), width = _a[0], setWidth = _a[1];
|
|
58
|
-
var _b = __read(React.useState(props.location === 'right' ? props.graphHeight : props.height), 2), height = _b[0], setHeight = _b[1];
|
|
59
|
-
var _c = __read(React.useState({ sm: 0, lg: 0 }), 2), nLegends = _c[0], setNLegends = _c[1];
|
|
60
|
-
var _d = __read(React.useState(false), 2), hasScroll = _d[0], setHasScroll = _d[1];
|
|
61
|
-
var _e = __read(React.useState(0), 2), leftPad = _e[0], setLeftPad = _e[1];
|
|
62
|
-
var legendContextValue = React.useMemo(function () {
|
|
63
|
-
var scrollBarSpace = (hasScroll ? 6 : 0);
|
|
64
|
-
var baseWidth = width - leftPad;
|
|
65
|
-
var baseHeight = props.location === 'bottom' ? itemHeight : Math.max(height / (Math.max(nLegends.sm + nLegends.lg, 1)), itemHeight);
|
|
66
|
-
return {
|
|
67
|
-
SmWidth: (baseWidth / (props.location === 'bottom' ? itemsWhenBottom : 1)) - scrollBarSpace,
|
|
68
|
-
LgWidth: baseWidth - scrollBarSpace,
|
|
69
|
-
SmHeight: baseHeight,
|
|
70
|
-
LgHeight: baseHeight * (props.location === 'bottom' ? 2 : 1),
|
|
71
|
-
RequestLegendWidth: props.RequestLegendWidth,
|
|
72
|
-
RequestLegendHeight: props.RequestLegendHeight
|
|
73
|
-
};
|
|
74
|
-
}, [width, height, props.RequestLegendWidth, props.RequestLegendHeight, hasScroll, props.location, leftPad, nLegends]);
|
|
75
|
-
React.useEffect(function () {
|
|
76
|
-
var newWidth = props.location === 'bottom' ? props.graphWidth : props.width;
|
|
77
|
-
if (newWidth !== width)
|
|
78
|
-
setWidth(newWidth);
|
|
79
|
-
}, [props.width, props.graphWidth, props.location]);
|
|
80
|
-
React.useEffect(function () {
|
|
81
|
-
var newHeight = props.location === 'right' ? props.graphHeight : props.height;
|
|
82
|
-
if (newHeight !== height)
|
|
83
|
-
setHeight(newHeight);
|
|
84
|
-
}, [props.height, props.graphHeight, props.location]);
|
|
85
|
-
React.useEffect(function () {
|
|
86
|
-
var newNLegends = __spreadArray([], __read(graphContext.Data.current.values()), false).reduce(function (s, c) {
|
|
87
|
-
var _a, _b, _c, _d, _e, _f;
|
|
88
|
-
if (c.legend === undefined)
|
|
89
|
-
return s;
|
|
90
|
-
if (props.HideDisabled && !((_c = (_b = (_a = c.legend) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.enabled) !== null && _c !== void 0 ? _c : true))
|
|
91
|
-
return s;
|
|
92
|
-
if (((_f = (_e = (_d = c.legend) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.size) !== null && _f !== void 0 ? _f : 'sm') === 'sm')
|
|
93
|
-
s.sm = s.sm + 1;
|
|
94
|
-
else
|
|
95
|
-
s.lg = s.lg + 1;
|
|
96
|
-
return s;
|
|
97
|
-
}, { sm: 0, lg: 0 });
|
|
98
|
-
if (newNLegends.sm !== nLegends.sm || newNLegends.lg !== nLegends.lg)
|
|
99
|
-
setNLegends(newNLegends);
|
|
100
|
-
}, [graphContext.DataGuid, props.HideDisabled]);
|
|
101
|
-
React.useEffect(function () {
|
|
102
|
-
var requiredHeight = Math.ceil(nLegends.sm / (props.location === 'bottom' ? itemsWhenBottom : 1)) * legendContextValue.SmHeight + nLegends.lg * legendContextValue.LgHeight;
|
|
103
|
-
if (props.RequestLegendHeight !== undefined && requiredHeight !== height)
|
|
104
|
-
props.RequestLegendHeight(requiredHeight);
|
|
105
|
-
setHasScroll(requiredHeight > height);
|
|
106
|
-
}, [nLegends, props.location, height, props.RequestLegendHeight]);
|
|
107
|
-
React.useEffect(function () { return setLeftPad(props.location === 'bottom' ? 39 : 0); }, [props.location]);
|
|
108
|
-
return (React.createElement(LegendContext_1.LegendContext.Provider, { value: legendContextValue },
|
|
109
|
-
React.createElement("div", { style: { height: height, width: width, paddingLeft: leftPad
|
|
110
|
-
overflowY: hasScroll ? 'scroll' : 'hidden', overflowX: hasScroll ? 'visible' : 'hidden', cursor: 'default' } }, __spreadArray([], __read(graphContext.Data.current.values()), false).map(function (series, index) {
|
|
111
|
-
var _a, _b;
|
|
112
|
-
return (series.legend !== undefined && (!props.HideDisabled || ((_a = series.legend.props.enabled) !== null && _a !== void 0 ? _a : true)) ?
|
|
113
|
-
React.createElement("div", { key: index, "data-html2canvas-ignore": !((_b = series.legend.props.enabled) !== null && _b !== void 0 ? _b : true) }, series.legend) : null);
|
|
114
|
-
}))));
|
|
115
|
-
}
|
|
116
|
-
exports.default = React.memo(Legend);
|
|
117
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
"use strict";
|
|
2
|
+
// ******************************************************************************************************
|
|
3
|
+
// Legend.tsx - Gbtc
|
|
4
|
+
//
|
|
5
|
+
// Copyright © 2021, Grid Protection Alliance. All Rights Reserved.
|
|
6
|
+
//
|
|
7
|
+
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
|
|
8
|
+
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
|
|
9
|
+
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
|
|
10
|
+
// file except in compliance with the License. You may obtain a copy of the License at:
|
|
11
|
+
//
|
|
12
|
+
// http://opensource.org/licenses/MIT
|
|
13
|
+
//
|
|
14
|
+
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
|
|
15
|
+
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
|
|
16
|
+
// License for the specific language governing permissions and limitations.
|
|
17
|
+
//
|
|
18
|
+
// Code Modification History:
|
|
19
|
+
// ----------------------------------------------------------------------------------------------------
|
|
20
|
+
// 03/19/2021 - C. lackner
|
|
21
|
+
// Generated original version of source code.
|
|
22
|
+
//
|
|
23
|
+
// ******************************************************************************************************
|
|
24
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
25
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
26
|
+
if (!m) return o;
|
|
27
|
+
var i = m.call(o), r, ar = [], e;
|
|
28
|
+
try {
|
|
29
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
30
|
+
}
|
|
31
|
+
catch (error) { e = { error: error }; }
|
|
32
|
+
finally {
|
|
33
|
+
try {
|
|
34
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
35
|
+
}
|
|
36
|
+
finally { if (e) throw e.error; }
|
|
37
|
+
}
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
41
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
42
|
+
if (ar || !(i in from)) {
|
|
43
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
44
|
+
ar[i] = from[i];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
48
|
+
};
|
|
49
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
+
var React = require("react");
|
|
51
|
+
var GraphContext_1 = require("./GraphContext");
|
|
52
|
+
var LegendContext_1 = require("./LegendContext");
|
|
53
|
+
var itemHeight = 25;
|
|
54
|
+
var itemsWhenBottom = 3;
|
|
55
|
+
function Legend(props) {
|
|
56
|
+
var graphContext = React.useContext(GraphContext_1.GraphContext);
|
|
57
|
+
var _a = __read(React.useState(props.location === 'bottom' ? props.graphWidth : props.width), 2), width = _a[0], setWidth = _a[1];
|
|
58
|
+
var _b = __read(React.useState(props.location === 'right' ? props.graphHeight : props.height), 2), height = _b[0], setHeight = _b[1];
|
|
59
|
+
var _c = __read(React.useState({ sm: 0, lg: 0 }), 2), nLegends = _c[0], setNLegends = _c[1];
|
|
60
|
+
var _d = __read(React.useState(false), 2), hasScroll = _d[0], setHasScroll = _d[1];
|
|
61
|
+
var _e = __read(React.useState(0), 2), leftPad = _e[0], setLeftPad = _e[1];
|
|
62
|
+
var legendContextValue = React.useMemo(function () {
|
|
63
|
+
var scrollBarSpace = (hasScroll ? 6 : 0);
|
|
64
|
+
var baseWidth = width - leftPad;
|
|
65
|
+
var baseHeight = props.location === 'bottom' ? itemHeight : Math.max(height / (Math.max(nLegends.sm + nLegends.lg, 1)), itemHeight);
|
|
66
|
+
return {
|
|
67
|
+
SmWidth: (baseWidth / (props.location === 'bottom' ? itemsWhenBottom : 1)) - scrollBarSpace,
|
|
68
|
+
LgWidth: baseWidth - scrollBarSpace,
|
|
69
|
+
SmHeight: baseHeight,
|
|
70
|
+
LgHeight: baseHeight * (props.location === 'bottom' ? 2 : 1),
|
|
71
|
+
RequestLegendWidth: props.RequestLegendWidth,
|
|
72
|
+
RequestLegendHeight: props.RequestLegendHeight
|
|
73
|
+
};
|
|
74
|
+
}, [width, height, props.RequestLegendWidth, props.RequestLegendHeight, hasScroll, props.location, leftPad, nLegends]);
|
|
75
|
+
React.useEffect(function () {
|
|
76
|
+
var newWidth = props.location === 'bottom' ? props.graphWidth : props.width;
|
|
77
|
+
if (newWidth !== width)
|
|
78
|
+
setWidth(newWidth);
|
|
79
|
+
}, [props.width, props.graphWidth, props.location]);
|
|
80
|
+
React.useEffect(function () {
|
|
81
|
+
var newHeight = props.location === 'right' ? props.graphHeight : props.height;
|
|
82
|
+
if (newHeight !== height)
|
|
83
|
+
setHeight(newHeight);
|
|
84
|
+
}, [props.height, props.graphHeight, props.location]);
|
|
85
|
+
React.useEffect(function () {
|
|
86
|
+
var newNLegends = __spreadArray([], __read(graphContext.Data.current.values()), false).reduce(function (s, c) {
|
|
87
|
+
var _a, _b, _c, _d, _e, _f;
|
|
88
|
+
if (c.legend === undefined)
|
|
89
|
+
return s;
|
|
90
|
+
if (props.HideDisabled && !((_c = (_b = (_a = c.legend) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.enabled) !== null && _c !== void 0 ? _c : true))
|
|
91
|
+
return s;
|
|
92
|
+
if (((_f = (_e = (_d = c.legend) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.size) !== null && _f !== void 0 ? _f : 'sm') === 'sm')
|
|
93
|
+
s.sm = s.sm + 1;
|
|
94
|
+
else
|
|
95
|
+
s.lg = s.lg + 1;
|
|
96
|
+
return s;
|
|
97
|
+
}, { sm: 0, lg: 0 });
|
|
98
|
+
if (newNLegends.sm !== nLegends.sm || newNLegends.lg !== nLegends.lg)
|
|
99
|
+
setNLegends(newNLegends);
|
|
100
|
+
}, [graphContext.DataGuid, props.HideDisabled]);
|
|
101
|
+
React.useEffect(function () {
|
|
102
|
+
var requiredHeight = Math.ceil(nLegends.sm / (props.location === 'bottom' ? itemsWhenBottom : 1)) * legendContextValue.SmHeight + nLegends.lg * legendContextValue.LgHeight;
|
|
103
|
+
if (props.RequestLegendHeight !== undefined && requiredHeight !== height)
|
|
104
|
+
props.RequestLegendHeight(requiredHeight);
|
|
105
|
+
setHasScroll(requiredHeight > height);
|
|
106
|
+
}, [nLegends, props.location, height, props.RequestLegendHeight]);
|
|
107
|
+
React.useEffect(function () { return setLeftPad(props.location === 'bottom' ? 39 : 0); }, [props.location]);
|
|
108
|
+
return (React.createElement(LegendContext_1.LegendContext.Provider, { value: legendContextValue },
|
|
109
|
+
React.createElement("div", { style: { height: height, width: width, paddingLeft: "".concat(leftPad, "px"), position: (props.location === 'bottom' ? 'absolute' : 'relative'), float: props.location, display: 'flex', flexWrap: 'wrap', bottom: 0,
|
|
110
|
+
overflowY: hasScroll ? 'scroll' : 'hidden', overflowX: hasScroll ? 'visible' : 'hidden', cursor: 'default' } }, __spreadArray([], __read(graphContext.Data.current.values()), false).map(function (series, index) {
|
|
111
|
+
var _a, _b;
|
|
112
|
+
return (series.legend !== undefined && (!props.HideDisabled || ((_a = series.legend.props.enabled) !== null && _a !== void 0 ? _a : true)) ?
|
|
113
|
+
React.createElement("div", { key: index, "data-html2canvas-ignore": !((_b = series.legend.props.enabled) !== null && _b !== void 0 ? _b : true) }, series.legend) : null);
|
|
114
|
+
}))));
|
|
115
|
+
}
|
|
116
|
+
exports.default = React.memo(Legend);
|
|
117
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTGVnZW5kLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0xlZ2VuZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHlHQUF5RztBQUN6RyxxQkFBcUI7QUFDckIsRUFBRTtBQUNGLHFFQUFxRTtBQUNyRSxFQUFFO0FBQ0Ysd0dBQXdHO0FBQ3hHLHdHQUF3RztBQUN4RyxzR0FBc0c7QUFDdEcsd0ZBQXdGO0FBQ3hGLEVBQUU7QUFDRiwwQ0FBMEM7QUFDMUMsRUFBRTtBQUNGLHdHQUF3RztBQUN4Ryx3R0FBd0c7QUFDeEcsNEVBQTRFO0FBQzVFLEVBQUU7QUFDRiw4QkFBOEI7QUFDOUIsd0dBQXdHO0FBQ3hHLDJCQUEyQjtBQUMzQixtREFBbUQ7QUFDbkQsRUFBRTtBQUNGLHlHQUF5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MsQ0FBQztBQUMvQixDQUFDO0FBRUQsa0JBQWUsS0FBSyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyJ9
|
package/lib/LegendContext.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface ILegendContext {
|
|
3
|
-
SmWidth: number;
|
|
4
|
-
LgWidth: number;
|
|
5
|
-
SmHeight: number;
|
|
6
|
-
LgHeight: number;
|
|
7
|
-
RequestLegendWidth: (width: number, requesterID: string) => void;
|
|
8
|
-
RequestLegendHeight: (height: number) => void;
|
|
9
|
-
}
|
|
10
|
-
export interface ILegendRequiredProps {
|
|
11
|
-
size: 'lg' | 'sm';
|
|
12
|
-
enabled: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const LegendContext: React.Context<ILegendContext>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ILegendContext {
|
|
3
|
+
SmWidth: number;
|
|
4
|
+
LgWidth: number;
|
|
5
|
+
SmHeight: number;
|
|
6
|
+
LgHeight: number;
|
|
7
|
+
RequestLegendWidth: (width: number, requesterID: string) => void;
|
|
8
|
+
RequestLegendHeight: (height: number) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface ILegendRequiredProps {
|
|
11
|
+
size: 'lg' | 'sm';
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const LegendContext: React.Context<ILegendContext>;
|
package/lib/LegendContext.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LegendContext = void 0;
|
|
4
|
-
// ******************************************************************************************************
|
|
5
|
-
// GraphContext.tsx - Gbtc
|
|
6
|
-
//
|
|
7
|
-
// Copyright © 2020, Grid Protection Alliance. All Rights Reserved.
|
|
8
|
-
//
|
|
9
|
-
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
|
|
10
|
-
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
|
|
11
|
-
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
|
|
12
|
-
// file except in compliance with the License. You may obtain a copy of the License at:
|
|
13
|
-
//
|
|
14
|
-
// http://opensource.org/licenses/MIT
|
|
15
|
-
//
|
|
16
|
-
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
|
|
17
|
-
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
|
|
18
|
-
// License for the specific language governing permissions and limitations.
|
|
19
|
-
//
|
|
20
|
-
// Code Modification History:
|
|
21
|
-
// ----------------------------------------------------------------------------------------------------
|
|
22
|
-
// 02/01/2024 - G. Santos
|
|
23
|
-
// Generated original version of source code.
|
|
24
|
-
//
|
|
25
|
-
// ******************************************************************************************************
|
|
26
|
-
var React = require("react");
|
|
27
|
-
exports.LegendContext = React.createContext({
|
|
28
|
-
SmWidth: 0,
|
|
29
|
-
LgWidth: 0,
|
|
30
|
-
SmHeight: 0,
|
|
31
|
-
LgHeight: 0,
|
|
32
|
-
RequestLegendWidth: function () { return undefined; },
|
|
33
|
-
RequestLegendHeight: function () { return undefined; }
|
|
34
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LegendContext = void 0;
|
|
4
|
+
// ******************************************************************************************************
|
|
5
|
+
// GraphContext.tsx - Gbtc
|
|
6
|
+
//
|
|
7
|
+
// Copyright © 2020, Grid Protection Alliance. All Rights Reserved.
|
|
8
|
+
//
|
|
9
|
+
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
|
|
10
|
+
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
|
|
11
|
+
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
|
|
12
|
+
// file except in compliance with the License. You may obtain a copy of the License at:
|
|
13
|
+
//
|
|
14
|
+
// http://opensource.org/licenses/MIT
|
|
15
|
+
//
|
|
16
|
+
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
|
|
17
|
+
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
|
|
18
|
+
// License for the specific language governing permissions and limitations.
|
|
19
|
+
//
|
|
20
|
+
// Code Modification History:
|
|
21
|
+
// ----------------------------------------------------------------------------------------------------
|
|
22
|
+
// 02/01/2024 - G. Santos
|
|
23
|
+
// Generated original version of source code.
|
|
24
|
+
//
|
|
25
|
+
// ******************************************************************************************************
|
|
26
|
+
var React = require("react");
|
|
27
|
+
exports.LegendContext = React.createContext({
|
|
28
|
+
SmWidth: 0,
|
|
29
|
+
LgWidth: 0,
|
|
30
|
+
SmHeight: 0,
|
|
31
|
+
LgHeight: 0,
|
|
32
|
+
RequestLegendWidth: function () { return undefined; },
|
|
33
|
+
RequestLegendHeight: function () { return undefined; }
|
|
34
|
+
});
|
|
35
35
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTGVnZW5kQ29udGV4dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9MZWdlbmRDb250ZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5R0FBeUc7QUFDekcsMkJBQTJCO0FBQzNCLEVBQUU7QUFDRixxRUFBcUU7QUFDckUsRUFBRTtBQUNGLHdHQUF3RztBQUN4Ryx3R0FBd0c7QUFDeEcsc0dBQXNHO0FBQ3RHLHdGQUF3RjtBQUN4RixFQUFFO0FBQ0YsMENBQTBDO0FBQzFDLEVBQUU7QUFDRix3R0FBd0c7QUFDeEcsd0dBQXdHO0FBQ3hHLDRFQUE0RTtBQUM1RSxFQUFFO0FBQ0YsOEJBQThCO0FBQzlCLHdHQUF3RztBQUN4RywwQkFBMEI7QUFDMUIsbURBQW1EO0FBQ25ELEVBQUU7QUFDRix5R0FBeUc7QUFDekcsNkJBQStCO0FBZ0JsQixRQUFBLGFBQWEsR0FBRyxLQUFLLENBQUMsYUFBYSxDQUFDO0lBQzdDLE9BQU8sRUFBRSxDQUFDO0lBQ1YsT0FBTyxFQUFFLENBQUM7SUFDVixRQUFRLEVBQUUsQ0FBQztJQUNYLFFBQVEsRUFBRSxDQUFDO0lBQ1gsa0JBQWtCLEVBQUUsY0FBTSxPQUFBLFNBQVMsRUFBVCxDQUFTO0lBQ25DLG1CQUFtQixFQUFFLGNBQU0sT0FBQSxTQUFTLEVBQVQsQ0FBUztDQUNyQixDQUFDLENBQUMifQ==
|
package/lib/Line.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export default Line;
|
|
1
|
+
import { LineStyle, AxisIdentifier } from './GraphContext';
|
|
2
|
+
export interface IProps {
|
|
3
|
+
showPoints?: boolean;
|
|
4
|
+
autoShowPoints?: boolean;
|
|
5
|
+
legend?: string;
|
|
6
|
+
highlightHover?: boolean;
|
|
7
|
+
data: [number, number][];
|
|
8
|
+
color: string;
|
|
9
|
+
lineStyle: LineStyle;
|
|
10
|
+
width?: number;
|
|
11
|
+
axis?: AxisIdentifier;
|
|
12
|
+
}
|
|
13
|
+
declare function Line(props: IProps): JSX.Element | null;
|
|
14
|
+
export default Line;
|