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.
Files changed (135) 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} +9498 -9497
  9. package/dist/styles/index.css.map +1 -0
  10. package/package.json +115 -124
  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-C8ewvn3T.js +0 -488
  15. package/dist/AvailabilityChart.d.ts +0 -59
  16. package/dist/AvailabilityChart.js +0 -26
  17. package/dist/ChartComponent-Dg8P-BTZ.js +0 -302
  18. package/dist/ChartComponent-ONNW31RL.d.ts +0 -80
  19. package/dist/ChartComponentData-DBW8_FnY.d.ts +0 -47
  20. package/dist/ChartDataOptions-CNTSB636.js +0 -49
  21. package/dist/ChartDataOptions-D0BJuRZy.d.ts +0 -38
  22. package/dist/ChartVisualizationComponent-CTs5Q_sg.js +0 -23
  23. package/dist/ChartVisualizationComponent-CpR8xZla.d.ts +0 -8
  24. package/dist/ColorPicker-0p6vkATj.js +0 -120
  25. package/dist/ColorPicker.d.ts +0 -28
  26. package/dist/ColorPicker.js +0 -6
  27. package/dist/Component-BgifJdKl.js +0 -401
  28. package/dist/Component-DXwYPoSo.d.ts +0 -226
  29. package/dist/ContextMenu-wqGGgAzp.js +0 -197
  30. package/dist/DateTimeButton-D7N8XG0S.js +0 -38
  31. package/dist/DateTimeButton-DfJL5kvr.d.ts +0 -16
  32. package/dist/DateTimeButtonRange-BM_J646m.js +0 -71
  33. package/dist/DateTimeButtonRange.d.ts +0 -19
  34. package/dist/DateTimeButtonRange.js +0 -15
  35. package/dist/DateTimeButtonSingle-BxMSitQG.js +0 -48
  36. package/dist/DateTimeButtonSingle.d.ts +0 -17
  37. package/dist/DateTimeButtonSingle.js +0 -14
  38. package/dist/DateTimePicker-BgTi-DY9.js +0 -532
  39. package/dist/DateTimePicker.d.ts +0 -69
  40. package/dist/DateTimePicker.js +0 -13
  41. package/dist/EllipsisMenu-CxJ0LoVm.js +0 -116
  42. package/dist/EllipsisMenu.d.ts +0 -20
  43. package/dist/EllipsisMenu.js +0 -6
  44. package/dist/Enums-DWpaQlXk.d.ts +0 -12
  45. package/dist/EventsTable-CsnBvvIW.js +0 -553
  46. package/dist/EventsTable.d.ts +0 -34
  47. package/dist/EventsTable.js +0 -10
  48. package/dist/GeoProcessGraphic-CUBMHIHX.js +0 -145
  49. package/dist/GeoProcessGraphic.d.ts +0 -34
  50. package/dist/GeoProcessGraphic.js +0 -7
  51. package/dist/Grid-uoHKTet9.js +0 -874
  52. package/dist/Grid.d.ts +0 -43
  53. package/dist/Grid.js +0 -6
  54. package/dist/GroupedBarChart-Bc3cGhgz.js +0 -579
  55. package/dist/GroupedBarChart.d.ts +0 -22
  56. package/dist/GroupedBarChart.js +0 -17
  57. package/dist/GroupedBarChartData-B7BTM9JH.d.ts +0 -20
  58. package/dist/GroupedBarChartData-Ml5JJimg.js +0 -121
  59. package/dist/Heatmap-5gFc_AVW.js +0 -524
  60. package/dist/Heatmap.d.ts +0 -31
  61. package/dist/Heatmap.js +0 -14
  62. package/dist/Hierarchy-C5ueDsus.js +0 -260
  63. package/dist/Hierarchy.d.ts +0 -39
  64. package/dist/Hierarchy.js +0 -6
  65. package/dist/HierarchyNavigation-C3Pwt0D6.js +0 -336
  66. package/dist/HierarchyNavigation.d.ts +0 -34
  67. package/dist/HierarchyNavigation.js +0 -6
  68. package/dist/HistoryPlayback-D09bter3.js +0 -175
  69. package/dist/HistoryPlayback-DmJ6u7lU.d.ts +0 -68
  70. package/dist/Interfaces-R_1l9lIT.d.ts +0 -6
  71. package/dist/Legend-gCIrAytG.js +0 -497
  72. package/dist/LineChart-CzDp5ULB.js +0 -3181
  73. package/dist/LineChart.d.ts +0 -163
  74. package/dist/LineChart.js +0 -18
  75. package/dist/ModelAutocomplete-lU71Ndju.js +0 -100
  76. package/dist/ModelAutocomplete.d.ts +0 -12
  77. package/dist/ModelAutocomplete.js +0 -7
  78. package/dist/ModelSearch-OF4DygOJ.js +0 -189
  79. package/dist/ModelSearch.d.ts +0 -23
  80. package/dist/ModelSearch.js +0 -9
  81. package/dist/PieChart-XLc9Itne.js +0 -258
  82. package/dist/PieChart.d.ts +0 -26
  83. package/dist/PieChart.js +0 -17
  84. package/dist/PlaybackControls-DbG9gExy.js +0 -195
  85. package/dist/PlaybackControls.d.ts +0 -39
  86. package/dist/PlaybackControls.js +0 -13
  87. package/dist/ProcessGraphic-Cft1b4Mf.js +0 -154
  88. package/dist/ProcessGraphic.d.ts +0 -31
  89. package/dist/ProcessGraphic.js +0 -7
  90. package/dist/ScatterPlot-CdnqSHq2.js +0 -924
  91. package/dist/ScatterPlot.d.ts +0 -115
  92. package/dist/ScatterPlot.js +0 -17
  93. package/dist/SingleDateTimePicker-Ddr-ogTk.js +0 -213
  94. package/dist/SingleDateTimePicker.d.ts +0 -45
  95. package/dist/SingleDateTimePicker.js +0 -12
  96. package/dist/Slider-CX0nvlqx.js +0 -186
  97. package/dist/Slider.d.ts +0 -31
  98. package/dist/Slider.js +0 -6
  99. package/dist/TemporalXAxisComponent-DXmMekYq.js +0 -129
  100. package/dist/TemporalXAxisComponent-PIeiJYUr.d.ts +0 -23
  101. package/dist/TimezonePicker-CQpXR5eb.js +0 -58
  102. package/dist/TimezonePicker.d.ts +0 -16
  103. package/dist/TimezonePicker.js +0 -10
  104. package/dist/Tooltip-C13k0eeH.js +0 -104
  105. package/dist/TsqExpression.d.ts +0 -36
  106. package/dist/TsqExpression.js +0 -89
  107. package/dist/UXClient-Bn1afElm.js +0 -230
  108. package/dist/UXClient.d.ts +0 -74
  109. package/dist/UXClient.js +0 -47
  110. package/dist/Utils-BcQeZOM3.d.ts +0 -104
  111. package/dist/Utils-DDGqSryb.js +0 -1138
  112. package/dist/Utils.d.ts +0 -7
  113. package/dist/Utils.js +0 -7
  114. package/dist/_tslib-BYFmvNeL.js +0 -96
  115. package/dist/pikaday-jh_aVtJs.js +0 -1252
  116. package/dist/tsiclient.cjs.js +0 -3
  117. package/dist/tsiclient.cjs.js.LICENSE.txt +0 -19
  118. package/dist/tsiclient.cjs.js.map +0 -1
  119. package/dist/tsiclient.d.ts +0 -46
  120. package/dist/tsiclient.esm.js +0 -3
  121. package/dist/tsiclient.esm.js.LICENSE.txt +0 -19
  122. package/dist/tsiclient.esm.js.map +0 -1
  123. package/dist/tsiclient.js +0 -58
  124. package/dist/tsiclient.min.css +0 -6
  125. package/dist/tsiclient.min.css.map +0 -1
  126. package/dist/tsiclient.umd.js +0 -3
  127. package/dist/tsiclient.umd.js.LICENSE.txt +0 -19
  128. package/dist/tsiclient.umd.js.map +0 -1
  129. package/dist/tsiclient.umd.min.js +0 -3
  130. package/dist/tsiclient.umd.min.js.LICENSE.txt +0 -19
  131. package/dist/tsiclient.umd.min.js.map +0 -1
  132. package/tsiclient.css +0 -17323
  133. package/tsiclient.d.ts +0 -46
  134. package/tsiclient.js +0 -58
  135. package/tsiclient.min.css +0 -6
