tsichart-core 1.0.4 → 2.0.0-beta.1

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.
Files changed (133) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +80 -0
  3. package/dist/index.d.ts +1744 -0
  4. package/dist/index.js +14284 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.mjs +14209 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/dist/{tsiclient.css → styles/index.css} +9388 -9387
  9. package/dist/styles/index.css.map +1 -0
  10. package/package.json +115 -125
  11. package/README.MD +0 -171
  12. package/dist/AggregateExpression.d.ts +0 -13
  13. package/dist/AggregateExpression.js +0 -70
  14. package/dist/AvailabilityChart-vciRThEz.js +0 -488
  15. package/dist/AvailabilityChart.d.ts +0 -59
  16. package/dist/AvailabilityChart.js +0 -26
  17. package/dist/ChartComponent-BxPbycj0.js +0 -302
  18. package/dist/ChartComponent-L_dR-Eny.d.ts +0 -80
  19. package/dist/ChartComponentData-ClzAtU_E.d.ts +0 -47
  20. package/dist/ChartDataOptions-DBu_M5gU.d.ts +0 -38
  21. package/dist/ChartDataOptions-rcIzlQJO.js +0 -49
  22. package/dist/ChartVisualizationComponent-CswB2P7Z.d.ts +0 -8
  23. package/dist/ChartVisualizationComponent-NsvZCsc-.js +0 -23
  24. package/dist/ColorPicker-CUZt1uup.js +0 -120
  25. package/dist/ColorPicker.d.ts +0 -28
  26. package/dist/ColorPicker.js +0 -6
  27. package/dist/Component-C9fQU2ia.js +0 -401
  28. package/dist/Component-CdI_Pyko.d.ts +0 -226
  29. package/dist/ContextMenu-CP1qV7pP.js +0 -197
  30. package/dist/DateTimeButton-Ck71nL87.d.ts +0 -16
  31. package/dist/DateTimeButton-DnqhATyX.js +0 -38
  32. package/dist/DateTimeButtonRange-CT1zOoCf.js +0 -71
  33. package/dist/DateTimeButtonRange.d.ts +0 -19
  34. package/dist/DateTimeButtonRange.js +0 -15
  35. package/dist/DateTimeButtonSingle-DZk5fW35.js +0 -48
  36. package/dist/DateTimeButtonSingle.d.ts +0 -17
  37. package/dist/DateTimeButtonSingle.js +0 -14
  38. package/dist/DateTimePicker-CuGwz86U.js +0 -532
  39. package/dist/DateTimePicker.d.ts +0 -69
  40. package/dist/DateTimePicker.js +0 -13
  41. package/dist/EllipsisMenu-CNWSo-qQ.js +0 -116
  42. package/dist/EllipsisMenu.d.ts +0 -20
  43. package/dist/EllipsisMenu.js +0 -6
  44. package/dist/Enums-CEhu18PC.d.ts +0 -12
  45. package/dist/EventsTable-mjoOfc0E.js +0 -553
  46. package/dist/EventsTable.d.ts +0 -34
  47. package/dist/EventsTable.js +0 -10
  48. package/dist/GeoProcessGraphic-CSsTL4zj.js +0 -145
  49. package/dist/GeoProcessGraphic.d.ts +0 -34
  50. package/dist/GeoProcessGraphic.js +0 -7
  51. package/dist/Grid-ByDh3Qdn.js +0 -874
  52. package/dist/Grid.d.ts +0 -43
  53. package/dist/Grid.js +0 -6
  54. package/dist/GroupedBarChart-DrSrSHNj.js +0 -579
  55. package/dist/GroupedBarChart.d.ts +0 -22
  56. package/dist/GroupedBarChart.js +0 -17
  57. package/dist/GroupedBarChartData-CpJKvTDQ.js +0 -121
  58. package/dist/GroupedBarChartData-DK30DLVh.d.ts +0 -20
  59. package/dist/Heatmap-BbWcAgp6.js +0 -524
  60. package/dist/Heatmap.d.ts +0 -31
  61. package/dist/Heatmap.js +0 -14
  62. package/dist/Hierarchy-BsvoKnCY.js +0 -260
  63. package/dist/Hierarchy.d.ts +0 -39
  64. package/dist/Hierarchy.js +0 -6
  65. package/dist/HierarchyNavigation-C5yoj--u.js +0 -336
  66. package/dist/HierarchyNavigation.d.ts +0 -34
  67. package/dist/HierarchyNavigation.js +0 -6
  68. package/dist/HistoryPlayback-DIhAsAOi.d.ts +0 -68
  69. package/dist/HistoryPlayback-DiflRzRf.js +0 -175
  70. package/dist/Interfaces-CdAVFIA6.d.ts +0 -6
  71. package/dist/Legend-CQ5yaF8f.js +0 -497
  72. package/dist/LineChart-DcUenMrZ.js +0 -3181
  73. package/dist/LineChart.d.ts +0 -163
  74. package/dist/LineChart.js +0 -18
  75. package/dist/ModelAutocomplete-sxVy4m65.js +0 -100
  76. package/dist/ModelAutocomplete.d.ts +0 -12
  77. package/dist/ModelAutocomplete.js +0 -7
  78. package/dist/ModelSearch-DEg5KwKw.js +0 -189
  79. package/dist/ModelSearch.d.ts +0 -23
  80. package/dist/ModelSearch.js +0 -9
  81. package/dist/PieChart-DDxMXcXE.js +0 -258
  82. package/dist/PieChart.d.ts +0 -26
  83. package/dist/PieChart.js +0 -17
  84. package/dist/PlaybackControls-DSoUncDP.js +0 -195
  85. package/dist/PlaybackControls.d.ts +0 -39
  86. package/dist/PlaybackControls.js +0 -13
  87. package/dist/ProcessGraphic-1f-FoGDy.js +0 -154
  88. package/dist/ProcessGraphic.d.ts +0 -31
  89. package/dist/ProcessGraphic.js +0 -7
  90. package/dist/README.MD +0 -171
  91. package/dist/ScatterPlot-BAn6r8ml.js +0 -924
  92. package/dist/ScatterPlot.d.ts +0 -115
  93. package/dist/ScatterPlot.js +0 -17
  94. package/dist/SingleDateTimePicker-BrFB5iPu.js +0 -213
  95. package/dist/SingleDateTimePicker.d.ts +0 -45
  96. package/dist/SingleDateTimePicker.js +0 -12
  97. package/dist/Slider-BpNCqoBD.js +0 -186
  98. package/dist/Slider.d.ts +0 -31
  99. package/dist/Slider.js +0 -6
  100. package/dist/TemporalXAxisComponent-BsTQyVO6.js +0 -129
  101. package/dist/TemporalXAxisComponent-DohbI08i.d.ts +0 -23
  102. package/dist/TimezonePicker-DHkC2iKE.js +0 -58
  103. package/dist/TimezonePicker.d.ts +0 -16
  104. package/dist/TimezonePicker.js +0 -10
  105. package/dist/Tooltip-B-mIKo4g.js +0 -104
  106. package/dist/TsqExpression.d.ts +0 -36
  107. package/dist/TsqExpression.js +0 -89
  108. package/dist/UXClient-BTulvzpq.js +0 -230
  109. package/dist/UXClient.d.ts +0 -74
  110. package/dist/UXClient.js +0 -47
  111. package/dist/Utils-CdKMmmwx.js +0 -1138
  112. package/dist/Utils-ChzaAbch.d.ts +0 -104
  113. package/dist/Utils.d.ts +0 -7
  114. package/dist/Utils.js +0 -7
  115. package/dist/_tslib-DYvz7dIO.js +0 -96
  116. package/dist/package.json +0 -125
  117. package/dist/pikaday-C_DS7oEN.js +0 -1252
  118. package/dist/tsiclient.cjs.js +0 -3
  119. package/dist/tsiclient.cjs.js.LICENSE.txt +0 -19
  120. package/dist/tsiclient.cjs.js.map +0 -1
  121. package/dist/tsiclient.d.ts +0 -46
  122. package/dist/tsiclient.esm.js +0 -3
  123. package/dist/tsiclient.esm.js.LICENSE.txt +0 -19
  124. package/dist/tsiclient.esm.js.map +0 -1
  125. package/dist/tsiclient.js +0 -58
  126. package/dist/tsiclient.min.css +0 -6
  127. package/dist/tsiclient.min.css.map +0 -1
  128. package/dist/tsiclient.umd.js +0 -3
  129. package/dist/tsiclient.umd.js.LICENSE.txt +0 -19
  130. package/dist/tsiclient.umd.js.map +0 -1
  131. package/dist/tsiclient.umd.min.js +0 -3
  132. package/dist/tsiclient.umd.min.js.LICENSE.txt +0 -19
  133. package/dist/tsiclient.umd.min.js.map +0 -1
