@fluentui/react-charting 5.23.17 → 5.23.19
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/CHANGELOG.json +37 -1
- package/CHANGELOG.md +21 -2
- package/dist/react-charting.d.ts +38 -0
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +18 -0
- package/lib/DeclarativeChart.d.ts +1 -0
- package/lib/DeclarativeChart.js +2 -0
- package/lib/DeclarativeChart.js.map +1 -0
- package/lib/components/AreaChart/AreaChart.base.js +6 -5
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.js +2 -2
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.d.ts +36 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js +67 -0
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +27 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +387 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
- package/lib/components/Legends/shape.js +3 -3
- package/lib/components/Legends/shape.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/Textbox.js +2 -1
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/utilities/utilities.d.ts +1 -0
- package/lib/utilities/utilities.js +7 -1
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/DeclarativeChart.d.ts +1 -0
- package/lib-amd/DeclarativeChart.js +6 -0
- package/lib-amd/DeclarativeChart.js.map +1 -0
- package/lib-amd/components/AreaChart/AreaChart.base.js +5 -4
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.d.ts +36 -0
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +58 -0
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +27 -0
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +402 -0
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
- package/lib-amd/components/Legends/shape.js +2 -2
- package/lib-amd/components/Legends/shape.js.map +1 -1
- package/lib-amd/components/LineChart/eventAnnotation/Textbox.js +2 -2
- package/lib-amd/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib-amd/index.d.ts +2 -0
- package/lib-amd/index.js +3 -2
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +1 -0
- package/lib-amd/utilities/utilities.js +8 -1
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/DeclarativeChart.d.ts +1 -0
- package/lib-commonjs/DeclarativeChart.js +5 -0
- package/lib-commonjs/DeclarativeChart.js.map +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +5 -4
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.d.ts +36 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +70 -0
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +27 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +402 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
- package/lib-commonjs/components/Legends/shape.js +2 -2
- package/lib-commonjs/components/Legends/shape.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +2 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib-commonjs/index.d.ts +2 -0
- package/lib-commonjs/index.js +3 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +1 -0
- package/lib-commonjs/utilities/utilities.js +8 -1
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "../../utilities/colors"], function (require, exports, tslib_1, colors_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.findArrayAttributes = exports.transformPlotlyJsonToGaugeProps = exports.transformPlotlyJsonToSankeyProps = exports.transformPlotlyJsonToHeatmapProps = exports.transformPlotlyJsonToHorizontalBarWithAxisProps = exports.transformPlotlyJsonToScatterChartProps = exports.transformPlotlyJsonToGVBCProps = exports.transformPlotlyJsonToVSBCProps = exports.transformPlotlyJsonToDonutProps = exports.getColor = exports.isNumberArray = exports.isDateArray = void 0;
|
|
5
|
+
var isDate = function (value) { return !isNaN(Date.parse(value)); };
|
|
6
|
+
var isNumber = function (value) { return !isNaN(parseFloat(value)) && isFinite(value); };
|
|
7
|
+
var isDateArray = function (array) { return isArrayOrTypedArray(array) && array.every(isDate); };
|
|
8
|
+
exports.isDateArray = isDateArray;
|
|
9
|
+
var isNumberArray = function (array) { return isArrayOrTypedArray(array) && array.every(isNumber); };
|
|
10
|
+
exports.isNumberArray = isNumberArray;
|
|
11
|
+
var getColor = function (legendLabel, colorMap) {
|
|
12
|
+
if (!colorMap.current.has(legendLabel)) {
|
|
13
|
+
var nextColor = (0, colors_1.getNextColor)(colorMap.current.size + 1);
|
|
14
|
+
colorMap.current.set(legendLabel, nextColor);
|
|
15
|
+
return nextColor;
|
|
16
|
+
}
|
|
17
|
+
return colorMap.current.get(legendLabel);
|
|
18
|
+
};
|
|
19
|
+
exports.getColor = getColor;
|
|
20
|
+
var transformPlotlyJsonToDonutProps = function (jsonObj, colorMap) {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
var data = jsonObj.data, layout = jsonObj.layout;
|
|
23
|
+
var firstData = data[0];
|
|
24
|
+
var donutData = (_a = firstData.labels) === null || _a === void 0 ? void 0 : _a.map(function (label, index) {
|
|
25
|
+
var _a;
|
|
26
|
+
var color = (0, exports.getColor)(label, colorMap);
|
|
27
|
+
return {
|
|
28
|
+
legend: label,
|
|
29
|
+
data: (_a = firstData.values) === null || _a === void 0 ? void 0 : _a[index],
|
|
30
|
+
color: color,
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
// TODO: innerRadius as a fraction needs to be supported internally. The pixel value depends on
|
|
34
|
+
// chart dimensions, arc label dimensions and the legend container height, all of which are subject to change.
|
|
35
|
+
var width = (layout === null || layout === void 0 ? void 0 : layout.width) || 440;
|
|
36
|
+
var height = (layout === null || layout === void 0 ? void 0 : layout.height) || 220;
|
|
37
|
+
var hideLabels = firstData.textinfo ? !['value', 'percent'].includes(firstData.textinfo) : false;
|
|
38
|
+
var donutMarginHorizontal = hideLabels ? 0 : 80;
|
|
39
|
+
var donutMarginVertical = 40 + (hideLabels ? 0 : 40);
|
|
40
|
+
var innerRadius = firstData.hole
|
|
41
|
+
? firstData.hole * (Math.min(width - donutMarginHorizontal, height - donutMarginVertical) / 2)
|
|
42
|
+
: 0;
|
|
43
|
+
var styles = {
|
|
44
|
+
root: {
|
|
45
|
+
'[class^="arcLabel"]': {
|
|
46
|
+
fontSize: (_b = firstData.textfont) === null || _b === void 0 ? void 0 : _b.size,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
return {
|
|
51
|
+
data: {
|
|
52
|
+
chartTitle: layout === null || layout === void 0 ? void 0 : layout.title,
|
|
53
|
+
chartData: donutData,
|
|
54
|
+
},
|
|
55
|
+
hideLegend: (layout === null || layout === void 0 ? void 0 : layout.showlegend) === false ? true : false,
|
|
56
|
+
width: width,
|
|
57
|
+
height: height,
|
|
58
|
+
innerRadius: innerRadius,
|
|
59
|
+
hideLabels: hideLabels,
|
|
60
|
+
showLabelsInPercent: firstData.textinfo ? firstData.textinfo === 'percent' : true,
|
|
61
|
+
styles: styles,
|
|
62
|
+
// TODO: Render custom hover card based on textinfo
|
|
63
|
+
// onRenderCalloutPerDataPoint: undefined,
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
exports.transformPlotlyJsonToDonutProps = transformPlotlyJsonToDonutProps;
|
|
67
|
+
var transformPlotlyJsonToVSBCProps = function (jsonObj, colorMap) {
|
|
68
|
+
var data = jsonObj.data, layout = jsonObj.layout;
|
|
69
|
+
var mapXToDataPoints = {};
|
|
70
|
+
var yMaxValue = 0;
|
|
71
|
+
data.forEach(function (series, index1) {
|
|
72
|
+
var _a;
|
|
73
|
+
(_a = series.x) === null || _a === void 0 ? void 0 : _a.forEach(function (x, index2) {
|
|
74
|
+
var _a, _b, _c;
|
|
75
|
+
if (!mapXToDataPoints[x]) {
|
|
76
|
+
mapXToDataPoints[x] = { xAxisPoint: x, chartData: [], lineData: [] };
|
|
77
|
+
}
|
|
78
|
+
var legend = series.name || "Series ".concat(index1 + 1);
|
|
79
|
+
if (series.type === 'bar') {
|
|
80
|
+
var color = (0, exports.getColor)(legend, colorMap);
|
|
81
|
+
mapXToDataPoints[x].chartData.push({
|
|
82
|
+
legend: legend,
|
|
83
|
+
data: (_a = series.y) === null || _a === void 0 ? void 0 : _a[index2],
|
|
84
|
+
color: color,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
else if (series.type === 'line') {
|
|
88
|
+
var color = (0, exports.getColor)(legend, colorMap);
|
|
89
|
+
mapXToDataPoints[x].lineData.push({
|
|
90
|
+
legend: legend,
|
|
91
|
+
y: (_b = series.y) === null || _b === void 0 ? void 0 : _b[index2],
|
|
92
|
+
color: color,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
yMaxValue = Math.max(yMaxValue, (_c = series.y) === null || _c === void 0 ? void 0 : _c[index2]);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
return {
|
|
99
|
+
data: Object.values(mapXToDataPoints),
|
|
100
|
+
chartTitle: layout === null || layout === void 0 ? void 0 : layout.title,
|
|
101
|
+
// width: layout?.width,
|
|
102
|
+
// height: layout?.height,
|
|
103
|
+
barWidth: 'auto',
|
|
104
|
+
yMaxValue: yMaxValue,
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
exports.transformPlotlyJsonToVSBCProps = transformPlotlyJsonToVSBCProps;
|
|
108
|
+
// TODO: Add support for continuous x-axis in grouped vertical bar chart
|
|
109
|
+
var transformPlotlyJsonToGVBCProps = function (jsonObj, colorMap) {
|
|
110
|
+
var data = jsonObj.data, layout = jsonObj.layout;
|
|
111
|
+
var mapXToDataPoints = {};
|
|
112
|
+
data.forEach(function (series, index1) {
|
|
113
|
+
var _a;
|
|
114
|
+
(_a = series.x) === null || _a === void 0 ? void 0 : _a.forEach(function (x, index2) {
|
|
115
|
+
var _a;
|
|
116
|
+
if (!mapXToDataPoints[x]) {
|
|
117
|
+
mapXToDataPoints[x] = { name: x.toString(), series: [] };
|
|
118
|
+
}
|
|
119
|
+
if (series.type === 'bar') {
|
|
120
|
+
var legend = series.name || "Series ".concat(index1 + 1);
|
|
121
|
+
var color = (0, exports.getColor)(legend, colorMap);
|
|
122
|
+
mapXToDataPoints[x].series.push({
|
|
123
|
+
key: legend,
|
|
124
|
+
data: (_a = series.y) === null || _a === void 0 ? void 0 : _a[index2],
|
|
125
|
+
color: color,
|
|
126
|
+
legend: legend,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
return {
|
|
132
|
+
data: Object.values(mapXToDataPoints),
|
|
133
|
+
chartTitle: layout === null || layout === void 0 ? void 0 : layout.title,
|
|
134
|
+
// width: layout?.width,
|
|
135
|
+
// height: layout?.height,
|
|
136
|
+
barwidth: 'auto',
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
exports.transformPlotlyJsonToGVBCProps = transformPlotlyJsonToGVBCProps;
|
|
140
|
+
var transformPlotlyJsonToScatterChartProps = function (jsonObj, isAreaChart, colorMap) {
|
|
141
|
+
var data = jsonObj.data, layout = jsonObj.layout;
|
|
142
|
+
var chartData = data.map(function (series, index) {
|
|
143
|
+
var xValues = series.x;
|
|
144
|
+
var isString = typeof xValues[0] === 'string';
|
|
145
|
+
var isXDate = (0, exports.isDateArray)(xValues);
|
|
146
|
+
var isXNumber = (0, exports.isNumberArray)(xValues);
|
|
147
|
+
var legend = series.name || "Series ".concat(index + 1);
|
|
148
|
+
var lineColor = (0, exports.getColor)(legend, colorMap);
|
|
149
|
+
return {
|
|
150
|
+
legend: legend,
|
|
151
|
+
data: xValues.map(function (x, i) { return ({
|
|
152
|
+
x: isString ? (isXDate ? new Date(x) : isXNumber ? parseFloat(x) : x) : x,
|
|
153
|
+
y: series.y[i],
|
|
154
|
+
}); }),
|
|
155
|
+
color: lineColor,
|
|
156
|
+
};
|
|
157
|
+
});
|
|
158
|
+
var chartProps = {
|
|
159
|
+
chartTitle: layout.title || '',
|
|
160
|
+
lineChartData: chartData,
|
|
161
|
+
};
|
|
162
|
+
if (isAreaChart) {
|
|
163
|
+
return {
|
|
164
|
+
data: chartProps,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
return {
|
|
169
|
+
data: chartProps,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
exports.transformPlotlyJsonToScatterChartProps = transformPlotlyJsonToScatterChartProps;
|
|
174
|
+
var transformPlotlyJsonToHorizontalBarWithAxisProps = function (jsonObj, colorMap) {
|
|
175
|
+
var _a, _b;
|
|
176
|
+
var data = jsonObj.data, layout = jsonObj.layout;
|
|
177
|
+
var chartData = data
|
|
178
|
+
.map(function (series, index) {
|
|
179
|
+
return series.y.map(function (yValue, i) {
|
|
180
|
+
var color = (0, exports.getColor)(yValue, colorMap);
|
|
181
|
+
return {
|
|
182
|
+
x: series.x[i],
|
|
183
|
+
y: yValue,
|
|
184
|
+
legend: yValue,
|
|
185
|
+
color: color,
|
|
186
|
+
};
|
|
187
|
+
});
|
|
188
|
+
})
|
|
189
|
+
.flat();
|
|
190
|
+
var chartHeight = layout.height || 350;
|
|
191
|
+
var margin = ((_a = layout.margin) === null || _a === void 0 ? void 0 : _a.l) || 0;
|
|
192
|
+
var padding = ((_b = layout.margin) === null || _b === void 0 ? void 0 : _b.pad) || 0;
|
|
193
|
+
var availableHeight = chartHeight - margin - padding;
|
|
194
|
+
var numberOfBars = data[0].y.length;
|
|
195
|
+
var gapFactor = 0.5;
|
|
196
|
+
var barHeight = availableHeight / (numberOfBars * (1 + gapFactor));
|
|
197
|
+
return {
|
|
198
|
+
data: chartData,
|
|
199
|
+
chartTitle: layout.title || '',
|
|
200
|
+
barHeight: barHeight,
|
|
201
|
+
showYAxisLables: true,
|
|
202
|
+
styles: {
|
|
203
|
+
root: {
|
|
204
|
+
height: chartHeight,
|
|
205
|
+
width: layout.width || 600,
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
exports.transformPlotlyJsonToHorizontalBarWithAxisProps = transformPlotlyJsonToHorizontalBarWithAxisProps;
|
|
211
|
+
// FIXME: Order of string axis ticks does not match the order in plotly json
|
|
212
|
+
// TODO: Add support for custom hover card
|
|
213
|
+
var transformPlotlyJsonToHeatmapProps = function (jsonObj) {
|
|
214
|
+
var _a, _b, _c;
|
|
215
|
+
var data = jsonObj.data, layout = jsonObj.layout;
|
|
216
|
+
var firstData = data[0];
|
|
217
|
+
var heatmapDataPoints = [];
|
|
218
|
+
var zMin = Number.POSITIVE_INFINITY;
|
|
219
|
+
var zMax = Number.NEGATIVE_INFINITY;
|
|
220
|
+
(_a = firstData.x) === null || _a === void 0 ? void 0 : _a.forEach(function (xVal, xIdx) {
|
|
221
|
+
var _a;
|
|
222
|
+
(_a = firstData.y) === null || _a === void 0 ? void 0 : _a.forEach(function (yVal, yIdx) {
|
|
223
|
+
var _a, _b, _c, _d;
|
|
224
|
+
var zVal = (_b = (_a = firstData.z) === null || _a === void 0 ? void 0 : _a[yIdx]) === null || _b === void 0 ? void 0 : _b[xIdx];
|
|
225
|
+
heatmapDataPoints.push({
|
|
226
|
+
x: ((_c = layout.xaxis) === null || _c === void 0 ? void 0 : _c.type) === 'date' ? new Date(xVal) : xVal,
|
|
227
|
+
y: ((_d = layout.yaxis) === null || _d === void 0 ? void 0 : _d.type) === 'date' ? new Date(yVal) : yVal,
|
|
228
|
+
value: zVal,
|
|
229
|
+
});
|
|
230
|
+
zMin = Math.min(zMin, zVal);
|
|
231
|
+
zMax = Math.max(zMax, zVal);
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
var heatmapData = {
|
|
235
|
+
legend: firstData.name || '',
|
|
236
|
+
data: heatmapDataPoints,
|
|
237
|
+
value: 0,
|
|
238
|
+
};
|
|
239
|
+
// Convert normalized values to actual values
|
|
240
|
+
var domainValuesForColorScale = (_b = firstData.colorscale) === null || _b === void 0 ? void 0 : _b.map(function (arr) { return arr[0] * (zMax - zMin) + zMin; });
|
|
241
|
+
var rangeValuesForColorScale = (_c = firstData.colorscale) === null || _c === void 0 ? void 0 : _c.map(function (arr) { return arr[1]; });
|
|
242
|
+
return {
|
|
243
|
+
data: [heatmapData],
|
|
244
|
+
domainValuesForColorScale: domainValuesForColorScale,
|
|
245
|
+
rangeValuesForColorScale: rangeValuesForColorScale,
|
|
246
|
+
hideLegend: true,
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
exports.transformPlotlyJsonToHeatmapProps = transformPlotlyJsonToHeatmapProps;
|
|
250
|
+
var transformPlotlyJsonToSankeyProps = function (jsonObj, colorMap) {
|
|
251
|
+
var _a;
|
|
252
|
+
var data = jsonObj.data, layout = jsonObj.layout;
|
|
253
|
+
var _b = data[0], link = _b.link, node = _b.node;
|
|
254
|
+
var validLinks = link.value
|
|
255
|
+
.map(function (val, index) { return ({
|
|
256
|
+
value: val,
|
|
257
|
+
source: link.source[index],
|
|
258
|
+
target: link.target[index],
|
|
259
|
+
}); })
|
|
260
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
261
|
+
//@ts-expect-error Dynamic link object. Ignore for now.
|
|
262
|
+
.filter(function (x) { return x.source !== x.target; }); // Filter out self-references (circular links)
|
|
263
|
+
var sankeyChartData = {
|
|
264
|
+
nodes: node.label.map(function (label, index) {
|
|
265
|
+
var color = (0, exports.getColor)(label, colorMap);
|
|
266
|
+
return {
|
|
267
|
+
nodeId: index,
|
|
268
|
+
name: label,
|
|
269
|
+
color: color,
|
|
270
|
+
};
|
|
271
|
+
}),
|
|
272
|
+
links: validLinks.map(function (validLink, index) {
|
|
273
|
+
return tslib_1.__assign({}, validLink);
|
|
274
|
+
}),
|
|
275
|
+
};
|
|
276
|
+
var width = (layout === null || layout === void 0 ? void 0 : layout.width) || 440;
|
|
277
|
+
var height = (layout === null || layout === void 0 ? void 0 : layout.height) || 220;
|
|
278
|
+
var styles = {
|
|
279
|
+
root: {
|
|
280
|
+
fontSize: (_a = layout.font) === null || _a === void 0 ? void 0 : _a.size,
|
|
281
|
+
},
|
|
282
|
+
};
|
|
283
|
+
var shouldResize = width + height;
|
|
284
|
+
return {
|
|
285
|
+
data: {
|
|
286
|
+
chartTitle: layout === null || layout === void 0 ? void 0 : layout.title,
|
|
287
|
+
SankeyChartData: sankeyChartData,
|
|
288
|
+
},
|
|
289
|
+
width: width,
|
|
290
|
+
height: height,
|
|
291
|
+
styles: styles,
|
|
292
|
+
shouldResize: shouldResize,
|
|
293
|
+
enableReflow: true,
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
exports.transformPlotlyJsonToSankeyProps = transformPlotlyJsonToSankeyProps;
|
|
297
|
+
var transformPlotlyJsonToGaugeProps = function (jsonObj, colorMap) {
|
|
298
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
299
|
+
var data = jsonObj.data, layout = jsonObj.layout;
|
|
300
|
+
var firstData = data[0];
|
|
301
|
+
var segments = (_b = (_a = firstData.gauge) === null || _a === void 0 ? void 0 : _a.steps) === null || _b === void 0 ? void 0 : _b.map(function (step, index) {
|
|
302
|
+
var _a, _b;
|
|
303
|
+
var legend = step.name || "Segment ".concat(index + 1);
|
|
304
|
+
var color = (0, exports.getColor)(legend, colorMap);
|
|
305
|
+
return {
|
|
306
|
+
legend: legend,
|
|
307
|
+
size: ((_a = step.range) === null || _a === void 0 ? void 0 : _a[1]) - ((_b = step.range) === null || _b === void 0 ? void 0 : _b[0]),
|
|
308
|
+
color: color,
|
|
309
|
+
};
|
|
310
|
+
});
|
|
311
|
+
var sublabel;
|
|
312
|
+
var sublabelColor;
|
|
313
|
+
if (typeof ((_c = firstData.delta) === null || _c === void 0 ? void 0 : _c.reference) === 'number') {
|
|
314
|
+
var diff = firstData.value - firstData.delta.reference;
|
|
315
|
+
if (diff >= 0) {
|
|
316
|
+
sublabel = "\u25B2 ".concat(diff);
|
|
317
|
+
var color = (0, exports.getColor)(((_d = firstData.delta.increasing) === null || _d === void 0 ? void 0 : _d.color) || '', colorMap);
|
|
318
|
+
sublabelColor = color;
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
sublabel = "\u25BC ".concat(Math.abs(diff));
|
|
322
|
+
var color = (0, exports.getColor)(((_e = firstData.delta.decreasing) === null || _e === void 0 ? void 0 : _e.color) || '', colorMap);
|
|
323
|
+
sublabelColor = color;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
var styles = {
|
|
327
|
+
sublabel: {
|
|
328
|
+
fill: sublabelColor,
|
|
329
|
+
},
|
|
330
|
+
};
|
|
331
|
+
return {
|
|
332
|
+
segments: segments,
|
|
333
|
+
chartValue: firstData.value,
|
|
334
|
+
chartTitle: (_f = firstData.title) === null || _f === void 0 ? void 0 : _f.text,
|
|
335
|
+
sublabel: sublabel,
|
|
336
|
+
// range values can be null
|
|
337
|
+
minValue: (_k = (_j = (_h = (_g = firstData.gauge) === null || _g === void 0 ? void 0 : _g.axis) === null || _h === void 0 ? void 0 : _h.range) === null || _j === void 0 ? void 0 : _j[0]) !== null && _k !== void 0 ? _k : undefined,
|
|
338
|
+
maxValue: (_p = (_o = (_m = (_l = firstData.gauge) === null || _l === void 0 ? void 0 : _l.axis) === null || _m === void 0 ? void 0 : _m.range) === null || _o === void 0 ? void 0 : _o[1]) !== null && _p !== void 0 ? _p : undefined,
|
|
339
|
+
chartValueFormat: function () { return firstData.value; },
|
|
340
|
+
width: layout === null || layout === void 0 ? void 0 : layout.width,
|
|
341
|
+
height: layout === null || layout === void 0 ? void 0 : layout.height,
|
|
342
|
+
hideLegend: true,
|
|
343
|
+
styles: styles,
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
exports.transformPlotlyJsonToGaugeProps = transformPlotlyJsonToGaugeProps;
|
|
347
|
+
function isTypedArray(a) {
|
|
348
|
+
return ArrayBuffer.isView(a) && !(a instanceof DataView);
|
|
349
|
+
}
|
|
350
|
+
function isArrayOrTypedArray(a) {
|
|
351
|
+
return Array.isArray(a) || isTypedArray(a);
|
|
352
|
+
}
|
|
353
|
+
function isPlainObject(obj) {
|
|
354
|
+
if (window && window.process && window.process.versions) {
|
|
355
|
+
return Object.prototype.toString.call(obj) === '[object Object]';
|
|
356
|
+
}
|
|
357
|
+
return (Object.prototype.toString.call(obj) === '[object Object]' &&
|
|
358
|
+
Object.getPrototypeOf(obj).hasOwnProperty('hasOwnProperty'));
|
|
359
|
+
}
|
|
360
|
+
var arrayAttributes = [];
|
|
361
|
+
var stack = [];
|
|
362
|
+
var isArrayStack = [];
|
|
363
|
+
var baseContainer, baseAttrName;
|
|
364
|
+
/**
|
|
365
|
+
* Interate iteratively through the trace object and find all the array attributes.
|
|
366
|
+
* 1 trace record = 1 series of data
|
|
367
|
+
* @param trace
|
|
368
|
+
*/
|
|
369
|
+
function findArrayAttributes(trace) {
|
|
370
|
+
// Init basecontainer and baseAttrName
|
|
371
|
+
crawlIntoTrace(baseContainer, 0, '');
|
|
372
|
+
for (var _i = 0, arrayAttributes_1 = arrayAttributes; _i < arrayAttributes_1.length; _i++) {
|
|
373
|
+
var attribute = arrayAttributes_1[_i];
|
|
374
|
+
console.log(attribute);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
exports.findArrayAttributes = findArrayAttributes;
|
|
378
|
+
function crawlIntoTrace(container, i, astrPartial) {
|
|
379
|
+
var item = container[stack[i]];
|
|
380
|
+
var newAstrPartial = astrPartial + stack[i];
|
|
381
|
+
if (i === stack.length - 1) {
|
|
382
|
+
if (isArrayOrTypedArray(item)) {
|
|
383
|
+
arrayAttributes.push(baseAttrName + newAstrPartial);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
if (isArrayStack[i]) {
|
|
388
|
+
if (Array.isArray(item)) {
|
|
389
|
+
for (var j = 0; j < item.length; j++) {
|
|
390
|
+
if (isPlainObject(item[j])) {
|
|
391
|
+
crawlIntoTrace(item[j], i + 1, newAstrPartial + '[' + j + '].');
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
else if (isPlainObject(item)) {
|
|
397
|
+
crawlIntoTrace(item, i + 1, newAstrPartial + '.');
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
//# sourceMappingURL=PlotlySchemaAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlotlySchemaAdapter.js","sourceRoot":"../src/","sources":["components/DeclarativeChart/PlotlySchemaAdapter.ts"],"names":[],"mappings":";;;;IA2BA,IAAM,MAA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CAAC,EAAE,EAAE;wBACpC,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;4BAC1B,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,cAAc,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;yBACjE;qBACF;iBACF;aACF;iBAAM,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE;gBAC9B,cAAc,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,cAAc,GAAG,GAAG,CAAC,CAAC;aACnD;SACF;IACH,CAAC","sourcesContent":["/* eslint-disable one-var */\n/* eslint-disable vars-on-top */\n/* eslint-disable no-var */\n/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as React from 'react';\nimport { IDonutChartProps } from '../DonutChart/index';\nimport {\n IChartDataPoint,\n IChartProps,\n IHorizontalBarChartWithAxisDataPoint,\n ILineChartPoints,\n IVerticalStackedChartProps,\n IHeatMapChartData,\n IHeatMapChartDataPoint,\n IGroupedVerticalBarChartData,\n} from '../../types/IDataPoint';\nimport { ISankeyChartProps } from '../SankeyChart/index';\nimport { IVerticalStackedBarChartProps } from '../VerticalStackedBarChart/index';\nimport { IHorizontalBarChartWithAxisProps } from '../HorizontalBarChartWithAxis/index';\nimport { ILineChartProps } from '../LineChart/index';\nimport { IAreaChartProps } from '../AreaChart/index';\nimport { IHeatMapChartProps } from '../HeatMapChart/index';\nimport { getNextColor } from '../../utilities/colors';\nimport { IGaugeChartProps, IGaugeChartSegment } from '../GaugeChart/index';\nimport { IGroupedVerticalBarChartProps } from '../GroupedVerticalBarChart/index';\n\nconst isDate = (value: any): boolean => !isNaN(Date.parse(value));\nconst isNumber = (value: any): boolean => !isNaN(parseFloat(value)) && isFinite(value);\nexport const isDateArray = (array: any[]): boolean => isArrayOrTypedArray(array) && array.every(isDate);\nexport const isNumberArray = (array: any[]): boolean => isArrayOrTypedArray(array) && array.every(isNumber);\n\nexport const getColor = (legendLabel: string, colorMap: React.MutableRefObject<Map<string, string>>): string => {\n if (!colorMap.current.has(legendLabel)) {\n const nextColor = getNextColor(colorMap.current.size + 1);\n colorMap.current.set(legendLabel, nextColor);\n return nextColor;\n }\n\n return colorMap.current.get(legendLabel) as string;\n};\n\nexport const transformPlotlyJsonToDonutProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n): IDonutChartProps => {\n const { data, layout } = jsonObj;\n const firstData = data[0];\n\n const donutData = firstData.labels?.map((label: string, index: number): IChartDataPoint => {\n const color = getColor(label, colorMap);\n return {\n legend: label,\n data: firstData.values?.[index],\n color,\n };\n });\n\n // TODO: innerRadius as a fraction needs to be supported internally. The pixel value depends on\n // chart dimensions, arc label dimensions and the legend container height, all of which are subject to change.\n const width: number = layout?.width || 440;\n const height: number = layout?.height || 220;\n const hideLabels = firstData.textinfo ? !['value', 'percent'].includes(firstData.textinfo) : false;\n const donutMarginHorizontal = hideLabels ? 0 : 80;\n const donutMarginVertical = 40 + (hideLabels ? 0 : 40);\n const innerRadius: number = firstData.hole\n ? firstData.hole * (Math.min(width - donutMarginHorizontal, height - donutMarginVertical) / 2)\n : 0;\n\n const styles: IDonutChartProps['styles'] = {\n root: {\n '[class^=\"arcLabel\"]': {\n fontSize: firstData.textfont?.size,\n },\n },\n };\n\n return {\n data: {\n chartTitle: layout?.title,\n chartData: donutData,\n },\n hideLegend: layout?.showlegend === false ? true : false,\n width,\n height,\n innerRadius,\n hideLabels,\n showLabelsInPercent: firstData.textinfo ? firstData.textinfo === 'percent' : true,\n styles,\n // TODO: Render custom hover card based on textinfo\n // onRenderCalloutPerDataPoint: undefined,\n };\n};\n\nexport const transformPlotlyJsonToVSBCProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n): IVerticalStackedBarChartProps => {\n const { data, layout } = jsonObj;\n const mapXToDataPoints: { [key: string]: IVerticalStackedChartProps } = {};\n let yMaxValue = 0;\n\n data.forEach((series: any, index1: number) => {\n series.x?.forEach((x: string | number, index2: number) => {\n if (!mapXToDataPoints[x]) {\n mapXToDataPoints[x] = { xAxisPoint: x, chartData: [], lineData: [] };\n }\n const legend: string = series.name || `Series ${index1 + 1}`;\n if (series.type === 'bar') {\n const color = getColor(legend, colorMap);\n mapXToDataPoints[x].chartData.push({\n legend,\n data: series.y?.[index2],\n color,\n });\n } else if (series.type === 'line') {\n const color = getColor(legend, colorMap);\n mapXToDataPoints[x].lineData!.push({\n legend,\n y: series.y?.[index2],\n color,\n });\n }\n\n yMaxValue = Math.max(yMaxValue, series.y?.[index2]);\n });\n });\n\n return {\n data: Object.values(mapXToDataPoints),\n chartTitle: layout?.title,\n // width: layout?.width,\n // height: layout?.height,\n barWidth: 'auto',\n yMaxValue,\n };\n};\n\n// TODO: Add support for continuous x-axis in grouped vertical bar chart\nexport const transformPlotlyJsonToGVBCProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n): IGroupedVerticalBarChartProps => {\n const { data, layout } = jsonObj;\n const mapXToDataPoints: Record<string, IGroupedVerticalBarChartData> = {};\n\n data.forEach((series: any, index1: number) => {\n series.x?.forEach((x: string | number, index2: number) => {\n if (!mapXToDataPoints[x]) {\n mapXToDataPoints[x] = { name: x.toString(), series: [] };\n }\n if (series.type === 'bar') {\n const legend: string = series.name || `Series ${index1 + 1}`;\n const color = getColor(legend, colorMap);\n\n mapXToDataPoints[x].series.push({\n key: legend,\n data: series.y?.[index2],\n color,\n legend,\n });\n }\n });\n });\n\n return {\n data: Object.values(mapXToDataPoints),\n chartTitle: layout?.title,\n // width: layout?.width,\n // height: layout?.height,\n barwidth: 'auto',\n };\n};\n\nexport const transformPlotlyJsonToScatterChartProps = (\n jsonObj: any,\n isAreaChart: boolean,\n colorMap: React.MutableRefObject<Map<string, string>>,\n): ILineChartProps | IAreaChartProps => {\n const { data, layout } = jsonObj;\n\n const chartData: ILineChartPoints[] = data.map((series: any, index: number) => {\n const xValues = series.x;\n const isString = typeof xValues[0] === 'string';\n const isXDate = isDateArray(xValues);\n const isXNumber = isNumberArray(xValues);\n const legend = series.name || `Series ${index + 1}`;\n const lineColor = getColor(legend, colorMap);\n\n return {\n legend,\n data: xValues.map((x: string | number, i: number) => ({\n x: isString ? (isXDate ? new Date(x) : isXNumber ? parseFloat(x as string) : x) : x,\n y: series.y[i],\n })),\n color: lineColor,\n };\n });\n\n const chartProps: IChartProps = {\n chartTitle: layout.title || '',\n lineChartData: chartData,\n };\n\n if (isAreaChart) {\n return {\n data: chartProps,\n } as IAreaChartProps;\n } else {\n return {\n data: chartProps,\n } as ILineChartProps;\n }\n};\n\nexport const transformPlotlyJsonToHorizontalBarWithAxisProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n): IHorizontalBarChartWithAxisProps => {\n const { data, layout } = jsonObj;\n\n const chartData: IHorizontalBarChartWithAxisDataPoint[] = data\n .map((series: any, index: number) => {\n return series.y.map((yValue: string, i: number) => {\n const color = getColor(yValue, colorMap);\n return {\n x: series.x[i],\n y: yValue,\n legend: yValue,\n color,\n };\n });\n })\n .flat();\n\n const chartHeight = layout.height || 350;\n const margin = layout.margin?.l || 0;\n const padding = layout.margin?.pad || 0;\n const availableHeight = chartHeight - margin - padding;\n const numberOfBars = data[0].y.length;\n const gapFactor = 0.5;\n const barHeight = availableHeight / (numberOfBars * (1 + gapFactor));\n\n return {\n data: chartData,\n chartTitle: layout.title || '',\n barHeight,\n showYAxisLables: true,\n styles: {\n root: {\n height: chartHeight,\n width: layout.width || 600,\n },\n },\n };\n};\n\n// FIXME: Order of string axis ticks does not match the order in plotly json\n// TODO: Add support for custom hover card\nexport const transformPlotlyJsonToHeatmapProps = (jsonObj: any): IHeatMapChartProps => {\n const { data, layout } = jsonObj;\n const firstData = data[0];\n const heatmapDataPoints: IHeatMapChartDataPoint[] = [];\n let zMin = Number.POSITIVE_INFINITY;\n let zMax = Number.NEGATIVE_INFINITY;\n\n firstData.x?.forEach((xVal: any, xIdx: number) => {\n firstData.y?.forEach((yVal: any, yIdx: number) => {\n const zVal = firstData.z?.[yIdx]?.[xIdx];\n\n heatmapDataPoints.push({\n x: layout.xaxis?.type === 'date' ? new Date(xVal) : xVal,\n y: layout.yaxis?.type === 'date' ? new Date(yVal) : yVal,\n value: zVal,\n });\n\n zMin = Math.min(zMin, zVal);\n zMax = Math.max(zMax, zVal);\n });\n });\n const heatmapData: IHeatMapChartData = {\n legend: firstData.name || '',\n data: heatmapDataPoints,\n value: 0,\n };\n\n // Convert normalized values to actual values\n const domainValuesForColorScale: number[] = firstData.colorscale?.map((arr: any) => arr[0] * (zMax - zMin) + zMin);\n const rangeValuesForColorScale: string[] = firstData.colorscale?.map((arr: any) => arr[1]);\n\n return {\n data: [heatmapData],\n domainValuesForColorScale,\n rangeValuesForColorScale,\n hideLegend: true,\n };\n};\n\nexport const transformPlotlyJsonToSankeyProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n): ISankeyChartProps => {\n const { data, layout } = jsonObj;\n const { link, node } = data[0];\n const validLinks = link.value\n .map((val: number, index: number) => ({\n value: val,\n source: link.source[index],\n target: link.target[index],\n }))\n // eslint-disable-next-line @typescript-eslint/no-shadow\n //@ts-expect-error Dynamic link object. Ignore for now.\n .filter(x => x.source !== x.target); // Filter out self-references (circular links)\n\n const sankeyChartData = {\n nodes: node.label.map((label: string, index: number) => {\n const color = getColor(label, colorMap);\n\n return {\n nodeId: index,\n name: label,\n color,\n };\n }),\n links: validLinks.map((validLink: any, index: number) => {\n return {\n ...validLink,\n };\n }),\n };\n\n const width: number = layout?.width || 440;\n const height: number = layout?.height || 220;\n const styles: ISankeyChartProps['styles'] = {\n root: {\n fontSize: layout.font?.size,\n },\n };\n const shouldResize: number = width + height;\n return {\n data: {\n chartTitle: layout?.title,\n SankeyChartData: sankeyChartData,\n },\n width,\n height,\n styles,\n shouldResize,\n enableReflow: true,\n };\n};\n\nexport const transformPlotlyJsonToGaugeProps = (\n jsonObj: any,\n colorMap: React.MutableRefObject<Map<string, string>>,\n): IGaugeChartProps => {\n const { data, layout } = jsonObj;\n const firstData = data[0];\n\n const segments = firstData.gauge?.steps?.map((step: any, index: number): IGaugeChartSegment => {\n const legend = step.name || `Segment ${index + 1}`;\n const color = getColor(legend, colorMap);\n return {\n legend,\n size: step.range?.[1] - step.range?.[0],\n color,\n };\n });\n\n let sublabel: string | undefined;\n let sublabelColor: string | undefined;\n if (typeof firstData.delta?.reference === 'number') {\n const diff = firstData.value - firstData.delta.reference;\n if (diff >= 0) {\n sublabel = `\\u25B2 ${diff}`;\n const color = getColor(firstData.delta.increasing?.color || '', colorMap);\n sublabelColor = color;\n } else {\n sublabel = `\\u25BC ${Math.abs(diff)}`;\n const color = getColor(firstData.delta.decreasing?.color || '', colorMap);\n sublabelColor = color;\n }\n }\n\n const styles: IGaugeChartProps['styles'] = {\n sublabel: {\n fill: sublabelColor,\n },\n };\n\n return {\n segments,\n chartValue: firstData.value,\n chartTitle: firstData.title?.text,\n sublabel,\n // range values can be null\n minValue: firstData.gauge?.axis?.range?.[0] ?? undefined,\n maxValue: firstData.gauge?.axis?.range?.[1] ?? undefined,\n chartValueFormat: () => firstData.value,\n width: layout?.width,\n height: layout?.height,\n hideLegend: true,\n styles,\n };\n};\n\nfunction isTypedArray(a: any) {\n return ArrayBuffer.isView(a) && !(a instanceof DataView);\n}\n\nfunction isArrayOrTypedArray(a: any) {\n return Array.isArray(a) || isTypedArray(a);\n}\n\nfunction isPlainObject(obj: any) {\n if (window && window.process && window.process.versions) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n }\n\n return (\n Object.prototype.toString.call(obj) === '[object Object]' &&\n Object.getPrototypeOf(obj).hasOwnProperty('hasOwnProperty')\n );\n}\n\nvar arrayAttributes: any[] = [];\nvar stack: any[] = [];\nvar isArrayStack: any[] = [];\nvar baseContainer: any, baseAttrName: any;\n/**\n * Interate iteratively through the trace object and find all the array attributes.\n * 1 trace record = 1 series of data\n * @param trace\n */\nexport function findArrayAttributes(trace: any) {\n // Init basecontainer and baseAttrName\n crawlIntoTrace(baseContainer, 0, '');\n for (const attribute of arrayAttributes) {\n console.log(attribute);\n }\n}\n\nfunction crawlIntoTrace(container: any, i: number, astrPartial: any) {\n var item = container[stack[i]];\n var newAstrPartial = astrPartial + stack[i];\n if (i === stack.length - 1) {\n if (isArrayOrTypedArray(item)) {\n arrayAttributes.push(baseAttrName + newAstrPartial);\n }\n } else {\n if (isArrayStack[i]) {\n if (Array.isArray(item)) {\n for (var j = 0; j < item.length; j++) {\n if (isPlainObject(item[j])) {\n crawlIntoTrace(item[j], i + 1, newAstrPartial + '[' + j + '].');\n }\n }\n }\n } else if (isPlainObject(item)) {\n crawlIntoTrace(item, i + 1, newAstrPartial + '.');\n }\n }\n}\n"]}
|
|
@@ -19,8 +19,8 @@ define(["require", "exports", "tslib", "react", "../../utilities/utilities"], fu
|
|
|
19
19
|
if (Object.keys(pointPath).indexOf(shape) === -1) {
|
|
20
20
|
return React.createElement("div", { className: classNameForNonSvg });
|
|
21
21
|
}
|
|
22
|
-
return (React.createElement("svg", tslib_1.__assign({ width: 14, height: 14, viewBox: '-1 -1 14 14' }, svgProps, { transform: "rotate(".concat(shape === utilities_1.Points[utilities_1.Points.diamond] ? 45 : shape === utilities_1.Points[utilities_1.Points.pyramid] ? 180 : 0, ", 0, 0)") }),
|
|
23
|
-
React.createElement("path", tslib_1.__assign({ d: pointPath[shape] }, pathProps))));
|
|
22
|
+
return (React.createElement("svg", tslib_1.__assign({ width: 14, height: 14, viewBox: '-1 -1 14 14' }, (0, utilities_1.getSecureProps)(svgProps), { transform: "rotate(".concat(shape === utilities_1.Points[utilities_1.Points.diamond] ? 45 : shape === utilities_1.Points[utilities_1.Points.pyramid] ? 180 : 0, ", 0, 0)") }),
|
|
23
|
+
React.createElement("path", tslib_1.__assign({ d: pointPath[shape] }, (0, utilities_1.getSecureProps)(pathProps)))));
|
|
24
24
|
};
|
|
25
25
|
exports.Shape = Shape;
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AS,EAAE,iBAAU,KAAK,KAAK,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAS;YAEhH,+CAAM,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,IAAM,IAAA,0BAAc,EAAC,SAAS,CAAC,EAAI,CACxD,CACP,CAAC;IACJ,CAAC,CAAC;IAfW,QAAA,KAAK,SAehB","sourcesContent":["import * as React from 'react';\nimport { LegendShape } from './Legends.types';\nimport { CustomPoints, getSecureProps, Points } from '../../utilities/utilities';\n\nexport interface IShapeProps {\n svgProps: React.SVGAttributes<SVGElement>;\n pathProps: React.SVGAttributes<SVGPathElement>;\n shape: LegendShape;\n classNameForNonSvg?: string;\n}\n\ntype PointPathType = {\n [key: string]: string;\n};\n\nconst pointPath: PointPathType = {\n [`${Points[Points.circle]}`]: 'M1 6 A5 5 0 1 0 12 6 M1 6 A5 5 0 0 1 12 6',\n [`${Points[Points.square]}`]: 'M1 1 L12 1 L12 12 L1 12 L1 1 Z',\n [`${Points[Points.triangle]}`]: 'M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z',\n [`${Points[Points.pyramid]}`]: 'M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z',\n [`${Points[Points.diamond]}`]: 'M2 2 L10 2 L10 10 L2 10 L2 2 Z',\n [`${Points[Points.hexagon]}`]: 'M9 0H3L0 5L3 10H9L12 5L9 0Z',\n [`${Points[Points.pentagon]}`]: 'M6.06061 0L0 4.21277L2.30303 11H9.69697L12 4.21277L6.06061 0Z',\n [`${Points[Points.octagon]}`]:\n 'M7.08333 0H2.91667L0 2.91667V7.08333L2.91667 10H7.08333L10 7.08333V2.91667L7.08333 0Z',\n [`${CustomPoints[CustomPoints.dottedLine]}`]: 'M0 6 H3 M5 6 H8 M10 6 H13',\n};\n\nexport const Shape: React.FC<IShapeProps> = ({ svgProps, pathProps, shape, classNameForNonSvg }) => {\n if (Object.keys(pointPath).indexOf(shape) === -1) {\n return <div className={classNameForNonSvg} />;\n }\n return (\n <svg\n width={14}\n height={14}\n viewBox={'-1 -1 14 14'}\n {...getSecureProps(svgProps)}\n transform={`rotate(${shape === Points[Points.diamond] ? 45 : shape === Points[Points.pyramid] ? 180 : 0}, 0, 0)`}\n >\n <path d={pointPath[shape]} {...getSecureProps(pathProps)} />\n </svg>\n );\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "react", "d3-selection"], function (require, exports, tslib_1, React, d3_selection_1) {
|
|
1
|
+
define(["require", "exports", "tslib", "react", "d3-selection", "../../../utilities/utilities"], function (require, exports, tslib_1, React, d3_selection_1, utilities_1) {
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Textbox = void 0;
|
|
@@ -33,7 +33,7 @@ define(["require", "exports", "tslib", "react", "d3-selection"], function (requi
|
|
|
33
33
|
};
|
|
34
34
|
React.useEffect(wrapWords);
|
|
35
35
|
var lineHeight = props.lineHeight, rest = tslib_1.__rest(props, ["lineHeight"]);
|
|
36
|
-
return React.createElement("text", tslib_1.__assign({ ref: textElementRef }, rest));
|
|
36
|
+
return React.createElement("text", tslib_1.__assign({ ref: textElementRef }, (0, utilities_1.getSecureProps)(rest)));
|
|
37
37
|
};
|
|
38
38
|
exports.Textbox = Textbox;
|
|
39
39
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textbox.js","sourceRoot":"../src/","sources":["components/LineChart/eventAnnotation/Textbox.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"Textbox.js","sourceRoot":"../src/","sources":["components/LineChart/eventAnnotation/Textbox.tsx"],"names":[],"mappings":";;;;IAeO,IAAM,OAAO,GAA2C,UAAA,KAAK;QAClE,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AC,IAAI,CAAC,IAAI,EAAE,CAAC,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;YAE9C,OAAO;gBACL,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;YACnC,CAAC,CAAC;QACJ,CAAC,CAAC;QACF,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAEnB,IAAA,UAAU,GAAc,KAAK,WAAnB,EAAK,IAAI,kBAAK,KAAK,EAA/B,cAAuB,CAAF,CAAW;QAEtC,OAAO,+CAAM,GAAG,EAAE,cAAc,IAAM,IAAA,0BAAc,EAAC,IAAI,CAAC,EAAI,CAAC;IACjE,CAAC,CAAC;IArCW,QAAA,OAAO,WAqClB","sourcesContent":["import * as React from 'react';\nimport { select } from 'd3-selection';\nimport { getSecureProps } from '../../../utilities/utilities';\n\ninterface ITextboxProps {\n text: string;\n width: number;\n x: number;\n y: number;\n lineHeight: number;\n textAnchor?: 'start' | 'middle' | 'end';\n fontSize?: string;\n fill?: string;\n}\n\nexport const Textbox: React.FunctionComponent<ITextboxProps> = props => {\n const textElementRef: React.RefObject<SVGTextElement> = React.useRef(null);\n\n const wrapWords = () => {\n if (!textElementRef.current) {\n return;\n }\n const text = select(textElementRef.current);\n const words = props.text.split(/\\s+/);\n let line: string[] = [];\n let tspan = text.append<SVGTSpanElement>('tspan');\n let numLines = 0;\n\n words.forEach(word => {\n line.push(word);\n tspan.text(line.join(' '));\n const node = tspan.node();\n if (node && node.getComputedTextLength() > props.width && line.length > 1) {\n numLines++;\n line.pop();\n tspan.text(line.join(' '));\n line = [word];\n tspan = text.append<SVGTSpanElement>('tspan').text(word).attr('dy', props.lineHeight).attr('x', props.x);\n }\n });\n // bottom aligns text\n text.attr('dy', -numLines * props.lineHeight);\n\n return () => {\n text.selectAll('tspan').remove();\n };\n };\n React.useEffect(wrapWords);\n\n const { lineHeight, ...rest } = props;\n\n return <text ref={textElementRef} {...getSecureProps(rest)} />;\n};\n"]}
|
package/lib-amd/index.d.ts
CHANGED
|
@@ -37,4 +37,6 @@ export { DataVizPalette, getColorFromToken, getNextColor } from './utilities/col
|
|
|
37
37
|
export { DataVizGradientPalette, getGradientFromToken, getNextGradient } from './utilities/gradients';
|
|
38
38
|
export type { IGaugeChartProps, IGaugeChartSegment, IGaugeChartStyleProps, IGaugeChartStyles } from './GaugeChart';
|
|
39
39
|
export { GaugeChart, GaugeChartVariant, GaugeValueFormat } from './GaugeChart';
|
|
40
|
+
export type { DeclarativeChartProps, Schema } from './DeclarativeChart';
|
|
41
|
+
export { DeclarativeChart } from './DeclarativeChart';
|
|
40
42
|
import './version';
|
package/lib-amd/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
define(["require", "exports", "./HorizontalBarChart", "./DonutChart", "./Legends", "./LineChart", "./AreaChart", "./PieChart", "./StackedBarChart", "./VerticalBarChart", "./VerticalStackedBarChart", "./GroupedVerticalBarChart", "./CartesianChart", "./utilities/ChartHoverCard/index", "./HeatMapChart", "./SankeyChart", "./TreeChart", "./Sparkline", "./HorizontalBarChartWithAxis", "./utilities/colors", "./utilities/gradients", "./GaugeChart", "./version"], function (require, exports, HorizontalBarChart_1, DonutChart_1, Legends_1, LineChart_1, AreaChart_1, PieChart_1, StackedBarChart_1, VerticalBarChart_1, VerticalStackedBarChart_1, GroupedVerticalBarChart_1, CartesianChart_1, index_1, HeatMapChart_1, SankeyChart_1, TreeChart_1, Sparkline_1, HorizontalBarChartWithAxis_1, colors_1, gradients_1, GaugeChart_1) {
|
|
1
|
+
define(["require", "exports", "./HorizontalBarChart", "./DonutChart", "./Legends", "./LineChart", "./AreaChart", "./PieChart", "./StackedBarChart", "./VerticalBarChart", "./VerticalStackedBarChart", "./GroupedVerticalBarChart", "./CartesianChart", "./utilities/ChartHoverCard/index", "./HeatMapChart", "./SankeyChart", "./TreeChart", "./Sparkline", "./HorizontalBarChartWithAxis", "./utilities/colors", "./utilities/gradients", "./GaugeChart", "./DeclarativeChart", "./version"], function (require, exports, HorizontalBarChart_1, DonutChart_1, Legends_1, LineChart_1, AreaChart_1, PieChart_1, StackedBarChart_1, VerticalBarChart_1, VerticalStackedBarChart_1, GroupedVerticalBarChart_1, CartesianChart_1, index_1, HeatMapChart_1, SankeyChart_1, TreeChart_1, Sparkline_1, HorizontalBarChartWithAxis_1, colors_1, gradients_1, GaugeChart_1, DeclarativeChart_1) {
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.GaugeValueFormat = exports.GaugeChartVariant = exports.GaugeChart = exports.getNextGradient = exports.getGradientFromToken = exports.DataVizGradientPalette = exports.getNextColor = exports.getColorFromToken = exports.DataVizPalette = exports.HorizontalBarChartWithAxis = exports.Sparkline = exports.TreeTraverse = exports.TreeChart = exports.NodesComposition = exports.SankeyChart = exports.HeatMapChart = exports.getChartHoverCardStyles = exports.ChartHoverCard = exports.CartesianChart = exports.GroupedVerticalBarChart = exports.VerticalStackedBarChart = exports.VerticalBarChart = exports.StackedBarChart = exports.MultiStackedBarChartVariant = exports.MultiStackedBarChart = exports.PieChart = exports.AreaChart = exports.Textbox = exports.LineChart = exports.Shape = exports.Legends = exports.DonutChart = exports.HorizontalBarChartVariant = exports.HorizontalBarChart = void 0;
|
|
4
|
+
exports.DeclarativeChart = exports.GaugeValueFormat = exports.GaugeChartVariant = exports.GaugeChart = exports.getNextGradient = exports.getGradientFromToken = exports.DataVizGradientPalette = exports.getNextColor = exports.getColorFromToken = exports.DataVizPalette = exports.HorizontalBarChartWithAxis = exports.Sparkline = exports.TreeTraverse = exports.TreeChart = exports.NodesComposition = exports.SankeyChart = exports.HeatMapChart = exports.getChartHoverCardStyles = exports.ChartHoverCard = exports.CartesianChart = exports.GroupedVerticalBarChart = exports.VerticalStackedBarChart = exports.VerticalBarChart = exports.StackedBarChart = exports.MultiStackedBarChartVariant = exports.MultiStackedBarChart = exports.PieChart = exports.AreaChart = exports.Textbox = exports.LineChart = exports.Shape = exports.Legends = exports.DonutChart = exports.HorizontalBarChartVariant = exports.HorizontalBarChart = void 0;
|
|
5
5
|
Object.defineProperty(exports, "HorizontalBarChart", { enumerable: true, get: function () { return HorizontalBarChart_1.HorizontalBarChart; } });
|
|
6
6
|
Object.defineProperty(exports, "HorizontalBarChartVariant", { enumerable: true, get: function () { return HorizontalBarChart_1.HorizontalBarChartVariant; } });
|
|
7
7
|
Object.defineProperty(exports, "DonutChart", { enumerable: true, get: function () { return DonutChart_1.DonutChart; } });
|
|
@@ -36,5 +36,6 @@ define(["require", "exports", "./HorizontalBarChart", "./DonutChart", "./Legends
|
|
|
36
36
|
Object.defineProperty(exports, "GaugeChart", { enumerable: true, get: function () { return GaugeChart_1.GaugeChart; } });
|
|
37
37
|
Object.defineProperty(exports, "GaugeChartVariant", { enumerable: true, get: function () { return GaugeChart_1.GaugeChartVariant; } });
|
|
38
38
|
Object.defineProperty(exports, "GaugeValueFormat", { enumerable: true, get: function () { return GaugeChart_1.GaugeValueFormat; } });
|
|
39
|
+
Object.defineProperty(exports, "DeclarativeChart", { enumerable: true, get: function () { return DeclarativeChart_1.DeclarativeChart; } });
|
|
39
40
|
});
|
|
40
41
|
//# sourceMappingURL=index.js.map
|
package/lib-amd/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;;IAMS,wHAAA,kBAAkB,OAAA;IAAE,+HAAA,yBAAyB,OAAA;IAE7C,wGAAA,UAAU,OAAA;IAWV,kGAAA,OAAO,OAAA;IAAE,gGAAA,KAAK,OAAA;IASd,sGAAA,SAAS,OAAA;IAAE,oGAAA,OAAO,OAAA;IAElB,sGAAA,SAAS,OAAA;IAET,oGAAA,QAAQ,OAAA;IAUR,uHAAA,oBAAoB,OAAA;IAAE,8HAAA,2BAA2B,OAAA;IAAE,kHAAA,eAAe,OAAA;IAElE,oHAAA,gBAAgB,OAAA;IAMhB,kIAAA,uBAAuB,OAAA;IAMvB,kIAAA,uBAAuB,OAAA;IASvB,gHAAA,cAAc,OAAA;IAwCd,uGAAA,cAAc,OAAA;IAAE,gHAAA,uBAAuB,OAAA;IAEvC,4GAAA,YAAY,OAAA;IAQZ,0GAAA,WAAW,OAAA;IASX,6GAAA,gBAAgB,OAAA;IAAE,sGAAA,SAAS,OAAA;IAAE,yGAAA,YAAY,OAAA;IAEzC,sGAAA,SAAS,OAAA;IAMT,wIAAA,0BAA0B,OAAA;IAC1B,wGAAA,cAAc,OAAA;IAAE,2GAAA,iBAAiB,OAAA;IAAE,sGAAA,YAAY,OAAA;IAC/C,mHAAA,sBAAsB,OAAA;IAAE,iHAAA,oBAAoB,OAAA;IAAE,4GAAA,eAAe,OAAA;IAE7D,wGAAA,UAAU,OAAA;IAAE,+GAAA,iBAAiB,OAAA;IAAE,8GAAA,gBAAgB,OAAA","sourcesContent":["export type {\n ChartDataMode,\n IHorizontalBarChartProps,\n IHorizontalBarChartStyleProps,\n IHorizontalBarChartStyles,\n} from './HorizontalBarChart';\nexport { HorizontalBarChart, HorizontalBarChartVariant } from './HorizontalBarChart';\nexport type { IDonutChart, IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './DonutChart';\nexport { DonutChart } from './DonutChart';\nexport type {\n ILegend,\n ILegendOverflowData,\n ILegendStyleProps,\n ILegendSubComponentStyles,\n ILegendsProps,\n ILegendsStyles,\n IShapeProps,\n LegendShape,\n} from './Legends';\nexport { Legends, Shape } from './Legends';\nexport type {\n IColorFillBarData,\n IColorFillBarsProps,\n IEventsAnnotationProps,\n ILineChartProps,\n ILineChartStyleProps,\n ILineChartStyles,\n} from './LineChart';\nexport { LineChart, Textbox } from './LineChart';\nexport type { IAreaChartProps, IAreaChartStyleProps, IAreaChartStyles } from './AreaChart';\nexport { AreaChart } from './AreaChart';\nexport type { IPieChart, IPieChartProps, IPieChartStyleProps, IPieChartStyles } from './PieChart';\nexport { PieChart } from './PieChart';\nexport type {\n IMultiStackedBarChartProps,\n IMultiStackedBarChartStyleProps,\n IMultiStackedBarChartStyles,\n IStackedBarChart,\n IStackedBarChartProps,\n IStackedBarChartStyleProps,\n IStackedBarChartStyles,\n} from './StackedBarChart';\nexport { MultiStackedBarChart, MultiStackedBarChartVariant, StackedBarChart } from './StackedBarChart';\nexport type { IVerticalBarChartProps, IVerticalBarChartStyleProps, IVerticalBarChartStyles } from './VerticalBarChart';\nexport { VerticalBarChart } from './VerticalBarChart';\nexport type {\n IVerticalStackedBarChartProps,\n IVerticalStackedBarChartStyleProps,\n IVerticalStackedBarChartStyles,\n} from './VerticalStackedBarChart';\nexport { VerticalStackedBarChart } from './VerticalStackedBarChart';\nexport type {\n IGroupedVerticalBarChartProps,\n IGroupedVerticalBarChartStyleProps,\n IGroupedVerticalBarChartStyles,\n} from './GroupedVerticalBarChart';\nexport { GroupedVerticalBarChart } from './GroupedVerticalBarChart';\nexport type {\n ICartesianChartProps,\n ICartesianChartStyleProps,\n ICartesianChartStyles,\n IChildProps,\n IModifiedCartesianChartProps,\n IYValueHover,\n} from './CartesianChart';\nexport { CartesianChart } from './CartesianChart';\nexport type {\n IAccessibilityProps,\n IBasestate,\n IChartDataPoint,\n IChartProps,\n ICustomizedCalloutData,\n ICustomizedCalloutDataPoint,\n IDataPoint,\n IGVBarChartSeriesPoint,\n IGVDataPoint,\n IGVForBarChart,\n IGVSingleDataPoint,\n IGroupedVerticalBarChartData,\n IHeatMapChartData,\n IHeatMapChartDataPoint,\n IHorizontalBarChartWithAxisDataPoint,\n IHorizontalDataPoint,\n ILegendDataItem,\n ILineChartDataPoint,\n ILineChartGap,\n ILineChartLineOptions,\n ILineChartPoints,\n ILineDataInVerticalBarChart,\n ILineDataInVerticalStackedBarChart,\n IMargins,\n IRefArrayData,\n ISankeyChartData,\n IVSChartDataPoint,\n IVerticalBarChartDataPoint,\n IVerticalStackedBarDataPoint,\n IVerticalStackedChartProps,\n SLink,\n SNode,\n} from './types/index';\nexport type {\n IChartHoverCardProps,\n IChartHoverCardStyleProps,\n IChartHoverCardStyles,\n} from './utilities/ChartHoverCard/index';\nexport { ChartHoverCard, getChartHoverCardStyles } from './utilities/ChartHoverCard/index';\nexport type { IHeatMapChartProps, IHeatMapChartStyleProps, IHeatMapChartStyles } from './HeatMapChart';\nexport { HeatMapChart } from './HeatMapChart';\nexport type {\n ISankeyChartAccessibilityProps,\n ISankeyChartProps,\n ISankeyChartStrings,\n ISankeyChartStyleProps,\n ISankeyChartStyles,\n} from './SankeyChart';\nexport { SankeyChart } from './SankeyChart';\nexport type {\n ITreeChartDataPoint,\n ITreeDataStructure,\n ITreeProps,\n ITreeState,\n ITreeStyleProps,\n ITreeStyles,\n} from './TreeChart';\nexport { NodesComposition, TreeChart, TreeTraverse } from './TreeChart';\nexport type { ISparklineProps, ISparklineStyleProps, ISparklineStyles } from './Sparkline';\nexport { Sparkline } from './Sparkline';\nexport type {\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisStyleProps,\n IHorizontalBarChartWithAxisStyles,\n} from './HorizontalBarChartWithAxis';\nexport { HorizontalBarChartWithAxis } from './HorizontalBarChartWithAxis';\nexport { DataVizPalette, getColorFromToken, getNextColor } from './utilities/colors';\nexport { DataVizGradientPalette, getGradientFromToken, getNextGradient } from './utilities/gradients';\nexport type { IGaugeChartProps, IGaugeChartSegment, IGaugeChartStyleProps, IGaugeChartStyles } from './GaugeChart';\nexport { GaugeChart, GaugeChartVariant, GaugeValueFormat } from './GaugeChart';\n\nimport './version';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;;IAMS,wHAAA,kBAAkB,OAAA;IAAE,+HAAA,yBAAyB,OAAA;IAE7C,wGAAA,UAAU,OAAA;IAWV,kGAAA,OAAO,OAAA;IAAE,gGAAA,KAAK,OAAA;IASd,sGAAA,SAAS,OAAA;IAAE,oGAAA,OAAO,OAAA;IAElB,sGAAA,SAAS,OAAA;IAET,oGAAA,QAAQ,OAAA;IAUR,uHAAA,oBAAoB,OAAA;IAAE,8HAAA,2BAA2B,OAAA;IAAE,kHAAA,eAAe,OAAA;IAElE,oHAAA,gBAAgB,OAAA;IAMhB,kIAAA,uBAAuB,OAAA;IAMvB,kIAAA,uBAAuB,OAAA;IASvB,gHAAA,cAAc,OAAA;IAwCd,uGAAA,cAAc,OAAA;IAAE,gHAAA,uBAAuB,OAAA;IAEvC,4GAAA,YAAY,OAAA;IAQZ,0GAAA,WAAW,OAAA;IASX,6GAAA,gBAAgB,OAAA;IAAE,sGAAA,SAAS,OAAA;IAAE,yGAAA,YAAY,OAAA;IAEzC,sGAAA,SAAS,OAAA;IAMT,wIAAA,0BAA0B,OAAA;IAC1B,wGAAA,cAAc,OAAA;IAAE,2GAAA,iBAAiB,OAAA;IAAE,sGAAA,YAAY,OAAA;IAC/C,mHAAA,sBAAsB,OAAA;IAAE,iHAAA,oBAAoB,OAAA;IAAE,4GAAA,eAAe,OAAA;IAE7D,wGAAA,UAAU,OAAA;IAAE,+GAAA,iBAAiB,OAAA;IAAE,8GAAA,gBAAgB,OAAA;IAE/C,oHAAA,gBAAgB,OAAA","sourcesContent":["export type {\n ChartDataMode,\n IHorizontalBarChartProps,\n IHorizontalBarChartStyleProps,\n IHorizontalBarChartStyles,\n} from './HorizontalBarChart';\nexport { HorizontalBarChart, HorizontalBarChartVariant } from './HorizontalBarChart';\nexport type { IDonutChart, IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './DonutChart';\nexport { DonutChart } from './DonutChart';\nexport type {\n ILegend,\n ILegendOverflowData,\n ILegendStyleProps,\n ILegendSubComponentStyles,\n ILegendsProps,\n ILegendsStyles,\n IShapeProps,\n LegendShape,\n} from './Legends';\nexport { Legends, Shape } from './Legends';\nexport type {\n IColorFillBarData,\n IColorFillBarsProps,\n IEventsAnnotationProps,\n ILineChartProps,\n ILineChartStyleProps,\n ILineChartStyles,\n} from './LineChart';\nexport { LineChart, Textbox } from './LineChart';\nexport type { IAreaChartProps, IAreaChartStyleProps, IAreaChartStyles } from './AreaChart';\nexport { AreaChart } from './AreaChart';\nexport type { IPieChart, IPieChartProps, IPieChartStyleProps, IPieChartStyles } from './PieChart';\nexport { PieChart } from './PieChart';\nexport type {\n IMultiStackedBarChartProps,\n IMultiStackedBarChartStyleProps,\n IMultiStackedBarChartStyles,\n IStackedBarChart,\n IStackedBarChartProps,\n IStackedBarChartStyleProps,\n IStackedBarChartStyles,\n} from './StackedBarChart';\nexport { MultiStackedBarChart, MultiStackedBarChartVariant, StackedBarChart } from './StackedBarChart';\nexport type { IVerticalBarChartProps, IVerticalBarChartStyleProps, IVerticalBarChartStyles } from './VerticalBarChart';\nexport { VerticalBarChart } from './VerticalBarChart';\nexport type {\n IVerticalStackedBarChartProps,\n IVerticalStackedBarChartStyleProps,\n IVerticalStackedBarChartStyles,\n} from './VerticalStackedBarChart';\nexport { VerticalStackedBarChart } from './VerticalStackedBarChart';\nexport type {\n IGroupedVerticalBarChartProps,\n IGroupedVerticalBarChartStyleProps,\n IGroupedVerticalBarChartStyles,\n} from './GroupedVerticalBarChart';\nexport { GroupedVerticalBarChart } from './GroupedVerticalBarChart';\nexport type {\n ICartesianChartProps,\n ICartesianChartStyleProps,\n ICartesianChartStyles,\n IChildProps,\n IModifiedCartesianChartProps,\n IYValueHover,\n} from './CartesianChart';\nexport { CartesianChart } from './CartesianChart';\nexport type {\n IAccessibilityProps,\n IBasestate,\n IChartDataPoint,\n IChartProps,\n ICustomizedCalloutData,\n ICustomizedCalloutDataPoint,\n IDataPoint,\n IGVBarChartSeriesPoint,\n IGVDataPoint,\n IGVForBarChart,\n IGVSingleDataPoint,\n IGroupedVerticalBarChartData,\n IHeatMapChartData,\n IHeatMapChartDataPoint,\n IHorizontalBarChartWithAxisDataPoint,\n IHorizontalDataPoint,\n ILegendDataItem,\n ILineChartDataPoint,\n ILineChartGap,\n ILineChartLineOptions,\n ILineChartPoints,\n ILineDataInVerticalBarChart,\n ILineDataInVerticalStackedBarChart,\n IMargins,\n IRefArrayData,\n ISankeyChartData,\n IVSChartDataPoint,\n IVerticalBarChartDataPoint,\n IVerticalStackedBarDataPoint,\n IVerticalStackedChartProps,\n SLink,\n SNode,\n} from './types/index';\nexport type {\n IChartHoverCardProps,\n IChartHoverCardStyleProps,\n IChartHoverCardStyles,\n} from './utilities/ChartHoverCard/index';\nexport { ChartHoverCard, getChartHoverCardStyles } from './utilities/ChartHoverCard/index';\nexport type { IHeatMapChartProps, IHeatMapChartStyleProps, IHeatMapChartStyles } from './HeatMapChart';\nexport { HeatMapChart } from './HeatMapChart';\nexport type {\n ISankeyChartAccessibilityProps,\n ISankeyChartProps,\n ISankeyChartStrings,\n ISankeyChartStyleProps,\n ISankeyChartStyles,\n} from './SankeyChart';\nexport { SankeyChart } from './SankeyChart';\nexport type {\n ITreeChartDataPoint,\n ITreeDataStructure,\n ITreeProps,\n ITreeState,\n ITreeStyleProps,\n ITreeStyles,\n} from './TreeChart';\nexport { NodesComposition, TreeChart, TreeTraverse } from './TreeChart';\nexport type { ISparklineProps, ISparklineStyleProps, ISparklineStyles } from './Sparkline';\nexport { Sparkline } from './Sparkline';\nexport type {\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisStyleProps,\n IHorizontalBarChartWithAxisStyles,\n} from './HorizontalBarChartWithAxis';\nexport { HorizontalBarChartWithAxis } from './HorizontalBarChartWithAxis';\nexport { DataVizPalette, getColorFromToken, getNextColor } from './utilities/colors';\nexport { DataVizGradientPalette, getGradientFromToken, getNextGradient } from './utilities/gradients';\nexport type { IGaugeChartProps, IGaugeChartSegment, IGaugeChartStyleProps, IGaugeChartStyles } from './GaugeChart';\nexport { GaugeChart, GaugeChartVariant, GaugeValueFormat } from './GaugeChart';\nexport type { DeclarativeChartProps, Schema } from './DeclarativeChart';\nexport { DeclarativeChart } from './DeclarativeChart';\n\nimport './version';\n"]}
|
|
@@ -408,4 +408,5 @@ export declare const getBarWidth: (barWidthProp: number | 'default' | 'auto' | u
|
|
|
408
408
|
export declare const getScalePadding: (prop: number | undefined, shorthandProp?: number, defaultValue?: number) => number;
|
|
409
409
|
export declare const isScalePaddingDefined: (prop: number | undefined, shorthandProp?: number) => boolean;
|
|
410
410
|
export declare const formatDate: (date: Date, useUTC?: boolean) => string;
|
|
411
|
+
export declare function getSecureProps(props?: Record<string, any>): Record<string, any>;
|
|
411
412
|
export {};
|
|
@@ -2,7 +2,7 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
2
2
|
"use strict";
|
|
3
3
|
var _a;
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.formatDate = exports.isScalePaddingDefined = exports.getScalePadding = exports.getBarWidth = exports.formatValueWithSIPrefix = exports.wrapTextInsideDonut = exports.rotateXAxisLabels = exports.convertToLocaleString = exports.getAccessibleDataObject = exports.pointTypes = exports.CustomPoints = exports.Points = exports.getTypeOfAxis = exports.findHBCWANumericMinMaxOfY = exports.findVerticalNumericMinMaxOfY = exports.findVSBCNumericMinMaxOfY = exports.findNumericMinMaxOfY = exports.domainRageOfVerticalNumeric = exports.domainRangeOfDateForAreaLineVerticalBarChart = exports.domainRangeOfVSBCNumeric = exports.domainRangeOfXStringAxis = exports.domainRangeOfNumericForHorizontalBarChartWithAxis = exports.domainRangeOfNumericForAreaChart = exports.getXAxisType = exports.tooltipOfXAxislabels = exports.calculateLongestLabelWidth = exports.wrapContent = exports.createYAxisLabels = exports.createWrapOfXLabels = exports.silceOrAppendToArray = exports.getUnique = exports.calloutData = exports.createStringYAxis = exports.createStringYAxisForHorizontalBarChartWithAxis = exports.createNumericYAxis = exports.createYAxisForHorizontalBarChartWithAxis = exports.prepareDatapoints = exports.createStringXAxis = exports.createDateXAxis = exports.createNumericXAxis = exports.YAxisType = exports.XAxisTypes = exports.ChartTypes = void 0;
|
|
5
|
+
exports.getSecureProps = exports.formatDate = exports.isScalePaddingDefined = exports.getScalePadding = exports.getBarWidth = exports.formatValueWithSIPrefix = exports.wrapTextInsideDonut = exports.rotateXAxisLabels = exports.convertToLocaleString = exports.getAccessibleDataObject = exports.pointTypes = exports.CustomPoints = exports.Points = exports.getTypeOfAxis = exports.findHBCWANumericMinMaxOfY = exports.findVerticalNumericMinMaxOfY = exports.findVSBCNumericMinMaxOfY = exports.findNumericMinMaxOfY = exports.domainRageOfVerticalNumeric = exports.domainRangeOfDateForAreaLineVerticalBarChart = exports.domainRangeOfVSBCNumeric = exports.domainRangeOfXStringAxis = exports.domainRangeOfNumericForHorizontalBarChartWithAxis = exports.domainRangeOfNumericForAreaChart = exports.getXAxisType = exports.tooltipOfXAxislabels = exports.calculateLongestLabelWidth = exports.wrapContent = exports.createYAxisLabels = exports.createWrapOfXLabels = exports.silceOrAppendToArray = exports.getUnique = exports.calloutData = exports.createStringYAxis = exports.createStringYAxisForHorizontalBarChartWithAxis = exports.createNumericYAxis = exports.createYAxisForHorizontalBarChartWithAxis = exports.prepareDatapoints = exports.createStringXAxis = exports.createDateXAxis = exports.createNumericXAxis = exports.YAxisType = exports.XAxisTypes = exports.ChartTypes = void 0;
|
|
6
6
|
var ChartTypes;
|
|
7
7
|
(function (ChartTypes) {
|
|
8
8
|
ChartTypes[ChartTypes["AreaChart"] = 0] = "AreaChart";
|
|
@@ -1081,5 +1081,12 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
|
|
|
1081
1081
|
return timeFormat('%-e %b %Y, %H:%M')(date) + (useUTC ? ' GMT' : '');
|
|
1082
1082
|
};
|
|
1083
1083
|
exports.formatDate = formatDate;
|
|
1084
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1085
|
+
function getSecureProps(props) {
|
|
1086
|
+
if (props === void 0) { props = {}; }
|
|
1087
|
+
var dangerouslySetInnerHTML = props.dangerouslySetInnerHTML, result = tslib_1.__rest(props, ["dangerouslySetInnerHTML"]);
|
|
1088
|
+
return result;
|
|
1089
|
+
}
|
|
1090
|
+
exports.getSecureProps = getSecureProps;
|
|
1084
1091
|
});
|
|
1085
1092
|
//# sourceMappingURL=utilities.js.map
|