@progress/kendo-angular-chart-wizard 16.6.0-develop.10

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 (54) hide show
  1. package/LICENSE.md +11 -0
  2. package/NOTICE.txt +200 -0
  3. package/README.md +32 -0
  4. package/chart-wizard-state.d.ts +149 -0
  5. package/chart-wizard.component.d.ts +80 -0
  6. package/chart-wizard.module.d.ts +19 -0
  7. package/common/get-wizard-data-from-data-rows.d.ts +41 -0
  8. package/common/index.d.ts +5 -0
  9. package/common/models.d.ts +19 -0
  10. package/directives.d.ts +10 -0
  11. package/esm2020/chart-wizard-state.mjs +502 -0
  12. package/esm2020/chart-wizard.component.mjs +552 -0
  13. package/esm2020/chart-wizard.module.mjs +53 -0
  14. package/esm2020/common/get-wizard-data-from-data-rows.mjs +27 -0
  15. package/esm2020/common/index.mjs +5 -0
  16. package/esm2020/common/models.mjs +5 -0
  17. package/esm2020/directives.mjs +13 -0
  18. package/esm2020/events/export-event.mjs +18 -0
  19. package/esm2020/events/index.mjs +5 -0
  20. package/esm2020/events/preventable-event.mjs +30 -0
  21. package/esm2020/grid-integration/get-grid-selected-rows.mjs +48 -0
  22. package/esm2020/grid-integration/get-wizard-data-from-grid-selection.mjs +13 -0
  23. package/esm2020/grid-integration/grid-chart-wizard.directive.mjs +74 -0
  24. package/esm2020/grid-integration/index.mjs +7 -0
  25. package/esm2020/index.mjs +11 -0
  26. package/esm2020/package-metadata.mjs +15 -0
  27. package/esm2020/progress-kendo-angular-chart-wizard.mjs +8 -0
  28. package/esm2020/property-pane/chart-tab.component.mjs +257 -0
  29. package/esm2020/property-pane/data-tab.component.mjs +229 -0
  30. package/esm2020/property-pane/form-field.component.mjs +245 -0
  31. package/esm2020/property-pane/format-tab.component.mjs +945 -0
  32. package/esm2020/series-type-button.component.mjs +67 -0
  33. package/esm2020/state.service.mjs +32 -0
  34. package/events/export-event.d.ts +24 -0
  35. package/events/index.d.ts +5 -0
  36. package/events/preventable-event.d.ts +24 -0
  37. package/fesm2015/progress-kendo-angular-chart-wizard.mjs +2999 -0
  38. package/fesm2020/progress-kendo-angular-chart-wizard.mjs +2993 -0
  39. package/grid-integration/get-grid-selected-rows.d.ts +20 -0
  40. package/grid-integration/get-wizard-data-from-grid-selection.d.ts +19 -0
  41. package/grid-integration/grid-chart-wizard.directive.d.ts +42 -0
  42. package/grid-integration/index.d.ts +7 -0
  43. package/index.d.ts +12 -0
  44. package/package-metadata.d.ts +9 -0
  45. package/package.json +65 -0
  46. package/property-pane/chart-tab.component.d.ts +35 -0
  47. package/property-pane/data-tab.component.d.ts +33 -0
  48. package/property-pane/form-field.component.d.ts +45 -0
  49. package/property-pane/format-tab.component.d.ts +102 -0
  50. package/schematics/collection.json +12 -0
  51. package/schematics/ngAdd/index.js +8 -0
  52. package/schematics/ngAdd/schema.json +24 -0
  53. package/series-type-button.component.d.ts +24 -0
  54. package/state.service.d.ts +23 -0
