tsichart-core 1.0.5 → 2.0.0-beta.2
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/LICENSE +22 -22
- package/README.md +80 -0
- package/dist/index.d.ts +1744 -0
- package/dist/index.js +14284 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +14209 -0
- package/dist/index.mjs.map +1 -0
- package/dist/{tsiclient.css → styles/index.css} +9498 -9497
- package/dist/styles/index.css.map +1 -0
- package/package.json +115 -124
- package/README.MD +0 -171
- package/dist/AggregateExpression.d.ts +0 -13
- package/dist/AggregateExpression.js +0 -70
- package/dist/AvailabilityChart-C8ewvn3T.js +0 -488
- package/dist/AvailabilityChart.d.ts +0 -59
- package/dist/AvailabilityChart.js +0 -26
- package/dist/ChartComponent-Dg8P-BTZ.js +0 -302
- package/dist/ChartComponent-ONNW31RL.d.ts +0 -80
- package/dist/ChartComponentData-DBW8_FnY.d.ts +0 -47
- package/dist/ChartDataOptions-CNTSB636.js +0 -49
- package/dist/ChartDataOptions-D0BJuRZy.d.ts +0 -38
- package/dist/ChartVisualizationComponent-CTs5Q_sg.js +0 -23
- package/dist/ChartVisualizationComponent-CpR8xZla.d.ts +0 -8
- package/dist/ColorPicker-0p6vkATj.js +0 -120
- package/dist/ColorPicker.d.ts +0 -28
- package/dist/ColorPicker.js +0 -6
- package/dist/Component-BgifJdKl.js +0 -401
- package/dist/Component-DXwYPoSo.d.ts +0 -226
- package/dist/ContextMenu-wqGGgAzp.js +0 -197
- package/dist/DateTimeButton-D7N8XG0S.js +0 -38
- package/dist/DateTimeButton-DfJL5kvr.d.ts +0 -16
- package/dist/DateTimeButtonRange-BM_J646m.js +0 -71
- package/dist/DateTimeButtonRange.d.ts +0 -19
- package/dist/DateTimeButtonRange.js +0 -15
- package/dist/DateTimeButtonSingle-BxMSitQG.js +0 -48
- package/dist/DateTimeButtonSingle.d.ts +0 -17
- package/dist/DateTimeButtonSingle.js +0 -14
- package/dist/DateTimePicker-BgTi-DY9.js +0 -532
- package/dist/DateTimePicker.d.ts +0 -69
- package/dist/DateTimePicker.js +0 -13
- package/dist/EllipsisMenu-CxJ0LoVm.js +0 -116
- package/dist/EllipsisMenu.d.ts +0 -20
- package/dist/EllipsisMenu.js +0 -6
- package/dist/Enums-DWpaQlXk.d.ts +0 -12
- package/dist/EventsTable-CsnBvvIW.js +0 -553
- package/dist/EventsTable.d.ts +0 -34
- package/dist/EventsTable.js +0 -10
- package/dist/GeoProcessGraphic-CUBMHIHX.js +0 -145
- package/dist/GeoProcessGraphic.d.ts +0 -34
- package/dist/GeoProcessGraphic.js +0 -7
- package/dist/Grid-uoHKTet9.js +0 -874
- package/dist/Grid.d.ts +0 -43
- package/dist/Grid.js +0 -6
- package/dist/GroupedBarChart-Bc3cGhgz.js +0 -579
- package/dist/GroupedBarChart.d.ts +0 -22
- package/dist/GroupedBarChart.js +0 -17
- package/dist/GroupedBarChartData-B7BTM9JH.d.ts +0 -20
- package/dist/GroupedBarChartData-Ml5JJimg.js +0 -121
- package/dist/Heatmap-5gFc_AVW.js +0 -524
- package/dist/Heatmap.d.ts +0 -31
- package/dist/Heatmap.js +0 -14
- package/dist/Hierarchy-C5ueDsus.js +0 -260
- package/dist/Hierarchy.d.ts +0 -39
- package/dist/Hierarchy.js +0 -6
- package/dist/HierarchyNavigation-C3Pwt0D6.js +0 -336
- package/dist/HierarchyNavigation.d.ts +0 -34
- package/dist/HierarchyNavigation.js +0 -6
- package/dist/HistoryPlayback-D09bter3.js +0 -175
- package/dist/HistoryPlayback-DmJ6u7lU.d.ts +0 -68
- package/dist/Interfaces-R_1l9lIT.d.ts +0 -6
- package/dist/Legend-gCIrAytG.js +0 -497
- package/dist/LineChart-CzDp5ULB.js +0 -3181
- package/dist/LineChart.d.ts +0 -163
- package/dist/LineChart.js +0 -18
- package/dist/ModelAutocomplete-lU71Ndju.js +0 -100
- package/dist/ModelAutocomplete.d.ts +0 -12
- package/dist/ModelAutocomplete.js +0 -7
- package/dist/ModelSearch-OF4DygOJ.js +0 -189
- package/dist/ModelSearch.d.ts +0 -23
- package/dist/ModelSearch.js +0 -9
- package/dist/PieChart-XLc9Itne.js +0 -258
- package/dist/PieChart.d.ts +0 -26
- package/dist/PieChart.js +0 -17
- package/dist/PlaybackControls-DbG9gExy.js +0 -195
- package/dist/PlaybackControls.d.ts +0 -39
- package/dist/PlaybackControls.js +0 -13
- package/dist/ProcessGraphic-Cft1b4Mf.js +0 -154
- package/dist/ProcessGraphic.d.ts +0 -31
- package/dist/ProcessGraphic.js +0 -7
- package/dist/ScatterPlot-CdnqSHq2.js +0 -924
- package/dist/ScatterPlot.d.ts +0 -115
- package/dist/ScatterPlot.js +0 -17
- package/dist/SingleDateTimePicker-Ddr-ogTk.js +0 -213
- package/dist/SingleDateTimePicker.d.ts +0 -45
- package/dist/SingleDateTimePicker.js +0 -12
- package/dist/Slider-CX0nvlqx.js +0 -186
- package/dist/Slider.d.ts +0 -31
- package/dist/Slider.js +0 -6
- package/dist/TemporalXAxisComponent-DXmMekYq.js +0 -129
- package/dist/TemporalXAxisComponent-PIeiJYUr.d.ts +0 -23
- package/dist/TimezonePicker-CQpXR5eb.js +0 -58
- package/dist/TimezonePicker.d.ts +0 -16
- package/dist/TimezonePicker.js +0 -10
- package/dist/Tooltip-C13k0eeH.js +0 -104
- package/dist/TsqExpression.d.ts +0 -36
- package/dist/TsqExpression.js +0 -89
- package/dist/UXClient-Bn1afElm.js +0 -230
- package/dist/UXClient.d.ts +0 -74
- package/dist/UXClient.js +0 -47
- package/dist/Utils-BcQeZOM3.d.ts +0 -104
- package/dist/Utils-DDGqSryb.js +0 -1138
- package/dist/Utils.d.ts +0 -7
- package/dist/Utils.js +0 -7
- package/dist/_tslib-BYFmvNeL.js +0 -96
- package/dist/pikaday-jh_aVtJs.js +0 -1252
- package/dist/tsiclient.cjs.js +0 -3
- package/dist/tsiclient.cjs.js.LICENSE.txt +0 -19
- package/dist/tsiclient.cjs.js.map +0 -1
- package/dist/tsiclient.d.ts +0 -46
- package/dist/tsiclient.esm.js +0 -3
- package/dist/tsiclient.esm.js.LICENSE.txt +0 -19
- package/dist/tsiclient.esm.js.map +0 -1
- package/dist/tsiclient.js +0 -58
- package/dist/tsiclient.min.css +0 -6
- package/dist/tsiclient.min.css.map +0 -1
- package/dist/tsiclient.umd.js +0 -3
- package/dist/tsiclient.umd.js.LICENSE.txt +0 -19
- package/dist/tsiclient.umd.js.map +0 -1
- package/dist/tsiclient.umd.min.js +0 -3
- package/dist/tsiclient.umd.min.js.LICENSE.txt +0 -19
- package/dist/tsiclient.umd.min.js.map +0 -1
- package/tsiclient.css +0 -17323
- package/tsiclient.d.ts +0 -46
- package/tsiclient.js +0 -58
- package/tsiclient.min.css +0 -6
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
import { _ as __extends, d as __spreadArray } from './_tslib-BYFmvNeL.js';
|
|
2
|
-
import { U as Utils, G as GRIDCONTAINERCLASS, T as TooltipMeasureFormat, D as DataTypes, S as ShiftTypes } from './Utils-DDGqSryb.js';
|
|
3
|
-
import { C as Component } from './Component-BgifJdKl.js';
|
|
4
|
-
import { C as ChartComponentData, G as Grid } from './Grid-uoHKTet9.js';
|
|
5
|
-
import * as d3 from 'd3';
|
|
6
|
-
import Split from 'split.js';
|
|
7
|
-
import { E as EllipsisMenu } from './EllipsisMenu-CxJ0LoVm.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-DWpaQlXk.js';
|
|
2
|
-
import { C as Component } from './Component-DXwYPoSo.js';
|
|
3
|
-
import { C as ChartComponentData } from './ChartComponentData-DBW8_FnY.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,49 +0,0 @@
|
|
|
1
|
-
import { I as InterpolationFunctions, U as Utils, D as DataTypes, E as EventElementTypes } from './Utils-DDGqSryb.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,38 +0,0 @@
|
|
|
1
|
-
import { H as HorizontalMarker } from './Interfaces-R_1l9lIT.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,23 +0,0 @@
|
|
|
1
|
-
import { _ as __extends } from './_tslib-BYFmvNeL.js';
|
|
2
|
-
import { U as Utils } from './Utils-DDGqSryb.js';
|
|
3
|
-
import { C as ChartComponent } from './ChartComponent-Dg8P-BTZ.js';
|
|
4
|
-
import { C as ChartDataOptions } from './ChartDataOptions-CNTSB636.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 };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { C as ChartComponent } from './ChartComponent-ONNW31RL.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 };
|