@operato/chart 8.0.0-alpha.9 → 8.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 (61) hide show
  1. package/CHANGELOG.md +197 -0
  2. package/dist/src/editors/configurer.d.ts +2 -2
  3. package/dist/src/editors/ox-input-chart-hbar.js +6 -1
  4. package/dist/src/editors/ox-input-chart-hbar.js.map +1 -1
  5. package/dist/src/editors/ox-input-chart-mixed.js +6 -1
  6. package/dist/src/editors/ox-input-chart-mixed.js.map +1 -1
  7. package/dist/src/editors/ox-input-chart-radar.js +6 -1
  8. package/dist/src/editors/ox-input-chart-radar.js.map +1 -1
  9. package/dist/src/editors/ox-input-chart-timeseries.js +7 -1
  10. package/dist/src/editors/ox-input-chart-timeseries.js.map +1 -1
  11. package/dist/src/editors/templates/annotations.d.ts +1 -0
  12. package/dist/src/editors/templates/annotations.js +5 -0
  13. package/dist/src/editors/templates/annotations.js.map +1 -1
  14. package/dist/src/editors/templates/display-value.js +7 -6
  15. package/dist/src/editors/templates/display-value.js.map +1 -1
  16. package/dist/src/editors/templates/series.d.ts +1 -0
  17. package/dist/src/editors/templates/series.js +5 -0
  18. package/dist/src/editors/templates/series.js.map +1 -1
  19. package/dist/tsconfig.tsbuildinfo +1 -1
  20. package/package.json +14 -14
  21. package/.editorconfig +0 -29
  22. package/.storybook/main.js +0 -3
  23. package/.storybook/preview.js +0 -52
  24. package/.storybook/server.mjs +0 -8
  25. package/assets/images/icon-editor-gradient-direction.png +0 -0
  26. package/assets/images/icon-properties-label.png +0 -0
  27. package/assets/images/icon-properties-line-type.png +0 -0
  28. package/assets/images/icon-properties-table.png +0 -0
  29. package/src/chartjs/config-converter.ts +0 -341
  30. package/src/chartjs/ox-chart-js.ts +0 -207
  31. package/src/editors/configurer.ts +0 -336
  32. package/src/editors/index.ts +0 -8
  33. package/src/editors/input-chart-abstract.ts +0 -202
  34. package/src/editors/input-chart-styles.ts +0 -206
  35. package/src/editors/ox-input-chart-hbar.ts +0 -152
  36. package/src/editors/ox-input-chart-mixed.ts +0 -236
  37. package/src/editors/ox-input-chart-pie.ts +0 -69
  38. package/src/editors/ox-input-chart-radar.ts +0 -51
  39. package/src/editors/ox-input-chart-timeseries.ts +0 -273
  40. package/src/editors/ox-property-editor-chart.ts +0 -72
  41. package/src/editors/templates/annotations.ts +0 -287
  42. package/src/editors/templates/display-value.ts +0 -110
  43. package/src/editors/templates/series.ts +0 -308
  44. package/src/global.d.ts +0 -1
  45. package/src/index.ts +0 -0
  46. package/src/progress/ox-progress-circle.ts +0 -133
  47. package/src/scichart/ox-scichart.ts +0 -151
  48. package/src/scichart/scichart-builder.ts +0 -508
  49. package/src/types.d.ts +0 -124
  50. package/stories/common.ts +0 -87
  51. package/stories/ox-input-chart-bar.stories.ts +0 -188
  52. package/stories/ox-input-chart-doughnut.stories.ts +0 -130
  53. package/stories/ox-input-chart-hbar.stories.ts +0 -188
  54. package/stories/ox-input-chart-line.stories.ts +0 -198
  55. package/stories/ox-input-chart-pie.stories.ts +0 -130
  56. package/stories/ox-input-chart-polar-area.stories.ts +0 -130
  57. package/stories/ox-input-chart-radar.stories.ts +0 -141
  58. package/stories/ox-input-chart-timeseries.stories.ts +0 -268
  59. package/tsconfig.json +0 -25
  60. package/web-dev-server.config.mjs +0 -27
  61. package/web-test-runner.config.mjs +0 -41
