tsichart-core 1.0.5 → 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.
- 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
package/package.json
CHANGED
|
@@ -1,124 +1,115 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "tsichart-core",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"keywords": [
|
|
6
|
-
"timeseries",
|
|
7
|
-
"time-series",
|
|
8
|
-
"charts",
|
|
9
|
-
"visualization",
|
|
10
|
-
"interactive",
|
|
11
|
-
"data-viz",
|
|
12
|
-
"d3",
|
|
13
|
-
"typescript",
|
|
14
|
-
"analytics",
|
|
15
|
-
"dashboard",
|
|
16
|
-
"tsichart",
|
|
17
|
-
"line-chart",
|
|
18
|
-
"heatmap"
|
|
19
|
-
],
|
|
20
|
-
"main": "
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"exports": {
|
|
24
|
-
".": {
|
|
25
|
-
"types": "./
|
|
26
|
-
"import": "./
|
|
27
|
-
"require": "./
|
|
28
|
-
"default": "./
|
|
29
|
-
},
|
|
30
|
-
"./
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"@rollup/plugin-
|
|
84
|
-
"@rollup/plugin-
|
|
85
|
-
"@rollup/plugin-
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"rollup
|
|
96
|
-
"rollup-plugin-
|
|
97
|
-
"rollup-plugin-
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"d3": "^7.9.0",
|
|
117
|
-
"d3-interpolate-path": "^2.3.0",
|
|
118
|
-
"d3-voronoi": "^1.1.4",
|
|
119
|
-
"moment": "^2.30.1",
|
|
120
|
-
"moment-timezone": "^0.6.0",
|
|
121
|
-
"sass": "1.93.2",
|
|
122
|
-
"split.js": "^1.6.5"
|
|
123
|
-
}
|
|
124
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "tsichart-core",
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
|
+
"description": "Framework-agnostic time series charting library - Core package",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"timeseries",
|
|
7
|
+
"time-series",
|
|
8
|
+
"charts",
|
|
9
|
+
"visualization",
|
|
10
|
+
"interactive",
|
|
11
|
+
"data-viz",
|
|
12
|
+
"d3",
|
|
13
|
+
"typescript",
|
|
14
|
+
"analytics",
|
|
15
|
+
"dashboard",
|
|
16
|
+
"tsichart",
|
|
17
|
+
"line-chart",
|
|
18
|
+
"heatmap"
|
|
19
|
+
],
|
|
20
|
+
"main": "./dist/index.js",
|
|
21
|
+
"module": "./dist/index.mjs",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.mjs",
|
|
27
|
+
"require": "./dist/index.js",
|
|
28
|
+
"default": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./components/*": {
|
|
31
|
+
"types": "./dist/components/*.d.ts",
|
|
32
|
+
"import": "./dist/components/*.mjs",
|
|
33
|
+
"require": "./dist/components/*.js"
|
|
34
|
+
},
|
|
35
|
+
"./models/*": {
|
|
36
|
+
"types": "./dist/models/*.d.ts",
|
|
37
|
+
"import": "./dist/models/*.mjs",
|
|
38
|
+
"require": "./dist/models/*.js"
|
|
39
|
+
},
|
|
40
|
+
"./utils": {
|
|
41
|
+
"types": "./dist/utils/index.d.ts",
|
|
42
|
+
"import": "./dist/utils/index.mjs",
|
|
43
|
+
"require": "./dist/utils/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./styles": "./dist/styles/index.css",
|
|
46
|
+
"./styles/*": "./dist/styles/*.css"
|
|
47
|
+
},
|
|
48
|
+
"sideEffects": [
|
|
49
|
+
"*.css",
|
|
50
|
+
"*.scss"
|
|
51
|
+
],
|
|
52
|
+
"files": [
|
|
53
|
+
"dist",
|
|
54
|
+
"README.md",
|
|
55
|
+
"LICENSE"
|
|
56
|
+
],
|
|
57
|
+
"repository": {
|
|
58
|
+
"type": "git",
|
|
59
|
+
"url": "git+https://github.com/Aenas11/tsichart-core.git",
|
|
60
|
+
"directory": "packages/core"
|
|
61
|
+
},
|
|
62
|
+
"bugs": {
|
|
63
|
+
"url": "https://github.com/Aenas11/tsichart-core/issues"
|
|
64
|
+
},
|
|
65
|
+
"homepage": "https://aenas11.github.io/tsichart-core/",
|
|
66
|
+
"author": "Alex Sysoiev <alexander.sysoev@gmail.com>",
|
|
67
|
+
"license": "MIT",
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"d3": "^7.0.0"
|
|
70
|
+
},
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"@types/awesomplete": "^1.1.16",
|
|
73
|
+
"@types/d3": "^7.4.3",
|
|
74
|
+
"awesomplete": "^1.1.7",
|
|
75
|
+
"d3": "^7.9.0",
|
|
76
|
+
"d3-interpolate-path": "^2.3.0",
|
|
77
|
+
"d3-voronoi": "^1.1.4",
|
|
78
|
+
"moment": "^2.30.1",
|
|
79
|
+
"moment-timezone": "^0.6.0",
|
|
80
|
+
"split.js": "^1.6.5"
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
84
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
85
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
86
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
87
|
+
"@testing-library/dom": "^10.4.1",
|
|
88
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
89
|
+
"@types/jest": "^29.5.14",
|
|
90
|
+
"@types/node": "^24.7.2",
|
|
91
|
+
"jest": "^29.7.0",
|
|
92
|
+
"jest-canvas-mock": "^2.5.2",
|
|
93
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
94
|
+
"postcss-url": "^10.1.3",
|
|
95
|
+
"rollup": "^4.52.4",
|
|
96
|
+
"rollup-plugin-auto-external": "^2.0.0",
|
|
97
|
+
"rollup-plugin-delete": "^3.0.1",
|
|
98
|
+
"rollup-plugin-dts": "^6.2.3",
|
|
99
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
100
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
101
|
+
"rollup-plugin-visualizer": "^6.0.4",
|
|
102
|
+
"sass": "1.93.2",
|
|
103
|
+
"shx": "^0.4.0",
|
|
104
|
+
"ts-jest": "^29.4.5",
|
|
105
|
+
"tslib": "^2.8.1",
|
|
106
|
+
"typescript": "^5.9.3"
|
|
107
|
+
},
|
|
108
|
+
"scripts": {
|
|
109
|
+
"build": "rollup -c rollup.config.mjs",
|
|
110
|
+
"test": "jest",
|
|
111
|
+
"test:watch": "jest --watch",
|
|
112
|
+
"test:coverage": "jest --coverage",
|
|
113
|
+
"clean": "shx rm -rf dist coverage"
|
|
114
|
+
}
|
|
115
|
+
}
|
package/README.MD
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
# @tsichart/core - Time Series Interactive Charts
|
|
2
|
-
|
|
3
|
-
A powerful, flexible JavaScript library for visualizing time series data with **interactive** charts. Built with TypeScript and D3.js, this library provides a rich set of chart components including line charts, bar charts, pie charts, heatmaps, scatter plots, and more.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
✨ **Rich Component Library** - 20+ pre-built, customizable chart components
|
|
8
|
-
📊 **Interactive Visualizations** - Tooltips, zooming, panning, and dynamic data updates
|
|
9
|
-
🎨 **Themeable** - Built-in light and dark themes with customization options
|
|
10
|
-
📱 **Responsive** - Charts adapt to different screen sizes
|
|
11
|
-
🎯 **TypeScript Support** - Full type definitions included
|
|
12
|
-
🌳 **Tree-shakeable** - Import only the components you need
|
|
13
|
-
📦 **Zero Configuration** - Works out of the box with sensible defaults
|
|
14
|
-
|
|
15
|
-
**Note:** This library is a community-maintained fork of the original Microsoft Time Series Insights Client, rebranded as **Time Series Interactive Charts** and updated for generic time series visualization use cases.
|
|
16
|
-
|
|
17
|
-
[](https://www.npmjs.com/package/tsichart-core)
|
|
18
|
-
[](https://opensource.org/licenses/MIT)
|
|
19
|
-
[](https://github.com/Aenas11/tsichart-core)
|
|
20
|
-
[](https://aenas11.github.io/tsichart-core/)
|
|
21
|
-
|
|
22
|
-
## Installation
|
|
23
|
-
|
|
24
|
-
### NPM
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
npm install tsichart-core
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Yarn
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
yarn add tsichart-core
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Quick Start
|
|
37
|
-
|
|
38
|
-
### Import All Components
|
|
39
|
-
|
|
40
|
-
```js
|
|
41
|
-
import TsiClient from "tsichart-core";
|
|
42
|
-
import "tsichart-core/tsiclient.css";
|
|
43
|
-
|
|
44
|
-
// Create a line chart
|
|
45
|
-
let tsiClient = new TsiClient();
|
|
46
|
-
let lineChart = new tsiClient.ux.LineChart(document.getElementById('chart'));
|
|
47
|
-
|
|
48
|
-
// Prepare your data
|
|
49
|
-
const data = [{
|
|
50
|
-
"Series1": {
|
|
51
|
-
"": {
|
|
52
|
-
"2023-01-01T00:00:00Z": { avg: 10 },
|
|
53
|
-
"2023-01-01T01:00:00Z": { avg: 15 },
|
|
54
|
-
"2023-01-01T02:00:00Z": { avg: 13 }
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}];
|
|
58
|
-
|
|
59
|
-
// Render the chart
|
|
60
|
-
lineChart.render(data, { theme: 'light', legend: 'compact' });
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Import Individual Components (Recommended for Tree-shaking)
|
|
64
|
-
|
|
65
|
-
```js
|
|
66
|
-
import LineChart from 'tsichart-core/LineChart';
|
|
67
|
-
import 'tsichart-core/tsiclient.css';
|
|
68
|
-
|
|
69
|
-
// Create and render chart
|
|
70
|
-
let lineChart = new LineChart(document.getElementById('chart'));
|
|
71
|
-
lineChart.render(data, { theme: 'light' });
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Available Components
|
|
75
|
-
|
|
76
|
-
**tsiclient** provides the following visualization components:
|
|
77
|
-
|
|
78
|
-
- **LineChart** - Render time series data as lines
|
|
79
|
-
- **BarChart** - Display time series data as bars with timestamp slider
|
|
80
|
-
- **PieChart** - Show time series data as pie charts with timestamp slider
|
|
81
|
-
- **Heatmap** - Visualize time series data as a heatmap
|
|
82
|
-
- **ScatterPlot** - Plot time series data points as a scatter plot
|
|
83
|
-
- **AvailabilityChart** - Display data availability over time
|
|
84
|
-
- **Grid** - Render time series data in a tabular format
|
|
85
|
-
- **Hierarchy** - Display hierarchical data structures
|
|
86
|
-
- **EventsTable** - Show events in a table format
|
|
87
|
-
- **DateTimePicker** - UI component for selecting date/time ranges
|
|
88
|
-
- **TimezonePicker** - UI component for timezone selection
|
|
89
|
-
- **Slider** - Time slider component
|
|
90
|
-
- **ModelSearch** - Search component for time series models
|
|
91
|
-
- **HierarchyNavigation** - Navigate hierarchical time series data
|
|
92
|
-
- **ProcessGraphic** - Display process graphics with data overlays
|
|
93
|
-
- **ColorPicker** - Color selection component
|
|
94
|
-
- And more...
|
|
95
|
-
|
|
96
|
-
For detailed usage examples and API documentation, see the [UX Components documentation](docs/UX.md).
|
|
97
|
-
|
|
98
|
-
## Data Format
|
|
99
|
-
|
|
100
|
-
All components work with a consistent JSON data structure. Here's the basic format:
|
|
101
|
-
|
|
102
|
-
```js
|
|
103
|
-
const data = [{
|
|
104
|
-
"SeriesName": {
|
|
105
|
-
"SplitByValue": { // Use empty string "" if no split
|
|
106
|
-
"2023-01-01T00:00:00Z": {
|
|
107
|
-
avg: 10, // Your metric values
|
|
108
|
-
min: 8,
|
|
109
|
-
max: 12
|
|
110
|
-
},
|
|
111
|
-
"2023-01-01T01:00:00Z": {
|
|
112
|
-
avg: 15,
|
|
113
|
-
min: 13,
|
|
114
|
-
max: 17
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}];
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
**You are responsible for:**
|
|
122
|
-
- Fetching time series data from your data source (API, database, etc.)
|
|
123
|
-
- Transforming your data into the expected format
|
|
124
|
-
- Handling any authentication/authorization
|
|
125
|
-
|
|
126
|
-
See the [UX Components documentation](docs/UX.md) for detailed format specifications for each chart type.
|
|
127
|
-
|
|
128
|
-
## Resources
|
|
129
|
-
|
|
130
|
-
* **[Live Examples](https://aenas11.github.io/tsichart-core/)** - Interactive examples hosted on GitHub Pages
|
|
131
|
-
* [Full API Documentation](docs/UX.md)
|
|
132
|
-
* [Example Source Code](pages/examples/) - Check the `pages/examples/` directory for working examples
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
## Contributing
|
|
136
|
-
|
|
137
|
-
Contributions are welcome! This is a community-maintained project. Please feel free to:
|
|
138
|
-
|
|
139
|
-
- Report bugs and request features via [GitHub Issues](https://github.com/Aenas11/tsichart-core/issues)
|
|
140
|
-
- Submit pull requests
|
|
141
|
-
- Improve documentation
|
|
142
|
-
- Share examples of your usage
|
|
143
|
-
|
|
144
|
-
## License
|
|
145
|
-
|
|
146
|
-
MIT License - see [LICENSE](LICENSE) file for details.
|
|
147
|
-
|
|
148
|
-
Original work Copyright (c) Microsoft Corporation
|
|
149
|
-
Modified work Copyright (c) 2024 [Alexander Sysoiev]
|
|
150
|
-
|
|
151
|
-
## Acknowledgments
|
|
152
|
-
|
|
153
|
-
This library is based on the original Microsoft Time Series Insights (TSI) JavaScript SDK, which has been deprecated. We've rebranded it as **Time Series Interactive Charts** and modernized it for generic time series visualization use cases.
|
|
154
|
-
|
|
155
|
-
**TSI** now stands for **Time Series Interactive** - reflecting the library's focus on interactive data visualization rather than a specific cloud service.
|
|
156
|
-
|
|
157
|
-
## Migration from Original TSIClient
|
|
158
|
-
|
|
159
|
-
If you're migrating from the original Microsoft `tsiclient` package:
|
|
160
|
-
|
|
161
|
-
1. **Package name change**: Update your imports from `tsiclient` to `tsichart-core`
|
|
162
|
-
2. **No breaking changes to component APIs**: The chart components work the same way
|
|
163
|
-
3. **Remove server calls**: You'll need to handle data fetching yourself (Azure TSI service was retired)
|
|
164
|
-
4. **Update documentation references**: Use the new documentation instead of Azure TSI docs
|
|
165
|
-
- The `tsiClient.server` object and all related methods have been removed
|
|
166
|
-
- Focus is now exclusively on client-side visualization components
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
## Contributing
|
|
170
|
-
|
|
171
|
-
This project welcomes contributions and suggestions.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { C as ChartDataOptions } from './ChartDataOptions-D0BJuRZy.js';
|
|
2
|
-
import './Interfaces-R_1l9lIT.js';
|
|
3
|
-
|
|
4
|
-
declare class AggregateExpression extends ChartDataOptions {
|
|
5
|
-
measureObject: any;
|
|
6
|
-
splitByObject: any;
|
|
7
|
-
predicate: Object;
|
|
8
|
-
visibleSplitByCap: number;
|
|
9
|
-
constructor(predicateObject: any, measureObject: any, measureTypes: Array<string>, searchSpan: any, splitByObject: any, colorOrOptionsObject: any, alias?: string, contextMenu?: Array<any>);
|
|
10
|
-
toTsx(roundFromTo?: boolean): {};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { AggregateExpression as default };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { _ as __extends, a as __assign } from './_tslib-BYFmvNeL.js';
|
|
2
|
-
import { U as Utils } from './Utils-DDGqSryb.js';
|
|
3
|
-
import { C as ChartDataOptions } from './ChartDataOptions-CNTSB636.js';
|
|
4
|
-
import 'd3';
|
|
5
|
-
import 'moment-timezone';
|
|
6
|
-
|
|
7
|
-
var MAXCARD = 150000;
|
|
8
|
-
var AggregateExpression = /** @class */ (function (_super) {
|
|
9
|
-
__extends(AggregateExpression, _super);
|
|
10
|
-
function AggregateExpression(predicateObject, measureObject, measureTypes, searchSpan, splitByObject, colorOrOptionsObject, alias, contextMenu) {
|
|
11
|
-
if (splitByObject === void 0) { splitByObject = null; }
|
|
12
|
-
var _this = _super.call(this, (typeof (colorOrOptionsObject) === 'object' && !!colorOrOptionsObject) ? __assign(__assign({}, colorOrOptionsObject), { searchSpan: searchSpan, measureTypes: measureTypes }) : { color: colorOrOptionsObject, searchSpan: searchSpan, measureTypes: measureTypes, alias: alias, contextMenu: contextMenu }) || this;
|
|
13
|
-
_this.visibleSplitByCap = 10;
|
|
14
|
-
_this.predicate = predicateObject;
|
|
15
|
-
_this.splitByObject = splitByObject;
|
|
16
|
-
_this.measureObject = ((measureTypes.length == 1 && measureTypes[0] == 'count') || measureObject.property == 'Events Count') ? { count: {} } : { input: measureObject };
|
|
17
|
-
return _this;
|
|
18
|
-
}
|
|
19
|
-
AggregateExpression.prototype.toTsx = function (roundFromTo) {
|
|
20
|
-
var _this = this;
|
|
21
|
-
if (roundFromTo === void 0) { roundFromTo = false; }
|
|
22
|
-
var tsx = {};
|
|
23
|
-
var shiftMillis = Utils.parseShift(this.timeShift, this.startAt, this.searchSpan);
|
|
24
|
-
var fromMillis = this.searchSpan.from.valueOf() + shiftMillis;
|
|
25
|
-
var toMillis = this.searchSpan.to.valueOf() + shiftMillis;
|
|
26
|
-
var bucketSizeInMillis = Utils.parseTimeInput(this.searchSpan.bucketSize);
|
|
27
|
-
var roundedFromMillis = Math.floor((fromMillis + 62135596800000) / (bucketSizeInMillis)) * (bucketSizeInMillis) - 62135596800000;
|
|
28
|
-
var roundedToMillis = Math.ceil((toMillis + 62135596800000) / (bucketSizeInMillis)) * (bucketSizeInMillis) - 62135596800000;
|
|
29
|
-
if (roundFromTo) {
|
|
30
|
-
fromMillis = roundedFromMillis;
|
|
31
|
-
toMillis = roundedToMillis;
|
|
32
|
-
}
|
|
33
|
-
tsx['searchSpan'] = { from: (new Date(fromMillis)).toISOString(), to: (new Date(toMillis)).toISOString() };
|
|
34
|
-
// create aggregates
|
|
35
|
-
var measures = (this.measureObject.hasOwnProperty('count')) ? [{ count: {} }]
|
|
36
|
-
: this.measureTypes.reduce(function (p, c) {
|
|
37
|
-
var measureObject = {};
|
|
38
|
-
if (c == 'count')
|
|
39
|
-
measureObject = { count: {} };
|
|
40
|
-
else
|
|
41
|
-
measureObject[c] = _this['measureObject'];
|
|
42
|
-
p.push(measureObject);
|
|
43
|
-
return p;
|
|
44
|
-
}, []);
|
|
45
|
-
var aggregateObject = {};
|
|
46
|
-
var dimensionObject = { dateHistogram: { input: { builtInProperty: "$ts" }, breaks: { size: this.searchSpan.bucketSize } } };
|
|
47
|
-
if (this.splitByObject != null) {
|
|
48
|
-
var bucketsCeil = Math.ceil((roundedToMillis - roundedFromMillis) / bucketSizeInMillis);
|
|
49
|
-
aggregateObject['dimension'] = { uniqueValues: { input: this.splitByObject, take: Math.floor(MAXCARD / bucketsCeil) } };
|
|
50
|
-
aggregateObject['aggregate'] = { dimension: dimensionObject, measures: measures };
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
aggregateObject['dimension'] = dimensionObject;
|
|
54
|
-
aggregateObject['measures'] = measures;
|
|
55
|
-
}
|
|
56
|
-
var aggregates = [aggregateObject];
|
|
57
|
-
tsx['aggregates'] = aggregates;
|
|
58
|
-
// create predicate
|
|
59
|
-
var predicate;
|
|
60
|
-
if (!this.measureObject.hasOwnProperty('count'))
|
|
61
|
-
predicate = { and: [this.predicate, { not: { eq: { left: this.measureObject.input, right: { 'double': null } } } }] };
|
|
62
|
-
else
|
|
63
|
-
predicate = this.predicate;
|
|
64
|
-
tsx['predicate'] = predicate;
|
|
65
|
-
return tsx;
|
|
66
|
-
};
|
|
67
|
-
return AggregateExpression;
|
|
68
|
-
}(ChartDataOptions));
|
|
69
|
-
|
|
70
|
-
export { AggregateExpression as default };
|