package/package.json CHANGED
@@ -1,124 +1,115 @@
1
- {
2
- "name": "tsichart-core",
3
- "version": "1.0.5",
4
- "description": "Time Series Interactive Charts - A comprehensive JavaScript library for visualizing time series data with interactive charts including line charts, bar charts, pie charts, heatmaps, scatter plots, and more.",
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": "tsiclient.js",
21
- "types": "tsiclient.d.ts",
22
- "module": "tsiclient.js",
23
- "exports": {
24
- ".": {
25
- "types": "./tsiclient.d.ts",
26
- "import": "./tsiclient.js",
27
- "require": "./tsiclient.js",
28
- "default": "./tsiclient.js"
29
- },
30
- "./tsiclient.css": "./tsiclient.css",
31
- "./tsiclient.min.css": "./tsiclient.min.css",
32
- "./*": {
33
- "types": "./dist/*.d.ts",
34
- "import": "./dist/*.js",
35
- "default": "./dist/*.js"
36
- }
37
- },
38
- "sideEffects": [
39
- "*.css",
40
- "*.scss"
41
- ],
42
- "files": [
43
- "dist",
44
- "tsiclient.js",
45
- "tsiclient.d.ts",
46
- "tsiclient.css",
47
- "tsiclient.min.css",
48
- "README.md",
49
- "LICENSE"
50
- ],
51
- "repository": {
52
- "type": "git",
53
- "url": "git+https://github.com/Aenas11/tsichart-core.git"
54
- },
55
- "bugs": {
56
- "url": "https://github.com/Aenas11/tsichart-core/issues"
57
- },
58
- "homepage": "https://aenas11.github.io/tsichart-core/",
59
- "publishConfig": {
60
- "access": "public",
61
- "registry": "https://registry.npmjs.org/"
62
- },
63
- "author": "Alex Sysoiev <alexander.sysoev@gmail.com>",
64
- "license": "MIT",
65
- "engines": {
66
- "node": "^22.5.1",
67
- "npm": "^10.8.2"
68
- },
69
- "scripts": {
70
- "start": "webpack-dev-server --config webpack.dev.js",
71
- "build": "npm run clean && npm run rollup && npm run webpack && npm run post-build",
72
- "clean": "shx rm -rf dist && shx rm -rf build_artifacts",
73
- "rollup": "rollup --c",
74
- "webpack": "webpack --config webpack.prod.js",
75
- "webpack_dev": "webpack --config webpack.dev.js",
76
- "copy-root-files": "shx cp dist/tsiclient.js . && shx cp dist/tsiclient.d.ts . && shx cp dist/tsiclient.css . && shx cp dist/tsiclient.min.css .",
77
- "pack": "shx mkdir -p build_artifacts && npm pack && shx mv *.tgz build_artifacts/",
78
- "post-build": "npm run copy-root-files && npm run pack",
79
- "umd-analyze": "webpack-bundle-analyzer ./build_artifacts/umd_stats.json"
80
- },
81
- "devDependencies": {
82
- "@rollup/plugin-commonjs": "^28.0.6",
83
- "@rollup/plugin-json": "^6.1.0",
84
- "@rollup/plugin-node-resolve": "^16.0.3",
85
- "@rollup/plugin-terser": "^0.4.4",
86
- "css-loader": "^7.1.2",
87
- "css-minimizer-webpack-plugin": "^7.0.2",
88
- "file-loader": "^6.2.0",
89
- "mini-css-extract-plugin": "^2.9.4",
90
- "postcss-url": "^10.1.3",
91
- "rollup": "^4.52.4",
92
- "rollup-plugin-auto-external": "^2.0.0",
93
- "rollup-plugin-delete": "^3.0.1",
94
- "rollup-plugin-dts": "^6.2.3",
95
- "rollup-plugin-postcss": "^4.0.2",
96
- "rollup-plugin-typescript2": "^0.36.0",
97
- "rollup-plugin-visualizer": "^6.0.4",
98
- "sass-loader": "^16.0.5",
99
- "shx": "^0.4.0",
100
- "style-loader": "^4.0.0",
101
- "terser-webpack-plugin": "^5.3.14",
102
- "ts-loader": "^9.5.4",
103
- "tslib": "^2.8.1",
104
- "typescript": "^5.9.3",
105
- "url-loader": "^4.1.1",
106
- "webpack": "^5.102.1",
107
- "webpack-bundle-analyzer": "^4.10.2",
108
- "webpack-cli": "^6.0.1",
109
- "webpack-dev-server": "^5.2.2",
110
- "webpack-merge": "^6.0.1"
111
- },
112
- "dependencies": {
113
- "@types/awesomplete": "^1.1.16",
114
- "@types/d3": "^7.4.3",
115
- "awesomplete": "^1.1.7",
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
- [![npm version](https://badge.fury.io/js/tsichart-core.svg)](https://www.npmjs.com/package/tsichart-core)
18
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
19
- [![GitHub](https://img.shields.io/badge/GitHub-Repository-blue?logo=github)](https://github.com/Aenas11/tsichart-core)
20
- [![Live Examples](https://img.shields.io/badge/Examples-Live%20Demo-green)](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 };