@@ -1,302 +0,0 @@
1
- import { _ as __extends, d as __spreadArray } from './_tslib-DYvz7dIO.js';
2
- import { U as Utils, G as GRIDCONTAINERCLASS, T as TooltipMeasureFormat, D as DataTypes, S as ShiftTypes } from './Utils-CdKMmmwx.js';
3
- import { C as Component } from './Component-C9fQU2ia.js';
4
- import { C as ChartComponentData, G as Grid } from './Grid-ByDh3Qdn.js';
5
- import * as d3 from 'd3';
6
- import Split from 'split.js';
7
- import { E as EllipsisMenu } from './EllipsisMenu-CNWSo-qQ.js';
8
-
9
- var ChartComponent = /** @class */ (function (_super) {
10
- __extends(ChartComponent, _super);
11
- function ChartComponent(renderTarget) {
12
- var _this = _super.call(this, renderTarget) || this;
13
- _this.MINWIDTH = 350;
14
- _this.MINHEIGHT = 150;
15
- _this.CONTROLSWIDTH = 200;
16
- _this.GUTTERWIDTH = 6;
17
- _this.chartControlsPanel = null;
18
- _this.ellipsisContainer = null;
19
- _this.ellipsisMenu = null;
20
- _this.svgSelection = null;
21
- _this.legendWidth = _this.CONTROLSWIDTH;
22
- _this.downloadAsCSV = function (isScatterPlot) {
23
- if (isScatterPlot === void 0) { isScatterPlot = false; }
24
- Utils.downloadCSV(_this.chartComponentData.generateCSVString(_this.chartOptions.offset, _this.chartOptions.dateLocale, isScatterPlot ? _this.chartOptions.spMeasures : null));
25
- };
26
- _this.chartComponentData = new ChartComponentData();
27
- return _this;
28
- }
29
- ChartComponent.prototype.showGrid = function () {
30
- Grid.showGrid(this.renderTarget, this.chartOptions, this.aggregateExpressionOptions, this.chartComponentData);
31
- };
32
- ChartComponent.prototype.gatedShowGrid = function () {
33
- if (this.isGridVisible()) {
34
- this.showGrid();
35
- }
36
- };
37
- ChartComponent.prototype.hideGrid = function () {
38
- Grid.hideGrid(this.renderTarget);
39
- };
40
- ChartComponent.prototype.isGridVisible = function () {
41
- return !d3.select(this.renderTarget).selectAll(".".concat(GRIDCONTAINERCLASS)).empty();
42
- };
43
- ChartComponent.prototype.drawEllipsisMenu = function (additionalEllipsisItems) {
44
- var _this = this;
45
- if (additionalEllipsisItems === void 0) { additionalEllipsisItems = []; }
46
- if (this.chartOptions.canDownload || this.chartOptions.grid || (this.chartOptions.ellipsisItems && this.chartOptions.ellipsisItems.length > 0) || additionalEllipsisItems.length > 0) {
47
- if (this.ellipsisContainer === null) {
48
- this.ellipsisContainer = this.chartControlsPanel.append("div")
49
- .attr("class", "tsi-ellipsisContainerDiv");
50
- }
51
- if (this.ellipsisMenu === null) {
52
- this.ellipsisMenu = new EllipsisMenu(this.ellipsisContainer.node());
53
- }
54
- var ellipsisItems = [];
55
- if (this.chartOptions.grid) {
56
- ellipsisItems.push(Grid.createGridEllipsisOption(this.renderTarget, this.chartOptions, this.aggregateExpressionOptions, this.chartComponentData, this.getString("Display Grid")));
57
- }
58
- if (this.chartOptions.canDownload) {
59
- ellipsisItems.push(Utils.createDownloadEllipsisOption(function () { return _this.chartComponentData.generateCSVString(_this.chartOptions.offset, _this.chartOptions.dateLocale); }, function () { return Utils.focusOnEllipsisButton(_this.renderTarget); }, this.getString("Download as CSV")));
60
- }
61
- if (this.chartOptions.ellipsisItems) {
62
- ellipsisItems = ellipsisItems.concat(this.chartOptions.ellipsisItems);
63
- }
64
- this.ellipsisMenu.render(ellipsisItems.concat(additionalEllipsisItems), { theme: this.chartOptions.theme });
65
- }
66
- };
67
- ChartComponent.prototype.removeControlPanel = function () {
68
- if (this.chartControlsPanel) {
69
- this.chartControlsPanel.remove();
70
- }
71
- this.chartControlsPanel = null;
72
- this.ellipsisContainer = null;
73
- this.ellipsisMenu = null;
74
- };
75
- ChartComponent.prototype.removeEllipsisMenu = function () {
76
- if (this.ellipsisContainer) {
77
- this.ellipsisContainer.remove();
78
- }
79
- this.ellipsisContainer = null;
80
- this.ellipsisMenu = null;
81
- };
82
- ChartComponent.prototype.getWidth = function () {
83
- return Math.max(d3.select(this.renderTarget).node().clientWidth, this.MINWIDTH);
84
- };
85
- ChartComponent.prototype.getVisibilityState = function () {
86
- return this.chartComponentData.getVisibilityState();
87
- };
88
- ChartComponent.prototype.ellipsisItemsExist = function () {
89
- return (this.chartOptions.canDownload || this.chartOptions.ellipsisItems.length > 0 || this.chartOptions.grid);
90
- };
91
- ChartComponent.prototype.getDataType = function (aggKey) {
92
- return this.chartComponentData.getDataType(aggKey);
93
- };
94
- ChartComponent.prototype.getCDOFromAggKey = function (aggKey) {
95
- var matches = this.aggregateExpressionOptions.filter(function (cDO) {
96
- return cDO.aggKey === aggKey;
97
- });
98
- if (matches.length === 1) {
99
- return matches[0];
100
- }
101
- return {};
102
- };
103
- ChartComponent.prototype.getFilteredMeasures = function (measureList, visibleMeasure, measureFormat, xyrMeasures) {
104
- if (xyrMeasures === void 0) { xyrMeasures = null; }
105
- var justVisibleMeasure = [visibleMeasure];
106
- switch (measureFormat) {
107
- case TooltipMeasureFormat.SingleValue:
108
- return justVisibleMeasure;
109
- case TooltipMeasureFormat.Scatter:
110
- return xyrMeasures;
111
- default:
112
- if (measureList.length !== 3) {
113
- return justVisibleMeasure;
114
- }
115
- var isAvgMinMax_1 = true;
116
- measureList.forEach(function (measure) {
117
- if (!(measure === 'avg' || measure === 'min' || measure === 'max')) {
118
- isAvgMinMax_1 = false;
119
- }
120
- });
121
- return isAvgMinMax_1 ? measureList.sort(function (m) { return m === 'min' ? -1 : (m === 'avg' ? 0 : 1); }) : justVisibleMeasure;
122
- }
123
- };
124
- // to get alignment for data points between other types and linechart for tooltip formatting
125
- ChartComponent.prototype.convertToTimeValueFormat = function (d) {
126
- var measuresObject = {};
127
- var measureType = d.measureType ? d.measureType : this.chartComponentData.displayState[d.aggKey].splitBys[d.splitBy].visibleType;
128
- measuresObject[measureType] = d.val;
129
- return {
130
- aggregateKey: d.aggKey,
131
- splitBy: d.splitBy,
132
- aggregateName: this.chartComponentData.displayState[d.aggKey].name,
133
- measures: measuresObject
134
- };
135
- };
136
- ChartComponent.prototype.formatDate = function (date, shiftMillis) {
137
- return Utils.timeFormat(this.chartComponentData.usesSeconds, this.chartComponentData.usesMillis, this.chartOptions.offset, this.chartOptions.is24HourTime, shiftMillis, null, this.chartOptions.dateLocale)(date);
138
- };
139
- ChartComponent.prototype.tooltipFormat = function (d, text, measureFormat, xyrMeasures) {
140
- var _this = this;
141
- if (xyrMeasures === void 0) { xyrMeasures = null; }
142
- var dataType = this.getDataType(d.aggregateKey);
143
- d.aggregateName;
144
- var cDO = this.getCDOFromAggKey(d.aggregateKey);
145
- var shiftMillis = this.chartComponentData.getTemporalShiftMillis(d.aggregateKey);
146
- var formatDate = function (date) { return _this.formatDate(date, shiftMillis); };
147
- var titleGroup = text.append("div")
148
- .attr("class", "tsi-tooltipTitleGroup");
149
- this.createTooltipSeriesInfo(d, titleGroup, cDO);
150
- if (dataType === DataTypes.Categorical) {
151
- titleGroup.append('h4')
152
- .attr('class', 'tsi-tooltipSubtitle tsi-tooltipTimeStamp')
153
- .text(formatDate(d.dateTime) + ' - ' + formatDate(d.endDate));
154
- }
155
- if (dataType === DataTypes.Events) {
156
- titleGroup.append('h4')
157
- .attr('class', 'tsi-tooltipSubtitle tsi-tooltipTimeStamp')
158
- .text(formatDate(d.dateTime));
159
- }
160
- var tooltipAttrs = cDO.tooltipAttributes;
161
- if (shiftMillis !== 0 && tooltipAttrs) {
162
- var shiftTuple = this.chartComponentData.getTemporalShiftStringTuple(d.aggregateKey);
163
- if (shiftTuple !== null) {
164
- var keyString = this.getString(shiftTuple[0]);
165
- var valueString = (keyString === ShiftTypes.startAt) ? this.formatDate(new Date(shiftTuple[1]), 0) : shiftTuple[1];
166
- tooltipAttrs = __spreadArray(__spreadArray([], tooltipAttrs, true), [[keyString, valueString]], false);
167
- }
168
- }
169
- if (tooltipAttrs && tooltipAttrs.length > 0) {
170
- var attrsGroup_1 = text.append('div')
171
- .attr('class', 'tsi-tooltipAttributeContainer tsi-tooltipFlexyBox');
172
- tooltipAttrs.forEach(function (attrTuple, i) {
173
- var timeShiftRow = attrsGroup_1.append('div')
174
- .attr('class', 'tsi-tooltipAttribute tsi-tooltipFlexyItem');
175
- timeShiftRow.append('div')
176
- .attr('class', 'tsi-tooltipAttrTitle')
177
- .text(attrTuple[0]);
178
- timeShiftRow.append('div')
179
- .attr('class', 'tsi-tooltipAttrValue')
180
- .text(attrTuple[1]);
181
- });
182
- }
183
- if (d.measures && Object.keys(d.measures).length) {
184
- var formatValue_1 = (dataType === DataTypes.Events ? function (d) { return d; } : Utils.formatYAxisNumber);
185
- if (dataType !== DataTypes.Numeric) {
186
- var valueGroup_1 = text.append('table')
187
- .attr('class', 'tsi-tooltipValues tsi-tooltipTable');
188
- Object.keys(d.measures).forEach(function (measureType, i) {
189
- if (!(dataType === DataTypes.Categorical) || d.measures[measureType] !== 0) {
190
- valueGroup_1.append('tr').classed('tsi-tableSpacer', true);
191
- var tr = valueGroup_1.append('tr')
192
- .classed('tsi-visibleValue', (dataType === DataTypes.Numeric && (measureType === _this.chartComponentData.getVisibleMeasure(d.aggregateKey, d.splitBy))))
193
- .style('border-left-color', Utils.getColorForValue(cDO, measureType));
194
- tr.append('td')
195
- .attr('class', 'tsi-valueLabel')
196
- .text(measureType);
197
- tr.append('td')
198
- .attr('class', 'tsi-valueCell')
199
- .text(formatValue_1(d.measures[measureType]));
200
- }
201
- });
202
- }
203
- else {
204
- var valueGroup_2 = text.append('div')
205
- .attr('class', 'tsi-tooltipFlexyBox');
206
- var filteredMeasures = this.getFilteredMeasures(Object.keys(d.measures), this.chartComponentData.getVisibleMeasure(d.aggregateKey, d.splitBy), measureFormat, xyrMeasures);
207
- filteredMeasures.forEach(function (measureType, i) {
208
- var valueItem = valueGroup_2.append('div')
209
- .attr('class', 'tsi-tooltipFlexyItem')
210
- .classed('tsi-visibleValue', (dataType === DataTypes.Numeric &&
211
- (measureType === _this.chartComponentData.getVisibleMeasure(d.aggregateKey, d.splitBy)) &&
212
- (measureFormat !== TooltipMeasureFormat.Scatter)));
213
- var measureTitle = valueItem.append('div')
214
- .attr('class', 'tsi-tooltipMeasureTitle');
215
- Utils.appendFormattedElementsFromString(measureTitle, measureType);
216
- valueItem.append('div')
217
- .attr('class', 'tsi-tooltipMeasureValue')
218
- .text(formatValue_1(d.measures[measureType]));
219
- });
220
- }
221
- }
222
- };
223
- ChartComponent.prototype.getSVGWidth = function () {
224
- return this.chartWidth + this.chartMargins.left + this.chartMargins.right;
225
- };
226
- ChartComponent.prototype.getChartWidth = function (legendWidth) {
227
- if (legendWidth === void 0) { legendWidth = this.CONTROLSWIDTH; }
228
- legendWidth = this.legendWidth; // + this.GUTTERWIDTH;
229
- return Math.max(1, this.width - this.chartMargins.left - this.chartMargins.right - (this.chartOptions.legend === "shown" ? legendWidth : 0));
230
- };
231
- ChartComponent.prototype.calcSVGWidth = function () {
232
- return this.svgSelection.node().getBoundingClientRect().width;
233
- };
234
- ChartComponent.prototype.setControlsPanelWidth = function () {
235
- if (!this.chartOptions.hideChartControlPanel && this.chartControlsPanel !== null) {
236
- //either calculate expected or just use svg if it's in the DOM
237
- var controlPanelWidth = this.svgSelection && this.svgSelection.node() ?
238
- this.calcSVGWidth() :
239
- this.getWidth() - (this.chartOptions.legend === 'shown' ? (this.legendWidth + this.GUTTERWIDTH) : 0);
240
- this.chartControlsPanel.style("width", controlPanelWidth + "px");
241
- }
242
- };
243
- ChartComponent.prototype.legendPostRenderProcess = function (legendState, chartElement, shouldSetControlsWidth, splitLegendOnDrag) {
244
- if (splitLegendOnDrag === void 0) { splitLegendOnDrag = undefined; }
245
- if (legendState === 'shown') {
246
- this.splitLegendAndSVG(chartElement.node(), splitLegendOnDrag);
247
- if (shouldSetControlsWidth) {
248
- this.setControlsPanelWidth();
249
- }
250
- }
251
- else {
252
- d3.select(this.renderTarget).select('.tsi-resizeGutter').remove();
253
- }
254
- };
255
- ChartComponent.prototype.splitLegendAndSVG = function (chartElement, onDrag) {
256
- var _this = this;
257
- if (onDrag === void 0) { onDrag = function () { }; }
258
- var svgWidth = this.getSVGWidth();
259
- var legendWidth = this.width - svgWidth;
260
- d3.select(this.renderTarget).select('.tsi-resizeGutter').remove();
261
- var legend = this.legendObject.legendElement;
262
- Split([this.legendObject.legendElement.node(), chartElement], {
263
- sizes: [legendWidth / this.width * 100, svgWidth / this.width * 100],
264
- gutterSize: 2,
265
- minSize: [200, 0],
266
- snapOffset: 0,
267
- cursor: 'e-resize',
268
- onDragEnd: function (sizes) {
269
- var legendWidth = _this.width * (sizes[0] / 100);
270
- _this.legendWidth = legendWidth;
271
- _this.chartWidth = _this.getChartWidth();
272
- _this.draw(true);
273
- legend.style('width', _this.legendWidth + 'px');
274
- d3.select(_this.renderTarget).select('.tsi-resizeGutter')
275
- .classed('tsi-isDragging', false);
276
- },
277
- onDragStart: function () {
278
- d3.select(_this.renderTarget).select('.tsi-resizeGutter')
279
- .classed('tsi-isDragging', true);
280
- },
281
- onDrag: function () {
282
- if (!_this.chartOptions.hideChartControlPanel && _this.chartControlsPanel !== null) {
283
- var svgLeftOffset = _this.calcSVGWidth();
284
- _this.chartControlsPanel.style("width", Math.max(svgLeftOffset, _this.chartMargins.left + 8) + "px"); //8px to account for the width of the icon
285
- }
286
- onDrag();
287
- },
288
- gutter: function (index, direction) {
289
- var gutter = document.createElement('div');
290
- gutter.className = "gutter tsi-resizeGutter";
291
- return gutter;
292
- },
293
- direction: 'horizontal'
294
- });
295
- // explicitly set the width of the legend to a pixel value
296
- var calcedLegendWidth = legend.node().getBoundingClientRect().width;
297
- legend.style("width", calcedLegendWidth + "px");
298
- };
299
- return ChartComponent;
300
- }(Component));
301
-
302
- export { ChartComponent as C };
@@ -1,80 +0,0 @@
1
- import { T as TooltipMeasureFormat } from './Enums-CEhu18PC.js';
2
- import { C as Component } from './Component-CdI_Pyko.js';
3
- import { C as ChartComponentData } from './ChartComponentData-ClzAtU_E.js';
4
- import EllipsisMenu from './EllipsisMenu.js';
5
-
6
- declare class Legend extends Component {
7
- drawChart: any;
8
- legendElement: any;
9
- legendWidth: number;
10
- private legendState;
11
- private stickySeriesAction;
12
- private labelMouseover;
13
- private labelMouseout;
14
- private svgSelection;
15
- private chartComponentData;
16
- constructor(drawChart: any, renderTarget: Element, legendWidth: number);
17
- private labelMouseoutWrapper;
18
- private toggleSplitByVisible;
19
- triggerSplitByFocus(aggKey: string, splitBy: string): void;
20
- private getHeightPerSplitBy;
21
- private createGradient;
22
- private isNonNumeric;
23
- private createNonNumericColorKey;
24
- private createCategoricalColorKey;
25
- private createEventsColorKey;
26
- private renderSplitBys;
27
- private toggleSticky;
28
- draw(legendState: string, chartComponentData: any, labelMouseover: any, svgSelection: any, options: any, labelMouseoutAction?: any, stickySeriesAction?: any, event?: any): void;
29
- }
30
-
31
- declare class ChartComponent extends Component {
32
- readonly MINWIDTH = 350;
33
- protected MINHEIGHT: number;
34
- readonly CONTROLSWIDTH = 200;
35
- readonly GUTTERWIDTH = 6;
36
- data: any;
37
- aggregateExpressionOptions: any;
38
- protected chartControlsPanel: any;
39
- protected ellipsisContainer: any;
40
- protected ellipsisMenu: EllipsisMenu;
41
- protected legendObject: Legend;
42
- protected width: number;
43
- protected chartWidth: number;
44
- protected svgSelection: any;
45
- protected legendWidth: number;
46
- draw: any;
47
- chartComponentData: ChartComponentData;
48
- chartMargins: any;
49
- constructor(renderTarget: Element);
50
- showGrid(): void;
51
- gatedShowGrid(): void;
52
- hideGrid(): void;
53
- isGridVisible(): boolean;
54
- protected drawEllipsisMenu(additionalEllipsisItems?: any[]): void;
55
- downloadAsCSV: (isScatterPlot?: boolean) => void;
56
- protected removeControlPanel(): void;
57
- protected removeEllipsisMenu(): void;
58
- protected getWidth(): number;
59
- getVisibilityState(): any[];
60
- protected ellipsisItemsExist(): boolean;
61
- protected getDataType(aggKey: any): any;
62
- protected getCDOFromAggKey(aggKey: any): any;
63
- protected getFilteredMeasures(measureList: any, visibleMeasure: any, measureFormat: TooltipMeasureFormat, xyrMeasures?: any): any;
64
- protected convertToTimeValueFormat(d: any): {
65
- aggregateKey: any;
66
- splitBy: any;
67
- aggregateName: any;
68
- measures: {};
69
- };
70
- protected formatDate(date: any, shiftMillis: any): string;
71
- protected tooltipFormat(d: any, text: any, measureFormat: TooltipMeasureFormat, xyrMeasures?: any): void;
72
- protected getSVGWidth(): any;
73
- protected getChartWidth(legendWidth?: number): number;
74
- protected calcSVGWidth(): any;
75
- protected setControlsPanelWidth(): void;
76
- protected legendPostRenderProcess(legendState: string, chartElement: any, shouldSetControlsWidth: boolean, splitLegendOnDrag?: any): void;
77
- protected splitLegendAndSVG(chartElement: any, onDrag?: () => void): void;
78
- }
79
-
80
- export { ChartComponent as C };
@@ -1,47 +0,0 @@
1
- declare class ChartComponentData {
2
- data: any;
3
- displayState: any;
4
- timeArrays: any;
5
- visibleTSCount: number;
6
- visibleTAs: any;
7
- allValues: any;
8
- allNumericValues: any;
9
- filteredAggregates: any;
10
- usesSeconds: boolean;
11
- usesMillis: boolean;
12
- fromMillis: number;
13
- toMillis: number;
14
- stickiedKey: any;
15
- allTimestampsArray: any;
16
- isFromHeatmap: boolean;
17
- constructor();
18
- protected getSwimlane: (aggKey: any) => any;
19
- protected setAllTimestampsArray(): void;
20
- getDataType(aggKey: any): any;
21
- private fillColors;
22
- private getVisibleType;
23
- mergeDataToDisplayStateAndTimeArrays(data: any, aggregateExpressionOptions?: any): void;
24
- private determineMeasureTypes;
25
- getTemporalShiftStringTuple(aggKey: any): any[];
26
- getTemporalShiftMillis(aggKey: any): number;
27
- doesTimeArrayUseSeconds(timeArray: any): any;
28
- doesTimeArrayUseMillis(timeArray: any): any;
29
- setAllValuesAndVisibleTAs(): Date[];
30
- findLastTimestampWithValue(aggKey: any, splitBy: any): any;
31
- private findFirstBucket;
32
- private getNumberOfPaddedBuckets;
33
- convertAggregateToArray(agg: any, aggKey: string, aggName: string, splitBy: string, from: Date, to: Date, bucketSize: number, shiftValue: number): Array<any>;
34
- isSplitByVisible(aggI: string, splitBy: string): any;
35
- isPossibleEnvelope(aggKey: string, splitBy: string): boolean;
36
- getVisibleMeasure(aggI: string, splitBy: string): any;
37
- getAggVisible(aggKey: any): boolean;
38
- getSplitByVisible(aggKey: any, splitBy: any): any;
39
- aggHasVisibleSplitBys(aggKey: any): boolean;
40
- valueAtTS(aggKey: any, splitByName: any, ts: any): any;
41
- setFilteredAggregates(): void;
42
- private guessValueType;
43
- generateCSVString(offset?: number, dateLocale?: string, spMeasures?: any): string;
44
- getVisibilityState(): any[];
45
- }
46
-
47
- export { ChartComponentData as C };
@@ -1,38 +0,0 @@
1
- import { H as HorizontalMarker } from './Interfaces-CdAVFIA6.js';
2
-
3
- declare class ChartDataOptions {
4
- searchSpan: any;
5
- color: string | Function;
6
- alias: string;
7
- contextMenu: any;
8
- measureTypes: Array<string>;
9
- interpolationFunction: string;
10
- yExtent: any;
11
- includeEnvelope: boolean;
12
- includeDots: boolean;
13
- visibilityState: Array<any>;
14
- timeShift: string;
15
- startAt: string;
16
- dataType: string;
17
- valueMapping: any;
18
- height: number;
19
- onElementClick: any;
20
- eventElementType: any;
21
- rollupCategoricalValues: boolean;
22
- tooltipAttributes: Array<any>;
23
- positionX: number;
24
- positionY: number;
25
- swimLane: number;
26
- variableAlias: any;
27
- connectPoints: boolean;
28
- pointConnectionMeasure: string;
29
- positionXVariableName: string;
30
- positionYVariableName: string;
31
- image: string;
32
- isRawData: boolean;
33
- isVariableAliasShownOnTooltip: boolean;
34
- horizontalMarkers: Array<HorizontalMarker>;
35
- constructor(optionsObject: Object);
36
- }
37
-
38
- export { ChartDataOptions as C };
@@ -1,49 +0,0 @@
1
- import { I as InterpolationFunctions, U as Utils, D as DataTypes, E as EventElementTypes } from './Utils-CdKMmmwx.js';
2
-
3
- var DEFAULT_HEIGHT = 40;
4
- // Represents an expression that is suitable for use as the expression options parameter in a chart component
5
- var ChartDataOptions = /** @class */ (function () {
6
- function ChartDataOptions(optionsObject) {
7
- this.interpolationFunction = InterpolationFunctions.None;
8
- this.yExtent = null;
9
- this.includeEnvelope = false;
10
- this.includeDots = false;
11
- this.visibilityState = null;
12
- this.connectPoints = false;
13
- this.pointConnectionMeasure = '';
14
- this.searchSpan = Utils.getValueOrDefault(optionsObject, 'searchSpan');
15
- this.measureTypes = Utils.getValueOrDefault(optionsObject, 'measureTypes');
16
- this.color = Utils.getValueOrDefault(optionsObject, 'color');
17
- this.alias = Utils.getValueOrDefault(optionsObject, 'alias');
18
- this.contextMenu = Utils.getValueOrDefault(optionsObject, 'contextMenu', []);
19
- this.interpolationFunction = Utils.getValueOrDefault(optionsObject, 'interpolationFunction', InterpolationFunctions.None);
20
- this.includeEnvelope = Utils.getValueOrDefault(optionsObject, 'includeEnvelope', false);
21
- this.includeDots = Utils.getValueOrDefault(optionsObject, 'includeDots', false);
22
- this.visibilityState = Utils.getValueOrDefault(optionsObject, 'visibilityState');
23
- this.yExtent = Utils.getValueOrDefault(optionsObject, 'yExtent');
24
- this.timeShift = Utils.getValueOrDefault(optionsObject, 'timeShift', '');
25
- this.dataType = Utils.getValueOrDefault(optionsObject, 'dataType', DataTypes.Numeric);
26
- this.valueMapping = Utils.getValueOrDefault(optionsObject, 'valueMapping', {});
27
- this.height = Utils.getValueOrDefault(optionsObject, 'height', DEFAULT_HEIGHT);
28
- this.onElementClick = Utils.getValueOrDefault(optionsObject, 'onElementClick', null);
29
- this.eventElementType = Utils.getValueOrDefault(optionsObject, 'eventElementType', EventElementTypes.Diamond);
30
- this.rollupCategoricalValues = Utils.getValueOrDefault(optionsObject, 'rollupCategoricalValues', false);
31
- this.tooltipAttributes = Utils.getValueOrDefault(optionsObject, 'tooltipAttributes', []);
32
- this.positionX = Utils.getValueOrDefault(optionsObject, 'positionX', 0);
33
- this.positionY = Utils.getValueOrDefault(optionsObject, 'positionY', 0);
34
- this.swimLane = Utils.getValueOrDefault(optionsObject, 'swimLane', null);
35
- this.variableAlias = Utils.getValueOrDefault(optionsObject, 'variableAlias', null);
36
- this.connectPoints = Utils.getValueOrDefault(optionsObject, "connectPoints", false);
37
- this.pointConnectionMeasure = Utils.getValueOrDefault(optionsObject, 'pointConnectionMeasure', '');
38
- this.positionXVariableName = Utils.getValueOrDefault(optionsObject, 'positionXVariableName', null);
39
- this.positionYVariableName = Utils.getValueOrDefault(optionsObject, 'positionYVariableName', null);
40
- this.image = Utils.getValueOrDefault(optionsObject, 'image', null);
41
- this.startAt = Utils.getValueOrDefault(optionsObject, 'startAt', null);
42
- this.isRawData = Utils.getValueOrDefault(optionsObject, 'isRawData', false);
43
- this.isVariableAliasShownOnTooltip = Utils.getValueOrDefault(optionsObject, 'isVariableAliasShownOnTooltip', true);
44
- this.horizontalMarkers = Utils.getValueOrDefault(optionsObject, 'horizontalMarkers', []);
45
- }
46
- return ChartDataOptions;
47
- }());
48
-
49
- export { ChartDataOptions as C };
@@ -1,8 +0,0 @@
1
- import { C as ChartComponent } from './ChartComponent-L_dR-Eny.js';
2
-
3
- declare class ChartVisualizationComponent extends ChartComponent {
4
- constructor(renderTarget: Element);
5
- render(data: any, options: any, aggregateExpressionOptions: any): void;
6
- }
7
-
8
- export { ChartVisualizationComponent as C };
@@ -1,23 +0,0 @@
1
- import { _ as __extends } from './_tslib-DYvz7dIO.js';
2
- import { U as Utils } from './Utils-CdKMmmwx.js';
3
- import { C as ChartComponent } from './ChartComponent-BxPbycj0.js';
4
- import { C as ChartDataOptions } from './ChartDataOptions-rcIzlQJO.js';
5
-
6
- var ChartVisualizationComponent = /** @class */ (function (_super) {
7
- __extends(ChartVisualizationComponent, _super);
8
- function ChartVisualizationComponent(renderTarget) {
9
- return _super.call(this, renderTarget) || this;
10
- }
11
- ChartVisualizationComponent.prototype.render = function (data, options, aggregateExpressionOptions) {
12
- this.data = Utils.standardizeTSStrings(data);
13
- this.chartOptions.setOptions(options);
14
- this.aggregateExpressionOptions = data.map(function (d, i) {
15
- return Object.assign(d, aggregateExpressionOptions && i in aggregateExpressionOptions ?
16
- new ChartDataOptions(aggregateExpressionOptions[i]) :
17
- new ChartDataOptions({}));
18
- });
19
- };
20
- return ChartVisualizationComponent;
21
- }(ChartComponent));
22
-
23
- export { ChartVisualizationComponent as C };