@auth0/quantum-charts 1.0.4 → 1.0.5
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/common/custom-tooltip.js
CHANGED
|
@@ -51,7 +51,7 @@ var CustomTooltip = function (props) {
|
|
|
51
51
|
return (React.createElement(quantum_product_1.StackLayout, { key: index, gutter: 0.5 },
|
|
52
52
|
React.createElement(custom_color_status_dot_1.default, { key: index, dotColor: x.color || 'grey', label: "".concat(x.name, ":") + ' ' }),
|
|
53
53
|
React.createElement(quantum_product_1.Text, { color: "text.secondary", alignItems: 'end' }, x.payload[x.dataKey || '']),
|
|
54
|
-
x.payload['
|
|
54
|
+
x.payload['evaluated_group'] === x.dataKey &&
|
|
55
55
|
x.payload['breachedPoint'] !== 'none' &&
|
|
56
56
|
(x.payload['breachedPoint'] === 'alert' ? (React.createElement(quantum_product_1.AlertDiamondFilledIcon, { color: theme.tokens.color_fg_state_danger })) : (React.createElement(quantum_product_1.AlertTriangleFilledIcon, { color: theme.tokens.color_fg_state_caution })))));
|
|
57
57
|
})))));
|
|
@@ -23,7 +23,7 @@ var CustomTooltip = function (props) {
|
|
|
23
23
|
return (React.createElement(StackLayout, { key: index, gutter: 0.5 },
|
|
24
24
|
React.createElement(StatusDot, { key: index, dotColor: x.color || 'grey', label: "".concat(x.name, ":") + ' ' }),
|
|
25
25
|
React.createElement(Text, { color: "text.secondary", alignItems: 'end' }, x.payload[x.dataKey || '']),
|
|
26
|
-
x.payload['
|
|
26
|
+
x.payload['evaluated_group'] === x.dataKey &&
|
|
27
27
|
x.payload['breachedPoint'] !== 'none' &&
|
|
28
28
|
(x.payload['breachedPoint'] === 'alert' ? (React.createElement(AlertDiamondFilledIcon, { color: theme.tokens.color_fg_state_danger })) : (React.createElement(AlertTriangleFilledIcon, { color: theme.tokens.color_fg_state_caution })))));
|
|
29
29
|
})))));
|
package/esm/line-chart/index.js
CHANGED
|
@@ -92,19 +92,20 @@ export function LineChart(props) {
|
|
|
92
92
|
_a[entry.group] = entry[leftAxisDataKey],
|
|
93
93
|
_a);
|
|
94
94
|
}
|
|
95
|
-
if (
|
|
95
|
+
if (threshold && threshold.evaluated_metric === entry.evaluated_metric) {
|
|
96
96
|
var _c = getThresholdData(threshold, entry), ewma_hidden = _c.ewma_hidden, alertThreshold_hidden = _c.alertThreshold_hidden, warnBuffer_hidden = _c.warnBuffer_hidden, warnThreshold_hidden = _c.warnThreshold_hidden;
|
|
97
97
|
entries[entrytKey].thresholdControl = true;
|
|
98
98
|
entries[entrytKey].breachedPoint = entry.breachedPoint;
|
|
99
99
|
// _hidden suffix is used to hide a dataKey from the tooltips and legend
|
|
100
|
-
entries[entrytKey].ewma_hidden = ewma_hidden;
|
|
100
|
+
entries[entrytKey].ewma_hidden = Math.max(0, ewma_hidden);
|
|
101
101
|
entries[entrytKey].alertThreshold_hidden = alertThreshold_hidden;
|
|
102
102
|
entries[entrytKey].warnThreshold_hidden = warnThreshold_hidden;
|
|
103
103
|
if (threshold.threshold_trigger === 'BELOW') {
|
|
104
|
-
entries[entrytKey].warnBuffer_hidden = warnBuffer_hidden;
|
|
104
|
+
entries[entrytKey].warnBuffer_hidden = Math.max(0, warnBuffer_hidden);
|
|
105
105
|
entries[entrytKey].warnThreshold_hidden = 0;
|
|
106
106
|
}
|
|
107
107
|
entries[entrytKey].evaluated_metric = threshold.evaluated_metric;
|
|
108
|
+
entries[entrytKey].evaluated_group = entry.group;
|
|
108
109
|
}
|
|
109
110
|
return _b = {},
|
|
110
111
|
_b[bottomAxisDataKey] = entry[bottomAxisDataKey],
|
package/line-chart/index.js
CHANGED
|
@@ -121,19 +121,20 @@ function LineChart(props) {
|
|
|
121
121
|
_a[entry.group] = entry[leftAxisDataKey],
|
|
122
122
|
_a);
|
|
123
123
|
}
|
|
124
|
-
if (
|
|
124
|
+
if (threshold && threshold.evaluated_metric === entry.evaluated_metric) {
|
|
125
125
|
var _c = getThresholdData(threshold, entry), ewma_hidden = _c.ewma_hidden, alertThreshold_hidden = _c.alertThreshold_hidden, warnBuffer_hidden = _c.warnBuffer_hidden, warnThreshold_hidden = _c.warnThreshold_hidden;
|
|
126
126
|
entries[entrytKey].thresholdControl = true;
|
|
127
127
|
entries[entrytKey].breachedPoint = entry.breachedPoint;
|
|
128
128
|
// _hidden suffix is used to hide a dataKey from the tooltips and legend
|
|
129
|
-
entries[entrytKey].ewma_hidden = ewma_hidden;
|
|
129
|
+
entries[entrytKey].ewma_hidden = Math.max(0, ewma_hidden);
|
|
130
130
|
entries[entrytKey].alertThreshold_hidden = alertThreshold_hidden;
|
|
131
131
|
entries[entrytKey].warnThreshold_hidden = warnThreshold_hidden;
|
|
132
132
|
if (threshold.threshold_trigger === 'BELOW') {
|
|
133
|
-
entries[entrytKey].warnBuffer_hidden = warnBuffer_hidden;
|
|
133
|
+
entries[entrytKey].warnBuffer_hidden = Math.max(0, warnBuffer_hidden);
|
|
134
134
|
entries[entrytKey].warnThreshold_hidden = 0;
|
|
135
135
|
}
|
|
136
136
|
entries[entrytKey].evaluated_metric = threshold.evaluated_metric;
|
|
137
|
+
entries[entrytKey].evaluated_group = entry.group;
|
|
137
138
|
}
|
|
138
139
|
return _b = {},
|
|
139
140
|
_b[bottomAxisDataKey] = entry[bottomAxisDataKey],
|