@@ -0,0 +1,2993 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as i0 from '@angular/core';
6
+ import { Injectable, EventEmitter, Component, ChangeDetectionStrategy, Input, Output, HostBinding, ViewChild, Directive, Inject, HostListener, NgModule } from '@angular/core';
7
+ import { shouldShowValidationUI, WatermarkOverlayComponent, isPresent, ResizeBatchService } from '@progress/kendo-angular-common';
8
+ import * as i2 from '@progress/kendo-angular-l10n';
9
+ import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
10
+ import { validatePackage } from '@progress/kendo-licensing';
11
+ import { Subscription } from 'rxjs';
12
+ import { trashIcon, plusIcon, exportIcon, chartBarClusteredIcon, chartBarStackedIcon, chartBarStacked100Icon, chartPieIcon, chartColumnClusteredIcon, chartColumnStackedIcon, chartColumnStacked100Icon, chartLineIcon, chartLineStackedIcon, chartLineStacked100Icon, chartScatterIcon, filePdfIcon, fileIcon, fileImageIcon } from '@progress/kendo-svg-icons';
13
+ import { ChartComponent, TitleComponent, SubtitleComponent, ChartAreaComponent, CategoryAxisComponent, CategoryAxisItemComponent, ValueAxisComponent, ValueAxisItemComponent, SeriesComponent, SeriesItemComponent, XAxisComponent, XAxisItemComponent, YAxisComponent, YAxisItemComponent, LegendComponent, ThemeService } from '@progress/kendo-angular-charts';
14
+ import { saveAs } from '@progress/kendo-file-saver';
15
+ import { exportPDF } from '@progress/kendo-drawing';
16
+ import { DropDownListComponent, ComboBoxComponent, ValueTemplateDirective } from '@progress/kendo-angular-dropdowns';
17
+ import { NumericTextBoxComponent, ColorPickerComponent, TextBoxComponent, CheckBoxComponent, SwitchComponent } from '@progress/kendo-angular-inputs';
18
+ import { LabelComponent } from '@progress/kendo-angular-label';
19
+ import { NgIf, NgFor } from '@angular/common';
20
+ import { ExpansionPanelComponent, SplitterComponent, SplitterPaneComponent, TabStripComponent, TabStripTabComponent, TabContentDirective } from '@progress/kendo-angular-layout';
21
+ import * as i2$1 from '@angular/forms';
22
+ import * as i1 from '@progress/kendo-angular-grid';
23
+ import { GridComponent, ReactiveEditingDirective, DataBindingDirective, ToolbarTemplateDirective, RowReorderColumnComponent, ColumnComponent, CommandColumnComponent, CellTemplateDirective, GridToolbarFocusableDirective, RemoveCommandDirective } from '@progress/kendo-angular-grid';
24
+ import { ButtonComponent, FocusableDirective, DropDownButtonComponent } from '@progress/kendo-angular-buttons';
25
+ import { SVGIconComponent, IconsService } from '@progress/kendo-angular-icons';
26
+ import { WindowComponent, DialogContainerService, DialogService, WindowService, WindowContainerService } from '@progress/kendo-angular-dialog';
27
+ import { PopupService } from '@progress/kendo-angular-popup';
28
+ import { getter } from '@progress/kendo-common';
29
+
30
+ /**
31
+ * @hidden
32
+ */
33
+ const packageMetadata = {
34
+ name: '@progress/kendo-angular-chart-wizard',
35
+ productName: 'Kendo UI for Angular',
36
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
37
+ publishDate: 1722607228,
38
+ version: '16.6.0-develop.10',
39
+ licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning',
40
+ };
41
+
42
+ /**
43
+ * @hidden
44
+ */
45
+ const fontSizes = [
46
+ { text: '16', value: '16px' },
47
+ { text: '20', value: '20px' },
48
+ { text: '24', value: '24px' },
49
+ { text: '48', value: '48px' },
50
+ { text: '60', value: '60px' },
51
+ { text: '96', value: '96px' },
52
+ ];
53
+ /**
54
+ * @hidden
55
+ */
56
+ const fontNames = [
57
+ { text: 'Arial', value: 'Arial, Helvetica, sans-serif',
58
+ style: { fontFamily: 'Arial, Helvetica, sans-serif' } },
59
+ { text: 'Courier New', value: '\'Courier New\', Courier, monospace',
60
+ style: { fontFamily: '\'Courier New\', Courier, monospace' } },
61
+ { text: 'Georgia', value: 'Georgia, serif',
62
+ style: { fontFamily: 'Georgia, serif' } },
63
+ { text: 'Impact', value: 'Impact, Charcoal, sans-serif',
64
+ style: { fontFamily: 'Impact, Charcoal, sans-serif' } },
65
+ { text: 'Lucida Console', value: '\'Lucida Console\', Monaco, monospace',
66
+ style: { fontFamily: '\'Lucida Console\', Monaco, monospace' } },
67
+ { text: 'Tahoma', value: 'Tahoma, Geneva, sans-serif',
68
+ style: { fontFamily: 'Tahoma, Geneva, sans-serif' } },
69
+ { text: 'Times New Roman', value: '\'Times New Roman\', Times,serif',
70
+ style: { fontFamily: '\'Times New Roman\', Times,serif' } },
71
+ { text: 'Trebuchet MS', value: '\'Trebuchet MS\', Helvetica, sans-serif',
72
+ style: { fontFamily: '\'Trebuchet MS\', Helvetica, sans-serif' } },
73
+ { text: 'Verdana', value: 'Verdana, Geneva, sans-serif',
74
+ style: { fontFamily: 'Verdana, Geneva, sans-serif' } }
75
+ ];
76
+ /**
77
+ * @hidden
78
+ */
79
+ const rotations = [
80
+ { text: '0°', value: 0 },
81
+ { text: '45°', value: 45 },
82
+ { text: '90°', value: 90 },
83
+ { text: '135°', value: 135 },
84
+ { text: '180°', value: 180 }
85
+ ];
86
+ /**
87
+ * @hidden
88
+ */
89
+ const positions = [
90
+ { text: 'Top', value: 'top' },
91
+ { text: 'Bottom', value: 'bottom' },
92
+ { text: 'Left', value: 'left' },
93
+ { text: 'Right', value: 'right' }
94
+ ];
95
+ const columnType = 'column';
96
+ const barType = 'bar';
97
+ const lineType = 'line';
98
+ const pieType = 'pie';
99
+ const scatterType = 'scatter';
100
+ const categoricalTypes = [columnType, barType, lineType, scatterType];
101
+ const scatterSeries = {
102
+ type: lineType,
103
+ width: 0
104
+ };
105
+ /**
106
+ * @hidden
107
+ */
108
+ const isCategorical = (type) => type && categoricalTypes.includes(type);
109
+ const categoryTypes = ['string', 'date', 'number'];
110
+ const valueTypes = ['number'];
111
+ const axesDefinitions = {
112
+ bar: [
113
+ { axisType: 'category', types: categoryTypes },
114
+ { axisType: 'value', types: valueTypes },
115
+ ],
116
+ column: [
117
+ { axisType: 'category', types: categoryTypes },
118
+ { axisType: 'value', types: valueTypes },
119
+ ],
120
+ line: [
121
+ { axisType: 'category', types: categoryTypes },
122
+ { axisType: 'value', types: valueTypes },
123
+ ],
124
+ pie: [
125
+ { axisType: 'category', types: categoryTypes },
126
+ { axisType: 'value', types: valueTypes },
127
+ ],
128
+ scatter: [
129
+ { axisType: 'value', types: valueTypes, count: 2 }
130
+ ]
131
+ };
132
+ const getFont = (font, size) => `${size || ''} ${font || ''}`.trim();
133
+ /**
134
+ * @hidden
135
+ */
136
+ const parseFont = (font) => {
137
+ const spaceIndex = (font || '').indexOf(' ');
138
+ const size = font?.substring(0, spaceIndex);
139
+ const name = font?.substring(spaceIndex + 1);
140
+ return { size, name };
141
+ };
142
+ const updateFontName = (fontName, defaultSize, currentFont) => {
143
+ const { size } = parseFont(currentFont);
144
+ return fontName ? getFont(fontName, size || defaultSize) : '';
145
+ };
146
+ const updateFontSize = (fontSize, defaultFontName, currentFont) => {
147
+ const { name } = parseFont(currentFont);
148
+ return fontSize ? getFont(name || defaultFontName, fontSize) : '';
149
+ };
150
+ const getCategoryColumnIndex = (data, categoryDef) => {
151
+ const candidates = [];
152
+ const firstRecord = data[0].slice();
153
+ categoryDef.types.forEach((type) => {
154
+ firstRecord.forEach((item, i) => {
155
+ if (typeof item.value === type) {
156
+ candidates.push(i);
157
+ }
158
+ });
159
+ });
160
+ const result = candidates.findIndex((index) => {
161
+ const values = data.map((record) => record[index].value);
162
+ return new Set(values).size === values.length;
163
+ });
164
+ return Math.max(result, 0);
165
+ };
166
+ const getValueColumnIndexes = (data, valuesDef) => {
167
+ const candidates = [];
168
+ const firstRecord = data[0].slice();
169
+ valuesDef.forEach((def) => {
170
+ def.types.forEach((type) => {
171
+ firstRecord.forEach((item, i) => {
172
+ if (typeof item.value === type) {
173
+ candidates.push(i);
174
+ }
175
+ });
176
+ });
177
+ });
178
+ return candidates;
179
+ };
180
+ const emptyState = () => structuredClone({
181
+ columns: [],
182
+ data: [],
183
+ series: [],
184
+ initialSeries: [],
185
+ categoryAxis: [],
186
+ valueAxis: [{ labels: { visible: true } }],
187
+ area: {
188
+ margin: { left: undefined, right: undefined, top: undefined, bottom: undefined }
189
+ },
190
+ });
191
+ const categoryValueChartState = (data, seriesType, options) => {
192
+ const state = emptyState();
193
+ state.seriesType = seriesType;
194
+ state.data = data;
195
+ const chartDef = axesDefinitions[seriesType];
196
+ if (!chartDef) {
197
+ return state;
198
+ }
199
+ const firstRecord = data[0].slice();
200
+ state.columns = data[0].map(i => String(i.field));
201
+ const categoryDef = chartDef.find(def => def.axisType === 'category');
202
+ let catIndex = -1;
203
+ if (categoryDef) {
204
+ catIndex = options?.categoryAxis ? state.columns.indexOf(options?.categoryAxis) : getCategoryColumnIndex(data, categoryDef);
205
+ }
206
+ const valuesDef = chartDef.filter(def => def.axisType === 'value');
207
+ let valuesIndexes = getValueColumnIndexes(data, valuesDef);
208
+ if (valuesIndexes.includes(catIndex)) {
209
+ valuesIndexes = valuesIndexes.filter(index => index !== catIndex);
210
+ }
211
+ const series = [];
212
+ valuesIndexes.forEach(index => {
213
+ const valuesColumn = firstRecord[index];
214
+ const valuesResult = [];
215
+ data.forEach(record => {
216
+ valuesResult.push(record[index].value);
217
+ });
218
+ series.push({
219
+ name: valuesColumn.field,
220
+ type: seriesType,
221
+ data: valuesResult,
222
+ stack: false,
223
+ labels: { visible: true },
224
+ ...(seriesType === scatterType ? scatterSeries : {})
225
+ });
226
+ });
227
+ const categories = catIndex > -1 ? data.map(item => String(item[catIndex].value)) : [];
228
+ if (series.length) {
229
+ state.series = series.map((s, i) => ({ ...s, id: i }));
230
+ state.initialSeries = structuredClone(state.series);
231
+ }
232
+ if (categories.length) {
233
+ state.categoryAxis = [{ categories, labels: { visible: true } }];
234
+ state.categoryField = state.columns[catIndex];
235
+ }
236
+ state.legend = { visible: true };
237
+ state.title = { text: null };
238
+ state.subtitle = { text: null };
239
+ return state;
240
+ };
241
+ const pieChartState = (data, seriesType, options) => {
242
+ const state = emptyState();
243
+ state.seriesType = seriesType;
244
+ state.data = data;
245
+ const chartDef = axesDefinitions[seriesType];
246
+ if (!chartDef) {
247
+ return state;
248
+ }
249
+ const categoriesAxis = data[0].map(i => i.field);
250
+ const categoryDef = chartDef.find(def => def.axisType === 'category');
251
+ let catIndex = -1;
252
+ if (categoryDef) {
253
+ catIndex = options?.categoryAxis ? categoriesAxis.indexOf(options?.categoryAxis) : getCategoryColumnIndex(data, categoryDef);
254
+ }
255
+ const valuesDef = chartDef.filter(def => def.axisType === 'value');
256
+ let valuesIndexes = [];
257
+ if (options?.valueAxis) {
258
+ valuesIndexes = [categoriesAxis.indexOf(options.valueAxis)];
259
+ }
260
+ else {
261
+ valuesIndexes = getValueColumnIndexes(data, valuesDef);
262
+ }
263
+ if (valuesIndexes.includes(catIndex) && valuesIndexes.length > 1) {
264
+ valuesIndexes = valuesIndexes.filter(index => index !== catIndex);
265
+ }
266
+ if (typeof valuesDef[0].count === 'number') {
267
+ valuesIndexes = valuesIndexes.slice(0, valuesDef[0].count);
268
+ }
269
+ const categories = catIndex > -1 ? data.map(item => String(item[catIndex].value)) : [];
270
+ const flatData = [];
271
+ data.forEach(item => {
272
+ const record = {};
273
+ valuesIndexes.forEach((index) => {
274
+ const col = item[index];
275
+ record[col.field] = col.value;
276
+ record[item[catIndex].field] = item[catIndex].value;
277
+ });
278
+ flatData.push(record);
279
+ });
280
+ state.columns = categoriesAxis;
281
+ state.categoryAxis = [{ categories, title: { text: '' } }];
282
+ state.series = [{
283
+ id: 0,
284
+ data: flatData,
285
+ type: seriesType,
286
+ name: categoriesAxis[catIndex],
287
+ labels: { visible: true },
288
+ categoryField: categoriesAxis[catIndex],
289
+ field: categoriesAxis[valuesIndexes[0]]
290
+ }];
291
+ state.categoryField = categoriesAxis[catIndex];
292
+ state.valueField = categoriesAxis[valuesIndexes[0]];
293
+ state.initialSeries = structuredClone(state.series);
294
+ return state;
295
+ };
296
+ /**
297
+ * @hidden
298
+ */
299
+ const createState = (data, seriesType) => {
300
+ return (isCategorical(seriesType) ? categoryValueChartState : pieChartState)(data, seriesType);
301
+ };
302
+ /**
303
+ * @hidden
304
+ */
305
+ var ActionTypes;
306
+ (function (ActionTypes) {
307
+ ActionTypes[ActionTypes["seriesType"] = 0] = "seriesType";
308
+ ActionTypes[ActionTypes["stacked"] = 1] = "stacked";
309
+ ActionTypes[ActionTypes["categoryAxisX"] = 2] = "categoryAxisX";
310
+ ActionTypes[ActionTypes["valueAxisY"] = 3] = "valueAxisY";
311
+ ActionTypes[ActionTypes["seriesChange"] = 4] = "seriesChange";
312
+ ActionTypes[ActionTypes["areaMarginLeft"] = 5] = "areaMarginLeft";
313
+ ActionTypes[ActionTypes["areaMarginRight"] = 6] = "areaMarginRight";
314
+ ActionTypes[ActionTypes["areaMarginTop"] = 7] = "areaMarginTop";
315
+ ActionTypes[ActionTypes["areaMarginBottom"] = 8] = "areaMarginBottom";
316
+ ActionTypes[ActionTypes["areaBackground"] = 9] = "areaBackground";
317
+ ActionTypes[ActionTypes["titleText"] = 10] = "titleText";
318
+ ActionTypes[ActionTypes["titleFontName"] = 11] = "titleFontName";
319
+ ActionTypes[ActionTypes["titleFontSize"] = 12] = "titleFontSize";
320
+ ActionTypes[ActionTypes["titleColor"] = 13] = "titleColor";
321
+ ActionTypes[ActionTypes["subtitleText"] = 14] = "subtitleText";
322
+ ActionTypes[ActionTypes["subtitleFontName"] = 15] = "subtitleFontName";
323
+ ActionTypes[ActionTypes["subtitleFontSize"] = 16] = "subtitleFontSize";
324
+ ActionTypes[ActionTypes["subtitleColor"] = 17] = "subtitleColor";
325
+ ActionTypes[ActionTypes["seriesColor"] = 18] = "seriesColor";
326
+ ActionTypes[ActionTypes["seriesLabel"] = 19] = "seriesLabel";
327
+ ActionTypes[ActionTypes["legendVisible"] = 20] = "legendVisible";
328
+ ActionTypes[ActionTypes["legendFontName"] = 21] = "legendFontName";
329
+ ActionTypes[ActionTypes["legendFontSize"] = 22] = "legendFontSize";
330
+ ActionTypes[ActionTypes["legendColor"] = 23] = "legendColor";
331
+ ActionTypes[ActionTypes["legendPosition"] = 24] = "legendPosition";
332
+ ActionTypes[ActionTypes["categoryAxisTitleText"] = 25] = "categoryAxisTitleText";
333
+ ActionTypes[ActionTypes["categoryAxisTitleFontName"] = 26] = "categoryAxisTitleFontName";
334
+ ActionTypes[ActionTypes["categoryAxisTitleFontSize"] = 27] = "categoryAxisTitleFontSize";
335
+ ActionTypes[ActionTypes["categoryAxisTitleColor"] = 28] = "categoryAxisTitleColor";
336
+ ActionTypes[ActionTypes["categoryAxisLabelsFontName"] = 29] = "categoryAxisLabelsFontName";
337
+ ActionTypes[ActionTypes["categoryAxisLabelsFontSize"] = 30] = "categoryAxisLabelsFontSize";
338
+ ActionTypes[ActionTypes["categoryAxisLabelsColor"] = 31] = "categoryAxisLabelsColor";
339
+ ActionTypes[ActionTypes["categoryAxisLabelsRotation"] = 32] = "categoryAxisLabelsRotation";
340
+ ActionTypes[ActionTypes["categoryAxisReverseOrder"] = 33] = "categoryAxisReverseOrder";
341
+ ActionTypes[ActionTypes["valueAxisTitleText"] = 34] = "valueAxisTitleText";
342
+ ActionTypes[ActionTypes["valueAxisTitleFontName"] = 35] = "valueAxisTitleFontName";
343
+ ActionTypes[ActionTypes["valueAxisTitleFontSize"] = 36] = "valueAxisTitleFontSize";
344
+ ActionTypes[ActionTypes["valueAxisTitleColor"] = 37] = "valueAxisTitleColor";
345
+ ActionTypes[ActionTypes["valueAxisLabelsFormat"] = 38] = "valueAxisLabelsFormat";
346
+ ActionTypes[ActionTypes["valueAxisLabelsFontName"] = 39] = "valueAxisLabelsFontName";
347
+ ActionTypes[ActionTypes["valueAxisLabelsFontSize"] = 40] = "valueAxisLabelsFontSize";
348
+ ActionTypes[ActionTypes["valueAxisLabelsColor"] = 41] = "valueAxisLabelsColor";
349
+ ActionTypes[ActionTypes["valueAxisLabelsRotation"] = 42] = "valueAxisLabelsRotation";
350
+ })(ActionTypes || (ActionTypes = {}));
351
+ /**
352
+ * @hidden
353
+ */
354
+ const mergeStates = (state, newState) => {
355
+ newState.legend = state.legend;
356
+ newState.area = state.area;
357
+ newState.title = state.title;
358
+ newState.subtitle = state.subtitle;
359
+ if (newState.series.length === state.series.length) {
360
+ for (let i = 0; i < newState.series.length; i++) {
361
+ newState.series[i].color = state.series[i].color;
362
+ newState.series[i].labels = state.series[i].labels;
363
+ }
364
+ }
365
+ if (state.series.every(s => s.labels?.visible)) {
366
+ newState.series.forEach(s => {
367
+ s.labels = s.labels || {};
368
+ s.labels.visible = true;
369
+ });
370
+ }
371
+ return newState;
372
+ };
373
+ /**
374
+ * @hidden
375
+ */
376
+ const updateState = (currentState, action, value) => {
377
+ const state = { ...currentState };
378
+ switch (action) {
379
+ case ActionTypes.seriesType:
380
+ return createState(state.data, value);
381
+ case ActionTypes.stacked:
382
+ state.series = state.series.map(s => ({ ...s, stack: value }));
383
+ return state;
384
+ case ActionTypes.categoryAxisX: {
385
+ if (state.seriesType && isCategorical(state.seriesType)) {
386
+ const newState = categoryValueChartState(state.data, state.seriesType, { categoryAxis: value });
387
+ return mergeStates(state, newState);
388
+ }
389
+ else if (state.seriesType === pieType) {
390
+ const newState = pieChartState(state.data, state.seriesType, { categoryAxis: value });
391
+ return mergeStates(state, newState);
392
+ }
393
+ return state;
394
+ }
395
+ case ActionTypes.valueAxisY: {
396
+ if (state.seriesType === pieType) {
397
+ const newState = pieChartState(state.data, state.seriesType, { categoryAxis: state.categoryField, valueAxis: value });
398
+ return mergeStates(state, newState);
399
+ }
400
+ return state;
401
+ }
402
+ case ActionTypes.seriesChange:
403
+ state.series = value;
404
+ return state;
405
+ case ActionTypes.areaMarginLeft:
406
+ state.area = { ...state.area, margin: { ...(state.area?.margin || {}), left: value } };
407
+ return state;
408
+ case ActionTypes.areaMarginRight:
409
+ state.area = { ...state.area, margin: { ...(state.area?.margin || {}), right: value } };
410
+ return state;
411
+ case ActionTypes.areaMarginTop:
412
+ state.area = { ...state.area, margin: { ...(state.area?.margin || {}), top: value } };
413
+ return state;
414
+ case ActionTypes.areaMarginBottom:
415
+ state.area = { ...state.area, margin: { ...(state.area?.margin || {}), bottom: value } };
416
+ return state;
417
+ case ActionTypes.areaBackground:
418
+ state.area = { ...state.area, background: value };
419
+ return state;
420
+ case ActionTypes.titleText:
421
+ state.title = { ...state.title, text: value };
422
+ return state;
423
+ case ActionTypes.titleFontName: {
424
+ state.title = { ...state.title, font: updateFontName(value, fontSizes[0].value, state.title?.font) };
425
+ return state;
426
+ }
427
+ case ActionTypes.titleFontSize:
428
+ state.title = { ...state.title, font: updateFontSize(value, fontNames[0].value, state.title?.font) };
429
+ return state;
430
+ case ActionTypes.titleColor:
431
+ state.title = { ...state.title, color: value };
432
+ return state;
433
+ case ActionTypes.subtitleText:
434
+ state.subtitle = { ...state.subtitle, text: value };
435
+ return state;
436
+ case ActionTypes.subtitleFontName:
437
+ state.subtitle = { ...state.subtitle, font: updateFontName(value, fontSizes[0].value, state.subtitle?.font) };
438
+ return state;
439
+ case ActionTypes.subtitleFontSize:
440
+ state.subtitle = { ...state.subtitle, font: updateFontSize(value, fontNames[0].value, state.subtitle?.font) };
441
+ return state;
442
+ case ActionTypes.subtitleColor:
443
+ state.subtitle = { ...state.subtitle, color: value };
444
+ return state;
445
+ case ActionTypes.seriesColor:
446
+ state.series = state.series.map(s => ({ ...s, color: value.seriesName === s.name ? value.color : s.color }));
447
+ return state;
448
+ case ActionTypes.seriesLabel:
449
+ state.series = state.series.map(s => {
450
+ if (value.all || value.seriesName === s.name) {
451
+ return { ...s, labels: { visible: value.visible } };
452
+ }
453
+ return s;
454
+ });
455
+ return state;
456
+ case ActionTypes.legendVisible:
457
+ state.legend = { ...state.legend, visible: value };
458
+ return state;
459
+ case ActionTypes.legendFontName: {
460
+ state.legend = { ...state.legend, labels: { ...state.legend?.labels, font: updateFontName(value, fontSizes[0].value, state.legend?.labels?.font) } };
461
+ return state;
462
+ }
463
+ case ActionTypes.legendFontSize:
464
+ state.legend = { ...state.legend, labels: { ...state.legend?.labels, font: updateFontSize(value, fontNames[0].value, state.legend?.labels?.font) } };
465
+ return state;
466
+ case ActionTypes.legendColor:
467
+ state.legend = { ...state.legend, labels: { ...state.legend?.labels, color: value } };
468
+ return state;
469
+ case ActionTypes.legendPosition:
470
+ state.legend = { ...state.legend, position: value };
471
+ return state;
472
+ case ActionTypes.categoryAxisTitleText:
473
+ state.categoryAxis = state.categoryAxis?.map(axis => ({ ...axis, title: { ...axis.title, text: value } }));
474
+ return state;
475
+ case ActionTypes.categoryAxisTitleFontName: {
476
+ state.categoryAxis = state.categoryAxis?.map(axis => ({ ...axis, title: { ...axis.title, font: updateFontName(value, fontSizes[0].value, axis.title?.font) } }));
477
+ return state;
478
+ }
479
+ case ActionTypes.categoryAxisTitleFontSize:
480
+ state.categoryAxis = state.categoryAxis?.map(axis => ({ ...axis, title: { ...axis.title, font: updateFontSize(value, fontNames[0].value, axis.title?.font) } }));
481
+ return state;
482
+ case ActionTypes.categoryAxisTitleColor:
483
+ state.categoryAxis = state.categoryAxis?.map(axis => ({ ...axis, title: { ...axis.title, color: value } }));
484
+ return state;
485
+ case ActionTypes.categoryAxisLabelsFontName: {
486
+ state.categoryAxis = state.categoryAxis?.map(axis => ({ ...axis, labels: { ...axis.labels, font: updateFontName(value, fontSizes[0].value, axis.labels?.font) } }));
487
+ return state;
488
+ }
489
+ case ActionTypes.categoryAxisLabelsFontSize:
490
+ state.categoryAxis = state.categoryAxis?.map(axis => ({ ...axis, labels: { ...axis.labels, font: updateFontSize(value, fontNames[0].value, axis.labels?.font) } }));
491
+ return state;
492
+ case ActionTypes.categoryAxisLabelsColor:
493
+ state.categoryAxis = state.categoryAxis?.map(axis => ({ ...axis, labels: { ...axis.labels, color: value } }));
494
+ return state;
495
+ case ActionTypes.categoryAxisLabelsRotation:
496
+ state.categoryAxis = state.categoryAxis?.map(axis => ({ ...axis, labels: { ...axis.labels, rotation: value } }));
497
+ return state;
498
+ case ActionTypes.categoryAxisReverseOrder:
499
+ state.categoryAxis = state.categoryAxis?.map(axis => ({ ...axis, reverse: value }));
500
+ return state;
501
+ case ActionTypes.valueAxisTitleText: {
502
+ if (!state.valueAxis || state.valueAxis.length === 0) {
503
+ state.valueAxis = [{ title: { text: value } }];
504
+ }
505
+ else {
506
+ state.valueAxis = state.valueAxis?.map(axis => ({ ...axis, title: { ...axis.title, text: value } }));
507
+ }
508
+ return state;
509
+ }
510
+ case ActionTypes.valueAxisTitleFontName: {
511
+ state.valueAxis = state.valueAxis?.map(axis => ({ ...axis, title: { ...axis.title, font: updateFontName(value, fontSizes[0].value, axis.title?.font) } }));
512
+ return state;
513
+ }
514
+ case ActionTypes.valueAxisTitleFontSize:
515
+ state.valueAxis = state.valueAxis?.map(axis => ({ ...axis, title: { ...axis.title, font: updateFontSize(value, fontNames[0].value, axis.title?.font) } }));
516
+ return state;
517
+ case ActionTypes.valueAxisTitleColor:
518
+ state.valueAxis = state.valueAxis?.map(axis => ({ ...axis, title: { ...axis.title, color: value } }));
519
+ return state;
520
+ case ActionTypes.valueAxisLabelsFormat:
521
+ state.valueAxis = state.valueAxis?.map(axis => ({ ...axis, labels: { ...axis.labels, format: value } }));
522
+ return state;
523
+ case ActionTypes.valueAxisLabelsFontName: {
524
+ state.valueAxis = state.valueAxis?.map(axis => ({ ...axis, labels: { ...axis.labels, font: updateFontName(value, fontSizes[0].value, axis.labels?.font) } }));
525
+ return state;
526
+ }
527
+ case ActionTypes.valueAxisLabelsFontSize:
528
+ state.valueAxis = state.valueAxis?.map(axis => ({ ...axis, labels: { ...axis.labels, font: updateFontSize(value, fontNames[0].value, axis.labels?.font) } }));
529
+ return state;
530
+ case ActionTypes.valueAxisLabelsColor:
531
+ state.valueAxis = state.valueAxis?.map(axis => ({ ...axis, labels: { ...axis.labels, color: value } }));
532
+ return state;
533
+ case ActionTypes.valueAxisLabelsRotation:
534
+ state.valueAxis = state.valueAxis?.map(axis => ({ ...axis, labels: { ...axis.labels, rotation: value } }));
535
+ return state;
536
+ default:
537
+ return state;
538
+ }
539
+ };
540
+
541
+ /**
542
+ * @hidden
543
+ */
544
+ class StateService {
545
+ constructor() {
546
+ this.state = {
547
+ categoryAxis: [],
548
+ valueAxis: [],
549
+ series: [],
550
+ initialSeries: [],
551
+ columns: [],
552
+ data: []
553
+ };
554
+ this.seriesType = 'bar';
555
+ this.currentTitle = 'Chart Title';
556
+ this.currentSeries = {};
557
+ this.data = [];
558
+ this.deletedSeries = [];
559
+ this.direction = 'ltr';
560
+ }
561
+ }
562
+ StateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
563
+ StateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StateService });
564
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StateService, decorators: [{
565
+ type: Injectable
566
+ }] });
567
+
568
+ /**
569
+ * @hidden
570
+ */
571
+ class ChartWizardPropertyPaneFormFieldComponent {
572
+ constructor(localization, cdr) {
573
+ this.localization = localization;
574
+ this.cdr = cdr;
575
+ this.colSpan = 1;
576
+ this.hasLabel = true;
577
+ this.isLabelInsideFormFieldWrap = false;
578
+ this.valueChange = new EventEmitter();
579
+ this.formField = true;
580
+ }
581
+ get isColSpan2() {
582
+ return this.colSpan === 2;
583
+ }
584
+ ngAfterViewChecked() {
585
+ this.localization.changes.subscribe(() => {
586
+ this.cdr.detectChanges();
587
+ });
588
+ }
589
+ ngOnDestroy() {
590
+ this.localization.changes.unsubscribe();
591
+ }
592
+ ngAfterViewInit() {
593
+ if (this.hasLabel) {
594
+ this.label.for =
595
+ this.numericTextBox ||
596
+ this.colorPicker ||
597
+ this.dropDownList ||
598
+ this.textBox ||
599
+ this.comboBox ||
600
+ this.checkBox;
601
+ }
602
+ }
603
+ }
604
+ ChartWizardPropertyPaneFormFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardPropertyPaneFormFieldComponent, deps: [{ token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
605
+ ChartWizardPropertyPaneFormFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChartWizardPropertyPaneFormFieldComponent, isStandalone: true, selector: "kendo-chart-wizard-property-pane-form-field", inputs: { currentState: "currentState", action: "action", class: "class", inputType: "inputType", text: "text", data: "data", placeholder: "placeholder", colSpan: "colSpan", hasLabel: "hasLabel", isLabelInsideFormFieldWrap: "isLabelInsideFormFieldWrap", value: "value" }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.k-form-field": "this.formField", "class.k-col-span-2": "this.isColSpan2" } }, viewQueries: [{ propertyName: "label", first: true, predicate: LabelComponent, descendants: true }, { propertyName: "numericTextBox", first: true, predicate: NumericTextBoxComponent, descendants: true }, { propertyName: "colorPicker", first: true, predicate: ColorPickerComponent, descendants: true }, { propertyName: "dropDownList", first: true, predicate: DropDownListComponent, descendants: true }, { propertyName: "textBox", first: true, predicate: TextBoxComponent, descendants: true }, { propertyName: "comboBox", first: true, predicate: ComboBoxComponent, descendants: true }, { propertyName: "checkBox", first: true, predicate: CheckBoxComponent, descendants: true }], ngImport: i0, template: `
606
+ <kendo-label *ngIf="hasLabel && !isLabelInsideFormFieldWrap" class="k-form-label" [text]="text"></kendo-label>
607
+ <div class="k-form-field-wrap">
608
+ <kendo-label
609
+ *ngIf="hasLabel && isLabelInsideFormFieldWrap"
610
+ class="k-form-label"
611
+ [text]="text"
612
+ ></kendo-label>
613
+ <kendo-numerictextbox
614
+ *ngIf="inputType === 'numeric'"
615
+ fillMode="outline"
616
+ rounded="medium"
617
+ [value]="value"
618
+ (valueChange)="valueChange.emit($event)"
619
+ ></kendo-numerictextbox>
620
+ <kendo-colorpicker
621
+ *ngIf="inputType === 'colorPicker'"
622
+ fillMode="outline"
623
+ rounded="medium"
624
+ [value]="value"
625
+ (valueChange)="valueChange.emit($event)"
626
+ ></kendo-colorpicker>
627
+ <kendo-dropdownlist
628
+ *ngIf="inputType === 'dropDownList'"
629
+ [data]="data"
630
+ textField="text"
631
+ valueField="value"
632
+ [valuePrimitive]="true"
633
+ fillMode="outline"
634
+ rounded="medium"
635
+ size="medium"
636
+ [value]="value"
637
+ (valueChange)="valueChange.emit($event)"
638
+ ></kendo-dropdownlist>
639
+ <kendo-combobox
640
+ *ngIf="inputType === 'comboBox'"
641
+ [data]="data"
642
+ [value]="value"
643
+ textField="text"
644
+ valueField="value"
645
+ [valuePrimitive]="true"
646
+ fillMode="outline"
647
+ rounded="medium"
648
+ size="medium"
649
+ [placeholder]="placeholder"
650
+ (valueChange)="valueChange.emit($event)"
651
+ ></kendo-combobox>
652
+ <kendo-textbox
653
+ *ngIf="inputType === 'text'"
654
+ fillMode="outline"
655
+ rounded="medium"
656
+ [placeholder]="placeholder"
657
+ [value]="value"
658
+ (valueChange)="valueChange.emit($event)"
659
+ ></kendo-textbox>
660
+ <kendo-checkbox
661
+ *ngIf="inputType === 'checkbox'"
662
+ class="k-checkbox-md k-rounded-md"
663
+ [checkedState]="value"
664
+ (checkedStateChange)="valueChange.emit($event)"
665
+ ></kendo-checkbox>
666
+ </div>
667
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LabelComponent, selector: "kendo-label", inputs: ["text", "for", "optional", "labelCssStyle", "labelCssClass"], exportAs: ["kendoLabel"] }, { kind: "component", type: NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "focus", "blur", "inputFocus", "inputBlur"], exportAs: ["kendoNumericTextBox"] }, { kind: "component", type: ColorPickerComponent, selector: "kendo-colorpicker", inputs: ["views", "view", "activeView", "readonly", "disabled", "format", "value", "popupSettings", "paletteSettings", "gradientSettings", "icon", "iconClass", "svgIcon", "clearButton", "tabindex", "preview", "actionsLayout", "size", "rounded", "fillMode"], outputs: ["valueChange", "open", "close", "focus", "blur", "cancel", "activeColorClick", "clearButtonClick", "activeViewChange"], exportAs: ["kendoColorPicker"] }, { kind: "component", type: DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "title", "subtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "component", type: ComboBoxComponent, selector: "kendo-combobox", inputs: ["icon", "svgIcon", "inputAttributes", "showStickyHeader", "focusableId", "allowCustom", "data", "value", "textField", "valueField", "valuePrimitive", "valueNormalizer", "placeholder", "adaptiveMode", "title", "subtitle", "popupSettings", "listHeight", "loading", "suggest", "clearButton", "disabled", "itemDisabled", "readonly", "tabindex", "tabIndex", "filterable", "virtual", "size", "rounded", "fillMode"], outputs: ["valueChange", "selectionChange", "filterChange", "open", "opened", "close", "closed", "focus", "blur", "inputFocus", "inputBlur", "escape"], exportAs: ["kendoComboBox"] }, { kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardPropertyPaneFormFieldComponent, decorators: [{
669
+ type: Component,
670
+ args: [{
671
+ selector: 'kendo-chart-wizard-property-pane-form-field',
672
+ changeDetection: ChangeDetectionStrategy.OnPush,
673
+ template: `
674
+ <kendo-label *ngIf="hasLabel && !isLabelInsideFormFieldWrap" class="k-form-label" [text]="text"></kendo-label>
675
+ <div class="k-form-field-wrap">
676
+ <kendo-label
677
+ *ngIf="hasLabel && isLabelInsideFormFieldWrap"
678
+ class="k-form-label"
679
+ [text]="text"
680
+ ></kendo-label>
681
+ <kendo-numerictextbox
682
+ *ngIf="inputType === 'numeric'"
683
+ fillMode="outline"
684
+ rounded="medium"
685
+ [value]="value"
686
+ (valueChange)="valueChange.emit($event)"
687
+ ></kendo-numerictextbox>
688
+ <kendo-colorpicker
689
+ *ngIf="inputType === 'colorPicker'"
690
+ fillMode="outline"
691
+ rounded="medium"
692
+ [value]="value"
693
+ (valueChange)="valueChange.emit($event)"
694
+ ></kendo-colorpicker>
695
+ <kendo-dropdownlist
696
+ *ngIf="inputType === 'dropDownList'"
697
+ [data]="data"
698
+ textField="text"
699
+ valueField="value"
700
+ [valuePrimitive]="true"
701
+ fillMode="outline"
702
+ rounded="medium"
703
+ size="medium"
704
+ [value]="value"
705
+ (valueChange)="valueChange.emit($event)"
706
+ ></kendo-dropdownlist>
707
+ <kendo-combobox
708
+ *ngIf="inputType === 'comboBox'"
709
+ [data]="data"
710
+ [value]="value"
711
+ textField="text"
712
+ valueField="value"
713
+ [valuePrimitive]="true"
714
+ fillMode="outline"
715
+ rounded="medium"
716
+ size="medium"
717
+ [placeholder]="placeholder"
718
+ (valueChange)="valueChange.emit($event)"
719
+ ></kendo-combobox>
720
+ <kendo-textbox
721
+ *ngIf="inputType === 'text'"
722
+ fillMode="outline"
723
+ rounded="medium"
724
+ [placeholder]="placeholder"
725
+ [value]="value"
726
+ (valueChange)="valueChange.emit($event)"
727
+ ></kendo-textbox>
728
+ <kendo-checkbox
729
+ *ngIf="inputType === 'checkbox'"
730
+ class="k-checkbox-md k-rounded-md"
731
+ [checkedState]="value"
732
+ (checkedStateChange)="valueChange.emit($event)"
733
+ ></kendo-checkbox>
734
+ </div>
735
+ `,
736
+ standalone: true,
737
+ imports: [
738
+ NgIf,
739
+ LabelComponent,
740
+ NumericTextBoxComponent,
741
+ ColorPickerComponent,
742
+ DropDownListComponent,
743
+ ComboBoxComponent,
744
+ TextBoxComponent,
745
+ CheckBoxComponent
746
+ ]
747
+ }]
748
+ }], ctorParameters: function () { return [{ type: i2.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { currentState: [{
749
+ type: Input
750
+ }], action: [{
751
+ type: Input
752
+ }], class: [{
753
+ type: Input
754
+ }], inputType: [{
755
+ type: Input
756
+ }], text: [{
757
+ type: Input
758
+ }], data: [{
759
+ type: Input
760
+ }], placeholder: [{
761
+ type: Input
762
+ }], colSpan: [{
763
+ type: Input
764
+ }], hasLabel: [{
765
+ type: Input
766
+ }], isLabelInsideFormFieldWrap: [{
767
+ type: Input
768
+ }], value: [{
769
+ type: Input
770
+ }], valueChange: [{
771
+ type: Output
772
+ }], formField: [{
773
+ type: HostBinding,
774
+ args: ['class.k-form-field']
775
+ }], isColSpan2: [{
776
+ type: HostBinding,
777
+ args: ['class.k-col-span-2']
778
+ }], label: [{
779
+ type: ViewChild,
780
+ args: [LabelComponent]
781
+ }], numericTextBox: [{
782
+ type: ViewChild,
783
+ args: [NumericTextBoxComponent]
784
+ }], colorPicker: [{
785
+ type: ViewChild,
786
+ args: [ColorPickerComponent]
787
+ }], dropDownList: [{
788
+ type: ViewChild,
789
+ args: [DropDownListComponent]
790
+ }], textBox: [{
791
+ type: ViewChild,
792
+ args: [TextBoxComponent]
793
+ }], comboBox: [{
794
+ type: ViewChild,
795
+ args: [ComboBoxComponent]
796
+ }], checkBox: [{
797
+ type: ViewChild,
798
+ args: [CheckBoxComponent]
799
+ }] } });
800
+
801
+ /**
802
+ * @hidden
803
+ */
804
+ class ChartWizardPropertyPaneDataTabComponent {
805
+ constructor(stateService, localization, cdr) {
806
+ this.stateService = stateService;
807
+ this.localization = localization;
808
+ this.cdr = cdr;
809
+ this.chartTitles = [
810
+ { text: 'Chart Title', value: 'Chart Title' },
811
+ { text: 'Chart Subtitle', value: 'Chart Subtitle' },
812
+ ];
813
+ this.titleText = ActionTypes.titleText;
814
+ this.titleFontName = ActionTypes.titleFontName;
815
+ this.titleFontSize = ActionTypes.titleFontSize;
816
+ this.titleColor = ActionTypes.titleColor;
817
+ this.subtitleText = ActionTypes.subtitleText;
818
+ this.subtitleFontName = ActionTypes.subtitleFontName;
819
+ this.subtitleFontSize = ActionTypes.subtitleFontSize;
820
+ this.subtitleColor = ActionTypes.subtitleColor;
821
+ this.areaMarginLeft = ActionTypes.areaMarginLeft;
822
+ this.areaMarginRight = ActionTypes.areaMarginRight;
823
+ this.areaMarginTop = ActionTypes.areaMarginTop;
824
+ this.areaMarginBottom = ActionTypes.areaMarginBottom;
825
+ this.areaBackground = ActionTypes.areaBackground;
826
+ this.legendVisible = ActionTypes.legendVisible;
827
+ this.legendFontName = ActionTypes.legendFontName;
828
+ this.legendFontSize = ActionTypes.legendFontSize;
829
+ this.legendColor = ActionTypes.legendColor;
830
+ this.legendPosition = ActionTypes.legendPosition;
831
+ this.seriesColor = ActionTypes.seriesColor;
832
+ this.seriesLabel = ActionTypes.seriesLabel;
833
+ this.categoryAxisTitleText = ActionTypes.categoryAxisTitleText;
834
+ this.categoryAxisTitleFontName = ActionTypes.categoryAxisTitleFontName;
835
+ this.categoryAxisTitleFontSize = ActionTypes.categoryAxisTitleFontSize;
836
+ this.categoryAxisTitleColor = ActionTypes.categoryAxisTitleColor;
837
+ this.categoryAxisLabelsFontName = ActionTypes.categoryAxisLabelsFontName;
838
+ this.categoryAxisLabelsFontSize = ActionTypes.categoryAxisLabelsFontSize;
839
+ this.categoryAxisLabelsColor = ActionTypes.categoryAxisLabelsColor;
840
+ this.categoryAxisLabelsRotation = ActionTypes.categoryAxisLabelsRotation;
841
+ this.categoryAxisReverseOrder = ActionTypes.categoryAxisReverseOrder;
842
+ this.valueAxisTitleText = ActionTypes.valueAxisTitleText;
843
+ this.valueAxisTitleFontName = ActionTypes.valueAxisTitleFontName;
844
+ this.valueAxisTitleFontSize = ActionTypes.valueAxisTitleFontSize;
845
+ this.valueAxisTitleColor = ActionTypes.valueAxisTitleColor;
846
+ this.valueAxisLabelsFontName = ActionTypes.valueAxisLabelsFontName;
847
+ this.valueAxisLabelsFontSize = ActionTypes.valueAxisLabelsFontSize;
848
+ this.valueAxisLabelsColor = ActionTypes.valueAxisLabelsColor;
849
+ this.valueAxisLabelsRotation = ActionTypes.valueAxisLabelsRotation;
850
+ this.parseFont = parseFont;
851
+ this.fontNames = fontNames;
852
+ this.fontSizes = fontSizes;
853
+ this.legendPositions = positions;
854
+ this.labelsRotation = rotations;
855
+ }
856
+ get chartTitleTypeText() {
857
+ return this.stateService.currentTitle === 'Chart Title'
858
+ ? this.stateService.state.title?.text
859
+ : this.stateService.state.subtitle?.text;
860
+ }
861
+ get chartTitleTypeFont() {
862
+ return this.stateService.currentTitle === 'Chart Title'
863
+ ? parseFont(this.stateService.state.title?.font).name
864
+ : parseFont(this.stateService.state.subtitle?.font).name;
865
+ }
866
+ get chartTitleTypeFontSize() {
867
+ return this.stateService.currentTitle === 'Chart Title'
868
+ ? parseFont(this.stateService.state.title?.font).size
869
+ : parseFont(this.stateService.state.subtitle?.font).size;
870
+ }
871
+ get chartTitleTypeColor() {
872
+ return this.stateService.currentTitle === 'Chart Title'
873
+ ? this.stateService.state.title?.color
874
+ : this.stateService.state.subtitle?.color;
875
+ }
876
+ get chartTitleTypeAction() {
877
+ return this.stateService.currentTitle === 'Chart Title' ? this.titleText : this.subtitleText;
878
+ }
879
+ get chartTitleTypeFontAction() {
880
+ return this.stateService.currentTitle === 'Chart Title' ? this.titleFontName : this.subtitleFontName;
881
+ }
882
+ get chartTitleTypeColorAction() {
883
+ return this.stateService.currentTitle === 'Chart Title' ? this.titleColor : this.subtitleColor;
884
+ }
885
+ get chartTitleTypeFontSizeAction() {
886
+ return this.stateService.currentTitle === 'Chart Title' ? this.titleFontSize : this.subtitleFontSize;
887
+ }
888
+ ngAfterViewChecked() {
889
+ this.localization.changes.subscribe(() => {
890
+ this.cdr.detectChanges();
891
+ });
892
+ }
893
+ ngOnDestroy() {
894
+ this.localization.changes.unsubscribe();
895
+ }
896
+ updateState(action, value) {
897
+ this.stateService.state = updateState(this.stateService.state, action, value);
898
+ }
899
+ changeCurrentTitle(value) {
900
+ this.stateService.currentTitle = value;
901
+ }
902
+ toggleSeriesLabels(value) {
903
+ this.updateCurrentSeries(this.stateService.currentSeries);
904
+ this.stateService.currentSeries.labels = { visible: value };
905
+ this.updateState(this.seriesLabel, this.stateService.currentSeries);
906
+ }
907
+ updateCurrentSeries(value) {
908
+ this.stateService.currentSeries = this.stateService.state.series.find((series) => series.name === value.name);
909
+ }
910
+ updateSeriesColor(value) {
911
+ this.updateCurrentSeries(this.stateService.currentSeries);
912
+ this.stateService.currentSeries.color = value;
913
+ this.updateState(this.seriesColor, this.stateService.currentSeries);
914
+ }
915
+ onExpandedChange(panel, expanded) {
916
+ expanded
917
+ ? (this.stateService.currentFormatExpansionPanel = panel)
918
+ : (this.stateService.currentFormatExpansionPanel = null);
919
+ }
920
+ isExpanded(panel) {
921
+ return this.stateService.currentFormatExpansionPanel === panel;
922
+ }
923
+ }
924
+ ChartWizardPropertyPaneDataTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardPropertyPaneDataTabComponent, deps: [{ token: StateService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
925
+ ChartWizardPropertyPaneDataTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChartWizardPropertyPaneDataTabComponent, isStandalone: true, selector: "kendo-chart-wizard-property-pane-format-tab", ngImport: i0, template: `
926
+ <section>
927
+ <kendo-expansionpanel
928
+ title="Chart Area"
929
+ [expanded]="isExpanded('Chart Area')"
930
+ (expandedChange)="onExpandedChange('Chart Area', $event)"
931
+ [attr.dir]="stateService.direction"
932
+ >
933
+ <form class="k-form k-form-md">
934
+ <fieldset class="k-form-fieldset">
935
+ <legend class="k-form-legend">Margins</legend>
936
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
937
+ <kendo-chart-wizard-property-pane-form-field
938
+ text="Left"
939
+ inputType="numeric"
940
+ [value]="$any(stateService.state.area?.margin).left"
941
+ (valueChange)="updateState(areaMarginLeft, $event)"
942
+ >
943
+ </kendo-chart-wizard-property-pane-form-field>
944
+ <kendo-chart-wizard-property-pane-form-field
945
+ text="Right"
946
+ inputType="numeric"
947
+ [value]="$any(stateService.state.area?.margin).right"
948
+ (valueChange)="updateState(areaMarginRight, $event)"
949
+ >
950
+ </kendo-chart-wizard-property-pane-form-field>
951
+ <kendo-chart-wizard-property-pane-form-field
952
+ text="Top"
953
+ inputType="numeric"
954
+ [value]="$any(stateService.state.area?.margin).top"
955
+ (valueChange)="updateState(areaMarginTop, $event)"
956
+ >
957
+ </kendo-chart-wizard-property-pane-form-field>
958
+ <kendo-chart-wizard-property-pane-form-field
959
+ text="Bottom"
960
+ inputType="numeric"
961
+ [value]="$any(stateService.state.area?.margin).bottom"
962
+ (valueChange)="updateState(areaMarginBottom, $event)"
963
+ >
964
+ </kendo-chart-wizard-property-pane-form-field>
965
+ </div>
966
+ </fieldset>
967
+ <fieldset class="k-form-fieldset">
968
+ <legend class="k-form-legend">Background</legend>
969
+ <kendo-chart-wizard-property-pane-form-field
970
+ text="Color"
971
+ inputType="colorPicker"
972
+ [value]="stateService.state.area?.background"
973
+ (valueChange)="updateState(areaBackground, $event)"
974
+ >
975
+ </kendo-chart-wizard-property-pane-form-field>
976
+ </fieldset>
977
+ </form>
978
+ </kendo-expansionpanel>
979
+ </section>
980
+ <section>
981
+ <kendo-expansionpanel
982
+ title="Title"
983
+ [expanded]="isExpanded('Title')"
984
+ (expandedChange)="onExpandedChange('Title', $event)"
985
+ >
986
+ <form class="k-form k-form-md">
987
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
988
+ <kendo-chart-wizard-property-pane-form-field
989
+ text="Apply to"
990
+ inputType="dropDownList"
991
+ [data]="chartTitles"
992
+ [colSpan]="2"
993
+ [value]="stateService.currentTitle"
994
+ (valueChange)="changeCurrentTitle($event)"
995
+ >
996
+ </kendo-chart-wizard-property-pane-form-field>
997
+ <kendo-chart-wizard-property-pane-form-field
998
+ text="Title"
999
+ inputType="text"
1000
+ [colSpan]="2"
1001
+ [value]="chartTitleTypeText"
1002
+ (valueChange)="updateState(chartTitleTypeAction, $event)"
1003
+ >
1004
+ </kendo-chart-wizard-property-pane-form-field>
1005
+ <kendo-chart-wizard-property-pane-form-field
1006
+ text="Font"
1007
+ inputType="comboBox"
1008
+ [data]="fontNames"
1009
+ [colSpan]="2"
1010
+ [value]="chartTitleTypeFont"
1011
+ placeholder="(Inherited font)"
1012
+ (valueChange)="updateState(chartTitleTypeFontAction, $event)"
1013
+ >
1014
+ </kendo-chart-wizard-property-pane-form-field>
1015
+ <kendo-chart-wizard-property-pane-form-field
1016
+ text="Size"
1017
+ inputType="comboBox"
1018
+ [data]="fontSizes"
1019
+ [value]="chartTitleTypeFontSize"
1020
+ (valueChange)="updateState(chartTitleTypeFontSizeAction, $event)"
1021
+ >
1022
+ </kendo-chart-wizard-property-pane-form-field>
1023
+ <kendo-chart-wizard-property-pane-form-field
1024
+ text="Color"
1025
+ inputType="colorPicker"
1026
+ [value]="chartTitleTypeColor"
1027
+ (valueChange)="updateState(chartTitleTypeColorAction, $event)"
1028
+ >
1029
+ </kendo-chart-wizard-property-pane-form-field>
1030
+ </div>
1031
+ </form>
1032
+ </kendo-expansionpanel>
1033
+ </section>
1034
+ <section>
1035
+ <kendo-expansionpanel
1036
+ title="Legend"
1037
+ [expanded]="isExpanded('Legend')"
1038
+ (expandedChange)="onExpandedChange('Legend', $event)"
1039
+ >
1040
+ <form class="k-form k-form-md">
1041
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
1042
+ <kendo-label [for]="toggleLegend" text="Show Legend"></kendo-label>
1043
+ <kendo-switch
1044
+ #toggleLegend
1045
+ onLabel="On"
1046
+ offLabel="Off"
1047
+ thumbRounded="full"
1048
+ size="medium"
1049
+ [checked]="stateService.state.legend?.visible"
1050
+ (valueChange)="updateState(legendVisible, $event)"
1051
+ ></kendo-switch>
1052
+ <kendo-chart-wizard-property-pane-form-field
1053
+ text="Font"
1054
+ inputType="comboBox"
1055
+ [data]="fontNames"
1056
+ [colSpan]="2"
1057
+ placeholder="(Inherited font)"
1058
+ [value]="parseFont(stateService.state.legend?.labels?.font).name"
1059
+ (valueChange)="updateState(legendFontName, $event)"
1060
+ >
1061
+ </kendo-chart-wizard-property-pane-form-field>
1062
+ <kendo-chart-wizard-property-pane-form-field
1063
+ text="Size"
1064
+ inputType="comboBox"
1065
+ [data]="fontSizes"
1066
+ placeholder="px"
1067
+ [value]="parseFont(stateService.state.legend?.labels?.font).size"
1068
+ (valueChange)="updateState(legendFontSize, $event)"
1069
+ >
1070
+ </kendo-chart-wizard-property-pane-form-field>
1071
+ <kendo-chart-wizard-property-pane-form-field
1072
+ text="Color"
1073
+ inputType="colorPicker"
1074
+ [value]="stateService.state.legend?.labels?.color"
1075
+ (valueChange)="updateState(legendColor, $event)"
1076
+ >
1077
+ </kendo-chart-wizard-property-pane-form-field>
1078
+ <kendo-chart-wizard-property-pane-form-field
1079
+ text="Position"
1080
+ inputType="dropDownList"
1081
+ [colSpan]="2"
1082
+ [data]="legendPositions"
1083
+ [value]="stateService.state.legend?.position"
1084
+ (valueChange)="updateState(legendPosition, $event)"
1085
+ >
1086
+ </kendo-chart-wizard-property-pane-form-field>
1087
+ </div>
1088
+ </form>
1089
+ </kendo-expansionpanel>
1090
+ </section>
1091
+ <section>
1092
+ <kendo-expansionpanel
1093
+ title="Series"
1094
+ [expanded]="isExpanded('Series')"
1095
+ (expandedChange)="onExpandedChange('Series', $event)"
1096
+ >
1097
+ <form class="k-form k-form-md">
1098
+ <div class="k-form-field">
1099
+ <kendo-label [for]="seriesDropDown" class="k-form-label" text="Apply to"></kendo-label>
1100
+ <div class="k-form-field-wrap">
1101
+ <kendo-dropdownlist
1102
+ #seriesDropDown
1103
+ [data]="stateService.state.series"
1104
+ textField="name"
1105
+ valueField="name"
1106
+ fillMode="outline"
1107
+ rounded="medium"
1108
+ size="medium"
1109
+ [value]="stateService.currentSeries"
1110
+ (valueChange)="updateCurrentSeries($event)"
1111
+ ></kendo-dropdownlist>
1112
+ </div>
1113
+ </div>
1114
+
1115
+ <kendo-chart-wizard-property-pane-form-field
1116
+ text="Color"
1117
+ [value]="stateService.currentSeries?.color"
1118
+ inputType="colorPicker"
1119
+ (valueChange)="updateSeriesColor($event)"
1120
+ >
1121
+ </kendo-chart-wizard-property-pane-form-field>
1122
+ <kendo-chart-wizard-property-pane-form-field
1123
+ text="Show Labels"
1124
+ [value]="stateService.currentSeries.labels?.visible"
1125
+ [isLabelInsideFormFieldWrap]="true"
1126
+ inputType="checkbox"
1127
+ (valueChange)="toggleSeriesLabels($event)"
1128
+ >
1129
+ </kendo-chart-wizard-property-pane-form-field>
1130
+ </form>
1131
+ </kendo-expansionpanel>
1132
+ </section>
1133
+ <section class="k-row-start-1 k-row-end-3 k-col-start-3">
1134
+ <kendo-expansionpanel
1135
+ title="Category axis"
1136
+ [expanded]="isExpanded('Category Axis')"
1137
+ (expandedChange)="onExpandedChange('Category Axis', $event)"
1138
+ >
1139
+ <form class="k-form k-form-md">
1140
+ <fieldset class="k-form-fieldset">
1141
+ <legend class="k-form-legend">Title</legend>
1142
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
1143
+ <kendo-chart-wizard-property-pane-form-field
1144
+ inputType="text"
1145
+ [hasLabel]="false"
1146
+ [colSpan]="2"
1147
+ placeholder="Axis Title"
1148
+ [value]="stateService.state.categoryAxis[0]?.title?.text"
1149
+ (valueChange)="updateState(categoryAxisTitleText, $event)"
1150
+ >
1151
+ </kendo-chart-wizard-property-pane-form-field>
1152
+ <kendo-chart-wizard-property-pane-form-field
1153
+ text="Font"
1154
+ inputType="comboBox"
1155
+ [data]="fontNames"
1156
+ [colSpan]="2"
1157
+ placeholder="(Inherited font)"
1158
+ [value]="parseFont(stateService.state.categoryAxis[0]?.title?.font).name"
1159
+ (valueChange)="updateState(categoryAxisTitleFontName, $event)"
1160
+ >
1161
+ </kendo-chart-wizard-property-pane-form-field>
1162
+ <kendo-chart-wizard-property-pane-form-field
1163
+ text="Size"
1164
+ inputType="comboBox"
1165
+ placeholder="px"
1166
+ [data]="fontSizes"
1167
+ [value]="parseFont(stateService.state.categoryAxis[0]?.title?.font).size"
1168
+ (valueChange)="updateState(categoryAxisTitleFontSize, $event)"
1169
+ >
1170
+ </kendo-chart-wizard-property-pane-form-field>
1171
+ <kendo-chart-wizard-property-pane-form-field
1172
+ text="Color"
1173
+ inputType="colorPicker"
1174
+ [value]="stateService.state.categoryAxis[0]?.title?.color"
1175
+ (valueChange)="updateState(categoryAxisTitleColor, $event)"
1176
+ >
1177
+ </kendo-chart-wizard-property-pane-form-field>
1178
+ </div>
1179
+ </fieldset>
1180
+ <fieldset class="k-form-fieldset">
1181
+ <legend class="k-form-legend">Labels</legend>
1182
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
1183
+ <kendo-chart-wizard-property-pane-form-field
1184
+ text="Font"
1185
+ inputType="comboBox"
1186
+ [data]="fontNames"
1187
+ placeholder="(Inherited font)"
1188
+ [value]="parseFont(stateService.state.categoryAxis[0]?.labels?.font).name"
1189
+ (valueChange)="updateState(categoryAxisLabelsFontName, $event)"
1190
+ >
1191
+ </kendo-chart-wizard-property-pane-form-field>
1192
+ <kendo-chart-wizard-property-pane-form-field
1193
+ text="Size"
1194
+ inputType="comboBox"
1195
+ [data]="fontSizes"
1196
+ placeholder="px"
1197
+ [value]="parseFont(stateService.state.categoryAxis[0]?.labels?.font).size"
1198
+ (valueChange)="updateState(categoryAxisLabelsFontSize, $event)"
1199
+ >
1200
+ </kendo-chart-wizard-property-pane-form-field>
1201
+ <kendo-chart-wizard-property-pane-form-field
1202
+ text="Color"
1203
+ inputType="colorPicker"
1204
+ [value]="stateService.state.categoryAxis[0]?.labels?.color || ''"
1205
+ (valueChange)="updateState(categoryAxisLabelsColor, $event)"
1206
+ >
1207
+ </kendo-chart-wizard-property-pane-form-field>
1208
+ <kendo-chart-wizard-property-pane-form-field
1209
+ text="Rotation"
1210
+ inputType="dropDownList"
1211
+ [data]="labelsRotation"
1212
+ [value]="stateService.state.categoryAxis[0]?.labels?.rotation"
1213
+ (valueChange)="updateState(categoryAxisLabelsRotation, $event)"
1214
+ >
1215
+ </kendo-chart-wizard-property-pane-form-field>
1216
+ <span></span>
1217
+ <kendo-chart-wizard-property-pane-form-field
1218
+ text="Reverse Order"
1219
+ [isLabelInsideFormFieldWrap]="true"
1220
+ inputType="checkbox"
1221
+ [colSpan]="2"
1222
+ [value]="stateService.state.categoryAxis[0]?.reverse"
1223
+ (valueChange)="updateState(categoryAxisReverseOrder, $event)"
1224
+ >
1225
+ </kendo-chart-wizard-property-pane-form-field>
1226
+ </div>
1227
+ </fieldset>
1228
+ </form>
1229
+ </kendo-expansionpanel>
1230
+ </section>
1231
+ <section class="k-row-start-1 k-row-end-3 k-col-start-4">
1232
+ <kendo-expansionpanel
1233
+ title="Value axis"
1234
+ [expanded]="isExpanded('Value Axis')"
1235
+ (expandedChange)="onExpandedChange('Value Axis', $event)"
1236
+ >
1237
+ <form class="k-form k-form-md">
1238
+ <fieldset class="k-form-fieldset">
1239
+ <legend class="k-form-legend">Title</legend>
1240
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
1241
+ <kendo-chart-wizard-property-pane-form-field
1242
+ inputType="text"
1243
+ [hasLabel]="false"
1244
+ [colSpan]="2"
1245
+ placeholder="Axis Title"
1246
+ [value]="stateService.state.valueAxis[0]?.title?.text"
1247
+ (valueChange)="updateState(valueAxisTitleText, $event)"
1248
+ >
1249
+ </kendo-chart-wizard-property-pane-form-field>
1250
+ <kendo-chart-wizard-property-pane-form-field
1251
+ text="Font"
1252
+ inputType="comboBox"
1253
+ [colSpan]="2"
1254
+ [data]="fontNames"
1255
+ placeholder="(Inherited font)"
1256
+ [value]="parseFont(stateService.state.valueAxis[0]?.title?.font).name"
1257
+ (valueChange)="updateState(valueAxisTitleFontName, $event)"
1258
+ >
1259
+ </kendo-chart-wizard-property-pane-form-field>
1260
+ <kendo-chart-wizard-property-pane-form-field
1261
+ text="Size"
1262
+ inputType="comboBox"
1263
+ placeholder="px"
1264
+ [data]="fontSizes"
1265
+ [value]="parseFont(stateService.state.valueAxis[0]?.title?.font).size"
1266
+ (valueChange)="updateState(valueAxisTitleFontSize, $event)"
1267
+ >
1268
+ </kendo-chart-wizard-property-pane-form-field>
1269
+ <kendo-chart-wizard-property-pane-form-field
1270
+ text="Color"
1271
+ inputType="colorPicker"
1272
+ [value]="stateService.state.valueAxis[0]?.title?.color"
1273
+ (valueChange)="updateState(valueAxisTitleColor, $event)"
1274
+ >
1275
+ </kendo-chart-wizard-property-pane-form-field>
1276
+ </div>
1277
+ </fieldset>
1278
+ <fieldset class="k-form-fieldset">
1279
+ <legend class="k-form-legend">Labels</legend>
1280
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
1281
+ <kendo-chart-wizard-property-pane-form-field
1282
+ text="Font"
1283
+ inputType="comboBox"
1284
+ [data]="fontNames"
1285
+ placeholder="(Inherited font)"
1286
+ [value]="parseFont(stateService.state.valueAxis[0]?.labels?.font).name"
1287
+ (valueChange)="updateState(valueAxisLabelsFontName, $event)"
1288
+ >
1289
+ </kendo-chart-wizard-property-pane-form-field>
1290
+ <kendo-chart-wizard-property-pane-form-field
1291
+ text="Size"
1292
+ inputType="comboBox"
1293
+ [data]="fontSizes"
1294
+ placeholder="px"
1295
+ [value]="parseFont(stateService.state.valueAxis[0]?.labels?.font).size"
1296
+ (valueChange)="updateState(valueAxisLabelsFontSize, $event)"
1297
+ >
1298
+ </kendo-chart-wizard-property-pane-form-field>
1299
+ <kendo-chart-wizard-property-pane-form-field
1300
+ text="Color"
1301
+ inputType="colorPicker"
1302
+ [value]="stateService.state.valueAxis[0]?.labels?.color || ''"
1303
+ (valueChange)="updateState(valueAxisLabelsColor, $event)"
1304
+ >
1305
+ </kendo-chart-wizard-property-pane-form-field>
1306
+ <kendo-chart-wizard-property-pane-form-field
1307
+ text="Rotation"
1308
+ inputType="dropDownList"
1309
+ [data]="labelsRotation"
1310
+ [value]="stateService.state.valueAxis[0]?.labels?.rotation"
1311
+ (valueChange)="updateState(valueAxisLabelsRotation, $event)"
1312
+ >
1313
+ </kendo-chart-wizard-property-pane-form-field>
1314
+ </div>
1315
+ </fieldset>
1316
+ </form>
1317
+ </kendo-expansionpanel>
1318
+ </section>
1319
+ `, isInline: true, dependencies: [{ kind: "component", type: ExpansionPanelComponent, selector: "kendo-expansionpanel", inputs: ["title", "subtitle", "disabled", "expanded", "svgExpandIcon", "svgCollapseIcon", "expandIcon", "collapseIcon", "animation"], outputs: ["expandedChange", "action", "expand", "collapse"], exportAs: ["kendoExpansionPanel"] }, { kind: "component", type: ChartWizardPropertyPaneFormFieldComponent, selector: "kendo-chart-wizard-property-pane-form-field", inputs: ["currentState", "action", "class", "inputType", "text", "data", "placeholder", "colSpan", "hasLabel", "isLabelInsideFormFieldWrap", "value"], outputs: ["valueChange"] }, { kind: "component", type: LabelComponent, selector: "kendo-label", inputs: ["text", "for", "optional", "labelCssStyle", "labelCssClass"], exportAs: ["kendoLabel"] }, { kind: "component", type: SwitchComponent, selector: "kendo-switch", inputs: ["focusableId", "onLabel", "offLabel", "checked", "disabled", "readonly", "tabindex", "size", "thumbRounded", "trackRounded", "tabIndex"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoSwitch"] }, { kind: "component", type: DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "title", "subtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardPropertyPaneDataTabComponent, decorators: [{
1321
+ type: Component,
1322
+ args: [{
1323
+ selector: 'kendo-chart-wizard-property-pane-format-tab',
1324
+ changeDetection: ChangeDetectionStrategy.OnPush,
1325
+ template: `
1326
+ <section>
1327
+ <kendo-expansionpanel
1328
+ title="Chart Area"
1329
+ [expanded]="isExpanded('Chart Area')"
1330
+ (expandedChange)="onExpandedChange('Chart Area', $event)"
1331
+ [attr.dir]="stateService.direction"
1332
+ >
1333
+ <form class="k-form k-form-md">
1334
+ <fieldset class="k-form-fieldset">
1335
+ <legend class="k-form-legend">Margins</legend>
1336
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
1337
+ <kendo-chart-wizard-property-pane-form-field
1338
+ text="Left"
1339
+ inputType="numeric"
1340
+ [value]="$any(stateService.state.area?.margin).left"
1341
+ (valueChange)="updateState(areaMarginLeft, $event)"
1342
+ >
1343
+ </kendo-chart-wizard-property-pane-form-field>
1344
+ <kendo-chart-wizard-property-pane-form-field
1345
+ text="Right"
1346
+ inputType="numeric"
1347
+ [value]="$any(stateService.state.area?.margin).right"
1348
+ (valueChange)="updateState(areaMarginRight, $event)"
1349
+ >
1350
+ </kendo-chart-wizard-property-pane-form-field>
1351
+ <kendo-chart-wizard-property-pane-form-field
1352
+ text="Top"
1353
+ inputType="numeric"
1354
+ [value]="$any(stateService.state.area?.margin).top"
1355
+ (valueChange)="updateState(areaMarginTop, $event)"
1356
+ >
1357
+ </kendo-chart-wizard-property-pane-form-field>
1358
+ <kendo-chart-wizard-property-pane-form-field
1359
+ text="Bottom"
1360
+ inputType="numeric"
1361
+ [value]="$any(stateService.state.area?.margin).bottom"
1362
+ (valueChange)="updateState(areaMarginBottom, $event)"
1363
+ >
1364
+ </kendo-chart-wizard-property-pane-form-field>
1365
+ </div>
1366
+ </fieldset>
1367
+ <fieldset class="k-form-fieldset">
1368
+ <legend class="k-form-legend">Background</legend>
1369
+ <kendo-chart-wizard-property-pane-form-field
1370
+ text="Color"
1371
+ inputType="colorPicker"
1372
+ [value]="stateService.state.area?.background"
1373
+ (valueChange)="updateState(areaBackground, $event)"
1374
+ >
1375
+ </kendo-chart-wizard-property-pane-form-field>
1376
+ </fieldset>
1377
+ </form>
1378
+ </kendo-expansionpanel>
1379
+ </section>
1380
+ <section>
1381
+ <kendo-expansionpanel
1382
+ title="Title"
1383
+ [expanded]="isExpanded('Title')"
1384
+ (expandedChange)="onExpandedChange('Title', $event)"
1385
+ >
1386
+ <form class="k-form k-form-md">
1387
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
1388
+ <kendo-chart-wizard-property-pane-form-field
1389
+ text="Apply to"
1390
+ inputType="dropDownList"
1391
+ [data]="chartTitles"
1392
+ [colSpan]="2"
1393
+ [value]="stateService.currentTitle"
1394
+ (valueChange)="changeCurrentTitle($event)"
1395
+ >
1396
+ </kendo-chart-wizard-property-pane-form-field>
1397
+ <kendo-chart-wizard-property-pane-form-field
1398
+ text="Title"
1399
+ inputType="text"
1400
+ [colSpan]="2"
1401
+ [value]="chartTitleTypeText"
1402
+ (valueChange)="updateState(chartTitleTypeAction, $event)"
1403
+ >
1404
+ </kendo-chart-wizard-property-pane-form-field>
1405
+ <kendo-chart-wizard-property-pane-form-field
1406
+ text="Font"
1407
+ inputType="comboBox"
1408
+ [data]="fontNames"
1409
+ [colSpan]="2"
1410
+ [value]="chartTitleTypeFont"
1411
+ placeholder="(Inherited font)"
1412
+ (valueChange)="updateState(chartTitleTypeFontAction, $event)"
1413
+ >
1414
+ </kendo-chart-wizard-property-pane-form-field>
1415
+ <kendo-chart-wizard-property-pane-form-field
1416
+ text="Size"
1417
+ inputType="comboBox"
1418
+ [data]="fontSizes"
1419
+ [value]="chartTitleTypeFontSize"
1420
+ (valueChange)="updateState(chartTitleTypeFontSizeAction, $event)"
1421
+ >
1422
+ </kendo-chart-wizard-property-pane-form-field>
1423
+ <kendo-chart-wizard-property-pane-form-field
1424
+ text="Color"
1425
+ inputType="colorPicker"
1426
+ [value]="chartTitleTypeColor"
1427
+ (valueChange)="updateState(chartTitleTypeColorAction, $event)"
1428
+ >
1429
+ </kendo-chart-wizard-property-pane-form-field>
1430
+ </div>
1431
+ </form>
1432
+ </kendo-expansionpanel>
1433
+ </section>
1434
+ <section>
1435
+ <kendo-expansionpanel
1436
+ title="Legend"
1437
+ [expanded]="isExpanded('Legend')"
1438
+ (expandedChange)="onExpandedChange('Legend', $event)"
1439
+ >
1440
+ <form class="k-form k-form-md">
1441
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
1442
+ <kendo-label [for]="toggleLegend" text="Show Legend"></kendo-label>
1443
+ <kendo-switch
1444
+ #toggleLegend
1445
+ onLabel="On"
1446
+ offLabel="Off"
1447
+ thumbRounded="full"
1448
+ size="medium"
1449
+ [checked]="stateService.state.legend?.visible"
1450
+ (valueChange)="updateState(legendVisible, $event)"
1451
+ ></kendo-switch>
1452
+ <kendo-chart-wizard-property-pane-form-field
1453
+ text="Font"
1454
+ inputType="comboBox"
1455
+ [data]="fontNames"
1456
+ [colSpan]="2"
1457
+ placeholder="(Inherited font)"
1458
+ [value]="parseFont(stateService.state.legend?.labels?.font).name"
1459
+ (valueChange)="updateState(legendFontName, $event)"
1460
+ >
1461
+ </kendo-chart-wizard-property-pane-form-field>
1462
+ <kendo-chart-wizard-property-pane-form-field
1463
+ text="Size"
1464
+ inputType="comboBox"
1465
+ [data]="fontSizes"
1466
+ placeholder="px"
1467
+ [value]="parseFont(stateService.state.legend?.labels?.font).size"
1468
+ (valueChange)="updateState(legendFontSize, $event)"
1469
+ >
1470
+ </kendo-chart-wizard-property-pane-form-field>
1471
+ <kendo-chart-wizard-property-pane-form-field
1472
+ text="Color"
1473
+ inputType="colorPicker"
1474
+ [value]="stateService.state.legend?.labels?.color"
1475
+ (valueChange)="updateState(legendColor, $event)"
1476
+ >
1477
+ </kendo-chart-wizard-property-pane-form-field>
1478
+ <kendo-chart-wizard-property-pane-form-field
1479
+ text="Position"
1480
+ inputType="dropDownList"
1481
+ [colSpan]="2"
1482
+ [data]="legendPositions"
1483
+ [value]="stateService.state.legend?.position"
1484
+ (valueChange)="updateState(legendPosition, $event)"
1485
+ >
1486
+ </kendo-chart-wizard-property-pane-form-field>
1487
+ </div>
1488
+ </form>
1489
+ </kendo-expansionpanel>
1490
+ </section>
1491
+ <section>
1492
+ <kendo-expansionpanel
1493
+ title="Series"
1494
+ [expanded]="isExpanded('Series')"
1495
+ (expandedChange)="onExpandedChange('Series', $event)"
1496
+ >
1497
+ <form class="k-form k-form-md">
1498
+ <div class="k-form-field">
1499
+ <kendo-label [for]="seriesDropDown" class="k-form-label" text="Apply to"></kendo-label>
1500
+ <div class="k-form-field-wrap">
1501
+ <kendo-dropdownlist
1502
+ #seriesDropDown
1503
+ [data]="stateService.state.series"
1504
+ textField="name"
1505
+ valueField="name"
1506
+ fillMode="outline"
1507
+ rounded="medium"
1508
+ size="medium"
1509
+ [value]="stateService.currentSeries"
1510
+ (valueChange)="updateCurrentSeries($event)"
1511
+ ></kendo-dropdownlist>
1512
+ </div>
1513
+ </div>
1514
+
1515
+ <kendo-chart-wizard-property-pane-form-field
1516
+ text="Color"
1517
+ [value]="stateService.currentSeries?.color"
1518
+ inputType="colorPicker"
1519
+ (valueChange)="updateSeriesColor($event)"
1520
+ >
1521
+ </kendo-chart-wizard-property-pane-form-field>
1522
+ <kendo-chart-wizard-property-pane-form-field
1523
+ text="Show Labels"
1524
+ [value]="stateService.currentSeries.labels?.visible"
1525
+ [isLabelInsideFormFieldWrap]="true"
1526
+ inputType="checkbox"
1527
+ (valueChange)="toggleSeriesLabels($event)"
1528
+ >
1529
+ </kendo-chart-wizard-property-pane-form-field>
1530
+ </form>
1531
+ </kendo-expansionpanel>
1532
+ </section>
1533
+ <section class="k-row-start-1 k-row-end-3 k-col-start-3">
1534
+ <kendo-expansionpanel
1535
+ title="Category axis"
1536
+ [expanded]="isExpanded('Category Axis')"
1537
+ (expandedChange)="onExpandedChange('Category Axis', $event)"
1538
+ >
1539
+ <form class="k-form k-form-md">
1540
+ <fieldset class="k-form-fieldset">
1541
+ <legend class="k-form-legend">Title</legend>
1542
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
1543
+ <kendo-chart-wizard-property-pane-form-field
1544
+ inputType="text"
1545
+ [hasLabel]="false"
1546
+ [colSpan]="2"
1547
+ placeholder="Axis Title"
1548
+ [value]="stateService.state.categoryAxis[0]?.title?.text"
1549
+ (valueChange)="updateState(categoryAxisTitleText, $event)"
1550
+ >
1551
+ </kendo-chart-wizard-property-pane-form-field>
1552
+ <kendo-chart-wizard-property-pane-form-field
1553
+ text="Font"
1554
+ inputType="comboBox"
1555
+ [data]="fontNames"
1556
+ [colSpan]="2"
1557
+ placeholder="(Inherited font)"
1558
+ [value]="parseFont(stateService.state.categoryAxis[0]?.title?.font).name"
1559
+ (valueChange)="updateState(categoryAxisTitleFontName, $event)"
1560
+ >
1561
+ </kendo-chart-wizard-property-pane-form-field>
1562
+ <kendo-chart-wizard-property-pane-form-field
1563
+ text="Size"
1564
+ inputType="comboBox"
1565
+ placeholder="px"
1566
+ [data]="fontSizes"
1567
+ [value]="parseFont(stateService.state.categoryAxis[0]?.title?.font).size"
1568
+ (valueChange)="updateState(categoryAxisTitleFontSize, $event)"
1569
+ >
1570
+ </kendo-chart-wizard-property-pane-form-field>
1571
+ <kendo-chart-wizard-property-pane-form-field
1572
+ text="Color"
1573
+ inputType="colorPicker"
1574
+ [value]="stateService.state.categoryAxis[0]?.title?.color"
1575
+ (valueChange)="updateState(categoryAxisTitleColor, $event)"
1576
+ >
1577
+ </kendo-chart-wizard-property-pane-form-field>
1578
+ </div>
1579
+ </fieldset>
1580
+ <fieldset class="k-form-fieldset">
1581
+ <legend class="k-form-legend">Labels</legend>
1582
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
1583
+ <kendo-chart-wizard-property-pane-form-field
1584
+ text="Font"
1585
+ inputType="comboBox"
1586
+ [data]="fontNames"
1587
+ placeholder="(Inherited font)"
1588
+ [value]="parseFont(stateService.state.categoryAxis[0]?.labels?.font).name"
1589
+ (valueChange)="updateState(categoryAxisLabelsFontName, $event)"
1590
+ >
1591
+ </kendo-chart-wizard-property-pane-form-field>
1592
+ <kendo-chart-wizard-property-pane-form-field
1593
+ text="Size"
1594
+ inputType="comboBox"
1595
+ [data]="fontSizes"
1596
+ placeholder="px"
1597
+ [value]="parseFont(stateService.state.categoryAxis[0]?.labels?.font).size"
1598
+ (valueChange)="updateState(categoryAxisLabelsFontSize, $event)"
1599
+ >
1600
+ </kendo-chart-wizard-property-pane-form-field>
1601
+ <kendo-chart-wizard-property-pane-form-field
1602
+ text="Color"
1603
+ inputType="colorPicker"
1604
+ [value]="stateService.state.categoryAxis[0]?.labels?.color || ''"
1605
+ (valueChange)="updateState(categoryAxisLabelsColor, $event)"
1606
+ >
1607
+ </kendo-chart-wizard-property-pane-form-field>
1608
+ <kendo-chart-wizard-property-pane-form-field
1609
+ text="Rotation"
1610
+ inputType="dropDownList"
1611
+ [data]="labelsRotation"
1612
+ [value]="stateService.state.categoryAxis[0]?.labels?.rotation"
1613
+ (valueChange)="updateState(categoryAxisLabelsRotation, $event)"
1614
+ >
1615
+ </kendo-chart-wizard-property-pane-form-field>
1616
+ <span></span>
1617
+ <kendo-chart-wizard-property-pane-form-field
1618
+ text="Reverse Order"
1619
+ [isLabelInsideFormFieldWrap]="true"
1620
+ inputType="checkbox"
1621
+ [colSpan]="2"
1622
+ [value]="stateService.state.categoryAxis[0]?.reverse"
1623
+ (valueChange)="updateState(categoryAxisReverseOrder, $event)"
1624
+ >
1625
+ </kendo-chart-wizard-property-pane-form-field>
1626
+ </div>
1627
+ </fieldset>
1628
+ </form>
1629
+ </kendo-expansionpanel>
1630
+ </section>
1631
+ <section class="k-row-start-1 k-row-end-3 k-col-start-4">
1632
+ <kendo-expansionpanel
1633
+ title="Value axis"
1634
+ [expanded]="isExpanded('Value Axis')"
1635
+ (expandedChange)="onExpandedChange('Value Axis', $event)"
1636
+ >
1637
+ <form class="k-form k-form-md">
1638
+ <fieldset class="k-form-fieldset">
1639
+ <legend class="k-form-legend">Title</legend>
1640
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
1641
+ <kendo-chart-wizard-property-pane-form-field
1642
+ inputType="text"
1643
+ [hasLabel]="false"
1644
+ [colSpan]="2"
1645
+ placeholder="Axis Title"
1646
+ [value]="stateService.state.valueAxis[0]?.title?.text"
1647
+ (valueChange)="updateState(valueAxisTitleText, $event)"
1648
+ >
1649
+ </kendo-chart-wizard-property-pane-form-field>
1650
+ <kendo-chart-wizard-property-pane-form-field
1651
+ text="Font"
1652
+ inputType="comboBox"
1653
+ [colSpan]="2"
1654
+ [data]="fontNames"
1655
+ placeholder="(Inherited font)"
1656
+ [value]="parseFont(stateService.state.valueAxis[0]?.title?.font).name"
1657
+ (valueChange)="updateState(valueAxisTitleFontName, $event)"
1658
+ >
1659
+ </kendo-chart-wizard-property-pane-form-field>
1660
+ <kendo-chart-wizard-property-pane-form-field
1661
+ text="Size"
1662
+ inputType="comboBox"
1663
+ placeholder="px"
1664
+ [data]="fontSizes"
1665
+ [value]="parseFont(stateService.state.valueAxis[0]?.title?.font).size"
1666
+ (valueChange)="updateState(valueAxisTitleFontSize, $event)"
1667
+ >
1668
+ </kendo-chart-wizard-property-pane-form-field>
1669
+ <kendo-chart-wizard-property-pane-form-field
1670
+ text="Color"
1671
+ inputType="colorPicker"
1672
+ [value]="stateService.state.valueAxis[0]?.title?.color"
1673
+ (valueChange)="updateState(valueAxisTitleColor, $event)"
1674
+ >
1675
+ </kendo-chart-wizard-property-pane-form-field>
1676
+ </div>
1677
+ </fieldset>
1678
+ <fieldset class="k-form-fieldset">
1679
+ <legend class="k-form-legend">Labels</legend>
1680
+ <div class="k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4">
1681
+ <kendo-chart-wizard-property-pane-form-field
1682
+ text="Font"
1683
+ inputType="comboBox"
1684
+ [data]="fontNames"
1685
+ placeholder="(Inherited font)"
1686
+ [value]="parseFont(stateService.state.valueAxis[0]?.labels?.font).name"
1687
+ (valueChange)="updateState(valueAxisLabelsFontName, $event)"
1688
+ >
1689
+ </kendo-chart-wizard-property-pane-form-field>
1690
+ <kendo-chart-wizard-property-pane-form-field
1691
+ text="Size"
1692
+ inputType="comboBox"
1693
+ [data]="fontSizes"
1694
+ placeholder="px"
1695
+ [value]="parseFont(stateService.state.valueAxis[0]?.labels?.font).size"
1696
+ (valueChange)="updateState(valueAxisLabelsFontSize, $event)"
1697
+ >
1698
+ </kendo-chart-wizard-property-pane-form-field>
1699
+ <kendo-chart-wizard-property-pane-form-field
1700
+ text="Color"
1701
+ inputType="colorPicker"
1702
+ [value]="stateService.state.valueAxis[0]?.labels?.color || ''"
1703
+ (valueChange)="updateState(valueAxisLabelsColor, $event)"
1704
+ >
1705
+ </kendo-chart-wizard-property-pane-form-field>
1706
+ <kendo-chart-wizard-property-pane-form-field
1707
+ text="Rotation"
1708
+ inputType="dropDownList"
1709
+ [data]="labelsRotation"
1710
+ [value]="stateService.state.valueAxis[0]?.labels?.rotation"
1711
+ (valueChange)="updateState(valueAxisLabelsRotation, $event)"
1712
+ >
1713
+ </kendo-chart-wizard-property-pane-form-field>
1714
+ </div>
1715
+ </fieldset>
1716
+ </form>
1717
+ </kendo-expansionpanel>
1718
+ </section>
1719
+ `,
1720
+ standalone: true,
1721
+ imports: [
1722
+ ExpansionPanelComponent,
1723
+ ChartWizardPropertyPaneFormFieldComponent,
1724
+ LabelComponent,
1725
+ SwitchComponent,
1726
+ DropDownListComponent
1727
+ ]
1728
+ }]
1729
+ }], ctorParameters: function () { return [{ type: StateService }, { type: i2.LocalizationService }, { type: i0.ChangeDetectorRef }]; } });
1730
+
1731
+ /**
1732
+ * @hidden
1733
+ */
1734
+ class ChartWizardPropertyPaneFormatTabComponent {
1735
+ constructor(stateService, formBuilder) {
1736
+ this.stateService = stateService;
1737
+ this.formBuilder = formBuilder;
1738
+ this.categoryAxisX = ActionTypes.categoryAxisX;
1739
+ this.valueAxisY = ActionTypes.valueAxisY;
1740
+ this.seriesChange = ActionTypes.seriesChange;
1741
+ this.trashIcon = trashIcon;
1742
+ this.plusIcon = plusIcon;
1743
+ this.isCategorical = isCategorical;
1744
+ this.formGroup = this.formBuilder.group({
1745
+ name: null,
1746
+ });
1747
+ }
1748
+ updateState(action, value) {
1749
+ this.stateService.state = updateState(this.stateService.state, action, value);
1750
+ }
1751
+ createFormGroup(args) {
1752
+ const item = args.isNew ? {} : args.dataItem;
1753
+ this.formGroup = this.formBuilder.group({
1754
+ name: item.name,
1755
+ });
1756
+ return this.formGroup;
1757
+ }
1758
+ addData() {
1759
+ this.stateService.state.series.push(this.stateService.deletedSeries[0]);
1760
+ this.stateService.deletedSeries.shift();
1761
+ this.updateState(this.seriesChange, this.stateService.state.series);
1762
+ }
1763
+ removeData(event) {
1764
+ this.stateService.deletedSeries.push(event.dataItem);
1765
+ this.updateState(this.seriesChange, event.sender.data.data);
1766
+ }
1767
+ onRowReorder(grid) {
1768
+ this.updateState(this.seriesChange, grid.data.data);
1769
+ }
1770
+ isDisabled(grid) {
1771
+ return grid.data.data.length === this.stateService.state.initialSeries.length;
1772
+ }
1773
+ }
1774
+ ChartWizardPropertyPaneFormatTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardPropertyPaneFormatTabComponent, deps: [{ token: StateService }, { token: i2$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
1775
+ ChartWizardPropertyPaneFormatTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChartWizardPropertyPaneFormatTabComponent, isStandalone: true, selector: "kendo-chart-wizard-property-pane-data-tab", ngImport: i0, template: `
1776
+ <kendo-expansionpanel title="Configuration" [expanded]="true">
1777
+ <form class="k-form k-form-md">
1778
+ <fieldset class="k-form-fieldset">
1779
+ <legend class="k-form-legend">
1780
+ {{ stateService.seriesType === 'scatter' ? 'X Axis' : 'Category Axis' }}
1781
+ </legend>
1782
+ <kendo-dropdownlist
1783
+ [data]="stateService.state.columns"
1784
+ [value]="stateService.state.categoryField"
1785
+ (valueChange)="updateState(categoryAxisX, $event)"
1786
+ >
1787
+ <ng-template kendoDropDownListValueTemplate> Current Item </ng-template>
1788
+ </kendo-dropdownlist>
1789
+ </fieldset>
1790
+ <fieldset class="k-form-fieldset" *ngIf="isCategorical(stateService.seriesType)">
1791
+ <legend class="k-form-legend">Series</legend>
1792
+ <kendo-grid
1793
+ #grid
1794
+ [kendoGridReactiveEditing]="createFormGroup"
1795
+ [kendoGridBinding]="stateService.state.series"
1796
+ [rowReorderable]="true"
1797
+ (rowReorder)="onRowReorder(grid)"
1798
+ (remove)="removeData($event)"
1799
+ >
1800
+ <ng-template kendoGridToolbarTemplate>
1801
+ <button
1802
+ kendoButton
1803
+ type="button"
1804
+ [svgIcon]="plusIcon"
1805
+ fillMode="flat"
1806
+ rounded="medium"
1807
+ [disabled]="isDisabled(grid)"
1808
+ (click)="addData()"
1809
+ >
1810
+ ADD
1811
+ </button>
1812
+ </ng-template>
1813
+ <kendo-grid-rowreorder-column [width]="40"></kendo-grid-rowreorder-column>
1814
+ <kendo-grid-column field="name" title="Name"></kendo-grid-column>
1815
+ <kendo-grid-command-column [width]="40">
1816
+ <ng-template kendoGridCellTemplate>
1817
+ <button
1818
+ [svgIcon]="trashIcon"
1819
+ kendoGridRemoveCommand
1820
+ fillMode="flat"
1821
+ rounded="medium"
1822
+ [disabled]="stateService.state.series.length < 2"
1823
+ ></button>
1824
+ </ng-template>
1825
+ </kendo-grid-command-column>
1826
+ </kendo-grid>
1827
+ </fieldset>
1828
+ <fieldset
1829
+ class="k-form-fieldset"
1830
+ *ngIf="stateService.seriesType === 'pie' || stateService.seriesType === 'scatter'"
1831
+ >
1832
+ <legend class="k-form-legend">
1833
+ {{ stateService.seriesType === 'scatter' ? 'Y Axis' : 'Value Axis' }}
1834
+ </legend>
1835
+ <kendo-dropdownlist
1836
+ [data]="stateService.state.columns"
1837
+ [value]="stateService.state.yField"
1838
+ (valueChange)="updateState(valueAxisY, $event)"
1839
+ >
1840
+ <ng-template kendoDropDownListValueTemplate> Current Item </ng-template>
1841
+ </kendo-dropdownlist>
1842
+ </fieldset>
1843
+ </form>
1844
+ </kendo-expansionpanel>
1845
+ `, isInline: true, dependencies: [{ kind: "component", type: ExpansionPanelComponent, selector: "kendo-expansionpanel", inputs: ["title", "subtitle", "disabled", "expanded", "svgExpandIcon", "svgCollapseIcon", "expandIcon", "collapseIcon", "animation"], outputs: ["expandedChange", "action", "expand", "collapse"], exportAs: ["kendoExpansionPanel"] }, { kind: "component", type: DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "title", "subtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "directive", type: ValueTemplateDirective, selector: "[kendoDropDownListValueTemplate],[kendoDropDownTreeValueTemplate]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: GridComponent, selector: "kendo-grid", inputs: ["data", "pageSize", "height", "rowHeight", "detailRowHeight", "skip", "scrollable", "selectable", "sort", "size", "trackBy", "filter", "group", "virtualColumns", "filterable", "sortable", "pageable", "groupable", "rowReorderable", "navigable", "navigatable", "autoSize", "rowClass", "rowSticky", "rowSelected", "cellSelected", "resizable", "reorderable", "loading", "columnMenu", "hideHeader", "isDetailExpanded", "isGroupExpanded"], outputs: ["filterChange", "pageChange", "groupChange", "sortChange", "selectionChange", "rowReorder", "dataStateChange", "groupExpand", "groupCollapse", "detailExpand", "detailCollapse", "edit", "cancel", "save", "remove", "add", "cellClose", "cellClick", "pdfExport", "excelExport", "columnResize", "columnReorder", "columnVisibilityChange", "columnLockedChange", "columnStickyChange", "scrollBottom", "contentScroll"], exportAs: ["kendoGrid"] }, { kind: "directive", type: ReactiveEditingDirective, selector: "[kendoGridReactiveEditing]", inputs: ["kendoGridReactiveEditing"] }, { kind: "directive", type: DataBindingDirective, selector: "[kendoGridBinding]", inputs: ["skip", "sort", "filter", "pageSize", "group", "kendoGridBinding"], exportAs: ["kendoGridBinding"] }, { kind: "directive", type: ToolbarTemplateDirective, selector: "[kendoGridToolbarTemplate]", inputs: ["position"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: RowReorderColumnComponent, selector: "kendo-grid-rowreorder-column", inputs: ["dragHandleIcon", "dragHandleSVGIcon"] }, { kind: "component", type: ColumnComponent, selector: "kendo-grid-column", inputs: ["field", "format", "sortable", "groupable", "editor", "filter", "filterable", "editable"] }, { kind: "component", type: CommandColumnComponent, selector: "kendo-grid-command-column" }, { kind: "directive", type: CellTemplateDirective, selector: "[kendoGridCellTemplate]" }, { kind: "directive", type: GridToolbarFocusableDirective, selector: " [kendoGridToolbarFocusable], [kendoGridAddCommand], [kendoGridCancelCommand], [kendoGridEditCommand], [kendoGridRemoveCommand], [kendoGridSaveCommand], [kendoGridExcelCommand], [kendoGridPDFCommand] " }, { kind: "component", type: RemoveCommandDirective, selector: "[kendoGridRemoveCommand]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1846
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardPropertyPaneFormatTabComponent, decorators: [{
1847
+ type: Component,
1848
+ args: [{
1849
+ selector: 'kendo-chart-wizard-property-pane-data-tab',
1850
+ changeDetection: ChangeDetectionStrategy.OnPush,
1851
+ template: `
1852
+ <kendo-expansionpanel title="Configuration" [expanded]="true">
1853
+ <form class="k-form k-form-md">
1854
+ <fieldset class="k-form-fieldset">
1855
+ <legend class="k-form-legend">
1856
+ {{ stateService.seriesType === 'scatter' ? 'X Axis' : 'Category Axis' }}
1857
+ </legend>
1858
+ <kendo-dropdownlist
1859
+ [data]="stateService.state.columns"
1860
+ [value]="stateService.state.categoryField"
1861
+ (valueChange)="updateState(categoryAxisX, $event)"
1862
+ >
1863
+ <ng-template kendoDropDownListValueTemplate> Current Item </ng-template>
1864
+ </kendo-dropdownlist>
1865
+ </fieldset>
1866
+ <fieldset class="k-form-fieldset" *ngIf="isCategorical(stateService.seriesType)">
1867
+ <legend class="k-form-legend">Series</legend>
1868
+ <kendo-grid
1869
+ #grid
1870
+ [kendoGridReactiveEditing]="createFormGroup"
1871
+ [kendoGridBinding]="stateService.state.series"
1872
+ [rowReorderable]="true"
1873
+ (rowReorder)="onRowReorder(grid)"
1874
+ (remove)="removeData($event)"
1875
+ >
1876
+ <ng-template kendoGridToolbarTemplate>
1877
+ <button
1878
+ kendoButton
1879
+ type="button"
1880
+ [svgIcon]="plusIcon"
1881
+ fillMode="flat"
1882
+ rounded="medium"
1883
+ [disabled]="isDisabled(grid)"
1884
+ (click)="addData()"
1885
+ >
1886
+ ADD
1887
+ </button>
1888
+ </ng-template>
1889
+ <kendo-grid-rowreorder-column [width]="40"></kendo-grid-rowreorder-column>
1890
+ <kendo-grid-column field="name" title="Name"></kendo-grid-column>
1891
+ <kendo-grid-command-column [width]="40">
1892
+ <ng-template kendoGridCellTemplate>
1893
+ <button
1894
+ [svgIcon]="trashIcon"
1895
+ kendoGridRemoveCommand
1896
+ fillMode="flat"
1897
+ rounded="medium"
1898
+ [disabled]="stateService.state.series.length < 2"
1899
+ ></button>
1900
+ </ng-template>
1901
+ </kendo-grid-command-column>
1902
+ </kendo-grid>
1903
+ </fieldset>
1904
+ <fieldset
1905
+ class="k-form-fieldset"
1906
+ *ngIf="stateService.seriesType === 'pie' || stateService.seriesType === 'scatter'"
1907
+ >
1908
+ <legend class="k-form-legend">
1909
+ {{ stateService.seriesType === 'scatter' ? 'Y Axis' : 'Value Axis' }}
1910
+ </legend>
1911
+ <kendo-dropdownlist
1912
+ [data]="stateService.state.columns"
1913
+ [value]="stateService.state.yField"
1914
+ (valueChange)="updateState(valueAxisY, $event)"
1915
+ >
1916
+ <ng-template kendoDropDownListValueTemplate> Current Item </ng-template>
1917
+ </kendo-dropdownlist>
1918
+ </fieldset>
1919
+ </form>
1920
+ </kendo-expansionpanel>
1921
+ `,
1922
+ standalone: true,
1923
+ imports: [
1924
+ ExpansionPanelComponent,
1925
+ DropDownListComponent,
1926
+ ValueTemplateDirective,
1927
+ NgIf,
1928
+ GridComponent,
1929
+ ReactiveEditingDirective,
1930
+ DataBindingDirective,
1931
+ ToolbarTemplateDirective,
1932
+ ButtonComponent,
1933
+ RowReorderColumnComponent,
1934
+ ColumnComponent,
1935
+ CommandColumnComponent,
1936
+ CellTemplateDirective,
1937
+ GridToolbarFocusableDirective,
1938
+ FocusableDirective,
1939
+ RemoveCommandDirective
1940
+ ]
1941
+ }]
1942
+ }], ctorParameters: function () { return [{ type: StateService }, { type: i2$1.FormBuilder }]; } });
1943
+
1944
+ /**
1945
+ * @hidden
1946
+ */
1947
+ class ChartWizardSeriesTypeButtonComponent {
1948
+ constructor(stateService) {
1949
+ this.stateService = stateService;
1950
+ this.stack = false;
1951
+ }
1952
+ onSelect() {
1953
+ this.stateService.seriesType = this.seriesType;
1954
+ this.stateService.state = mergeStates(this.stateService.state, createState(this.stateService.data, this.stateService.seriesType));
1955
+ this.stateService.currentSeries = {};
1956
+ if (this.stack) {
1957
+ this.stateService.state = updateState(this.stateService.state, ActionTypes.stacked, this.stack);
1958
+ }
1959
+ }
1960
+ isSelected() {
1961
+ if (this.stack?.type === '100%') {
1962
+ return this.stack?.type === this.stateService.state.series[0].stack?.type;
1963
+ }
1964
+ return (this.stateService.state.seriesType === this.seriesType &&
1965
+ this.stateService.state.series[0].stack === this.stack);
1966
+ }
1967
+ }
1968
+ ChartWizardSeriesTypeButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardSeriesTypeButtonComponent, deps: [{ token: StateService }], target: i0.ɵɵFactoryTarget.Component });
1969
+ ChartWizardSeriesTypeButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChartWizardSeriesTypeButtonComponent, isStandalone: true, selector: "kendo-chart-wizard-series-type-button", inputs: { title: "title", chartTypeIcon: "chartTypeIcon", stack: "stack", seriesType: "seriesType" }, ngImport: i0, template: `
1970
+ <div class="k-icon-text-wrapper" [class.k-selected]="isSelected()" (click)="onSelect()">
1971
+ <div class="k-icon-background-area">
1972
+ <kendo-svgicon [icon]="chartTypeIcon" size="xlarge" themeColor="secondary"> </kendo-svgicon>
1973
+ </div>
1974
+ {{ title }}
1975
+ </div>
1976
+ `, isInline: true, dependencies: [{ kind: "component", type: SVGIconComponent, selector: "kendo-svg-icon, kendo-svgicon", inputs: ["icon"], exportAs: ["kendoSVGIcon"] }] });
1977
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardSeriesTypeButtonComponent, decorators: [{
1978
+ type: Component,
1979
+ args: [{
1980
+ selector: 'kendo-chart-wizard-series-type-button',
1981
+ template: `
1982
+ <div class="k-icon-text-wrapper" [class.k-selected]="isSelected()" (click)="onSelect()">
1983
+ <div class="k-icon-background-area">
1984
+ <kendo-svgicon [icon]="chartTypeIcon" size="xlarge" themeColor="secondary"> </kendo-svgicon>
1985
+ </div>
1986
+ {{ title }}
1987
+ </div>
1988
+ `,
1989
+ standalone: true,
1990
+ imports: [SVGIconComponent]
1991
+ }]
1992
+ }], ctorParameters: function () { return [{ type: StateService }]; }, propDecorators: { title: [{
1993
+ type: Input
1994
+ }], chartTypeIcon: [{
1995
+ type: Input
1996
+ }], stack: [{
1997
+ type: Input
1998
+ }], seriesType: [{
1999
+ type: Input
2000
+ }] } });
2001
+
2002
+ /**
2003
+ * @hidden
2004
+ */
2005
+ class ChartWizardPropertyPaneChartTabComponent {
2006
+ constructor(stateService, cdr, localization) {
2007
+ this.stateService = stateService;
2008
+ this.cdr = cdr;
2009
+ this.localization = localization;
2010
+ this.exportIcon = exportIcon;
2011
+ this.chartBarClusteredIcon = chartBarClusteredIcon;
2012
+ this.chartBarStackedIcon = chartBarStackedIcon;
2013
+ this.chartBarStacked100Icon = chartBarStacked100Icon;
2014
+ this.chartPieIcon = chartPieIcon;
2015
+ this.chartColumnClusteredIcon = chartColumnClusteredIcon;
2016
+ this.chartColumnStackedIcon = chartColumnStackedIcon;
2017
+ this.chartColumnStacked100Icon = chartColumnStacked100Icon;
2018
+ this.chartLineIcon = chartLineIcon;
2019
+ this.chartLineStackedIcon = chartLineStackedIcon;
2020
+ this.chartLineStacked100Icon = chartLineStacked100Icon;
2021
+ this.chartScatterIcon = chartScatterIcon;
2022
+ }
2023
+ isExpanded(type) {
2024
+ return this.stateService.state.seriesType === type;
2025
+ }
2026
+ ngAfterViewChecked() {
2027
+ this.localization.changes.subscribe(() => {
2028
+ this.detectChanges();
2029
+ });
2030
+ }
2031
+ ngOnDestroy() {
2032
+ this.localization.changes.unsubscribe();
2033
+ }
2034
+ detectChanges() {
2035
+ this.cdr.detectChanges();
2036
+ }
2037
+ }
2038
+ ChartWizardPropertyPaneChartTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardPropertyPaneChartTabComponent, deps: [{ token: StateService }, { token: i0.ChangeDetectorRef }, { token: i2.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
2039
+ ChartWizardPropertyPaneChartTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChartWizardPropertyPaneChartTabComponent, isStandalone: true, selector: "kendo-chart-wizard-property-pane-chart-tab", ngImport: i0, template: `
2040
+ <kendo-expansionpanel title="Bar Chart" [expanded]="isExpanded('bar')">
2041
+ <div class="k-chart-types-wrapper">
2042
+ <kendo-chart-wizard-series-type-button
2043
+ title="Bar"
2044
+ [chartTypeIcon]="chartBarClusteredIcon"
2045
+ seriesType="bar"
2046
+ [stack]="false"
2047
+ >
2048
+ </kendo-chart-wizard-series-type-button>
2049
+ <kendo-chart-wizard-series-type-button
2050
+ title="Stacked Bar"
2051
+ [chartTypeIcon]="chartBarStackedIcon"
2052
+ seriesType="bar"
2053
+ [stack]="true"
2054
+ >
2055
+ </kendo-chart-wizard-series-type-button>
2056
+ <kendo-chart-wizard-series-type-button
2057
+ title="100% Stacked Bar"
2058
+ [chartTypeIcon]="chartBarStacked100Icon"
2059
+ seriesType="bar"
2060
+ [stack]="{ type: '100%' }"
2061
+ >
2062
+ </kendo-chart-wizard-series-type-button>
2063
+ </div>
2064
+ </kendo-expansionpanel>
2065
+ <kendo-expansionpanel title="Pie Chart" [expanded]="isExpanded('pie')">
2066
+ <div class="k-chart-types-wrapper">
2067
+ <kendo-chart-wizard-series-type-button
2068
+ title="Pie"
2069
+ [chartTypeIcon]="chartPieIcon"
2070
+ seriesType="pie"
2071
+ [stack]="undefined"
2072
+ >
2073
+ </kendo-chart-wizard-series-type-button>
2074
+ </div>
2075
+ </kendo-expansionpanel>
2076
+ <kendo-expansionpanel title="Column Chart" [expanded]="isExpanded('column')">
2077
+ <div class="k-chart-types-wrapper">
2078
+ <kendo-chart-wizard-series-type-button
2079
+ title="Column"
2080
+ [chartTypeIcon]="chartColumnClusteredIcon"
2081
+ seriesType="column"
2082
+ [stack]="false"
2083
+ >
2084
+ </kendo-chart-wizard-series-type-button>
2085
+ <kendo-chart-wizard-series-type-button
2086
+ title="Stacked Column"
2087
+ [chartTypeIcon]="chartColumnStackedIcon"
2088
+ seriesType="column"
2089
+ [stack]="true"
2090
+ >
2091
+ </kendo-chart-wizard-series-type-button>
2092
+ <kendo-chart-wizard-series-type-button
2093
+ title="100% Stacked Column"
2094
+ [chartTypeIcon]="chartColumnStacked100Icon"
2095
+ seriesType="column"
2096
+ [stack]="{ type: '100%' }"
2097
+ >
2098
+ </kendo-chart-wizard-series-type-button>
2099
+ </div>
2100
+ </kendo-expansionpanel>
2101
+ <kendo-expansionpanel title="Line Chart" [expanded]="isExpanded('line')">
2102
+ <div class="k-chart-types-wrapper">
2103
+ <kendo-chart-wizard-series-type-button
2104
+ title="Line"
2105
+ [chartTypeIcon]="chartLineIcon"
2106
+ seriesType="line"
2107
+ [stack]="false"
2108
+ >
2109
+ </kendo-chart-wizard-series-type-button>
2110
+ <kendo-chart-wizard-series-type-button
2111
+ title="Stacked Line"
2112
+ [chartTypeIcon]="chartLineStackedIcon"
2113
+ seriesType="line"
2114
+ [stack]="true"
2115
+ >
2116
+ </kendo-chart-wizard-series-type-button>
2117
+ <kendo-chart-wizard-series-type-button
2118
+ title="100% Line Column"
2119
+ [chartTypeIcon]="chartLineStacked100Icon"
2120
+ seriesType="line"
2121
+ [stack]="{ type: '100%' }"
2122
+ >
2123
+ </kendo-chart-wizard-series-type-button>
2124
+ </div>
2125
+ </kendo-expansionpanel>
2126
+ <kendo-expansionpanel title="Scatter Chart" [expanded]="isExpanded('scatter')">
2127
+ <div class="k-chart-types-wrapper">
2128
+ <kendo-chart-wizard-series-type-button
2129
+ title="Scatter"
2130
+ [chartTypeIcon]="chartScatterIcon"
2131
+ seriesType="scatter"
2132
+ [stack]="false"
2133
+ >
2134
+ </kendo-chart-wizard-series-type-button>
2135
+ </div>
2136
+ </kendo-expansionpanel>
2137
+ `, isInline: true, dependencies: [{ kind: "component", type: ExpansionPanelComponent, selector: "kendo-expansionpanel", inputs: ["title", "subtitle", "disabled", "expanded", "svgExpandIcon", "svgCollapseIcon", "expandIcon", "collapseIcon", "animation"], outputs: ["expandedChange", "action", "expand", "collapse"], exportAs: ["kendoExpansionPanel"] }, { kind: "component", type: ChartWizardSeriesTypeButtonComponent, selector: "kendo-chart-wizard-series-type-button", inputs: ["title", "chartTypeIcon", "stack", "seriesType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardPropertyPaneChartTabComponent, decorators: [{
2139
+ type: Component,
2140
+ args: [{
2141
+ selector: 'kendo-chart-wizard-property-pane-chart-tab',
2142
+ changeDetection: ChangeDetectionStrategy.OnPush,
2143
+ template: `
2144
+ <kendo-expansionpanel title="Bar Chart" [expanded]="isExpanded('bar')">
2145
+ <div class="k-chart-types-wrapper">
2146
+ <kendo-chart-wizard-series-type-button
2147
+ title="Bar"
2148
+ [chartTypeIcon]="chartBarClusteredIcon"
2149
+ seriesType="bar"
2150
+ [stack]="false"
2151
+ >
2152
+ </kendo-chart-wizard-series-type-button>
2153
+ <kendo-chart-wizard-series-type-button
2154
+ title="Stacked Bar"
2155
+ [chartTypeIcon]="chartBarStackedIcon"
2156
+ seriesType="bar"
2157
+ [stack]="true"
2158
+ >
2159
+ </kendo-chart-wizard-series-type-button>
2160
+ <kendo-chart-wizard-series-type-button
2161
+ title="100% Stacked Bar"
2162
+ [chartTypeIcon]="chartBarStacked100Icon"
2163
+ seriesType="bar"
2164
+ [stack]="{ type: '100%' }"
2165
+ >
2166
+ </kendo-chart-wizard-series-type-button>
2167
+ </div>
2168
+ </kendo-expansionpanel>
2169
+ <kendo-expansionpanel title="Pie Chart" [expanded]="isExpanded('pie')">
2170
+ <div class="k-chart-types-wrapper">
2171
+ <kendo-chart-wizard-series-type-button
2172
+ title="Pie"
2173
+ [chartTypeIcon]="chartPieIcon"
2174
+ seriesType="pie"
2175
+ [stack]="undefined"
2176
+ >
2177
+ </kendo-chart-wizard-series-type-button>
2178
+ </div>
2179
+ </kendo-expansionpanel>
2180
+ <kendo-expansionpanel title="Column Chart" [expanded]="isExpanded('column')">
2181
+ <div class="k-chart-types-wrapper">
2182
+ <kendo-chart-wizard-series-type-button
2183
+ title="Column"
2184
+ [chartTypeIcon]="chartColumnClusteredIcon"
2185
+ seriesType="column"
2186
+ [stack]="false"
2187
+ >
2188
+ </kendo-chart-wizard-series-type-button>
2189
+ <kendo-chart-wizard-series-type-button
2190
+ title="Stacked Column"
2191
+ [chartTypeIcon]="chartColumnStackedIcon"
2192
+ seriesType="column"
2193
+ [stack]="true"
2194
+ >
2195
+ </kendo-chart-wizard-series-type-button>
2196
+ <kendo-chart-wizard-series-type-button
2197
+ title="100% Stacked Column"
2198
+ [chartTypeIcon]="chartColumnStacked100Icon"
2199
+ seriesType="column"
2200
+ [stack]="{ type: '100%' }"
2201
+ >
2202
+ </kendo-chart-wizard-series-type-button>
2203
+ </div>
2204
+ </kendo-expansionpanel>
2205
+ <kendo-expansionpanel title="Line Chart" [expanded]="isExpanded('line')">
2206
+ <div class="k-chart-types-wrapper">
2207
+ <kendo-chart-wizard-series-type-button
2208
+ title="Line"
2209
+ [chartTypeIcon]="chartLineIcon"
2210
+ seriesType="line"
2211
+ [stack]="false"
2212
+ >
2213
+ </kendo-chart-wizard-series-type-button>
2214
+ <kendo-chart-wizard-series-type-button
2215
+ title="Stacked Line"
2216
+ [chartTypeIcon]="chartLineStackedIcon"
2217
+ seriesType="line"
2218
+ [stack]="true"
2219
+ >
2220
+ </kendo-chart-wizard-series-type-button>
2221
+ <kendo-chart-wizard-series-type-button
2222
+ title="100% Line Column"
2223
+ [chartTypeIcon]="chartLineStacked100Icon"
2224
+ seriesType="line"
2225
+ [stack]="{ type: '100%' }"
2226
+ >
2227
+ </kendo-chart-wizard-series-type-button>
2228
+ </div>
2229
+ </kendo-expansionpanel>
2230
+ <kendo-expansionpanel title="Scatter Chart" [expanded]="isExpanded('scatter')">
2231
+ <div class="k-chart-types-wrapper">
2232
+ <kendo-chart-wizard-series-type-button
2233
+ title="Scatter"
2234
+ [chartTypeIcon]="chartScatterIcon"
2235
+ seriesType="scatter"
2236
+ [stack]="false"
2237
+ >
2238
+ </kendo-chart-wizard-series-type-button>
2239
+ </div>
2240
+ </kendo-expansionpanel>
2241
+ `,
2242
+ standalone: true,
2243
+ imports: [ExpansionPanelComponent, ChartWizardSeriesTypeButtonComponent]
2244
+ }]
2245
+ }], ctorParameters: function () { return [{ type: StateService }, { type: i0.ChangeDetectorRef }, { type: i2.LocalizationService }]; } });
2246
+
2247
+ /**
2248
+ * @hidden
2249
+ */
2250
+ class PreventableEvent {
2251
+ constructor() {
2252
+ this.prevented = false;
2253
+ }
2254
+ /**
2255
+ * Prevents the default action for a specified event.
2256
+ * In this way, the source component suppresses
2257
+ * the built-in behavior that follows the event.
2258
+ */
2259
+ preventDefault() {
2260
+ this.prevented = true;
2261
+ }
2262
+ /**
2263
+ * Returns `true` if the event was prevented
2264
+ * by any of its subscribers.
2265
+ *
2266
+ * @returns `true` if the default action was prevented.
2267
+ * Otherwise, returns `false`.
2268
+ */
2269
+ isDefaultPrevented() {
2270
+ return this.prevented;
2271
+ }
2272
+ }
2273
+
2274
+ /**
2275
+ * Arguments for the `export` event on the Chart Wizard.
2276
+ */
2277
+ class ExportEvent extends PreventableEvent {
2278
+ /**
2279
+ * @hidden
2280
+ */
2281
+ constructor(chart, exportOptions) {
2282
+ super();
2283
+ this.chart = chart;
2284
+ this.exportOptions = exportOptions;
2285
+ }
2286
+ }
2287
+
2288
+ /**
2289
+ * The Chart Wizard component.
2290
+ * ```
2291
+ */
2292
+ class ChartWizardComponent {
2293
+ constructor(localization, stateService) {
2294
+ this.localization = localization;
2295
+ this.stateService = stateService;
2296
+ /**
2297
+ * @hidden
2298
+ */
2299
+ this.showLicenseWatermark = false;
2300
+ /**
2301
+ * @hidden
2302
+ */
2303
+ this.exportIcon = exportIcon;
2304
+ /**
2305
+ * @hidden
2306
+ */
2307
+ this.exportDropdownItems = [
2308
+ {
2309
+ text: 'PDF File',
2310
+ svgIcon: filePdfIcon,
2311
+ },
2312
+ {
2313
+ text: 'SVG File',
2314
+ svgIcon: fileIcon,
2315
+ },
2316
+ {
2317
+ text: 'PNG File',
2318
+ svgIcon: fileImageIcon,
2319
+ },
2320
+ ];
2321
+ /**
2322
+ * Fires when the Chart Wizard Window is to be close.
2323
+ */
2324
+ this.close = new EventEmitter();
2325
+ /**
2326
+ * Fires when the Chart is about to be exported. Can be prevented.
2327
+ */
2328
+ this.export = new EventEmitter();
2329
+ this.subscription = new Subscription();
2330
+ const isValid = validatePackage(packageMetadata);
2331
+ this.showLicenseWatermark = shouldShowValidationUI(isValid);
2332
+ this.stateService.direction = this.localization.rtl ? 'rtl' : 'ltr';
2333
+ }
2334
+ get dir() {
2335
+ return this.stateService.direction;
2336
+ }
2337
+ ngAfterViewInit() {
2338
+ this.subscription.add(this.localization.changes.subscribe(({ rtl }) => {
2339
+ this.stateService.direction = rtl ? 'rtl' : 'ltr';
2340
+ }));
2341
+ }
2342
+ ngOnChanges(changes) {
2343
+ if (changes['data']) {
2344
+ const data = changes['data'].currentValue;
2345
+ const clonedData = structuredClone(data);
2346
+ this.stateService.data = clonedData;
2347
+ this.stateService.state = createState(clonedData, this.stateService.seriesType);
2348
+ }
2349
+ if (changes['defaultState']) {
2350
+ const defaultState = changes['defaultState'].currentValue;
2351
+ if (defaultState.seriesType) {
2352
+ this.stateService.seriesType = defaultState.seriesType;
2353
+ this.stateService.state = mergeStates(this.stateService.state, createState(this.stateService.data, this.stateService.seriesType));
2354
+ }
2355
+ this.stateService.currentSeries = {};
2356
+ if (typeof defaultState.stack !== 'undefined') {
2357
+ this.stateService.state = updateState(this.stateService.state, ActionTypes.stacked, defaultState.stack);
2358
+ }
2359
+ this.propertyPane?.detectChanges();
2360
+ }
2361
+ }
2362
+ ngOnDestroy() {
2363
+ if (this.subscription) {
2364
+ this.subscription.unsubscribe();
2365
+ }
2366
+ }
2367
+ /**
2368
+ * @hidden
2369
+ */
2370
+ messageFor(key) {
2371
+ return this.localization.get(key);
2372
+ }
2373
+ /**
2374
+ * @hidden
2375
+ */
2376
+ onExport(exportType) {
2377
+ const args = new ExportEvent(this.chart, this.exportOptions);
2378
+ this.export.emit(args);
2379
+ if (args.isDefaultPrevented()) {
2380
+ return;
2381
+ }
2382
+ switch (exportType.text) {
2383
+ case 'PDF File':
2384
+ exportPDF(this.chart.exportVisual(), this.exportOptions?.pdf).then((dataURI) => {
2385
+ saveAs(dataURI, this.exportOptions?.fileName || 'chart');
2386
+ });
2387
+ break;
2388
+ case 'SVG File':
2389
+ this.chart.exportSVG(this.exportOptions?.image).then((dataURI) => {
2390
+ saveAs(dataURI, this.exportOptions?.fileName || 'chart');
2391
+ });
2392
+ break;
2393
+ case 'PNG File':
2394
+ this.chart.exportImage(this.exportOptions?.image).then((dataURI) => {
2395
+ saveAs(dataURI, this.exportOptions?.fileName || 'chart');
2396
+ });
2397
+ break;
2398
+ }
2399
+ }
2400
+ }
2401
+ ChartWizardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardComponent, deps: [{ token: i2.LocalizationService }, { token: StateService }], target: i0.ɵɵFactoryTarget.Component });
2402
+ ChartWizardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChartWizardComponent, isStandalone: true, selector: "kendo-chart-wizard", inputs: { data: "data", defaultState: "defaultState", exportOptions: "exportOptions" }, outputs: { close: "close", export: "export" }, host: { properties: { "attr.dir": "this.dir" } }, providers: [
2403
+ LocalizationService,
2404
+ {
2405
+ provide: L10N_PREFIX,
2406
+ useValue: 'kendo.chartwizard',
2407
+ },
2408
+ StateService
2409
+ ], viewQueries: [{ propertyName: "chart", first: true, predicate: ChartComponent, descendants: true }, { propertyName: "propertyPane", first: true, predicate: ChartWizardPropertyPaneChartTabComponent, descendants: true }], exportAs: ["kendoChartWizard"], usesOnChanges: true, ngImport: i0, template: `
2410
+ <ng-container
2411
+ kendoChartWizardLocalizedMessages
2412
+ i18n-sampleMessage="kendo.chartwizard.sampleMessage|Sample description"
2413
+ sampleMessage="foo"
2414
+ ></ng-container>
2415
+ <kendo-window
2416
+ class="k-chart-wizard"
2417
+ title="Chart Wizard"
2418
+ [width]="1000"
2419
+ [height]="700"
2420
+ [resizable]="true"
2421
+ (close)="close.emit()"
2422
+ >
2423
+ <kendo-splitter class="k-chart-wizard-splitter">
2424
+ <kendo-splitter-pane class="k-chart-wizard-preview-pane">
2425
+ <div class="k-preview-pane-header">
2426
+ <kendo-dropdownbutton
2427
+ [svgIcon]="exportIcon"
2428
+ [data]="exportDropdownItems"
2429
+ textField="text"
2430
+ fillMode="flat"
2431
+ (itemClick)="onExport($event)"
2432
+ >
2433
+ Export
2434
+ </kendo-dropdownbutton>
2435
+ </div>
2436
+ <div class="k-preview-pane-content">
2437
+ <kendo-chart [transitions]="false">
2438
+ <kendo-chart-title
2439
+ [text]="stateService.state.title?.text"
2440
+ [font]="stateService.state.title?.font"
2441
+ [color]="stateService.state.title?.color"
2442
+ ></kendo-chart-title>
2443
+ <kendo-chart-subtitle
2444
+ [text]="stateService.state.subtitle?.text"
2445
+ [font]="stateService.state.subtitle?.font"
2446
+ [color]="stateService.state.subtitle?.color"
2447
+ ></kendo-chart-subtitle>
2448
+ <kendo-chart-area
2449
+ [background]="stateService.state.area?.background"
2450
+ [margin]="stateService.state.area?.margin"
2451
+ >
2452
+ </kendo-chart-area>
2453
+ <kendo-chart-category-axis *ngIf="stateService.state.categoryAxis">
2454
+ <kendo-chart-category-axis-item
2455
+ *ngFor="let axis of stateService.state.categoryAxis"
2456
+ [categories]="axis.categories"
2457
+ [title]="{
2458
+ text: axis.title?.text,
2459
+ font: axis.title?.font,
2460
+ color: axis.title?.color
2461
+ }"
2462
+ [labels]="{
2463
+ rotation: { angle: $any(axis.labels)?.rotation },
2464
+ font: axis.labels?.font,
2465
+ color: axis.labels?.color
2466
+ }"
2467
+ [reverse]="axis.reverse"
2468
+ >
2469
+ </kendo-chart-category-axis-item>
2470
+ <kendo-chart-value-axis *ngIf="stateService.state.valueAxis">
2471
+ <kendo-chart-value-axis-item
2472
+ *ngFor="let axis of stateService.state.valueAxis"
2473
+ [title]="{
2474
+ text: axis.title?.text,
2475
+ font: axis.title?.font,
2476
+ color: axis.title?.color
2477
+ }"
2478
+ [labels]="{
2479
+ rotation: { angle: $any(axis.labels)?.rotation },
2480
+ font: axis.labels?.font,
2481
+ color: axis.labels?.color
2482
+ }"
2483
+ >
2484
+ </kendo-chart-value-axis-item>
2485
+ </kendo-chart-value-axis>
2486
+ </kendo-chart-category-axis>
2487
+ <kendo-chart-series>
2488
+ <kendo-chart-series-item
2489
+ *ngFor="let series of stateService.state.series"
2490
+ [type]="series.type"
2491
+ [data]="series.data"
2492
+ [stack]="series.stack"
2493
+ [field]="series.field"
2494
+ [categoryField]="series.categoryField"
2495
+ [name]="series.name"
2496
+ [color]="series.color"
2497
+ [labels]="{ visible: series.labels?.visible }"
2498
+ [xField]="series.xField"
2499
+ [yField]="series.yField"
2500
+ >
2501
+ </kendo-chart-series-item>
2502
+ </kendo-chart-series>
2503
+ <kendo-chart-x-axis>
2504
+ <kendo-chart-x-axis-item
2505
+ *ngFor="let axis of stateService.state.categoryAxis"
2506
+ [categories]="axis.categories"
2507
+ [title]="{
2508
+ text: axis.title?.text,
2509
+ font: axis.title?.font,
2510
+ color: axis.title?.color
2511
+ }"
2512
+ [labels]="{
2513
+ rotation: { angle: $any(axis.labels)?.rotation },
2514
+ font: axis.labels?.font,
2515
+ color: axis.labels?.color
2516
+ }"
2517
+ [reverse]="axis.reverse"
2518
+ >
2519
+ </kendo-chart-x-axis-item>
2520
+ </kendo-chart-x-axis>
2521
+ <kendo-chart-y-axis>
2522
+ <kendo-chart-y-axis-item
2523
+ *ngFor="let axis of stateService.state.valueAxis"
2524
+ [title]="{
2525
+ text: axis.title?.text,
2526
+ font: axis.title?.font,
2527
+ color: axis.title?.color
2528
+ }"
2529
+ [labels]="{
2530
+ rotation: { angle: $any(axis.labels)?.rotation },
2531
+ font: axis.labels?.font,
2532
+ color: axis.labels?.color
2533
+ }"
2534
+ >
2535
+ </kendo-chart-y-axis-item>
2536
+ </kendo-chart-y-axis>
2537
+ <kendo-chart-legend
2538
+ [visible]="stateService.state.legend?.visible"
2539
+ [position]="stateService.state.legend?.position"
2540
+ [labels]="stateService.state.legend?.labels"
2541
+ >
2542
+ </kendo-chart-legend>
2543
+ </kendo-chart>
2544
+ </div>
2545
+ </kendo-splitter-pane>
2546
+ <kendo-splitter-pane class="k-chart-wizard-property-pane" [collapsible]="true" size="30%">
2547
+ <kendo-tabstrip [keepTabContent]="true">
2548
+ <kendo-tabstrip-tab title="Chart" [selected]="true">
2549
+ <ng-template kendoTabContent>
2550
+ <kendo-chart-wizard-property-pane-chart-tab>
2551
+ </kendo-chart-wizard-property-pane-chart-tab>
2552
+ </ng-template>
2553
+ </kendo-tabstrip-tab>
2554
+ <kendo-tabstrip-tab title="Data">
2555
+ <ng-template kendoTabContent>
2556
+ <kendo-chart-wizard-property-pane-data-tab> </kendo-chart-wizard-property-pane-data-tab>
2557
+ </ng-template>
2558
+ </kendo-tabstrip-tab>
2559
+ <kendo-tabstrip-tab title="Format">
2560
+ <ng-template kendoTabContent>
2561
+ <kendo-chart-wizard-property-pane-format-tab>
2562
+ </kendo-chart-wizard-property-pane-format-tab>
2563
+ </ng-template>
2564
+ </kendo-tabstrip-tab>
2565
+ </kendo-tabstrip>
2566
+ </kendo-splitter-pane>
2567
+ </kendo-splitter>
2568
+ <div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
2569
+ </kendo-window>
2570
+ `, isInline: true, dependencies: [{ kind: "component", type: WindowComponent, selector: "kendo-window", inputs: ["autoFocusedElement", "title", "draggable", "resizable", "themeColor", "keepContent", "state", "minWidth", "minHeight", "width", "height", "top", "left"], outputs: ["dragStart", "dragEnd", "resizeStart", "resizeEnd", "close", "widthChange", "heightChange", "topChange", "leftChange", "stateChange"], exportAs: ["kendoWindow"] }, { kind: "component", type: SplitterComponent, selector: "kendo-splitter", inputs: ["orientation", "splitbarWidth", "resizeStep"], outputs: ["layoutChange"], exportAs: ["kendoSplitter"] }, { kind: "component", type: SplitterPaneComponent, selector: "kendo-splitter-pane", inputs: ["order", "size", "separatorLabel", "min", "max", "resizable", "collapsible", "scrollable", "collapsed", "orientation", "containsSplitter", "overlayContent"], outputs: ["sizeChange", "collapsedChange"], exportAs: ["kendoSplitterPane"] }, { kind: "component", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["arrowIcon", "icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor", "buttonAttributes"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }, { kind: "component", type: ChartComponent, selector: "kendo-chart", inputs: ["pannable", "renderAs", "seriesColors", "subtitle", "title", "transitions", "zoomable", "axisDefaults", "categoryAxis", "chartArea", "legend", "panes", "paneDefaults", "plotArea", "series", "seriesDefaults", "tooltip", "valueAxis", "xAxis", "yAxis", "resizeRateLimit", "popupSettings", "drilldownLevel"], outputs: ["axisLabelClick", "drag", "dragEnd", "dragStart", "legendItemHover", "legendItemLeave", "noteClick", "noteHover", "noteLeave", "paneRender", "plotAreaClick", "plotAreaHover", "plotAreaLeave", "render", "select", "selectEnd", "selectStart", "seriesClick", "drilldown", "seriesHover", "seriesOver", "seriesLeave", "zoom", "zoomEnd", "zoomStart", "legendItemClick", "drilldownLevelChange"], exportAs: ["kendoChart"] }, { kind: "component", type: TitleComponent, selector: "kendo-chart-title", inputs: ["align", "background", "border", "color", "font", "margin", "padding", "position", "text", "description", "visible"] }, { kind: "component", type: SubtitleComponent, selector: "kendo-chart-subtitle", inputs: ["align", "background", "border", "color", "font", "margin", "padding", "position", "text", "visible"] }, { kind: "component", type: ChartAreaComponent, selector: "kendo-chart-area", inputs: ["background", "border", "height", "margin", "opacity", "width"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CategoryAxisComponent, selector: "kendo-chart-category-axis" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: CategoryAxisItemComponent, selector: "kendo-chart-category-axis-item", inputs: ["autoBaseUnitSteps", "axisCrossingValue", "background", "baseUnit", "baseUnitStep", "categories", "color", "justified", "line", "majorGridLines", "majorTicks", "max", "maxDateGroups", "maxDivisions", "min", "minorGridLines", "minorTicks", "name", "pane", "plotBands", "reverse", "roundToBaseUnit", "startAngle", "type", "visible", "weekStartDay", "crosshair", "labels", "notes", "select", "title", "rangeLabels"] }, { kind: "component", type: ValueAxisComponent, selector: "kendo-chart-value-axis" }, { kind: "component", type: ValueAxisItemComponent, selector: "kendo-chart-value-axis-item", inputs: ["axisCrossingValue", "background", "color", "line", "majorGridLines", "majorTicks", "majorUnit", "max", "min", "minorGridLines", "minorTicks", "minorUnit", "name", "narrowRange", "pane", "plotBands", "reverse", "type", "visible", "crosshair", "labels", "notes", "title"] }, { kind: "component", type: SeriesComponent, selector: "kendo-chart-series" }, { kind: "component", type: SeriesItemComponent, selector: "kendo-chart-series-item", inputs: ["aggregate", "autoFit", "axis", "border", "categoryAxis", "categoryField", "closeField", "color", "colorField", "connectors", "currentField", "dashType", "data", "downColor", "downColorField", "drilldownField", "dynamicHeight", "dynamicSlope", "errorHighField", "errorLowField", "explodeField", "field", "fromField", "gap", "highField", "holeSize", "line", "lowField", "lowerField", "margin", "maxSize", "mean", "meanField", "median", "medianField", "minSize", "missingValues", "name", "neckRatio", "negativeColor", "negativeValues", "noteTextField", "opacity", "openField", "outliersField", "overlay", "padding", "q1Field", "q3Field", "segmentSpacing", "size", "sizeField", "spacing", "stack", "startAngle", "style", "summaryField", "target", "toField", "type", "upperField", "visible", "visibleInLegend", "visibleInLegendField", "visual", "width", "whiskers", "xAxis", "xErrorHighField", "xErrorLowField", "xField", "yAxis", "yErrorHighField", "yErrorLowField", "yField", "zIndex", "trendline", "for", "legendItem", "errorBars", "extremes", "highlight", "labels", "markers", "notes", "outliers", "tooltip"] }, { kind: "component", type: XAxisComponent, selector: "kendo-chart-x-axis" }, { kind: "component", type: XAxisItemComponent, selector: "kendo-chart-x-axis-item", inputs: ["axisCrossingValue", "background", "baseUnit", "categories", "color", "line", "majorGridLines", "majorTicks", "majorUnit", "max", "min", "minorGridLines", "minorTicks", "minorUnit", "name", "narrowRange", "pane", "plotBands", "reverse", "startAngle", "type", "visible", "weekStartDay", "crosshair", "labels", "notes", "title"] }, { kind: "component", type: YAxisComponent, selector: "kendo-chart-y-axis" }, { kind: "component", type: YAxisItemComponent, selector: "kendo-chart-y-axis-item", inputs: ["axisCrossingValue", "background", "baseUnit", "categories", "color", "line", "majorGridLines", "majorTicks", "majorUnit", "max", "min", "minorGridLines", "minorTicks", "minorUnit", "name", "narrowRange", "pane", "plotBands", "reverse", "type", "visible", "crosshair", "labels", "notes", "title"] }, { kind: "component", type: LegendComponent, selector: "kendo-chart-legend", inputs: ["align", "background", "border", "height", "labels", "margin", "offsetX", "offsetY", "orientation", "padding", "position", "reverse", "visible", "width", "markers", "spacing", "inactiveItems", "item", "title"] }, { kind: "component", type: TabStripComponent, selector: "kendo-tabstrip", inputs: ["height", "animate", "tabAlignment", "tabPosition", "keepTabContent", "closable", "scrollable", "closeIcon", "closeIconClass", "closeSVGIcon", "showContentArea"], outputs: ["tabSelect", "tabClose", "tabScroll"], exportAs: ["kendoTabStrip"] }, { kind: "component", type: TabStripTabComponent, selector: "kendo-tabstrip-tab", inputs: ["title", "disabled", "cssClass", "cssStyle", "selected", "closable", "closeIcon", "closeIconClass", "closeSVGIcon"], exportAs: ["kendoTabStripTab"] }, { kind: "directive", type: TabContentDirective, selector: "[kendoTabContent]" }, { kind: "component", type: ChartWizardPropertyPaneChartTabComponent, selector: "kendo-chart-wizard-property-pane-chart-tab" }, { kind: "component", type: ChartWizardPropertyPaneFormatTabComponent, selector: "kendo-chart-wizard-property-pane-data-tab" }, { kind: "component", type: ChartWizardPropertyPaneDataTabComponent, selector: "kendo-chart-wizard-property-pane-format-tab" }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2571
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardComponent, decorators: [{
2572
+ type: Component,
2573
+ args: [{
2574
+ changeDetection: ChangeDetectionStrategy.OnPush,
2575
+ exportAs: 'kendoChartWizard',
2576
+ providers: [
2577
+ LocalizationService,
2578
+ {
2579
+ provide: L10N_PREFIX,
2580
+ useValue: 'kendo.chartwizard',
2581
+ },
2582
+ StateService
2583
+ ],
2584
+ selector: 'kendo-chart-wizard',
2585
+ template: `
2586
+ <ng-container
2587
+ kendoChartWizardLocalizedMessages
2588
+ i18n-sampleMessage="kendo.chartwizard.sampleMessage|Sample description"
2589
+ sampleMessage="foo"
2590
+ ></ng-container>
2591
+ <kendo-window
2592
+ class="k-chart-wizard"
2593
+ title="Chart Wizard"
2594
+ [width]="1000"
2595
+ [height]="700"
2596
+ [resizable]="true"
2597
+ (close)="close.emit()"
2598
+ >
2599
+ <kendo-splitter class="k-chart-wizard-splitter">
2600
+ <kendo-splitter-pane class="k-chart-wizard-preview-pane">
2601
+ <div class="k-preview-pane-header">
2602
+ <kendo-dropdownbutton
2603
+ [svgIcon]="exportIcon"
2604
+ [data]="exportDropdownItems"
2605
+ textField="text"
2606
+ fillMode="flat"
2607
+ (itemClick)="onExport($event)"
2608
+ >
2609
+ Export
2610
+ </kendo-dropdownbutton>
2611
+ </div>
2612
+ <div class="k-preview-pane-content">
2613
+ <kendo-chart [transitions]="false">
2614
+ <kendo-chart-title
2615
+ [text]="stateService.state.title?.text"
2616
+ [font]="stateService.state.title?.font"
2617
+ [color]="stateService.state.title?.color"
2618
+ ></kendo-chart-title>
2619
+ <kendo-chart-subtitle
2620
+ [text]="stateService.state.subtitle?.text"
2621
+ [font]="stateService.state.subtitle?.font"
2622
+ [color]="stateService.state.subtitle?.color"
2623
+ ></kendo-chart-subtitle>
2624
+ <kendo-chart-area
2625
+ [background]="stateService.state.area?.background"
2626
+ [margin]="stateService.state.area?.margin"
2627
+ >
2628
+ </kendo-chart-area>
2629
+ <kendo-chart-category-axis *ngIf="stateService.state.categoryAxis">
2630
+ <kendo-chart-category-axis-item
2631
+ *ngFor="let axis of stateService.state.categoryAxis"
2632
+ [categories]="axis.categories"
2633
+ [title]="{
2634
+ text: axis.title?.text,
2635
+ font: axis.title?.font,
2636
+ color: axis.title?.color
2637
+ }"
2638
+ [labels]="{
2639
+ rotation: { angle: $any(axis.labels)?.rotation },
2640
+ font: axis.labels?.font,
2641
+ color: axis.labels?.color
2642
+ }"
2643
+ [reverse]="axis.reverse"
2644
+ >
2645
+ </kendo-chart-category-axis-item>
2646
+ <kendo-chart-value-axis *ngIf="stateService.state.valueAxis">
2647
+ <kendo-chart-value-axis-item
2648
+ *ngFor="let axis of stateService.state.valueAxis"
2649
+ [title]="{
2650
+ text: axis.title?.text,
2651
+ font: axis.title?.font,
2652
+ color: axis.title?.color
2653
+ }"
2654
+ [labels]="{
2655
+ rotation: { angle: $any(axis.labels)?.rotation },
2656
+ font: axis.labels?.font,
2657
+ color: axis.labels?.color
2658
+ }"
2659
+ >
2660
+ </kendo-chart-value-axis-item>
2661
+ </kendo-chart-value-axis>
2662
+ </kendo-chart-category-axis>
2663
+ <kendo-chart-series>
2664
+ <kendo-chart-series-item
2665
+ *ngFor="let series of stateService.state.series"
2666
+ [type]="series.type"
2667
+ [data]="series.data"
2668
+ [stack]="series.stack"
2669
+ [field]="series.field"
2670
+ [categoryField]="series.categoryField"
2671
+ [name]="series.name"
2672
+ [color]="series.color"
2673
+ [labels]="{ visible: series.labels?.visible }"
2674
+ [xField]="series.xField"
2675
+ [yField]="series.yField"
2676
+ >
2677
+ </kendo-chart-series-item>
2678
+ </kendo-chart-series>
2679
+ <kendo-chart-x-axis>
2680
+ <kendo-chart-x-axis-item
2681
+ *ngFor="let axis of stateService.state.categoryAxis"
2682
+ [categories]="axis.categories"
2683
+ [title]="{
2684
+ text: axis.title?.text,
2685
+ font: axis.title?.font,
2686
+ color: axis.title?.color
2687
+ }"
2688
+ [labels]="{
2689
+ rotation: { angle: $any(axis.labels)?.rotation },
2690
+ font: axis.labels?.font,
2691
+ color: axis.labels?.color
2692
+ }"
2693
+ [reverse]="axis.reverse"
2694
+ >
2695
+ </kendo-chart-x-axis-item>
2696
+ </kendo-chart-x-axis>
2697
+ <kendo-chart-y-axis>
2698
+ <kendo-chart-y-axis-item
2699
+ *ngFor="let axis of stateService.state.valueAxis"
2700
+ [title]="{
2701
+ text: axis.title?.text,
2702
+ font: axis.title?.font,
2703
+ color: axis.title?.color
2704
+ }"
2705
+ [labels]="{
2706
+ rotation: { angle: $any(axis.labels)?.rotation },
2707
+ font: axis.labels?.font,
2708
+ color: axis.labels?.color
2709
+ }"
2710
+ >
2711
+ </kendo-chart-y-axis-item>
2712
+ </kendo-chart-y-axis>
2713
+ <kendo-chart-legend
2714
+ [visible]="stateService.state.legend?.visible"
2715
+ [position]="stateService.state.legend?.position"
2716
+ [labels]="stateService.state.legend?.labels"
2717
+ >
2718
+ </kendo-chart-legend>
2719
+ </kendo-chart>
2720
+ </div>
2721
+ </kendo-splitter-pane>
2722
+ <kendo-splitter-pane class="k-chart-wizard-property-pane" [collapsible]="true" size="30%">
2723
+ <kendo-tabstrip [keepTabContent]="true">
2724
+ <kendo-tabstrip-tab title="Chart" [selected]="true">
2725
+ <ng-template kendoTabContent>
2726
+ <kendo-chart-wizard-property-pane-chart-tab>
2727
+ </kendo-chart-wizard-property-pane-chart-tab>
2728
+ </ng-template>
2729
+ </kendo-tabstrip-tab>
2730
+ <kendo-tabstrip-tab title="Data">
2731
+ <ng-template kendoTabContent>
2732
+ <kendo-chart-wizard-property-pane-data-tab> </kendo-chart-wizard-property-pane-data-tab>
2733
+ </ng-template>
2734
+ </kendo-tabstrip-tab>
2735
+ <kendo-tabstrip-tab title="Format">
2736
+ <ng-template kendoTabContent>
2737
+ <kendo-chart-wizard-property-pane-format-tab>
2738
+ </kendo-chart-wizard-property-pane-format-tab>
2739
+ </ng-template>
2740
+ </kendo-tabstrip-tab>
2741
+ </kendo-tabstrip>
2742
+ </kendo-splitter-pane>
2743
+ </kendo-splitter>
2744
+ <div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
2745
+ </kendo-window>
2746
+ `,
2747
+ standalone: true,
2748
+ imports: [
2749
+ WindowComponent,
2750
+ SplitterComponent,
2751
+ SplitterPaneComponent,
2752
+ DropDownButtonComponent,
2753
+ ChartComponent,
2754
+ TitleComponent,
2755
+ SubtitleComponent,
2756
+ ChartAreaComponent,
2757
+ NgIf,
2758
+ CategoryAxisComponent,
2759
+ NgFor,
2760
+ CategoryAxisItemComponent,
2761
+ ValueAxisComponent,
2762
+ ValueAxisItemComponent,
2763
+ SeriesComponent,
2764
+ SeriesItemComponent,
2765
+ XAxisComponent,
2766
+ XAxisItemComponent,
2767
+ YAxisComponent,
2768
+ YAxisItemComponent,
2769
+ LegendComponent,
2770
+ TabStripComponent,
2771
+ TabStripTabComponent,
2772
+ TabContentDirective,
2773
+ ChartWizardPropertyPaneChartTabComponent,
2774
+ ChartWizardPropertyPaneFormatTabComponent,
2775
+ ChartWizardPropertyPaneDataTabComponent,
2776
+ WatermarkOverlayComponent
2777
+ ]
2778
+ }]
2779
+ }], ctorParameters: function () { return [{ type: i2.LocalizationService }, { type: StateService }]; }, propDecorators: { data: [{
2780
+ type: Input
2781
+ }], defaultState: [{
2782
+ type: Input
2783
+ }], exportOptions: [{
2784
+ type: Input
2785
+ }], close: [{
2786
+ type: Output
2787
+ }], export: [{
2788
+ type: Output
2789
+ }], dir: [{
2790
+ type: HostBinding,
2791
+ args: ['attr.dir']
2792
+ }], chart: [{
2793
+ type: ViewChild,
2794
+ args: [ChartComponent]
2795
+ }], propertyPane: [{
2796
+ type: ViewChild,
2797
+ args: [ChartWizardPropertyPaneChartTabComponent]
2798
+ }] } });
2799
+
2800
+ // TODO: Extract to kendo-charts
2801
+ /**
2802
+ * Maps data rows to the Chart Wizard data format.
2803
+ *
2804
+ * @returns collection that can be used as Chart Wizard.
2805
+ */
2806
+ function getWizardDataFromDataRows(dataRows) {
2807
+ const result = [];
2808
+ dataRows.forEach(item => {
2809
+ const { dataItem, dataColumns } = item;
2810
+ const row = [];
2811
+ dataColumns.forEach(column => {
2812
+ row.push({
2813
+ field: column.title || column.field,
2814
+ value: getter(column.field)(dataItem)
2815
+ });
2816
+ });
2817
+ result.push(row);
2818
+ });
2819
+ return result;
2820
+ }
2821
+ // End: Extract to kendo-charts
2822
+
2823
+ /**
2824
+ * Maps the Grid selectedKeys to a more general DataRows type to be displayed in the Chart Wizard.
2825
+ *
2826
+ * The selectedKeys can be either row keys or cell keys.
2827
+ *
2828
+ * @returns DataRow array that can be passed to getWizardDataFromDataRows in order to bind the Chart Wizard.
2829
+ */
2830
+ function getGridSelectedRows(args) {
2831
+ const { grid, data, selectedKeys, selectionKey, columnKey } = args;
2832
+ const columns = [...grid.leafColumns];
2833
+ const allColumns = columns.map((column) => ({ field: column.field, title: column.title }));
2834
+ const selectedColumns = new Map();
2835
+ let getItemByKey;
2836
+ if (selectionKey) {
2837
+ const idGetter = getter(selectionKey);
2838
+ const dataMap = new Map(data.map((item) => [idGetter(item), item]));
2839
+ getItemByKey = itemKey => dataMap.get(itemKey);
2840
+ }
2841
+ else {
2842
+ getItemByKey = itemIndex => data[itemIndex];
2843
+ }
2844
+ let getColumnByColumnKey = key => columns[key];
2845
+ if (typeof columnKey === "function") {
2846
+ const columnMap = new Map(columns.map((col, colIndex) => [columnKey(col, colIndex), col]));
2847
+ getColumnByColumnKey = key => columnMap.get(key);
2848
+ }
2849
+ selectedKeys.forEach(item => {
2850
+ if (isPresent(item.columnKey)) {
2851
+ const itemColumns = selectedColumns.get(item.itemKey) || [];
2852
+ const column = getColumnByColumnKey(item.columnKey);
2853
+ itemColumns.push({ field: column.field, title: column.title });
2854
+ selectedColumns.set(item.itemKey, itemColumns);
2855
+ }
2856
+ else {
2857
+ selectedColumns.set(item, allColumns);
2858
+ }
2859
+ });
2860
+ return [...selectedColumns.entries()].map(([itemKey, dataColumns]) => ({
2861
+ dataItem: getItemByKey(itemKey),
2862
+ dataColumns
2863
+ }));
2864
+ }
2865
+
2866
+ /**
2867
+ * Maps the Grid selectedKeys to data to be displayed in the Chart Wizard.
2868
+ *
2869
+ * Supports both row and cell selection.
2870
+ * @returns collection that can be used as Chart Wizard.
2871
+ */
2872
+ const getWizardDataFromGridSelection = (args) => getWizardDataFromDataRows(getGridSelectedRows(args));
2873
+
2874
+ /**
2875
+ * A directive which binds the Chart Wizard from the selection state of the Grid
2876
+ * ([see example](slug:integration_with_chart).
2877
+ */
2878
+ class ChartWizardGridBindingDirective {
2879
+ constructor(grid) {
2880
+ this.grid = grid;
2881
+ /**
2882
+ * Defines the collection that will store the Chart Wizard data.
2883
+ *
2884
+ * @default []
2885
+ */
2886
+ this.chartWizardData = [];
2887
+ /**
2888
+ * Fires when the `chartWizardData` collection has been updated.
2889
+ */
2890
+ this.chartWizardDataChange = new EventEmitter();
2891
+ }
2892
+ ngOnInit() {
2893
+ if (!this.selectionKey || !this.data) {
2894
+ throw new Error('The [kendoChartWizardGridBinding] directive requires that [kendoGridBinding] and [kendoGridSelectBy] are set. ' +
2895
+ 'See the Grid documentation for an example on how to use the Chart Wizard without the directive.');
2896
+ }
2897
+ if (typeof this.selectionKey === 'function') {
2898
+ throw new Error('The [kendoChartWizardGridBinding] directive supports only strings as [kendoGridSelectBy] selection key.');
2899
+ }
2900
+ }
2901
+ onSelectionChange(selectedKeys) {
2902
+ this.chartWizardData = getWizardDataFromGridSelection({
2903
+ grid: this.grid,
2904
+ data: this.data,
2905
+ selectedKeys,
2906
+ selectionKey: this.selectionKey
2907
+ });
2908
+ this.chartWizardDataChange.emit(this.chartWizardData);
2909
+ }
2910
+ }
2911
+ ChartWizardGridBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardGridBindingDirective, deps: [{ token: GridComponent }], target: i0.ɵɵFactoryTarget.Directive });
2912
+ ChartWizardGridBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ChartWizardGridBindingDirective, isStandalone: true, selector: "[kendoChartWizardGridBinding]", inputs: { chartWizardData: "chartWizardData", data: ["kendoGridBinding", "data"], selectionKey: ["kendoGridSelectBy", "selectionKey"], columnKey: "columnKey" }, outputs: { chartWizardDataChange: "chartWizardDataChange" }, host: { listeners: { "selectedKeysChange": "onSelectionChange($event)" } }, exportAs: ["kendoChartWizardGridBinding"], ngImport: i0 });
2913
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardGridBindingDirective, decorators: [{
2914
+ type: Directive,
2915
+ args: [{
2916
+ selector: '[kendoChartWizardGridBinding]',
2917
+ exportAs: 'kendoChartWizardGridBinding',
2918
+ standalone: true
2919
+ }]
2920
+ }], ctorParameters: function () { return [{ type: i1.GridComponent, decorators: [{
2921
+ type: Inject,
2922
+ args: [GridComponent]
2923
+ }] }]; }, propDecorators: { chartWizardData: [{
2924
+ type: Input
2925
+ }], chartWizardDataChange: [{
2926
+ type: Output
2927
+ }], data: [{
2928
+ type: Input,
2929
+ args: ['kendoGridBinding']
2930
+ }], selectionKey: [{
2931
+ type: Input,
2932
+ args: ['kendoGridSelectBy']
2933
+ }], columnKey: [{
2934
+ type: Input
2935
+ }], onSelectionChange: [{
2936
+ type: HostListener,
2937
+ args: ['selectedKeysChange', ['$event']]
2938
+ }] } });
2939
+
2940
+ /**
2941
+ * Utility array that contains all `@progress/kendo-angular-chart-wizard` related components and directives.
2942
+ */
2943
+ const KENDO_CHARTWIZARD = [
2944
+ ChartWizardComponent,
2945
+ ChartWizardGridBindingDirective
2946
+ ];
2947
+
2948
+ //IMPORTANT: NgModule export kept for backwards compatibility
2949
+ /**
2950
+ * A [module](link:site.data.urls.angular['ngmoduleapi']) that includes the Chart Wizard component and directives.
2951
+ *
2952
+ * Imports the ChartWizardModule into your application
2953
+ * [root module](link:site.data.urls.angular['ngmodules']#angular-modularity) or any other sub-module
2954
+ * that will use the Chart Wizard component.
2955
+ */
2956
+ class ChartWizardModule {
2957
+ }
2958
+ ChartWizardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2959
+ ChartWizardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardModule, imports: [ChartWizardComponent, ChartWizardGridBindingDirective], exports: [ChartWizardComponent, ChartWizardGridBindingDirective] });
2960
+ ChartWizardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardModule, providers: [
2961
+ ThemeService,
2962
+ PopupService,
2963
+ ResizeBatchService,
2964
+ IconsService,
2965
+ DialogContainerService,
2966
+ DialogService,
2967
+ WindowService,
2968
+ WindowContainerService
2969
+ ], imports: [ChartWizardComponent] });
2970
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardModule, decorators: [{
2971
+ type: NgModule,
2972
+ args: [{
2973
+ imports: [...KENDO_CHARTWIZARD],
2974
+ exports: [...KENDO_CHARTWIZARD],
2975
+ providers: [
2976
+ ThemeService,
2977
+ PopupService,
2978
+ ResizeBatchService,
2979
+ IconsService,
2980
+ DialogContainerService,
2981
+ DialogService,
2982
+ WindowService,
2983
+ WindowContainerService
2984
+ ]
2985
+ }]
2986
+ }] });
2987
+
2988
+ /**
2989
+ * Generated bundle index. Do not edit.
2990
+ */
2991
+
2992
+ export { ChartWizardComponent, ChartWizardGridBindingDirective, ChartWizardModule, ExportEvent, KENDO_CHARTWIZARD, getGridSelectedRows, getWizardDataFromDataRows, getWizardDataFromGridSelection };
2993
+