@@ -1,268 +0,0 @@
1
- import { html, TemplateResult } from 'lit'
2
-
3
- import '../src/editors/ox-input-chart-timeseries.js'
4
- import '../src/chartjs/ox-chart-js.js'
5
- import '../src/scichart/ox-scichart.js'
6
-
7
- import { data, getDefaultChartConfig } from './common.js'
8
-
9
- export default {
10
- title: 'ox-input-chart-timeseries',
11
- component: 'ox-input-chart-timeseries',
12
- argTypes: {
13
- value: { control: 'object' }
14
- }
15
- }
16
-
17
- interface Story<T> {
18
- (args: T): TemplateResult
19
- args?: Partial<T>
20
- argTypes?: Record<string, unknown>
21
- }
22
-
23
- interface ArgTypes {
24
- value: OperatoChart.ChartConfig
25
- }
26
-
27
- function showCharts(e: Event) {
28
- const target = e.currentTarget as any
29
- const config = target.value
30
- const chartjs = document.querySelector('#chartjs') as HTMLElement
31
- if (chartjs) {
32
- ;(chartjs as any).config = { ...config }
33
- }
34
- const scichart = document.querySelector('#scichart') as HTMLElement
35
- if (scichart) {
36
- ;(scichart as any).config = config
37
- }
38
- }
39
-
40
- const Template: Story<ArgTypes> = ({ value }: ArgTypes) => html`
41
- <link
42
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
43
- rel="stylesheet"
44
- />
45
- <link
46
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
47
- rel="stylesheet"
48
- />
49
- <link
50
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
51
- rel="stylesheet"
52
- />
53
-
54
- <link href="/themes/light.css" rel="stylesheet" />
55
- <link href="/themes/dark.css" rel="stylesheet" />
56
- <link href="/themes/spacing.css" rel="stylesheet" />
57
-
58
- <style>
59
- .desc {
60
- color: var(--md-sys-color-background);
61
- background-color: var(--md-sys-color-on-background);
62
- padding: var(--spacing-small);
63
- }
64
-
65
- .container {
66
- display: flex;
67
- flex-direction: row;
68
- overflow-y: auto;
69
- padding: var(--spacing-medium);
70
- gap: var(--spacing-medium);
71
-
72
- color: var(--md-sys-color-on-background);
73
- background-color: var(--md-sys-color-background);
74
- }
75
-
76
- #editor {
77
- width: 300px;
78
- }
79
-
80
- #charts {
81
- flex: 1;
82
-
83
- display: flex;
84
- flex-direction: column;
85
- gap: var(--spacing-medium);
86
- }
87
-
88
- #chartjs {
89
- flex: 1;
90
- }
91
-
92
- #scichart {
93
- flex: 1;
94
- }
95
- </style>
96
-
97
- <div class="desc">Type 'count' or 'average' for series dataKey, type 'timestamp' for axis's dataKey</div>
98
-
99
- <div class="container">
100
- <ox-input-chart-timeseries
101
- chart-type="line"
102
- id="editor"
103
- .value=${value}
104
- @change=${showCharts}
105
- ></ox-input-chart-timeseries>
106
- <div id="charts">
107
- <ox-scichart id="scichart" .data=${data} attr-x="timestamp" attr-y="count"></ox-scichart>
108
- <!-- <ox-chart-js id="chartjs" .data=${data}></ox-chart-js> -->
109
- </div>
110
- </div>
111
- `
112
-
113
- export const Default = Template.bind({})
114
- Default.args = {}
115
-
116
- export const WithData = Template.bind({})
117
- WithData.args = {
118
- value: {
119
- ...getDefaultChartConfig('line'),
120
- data: {
121
- datasets: [
122
- {
123
- dataKey: 'count',
124
- label: '라인 시리즈 카운트',
125
- type: 'line',
126
- color: 'rgba(255, 99, 132, 1)',
127
- borderWidth: 1
128
- },
129
- {
130
- dataKey: 'average',
131
- label: '라인 시리즈 평균값',
132
- type: 'line',
133
- color: 'rgba(54, 162, 235, 1)',
134
- fill: false,
135
- lineTension: 0.4,
136
- pointStyle: 'circle',
137
- pointRadius: 3
138
- }
139
- ],
140
- labelDataKey: 'timestamp'
141
- },
142
- options: {
143
- scales: {
144
- xAxes: [
145
- {
146
- axisTitle: 'timestamp',
147
- ticks: { beginAtZero: true }
148
- }
149
- ],
150
- yAxes: [
151
- {
152
- axisTitle: 'count',
153
- ticks: { beginAtZero: true }
154
- }
155
- ]
156
- },
157
- legend: { display: true }
158
- }
159
- }
160
- }
161
-
162
- export const MultiAxis = Template.bind({})
163
- MultiAxis.args = {
164
- value: {
165
- ...getDefaultChartConfig('line'),
166
- data: {
167
- datasets: [
168
- {
169
- label: 'Bar Series',
170
- type: 'bar',
171
- dataKey: 'count',
172
- axisTitle: 'count',
173
- backgroundColor: 'rgba(255, 99, 132, 0.2)',
174
- borderColor: 'rgba(255, 99, 132, 1)',
175
- borderWidth: 1,
176
- yAxisID: 'left'
177
- },
178
- {
179
- label: 'Line Series',
180
- type: 'line',
181
- dataKey: 'average',
182
- axisTitle: 'average',
183
- color: 'rgba(54, 162, 235, 1)',
184
- borderWidth: 1,
185
- fill: false,
186
- lineTension: 0.4,
187
- pointStyle: 'rect',
188
- pointRadius: 3,
189
- yAxisID: 'right'
190
- }
191
- ],
192
- labelDataKey: 'timestamp'
193
- },
194
- options: {
195
- scales: {
196
- xAxes: [
197
- {
198
- axisTitle: 'timestamp',
199
- ticks: { beginAtZero: true }
200
- }
201
- ],
202
- yAxes: [
203
- {
204
- axisTitle: 'count',
205
- ticks: { beginAtZero: true }
206
- },
207
- {
208
- axisTitle: 'average',
209
- ticks: { beginAtZero: true }
210
- }
211
- ]
212
- },
213
- multiAxis: true,
214
- legend: { display: true },
215
- annotations: [
216
- {
217
- type: 'line',
218
- x1: 0,
219
- y1: -10,
220
- x2: 1,
221
- y2: 10,
222
- stroke: 'red',
223
- strokeThickness: 5,
224
- xCoordinateMode: 'Relative',
225
- yCoordinateMode: 'DataValue'
226
- },
227
- {
228
- type: 'text',
229
- x1: 0.5,
230
- y1: 0,
231
- text: 'Hello',
232
- fontSize: 50,
233
- stroke: 'blue',
234
- xCoordinateMode: 'Relative',
235
- yCoordinateMode: 'DataValue'
236
- },
237
- {
238
- type: 'box',
239
- x1: 0.2,
240
- y1: 10,
241
- x2: 0.5,
242
- y2: 20,
243
- fill: 'green',
244
- stroke: 'blue',
245
- strokeThickness: 10,
246
- xCoordinateMode: 'Relative',
247
- yCoordinateMode: 'DataValue'
248
- },
249
- {
250
- type: 'horizontalLine',
251
- y1: 20,
252
- stroke: 'purple',
253
- strokeThickness: 5,
254
- xCoordinateMode: 'Relative',
255
- yCoordinateMode: 'DataValue'
256
- },
257
- {
258
- type: 'verticalLine',
259
- x1: 0.8,
260
- stroke: 'orange',
261
- strokeThickness: 5,
262
- xCoordinateMode: 'Relative',
263
- yCoordinateMode: 'DataValue'
264
- }
265
- ]
266
- }
267
- }
268
- }
package/tsconfig.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "esnext",
4
- "module": "esnext",
5
- "moduleResolution": "node",
6
- "resolveJsonModule": true,
7
- "noEmitOnError": true,
8
- "lib": ["es2017", "dom"],
9
- "strict": true,
10
- "esModuleInterop": false,
11
- "allowSyntheticDefaultImports": true,
12
- "experimentalDecorators": true,
13
- "useDefineForClassFields": false,
14
- "importHelpers": true,
15
- "outDir": "dist",
16
- "sourceMap": true,
17
- "inlineSources": true,
18
- "rootDir": "./",
19
- "declaration": true,
20
- "incremental": true,
21
- "skipLibCheck": true,
22
- "types": ["node", "mocha"]
23
- },
24
- "include": ["**/*.ts", "*.d.ts"]
25
- }
@@ -1,27 +0,0 @@
1
- // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
2
-
3
- /** Use Hot Module replacement by adding --hmr to the start command */
4
- const hmr = process.argv.includes('--hmr')
5
-
6
- export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
7
- open: '/demo/',
8
- /** Use regular watch mode if HMR is not enabled. */
9
- watch: !hmr,
10
- /** Resolve bare module imports */
11
- nodeResolve: {
12
- exportConditions: ['browser', 'development']
13
- },
14
-
15
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
16
- // esbuildTarget: 'auto'
17
-
18
- /** Set appIndex to enable SPA routing */
19
- // appIndex: 'demo/index.html',
20
-
21
- plugins: [
22
- /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
23
- // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
24
- ]
25
-
26
- // See documentation for all available options
27
- })
@@ -1,41 +0,0 @@
1
- // import { playwrightLauncher } from '@web/test-runner-playwright';
2
-
3
- const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
4
-
5
- export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
6
- /** Test files to run */
7
- files: 'dist/test/**/*.test.js',
8
-
9
- /** Resolve bare module imports */
10
- nodeResolve: {
11
- exportConditions: ['browser', 'development'],
12
- },
13
-
14
- /** Filter out lit dev mode logs */
15
- filterBrowserLogs(log) {
16
- for (const arg of log.args) {
17
- if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
18
- return false;
19
- }
20
- }
21
- return true;
22
- },
23
-
24
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
25
- // esbuildTarget: 'auto',
26
-
27
- /** Amount of browsers to run concurrently */
28
- // concurrentBrowsers: 2,
29
-
30
- /** Amount of test files per browser to test concurrently */
31
- // concurrency: 1,
32
-
33
- /** Browsers to run tests on */
34
- // browsers: [
35
- // playwrightLauncher({ product: 'chromium' }),
36
- // playwrightLauncher({ product: 'firefox' }),
37
- // playwrightLauncher({ product: 'webkit' }),
38
- // ],
39
-
40
- // See documentation for all available options
41
- });