@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.
- package/LICENSE.md +11 -0
- package/NOTICE.txt +200 -0
- package/README.md +32 -0
- package/chart-wizard-state.d.ts +149 -0
- package/chart-wizard.component.d.ts +80 -0
- package/chart-wizard.module.d.ts +19 -0
- package/common/get-wizard-data-from-data-rows.d.ts +41 -0
- package/common/index.d.ts +5 -0
- package/common/models.d.ts +19 -0
- package/directives.d.ts +10 -0
- package/esm2020/chart-wizard-state.mjs +502 -0
- package/esm2020/chart-wizard.component.mjs +552 -0
- package/esm2020/chart-wizard.module.mjs +53 -0
- package/esm2020/common/get-wizard-data-from-data-rows.mjs +27 -0
- package/esm2020/common/index.mjs +5 -0
- package/esm2020/common/models.mjs +5 -0
- package/esm2020/directives.mjs +13 -0
- package/esm2020/events/export-event.mjs +18 -0
- package/esm2020/events/index.mjs +5 -0
- package/esm2020/events/preventable-event.mjs +30 -0
- package/esm2020/grid-integration/get-grid-selected-rows.mjs +48 -0
- package/esm2020/grid-integration/get-wizard-data-from-grid-selection.mjs +13 -0
- package/esm2020/grid-integration/grid-chart-wizard.directive.mjs +74 -0
- package/esm2020/grid-integration/index.mjs +7 -0
- package/esm2020/index.mjs +11 -0
- package/esm2020/package-metadata.mjs +15 -0
- package/esm2020/progress-kendo-angular-chart-wizard.mjs +8 -0
- package/esm2020/property-pane/chart-tab.component.mjs +257 -0
- package/esm2020/property-pane/data-tab.component.mjs +229 -0
- package/esm2020/property-pane/form-field.component.mjs +245 -0
- package/esm2020/property-pane/format-tab.component.mjs +945 -0
- package/esm2020/series-type-button.component.mjs +67 -0
- package/esm2020/state.service.mjs +32 -0
- package/events/export-event.d.ts +24 -0
- package/events/index.d.ts +5 -0
- package/events/preventable-event.d.ts +24 -0
- package/fesm2015/progress-kendo-angular-chart-wizard.mjs +2999 -0
- package/fesm2020/progress-kendo-angular-chart-wizard.mjs +2993 -0
- package/grid-integration/get-grid-selected-rows.d.ts +20 -0
- package/grid-integration/get-wizard-data-from-grid-selection.d.ts +19 -0
- package/grid-integration/grid-chart-wizard.directive.d.ts +42 -0
- package/grid-integration/index.d.ts +7 -0
- package/index.d.ts +12 -0
- package/package-metadata.d.ts +9 -0
- package/package.json +65 -0
- package/property-pane/chart-tab.component.d.ts +35 -0
- package/property-pane/data-tab.component.d.ts +33 -0
- package/property-pane/form-field.component.d.ts +45 -0
- package/property-pane/format-tab.component.d.ts +102 -0
- package/schematics/collection.json +12 -0
- package/schematics/ngAdd/index.js +8 -0
- package/schematics/ngAdd/schema.json +24 -0
- package/series-type-button.component.d.ts +24 -0
- package/state.service.d.ts +23 -0
@@ -0,0 +1,552 @@
|
|
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 { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output, ViewChild, } from '@angular/core';
|
6
|
+
import { WatermarkOverlayComponent, shouldShowValidationUI } from '@progress/kendo-angular-common';
|
7
|
+
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
8
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
9
|
+
import { Subscription } from 'rxjs';
|
10
|
+
import { packageMetadata } from './package-metadata';
|
11
|
+
import { ActionTypes, createState, mergeStates, updateState } from './chart-wizard-state';
|
12
|
+
import { exportIcon, fileIcon, fileImageIcon, filePdfIcon } from '@progress/kendo-svg-icons';
|
13
|
+
import { StateService } from './state.service';
|
14
|
+
import { ChartComponent } from '@progress/kendo-angular-charts';
|
15
|
+
import { saveAs } from '@progress/kendo-file-saver';
|
16
|
+
import { exportPDF } from '@progress/kendo-drawing';
|
17
|
+
import { ChartWizardPropertyPaneDataTabComponent } from './property-pane/format-tab.component';
|
18
|
+
import { ChartWizardPropertyPaneFormatTabComponent } from './property-pane/data-tab.component';
|
19
|
+
import { ChartWizardPropertyPaneChartTabComponent } from './property-pane/chart-tab.component';
|
20
|
+
import { LegendComponent } from '@progress/kendo-angular-charts';
|
21
|
+
import { YAxisItemComponent } from '@progress/kendo-angular-charts';
|
22
|
+
import { YAxisComponent } from '@progress/kendo-angular-charts';
|
23
|
+
import { XAxisItemComponent } from '@progress/kendo-angular-charts';
|
24
|
+
import { XAxisComponent } from '@progress/kendo-angular-charts';
|
25
|
+
import { SeriesItemComponent } from '@progress/kendo-angular-charts';
|
26
|
+
import { SeriesComponent } from '@progress/kendo-angular-charts';
|
27
|
+
import { ValueAxisItemComponent } from '@progress/kendo-angular-charts';
|
28
|
+
import { ValueAxisComponent } from '@progress/kendo-angular-charts';
|
29
|
+
import { CategoryAxisItemComponent } from '@progress/kendo-angular-charts';
|
30
|
+
import { CategoryAxisComponent } from '@progress/kendo-angular-charts';
|
31
|
+
import { NgIf, NgFor } from '@angular/common';
|
32
|
+
import { ChartAreaComponent } from '@progress/kendo-angular-charts';
|
33
|
+
import { SubtitleComponent } from '@progress/kendo-angular-charts';
|
34
|
+
import { TitleComponent } from '@progress/kendo-angular-charts';
|
35
|
+
import { WindowComponent } from '@progress/kendo-angular-dialog';
|
36
|
+
import { SplitterComponent, SplitterPaneComponent, TabContentDirective, TabStripComponent, TabStripTabComponent } from '@progress/kendo-angular-layout';
|
37
|
+
import { DropDownButtonComponent } from '@progress/kendo-angular-buttons';
|
38
|
+
import { ExportEvent } from './events';
|
39
|
+
import * as i0 from "@angular/core";
|
40
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
41
|
+
import * as i2 from "./state.service";
|
42
|
+
/**
|
43
|
+
* The Chart Wizard component.
|
44
|
+
* ```
|
45
|
+
*/
|
46
|
+
export class ChartWizardComponent {
|
47
|
+
constructor(localization, stateService) {
|
48
|
+
this.localization = localization;
|
49
|
+
this.stateService = stateService;
|
50
|
+
/**
|
51
|
+
* @hidden
|
52
|
+
*/
|
53
|
+
this.showLicenseWatermark = false;
|
54
|
+
/**
|
55
|
+
* @hidden
|
56
|
+
*/
|
57
|
+
this.exportIcon = exportIcon;
|
58
|
+
/**
|
59
|
+
* @hidden
|
60
|
+
*/
|
61
|
+
this.exportDropdownItems = [
|
62
|
+
{
|
63
|
+
text: 'PDF File',
|
64
|
+
svgIcon: filePdfIcon,
|
65
|
+
},
|
66
|
+
{
|
67
|
+
text: 'SVG File',
|
68
|
+
svgIcon: fileIcon,
|
69
|
+
},
|
70
|
+
{
|
71
|
+
text: 'PNG File',
|
72
|
+
svgIcon: fileImageIcon,
|
73
|
+
},
|
74
|
+
];
|
75
|
+
/**
|
76
|
+
* Fires when the Chart Wizard Window is to be close.
|
77
|
+
*/
|
78
|
+
this.close = new EventEmitter();
|
79
|
+
/**
|
80
|
+
* Fires when the Chart is about to be exported. Can be prevented.
|
81
|
+
*/
|
82
|
+
this.export = new EventEmitter();
|
83
|
+
this.subscription = new Subscription();
|
84
|
+
const isValid = validatePackage(packageMetadata);
|
85
|
+
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
86
|
+
this.stateService.direction = this.localization.rtl ? 'rtl' : 'ltr';
|
87
|
+
}
|
88
|
+
get dir() {
|
89
|
+
return this.stateService.direction;
|
90
|
+
}
|
91
|
+
ngAfterViewInit() {
|
92
|
+
this.subscription.add(this.localization.changes.subscribe(({ rtl }) => {
|
93
|
+
this.stateService.direction = rtl ? 'rtl' : 'ltr';
|
94
|
+
}));
|
95
|
+
}
|
96
|
+
ngOnChanges(changes) {
|
97
|
+
if (changes['data']) {
|
98
|
+
const data = changes['data'].currentValue;
|
99
|
+
const clonedData = structuredClone(data);
|
100
|
+
this.stateService.data = clonedData;
|
101
|
+
this.stateService.state = createState(clonedData, this.stateService.seriesType);
|
102
|
+
}
|
103
|
+
if (changes['defaultState']) {
|
104
|
+
const defaultState = changes['defaultState'].currentValue;
|
105
|
+
if (defaultState.seriesType) {
|
106
|
+
this.stateService.seriesType = defaultState.seriesType;
|
107
|
+
this.stateService.state = mergeStates(this.stateService.state, createState(this.stateService.data, this.stateService.seriesType));
|
108
|
+
}
|
109
|
+
this.stateService.currentSeries = {};
|
110
|
+
if (typeof defaultState.stack !== 'undefined') {
|
111
|
+
this.stateService.state = updateState(this.stateService.state, ActionTypes.stacked, defaultState.stack);
|
112
|
+
}
|
113
|
+
this.propertyPane?.detectChanges();
|
114
|
+
}
|
115
|
+
}
|
116
|
+
ngOnDestroy() {
|
117
|
+
if (this.subscription) {
|
118
|
+
this.subscription.unsubscribe();
|
119
|
+
}
|
120
|
+
}
|
121
|
+
/**
|
122
|
+
* @hidden
|
123
|
+
*/
|
124
|
+
messageFor(key) {
|
125
|
+
return this.localization.get(key);
|
126
|
+
}
|
127
|
+
/**
|
128
|
+
* @hidden
|
129
|
+
*/
|
130
|
+
onExport(exportType) {
|
131
|
+
const args = new ExportEvent(this.chart, this.exportOptions);
|
132
|
+
this.export.emit(args);
|
133
|
+
if (args.isDefaultPrevented()) {
|
134
|
+
return;
|
135
|
+
}
|
136
|
+
switch (exportType.text) {
|
137
|
+
case 'PDF File':
|
138
|
+
exportPDF(this.chart.exportVisual(), this.exportOptions?.pdf).then((dataURI) => {
|
139
|
+
saveAs(dataURI, this.exportOptions?.fileName || 'chart');
|
140
|
+
});
|
141
|
+
break;
|
142
|
+
case 'SVG File':
|
143
|
+
this.chart.exportSVG(this.exportOptions?.image).then((dataURI) => {
|
144
|
+
saveAs(dataURI, this.exportOptions?.fileName || 'chart');
|
145
|
+
});
|
146
|
+
break;
|
147
|
+
case 'PNG File':
|
148
|
+
this.chart.exportImage(this.exportOptions?.image).then((dataURI) => {
|
149
|
+
saveAs(dataURI, this.exportOptions?.fileName || 'chart');
|
150
|
+
});
|
151
|
+
break;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
}
|
155
|
+
ChartWizardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardComponent, deps: [{ token: i1.LocalizationService }, { token: i2.StateService }], target: i0.ɵɵFactoryTarget.Component });
|
156
|
+
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: [
|
157
|
+
LocalizationService,
|
158
|
+
{
|
159
|
+
provide: L10N_PREFIX,
|
160
|
+
useValue: 'kendo.chartwizard',
|
161
|
+
},
|
162
|
+
StateService
|
163
|
+
], viewQueries: [{ propertyName: "chart", first: true, predicate: ChartComponent, descendants: true }, { propertyName: "propertyPane", first: true, predicate: ChartWizardPropertyPaneChartTabComponent, descendants: true }], exportAs: ["kendoChartWizard"], usesOnChanges: true, ngImport: i0, template: `
|
164
|
+
<ng-container
|
165
|
+
kendoChartWizardLocalizedMessages
|
166
|
+
i18n-sampleMessage="kendo.chartwizard.sampleMessage|Sample description"
|
167
|
+
sampleMessage="foo"
|
168
|
+
></ng-container>
|
169
|
+
<kendo-window
|
170
|
+
class="k-chart-wizard"
|
171
|
+
title="Chart Wizard"
|
172
|
+
[width]="1000"
|
173
|
+
[height]="700"
|
174
|
+
[resizable]="true"
|
175
|
+
(close)="close.emit()"
|
176
|
+
>
|
177
|
+
<kendo-splitter class="k-chart-wizard-splitter">
|
178
|
+
<kendo-splitter-pane class="k-chart-wizard-preview-pane">
|
179
|
+
<div class="k-preview-pane-header">
|
180
|
+
<kendo-dropdownbutton
|
181
|
+
[svgIcon]="exportIcon"
|
182
|
+
[data]="exportDropdownItems"
|
183
|
+
textField="text"
|
184
|
+
fillMode="flat"
|
185
|
+
(itemClick)="onExport($event)"
|
186
|
+
>
|
187
|
+
Export
|
188
|
+
</kendo-dropdownbutton>
|
189
|
+
</div>
|
190
|
+
<div class="k-preview-pane-content">
|
191
|
+
<kendo-chart [transitions]="false">
|
192
|
+
<kendo-chart-title
|
193
|
+
[text]="stateService.state.title?.text"
|
194
|
+
[font]="stateService.state.title?.font"
|
195
|
+
[color]="stateService.state.title?.color"
|
196
|
+
></kendo-chart-title>
|
197
|
+
<kendo-chart-subtitle
|
198
|
+
[text]="stateService.state.subtitle?.text"
|
199
|
+
[font]="stateService.state.subtitle?.font"
|
200
|
+
[color]="stateService.state.subtitle?.color"
|
201
|
+
></kendo-chart-subtitle>
|
202
|
+
<kendo-chart-area
|
203
|
+
[background]="stateService.state.area?.background"
|
204
|
+
[margin]="stateService.state.area?.margin"
|
205
|
+
>
|
206
|
+
</kendo-chart-area>
|
207
|
+
<kendo-chart-category-axis *ngIf="stateService.state.categoryAxis">
|
208
|
+
<kendo-chart-category-axis-item
|
209
|
+
*ngFor="let axis of stateService.state.categoryAxis"
|
210
|
+
[categories]="axis.categories"
|
211
|
+
[title]="{
|
212
|
+
text: axis.title?.text,
|
213
|
+
font: axis.title?.font,
|
214
|
+
color: axis.title?.color
|
215
|
+
}"
|
216
|
+
[labels]="{
|
217
|
+
rotation: { angle: $any(axis.labels)?.rotation },
|
218
|
+
font: axis.labels?.font,
|
219
|
+
color: axis.labels?.color
|
220
|
+
}"
|
221
|
+
[reverse]="axis.reverse"
|
222
|
+
>
|
223
|
+
</kendo-chart-category-axis-item>
|
224
|
+
<kendo-chart-value-axis *ngIf="stateService.state.valueAxis">
|
225
|
+
<kendo-chart-value-axis-item
|
226
|
+
*ngFor="let axis of stateService.state.valueAxis"
|
227
|
+
[title]="{
|
228
|
+
text: axis.title?.text,
|
229
|
+
font: axis.title?.font,
|
230
|
+
color: axis.title?.color
|
231
|
+
}"
|
232
|
+
[labels]="{
|
233
|
+
rotation: { angle: $any(axis.labels)?.rotation },
|
234
|
+
font: axis.labels?.font,
|
235
|
+
color: axis.labels?.color
|
236
|
+
}"
|
237
|
+
>
|
238
|
+
</kendo-chart-value-axis-item>
|
239
|
+
</kendo-chart-value-axis>
|
240
|
+
</kendo-chart-category-axis>
|
241
|
+
<kendo-chart-series>
|
242
|
+
<kendo-chart-series-item
|
243
|
+
*ngFor="let series of stateService.state.series"
|
244
|
+
[type]="series.type"
|
245
|
+
[data]="series.data"
|
246
|
+
[stack]="series.stack"
|
247
|
+
[field]="series.field"
|
248
|
+
[categoryField]="series.categoryField"
|
249
|
+
[name]="series.name"
|
250
|
+
[color]="series.color"
|
251
|
+
[labels]="{ visible: series.labels?.visible }"
|
252
|
+
[xField]="series.xField"
|
253
|
+
[yField]="series.yField"
|
254
|
+
>
|
255
|
+
</kendo-chart-series-item>
|
256
|
+
</kendo-chart-series>
|
257
|
+
<kendo-chart-x-axis>
|
258
|
+
<kendo-chart-x-axis-item
|
259
|
+
*ngFor="let axis of stateService.state.categoryAxis"
|
260
|
+
[categories]="axis.categories"
|
261
|
+
[title]="{
|
262
|
+
text: axis.title?.text,
|
263
|
+
font: axis.title?.font,
|
264
|
+
color: axis.title?.color
|
265
|
+
}"
|
266
|
+
[labels]="{
|
267
|
+
rotation: { angle: $any(axis.labels)?.rotation },
|
268
|
+
font: axis.labels?.font,
|
269
|
+
color: axis.labels?.color
|
270
|
+
}"
|
271
|
+
[reverse]="axis.reverse"
|
272
|
+
>
|
273
|
+
</kendo-chart-x-axis-item>
|
274
|
+
</kendo-chart-x-axis>
|
275
|
+
<kendo-chart-y-axis>
|
276
|
+
<kendo-chart-y-axis-item
|
277
|
+
*ngFor="let axis of stateService.state.valueAxis"
|
278
|
+
[title]="{
|
279
|
+
text: axis.title?.text,
|
280
|
+
font: axis.title?.font,
|
281
|
+
color: axis.title?.color
|
282
|
+
}"
|
283
|
+
[labels]="{
|
284
|
+
rotation: { angle: $any(axis.labels)?.rotation },
|
285
|
+
font: axis.labels?.font,
|
286
|
+
color: axis.labels?.color
|
287
|
+
}"
|
288
|
+
>
|
289
|
+
</kendo-chart-y-axis-item>
|
290
|
+
</kendo-chart-y-axis>
|
291
|
+
<kendo-chart-legend
|
292
|
+
[visible]="stateService.state.legend?.visible"
|
293
|
+
[position]="stateService.state.legend?.position"
|
294
|
+
[labels]="stateService.state.legend?.labels"
|
295
|
+
>
|
296
|
+
</kendo-chart-legend>
|
297
|
+
</kendo-chart>
|
298
|
+
</div>
|
299
|
+
</kendo-splitter-pane>
|
300
|
+
<kendo-splitter-pane class="k-chart-wizard-property-pane" [collapsible]="true" size="30%">
|
301
|
+
<kendo-tabstrip [keepTabContent]="true">
|
302
|
+
<kendo-tabstrip-tab title="Chart" [selected]="true">
|
303
|
+
<ng-template kendoTabContent>
|
304
|
+
<kendo-chart-wizard-property-pane-chart-tab>
|
305
|
+
</kendo-chart-wizard-property-pane-chart-tab>
|
306
|
+
</ng-template>
|
307
|
+
</kendo-tabstrip-tab>
|
308
|
+
<kendo-tabstrip-tab title="Data">
|
309
|
+
<ng-template kendoTabContent>
|
310
|
+
<kendo-chart-wizard-property-pane-data-tab> </kendo-chart-wizard-property-pane-data-tab>
|
311
|
+
</ng-template>
|
312
|
+
</kendo-tabstrip-tab>
|
313
|
+
<kendo-tabstrip-tab title="Format">
|
314
|
+
<ng-template kendoTabContent>
|
315
|
+
<kendo-chart-wizard-property-pane-format-tab>
|
316
|
+
</kendo-chart-wizard-property-pane-format-tab>
|
317
|
+
</ng-template>
|
318
|
+
</kendo-tabstrip-tab>
|
319
|
+
</kendo-tabstrip>
|
320
|
+
</kendo-splitter-pane>
|
321
|
+
</kendo-splitter>
|
322
|
+
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
323
|
+
</kendo-window>
|
324
|
+
`, 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 });
|
325
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardComponent, decorators: [{
|
326
|
+
type: Component,
|
327
|
+
args: [{
|
328
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
329
|
+
exportAs: 'kendoChartWizard',
|
330
|
+
providers: [
|
331
|
+
LocalizationService,
|
332
|
+
{
|
333
|
+
provide: L10N_PREFIX,
|
334
|
+
useValue: 'kendo.chartwizard',
|
335
|
+
},
|
336
|
+
StateService
|
337
|
+
],
|
338
|
+
selector: 'kendo-chart-wizard',
|
339
|
+
template: `
|
340
|
+
<ng-container
|
341
|
+
kendoChartWizardLocalizedMessages
|
342
|
+
i18n-sampleMessage="kendo.chartwizard.sampleMessage|Sample description"
|
343
|
+
sampleMessage="foo"
|
344
|
+
></ng-container>
|
345
|
+
<kendo-window
|
346
|
+
class="k-chart-wizard"
|
347
|
+
title="Chart Wizard"
|
348
|
+
[width]="1000"
|
349
|
+
[height]="700"
|
350
|
+
[resizable]="true"
|
351
|
+
(close)="close.emit()"
|
352
|
+
>
|
353
|
+
<kendo-splitter class="k-chart-wizard-splitter">
|
354
|
+
<kendo-splitter-pane class="k-chart-wizard-preview-pane">
|
355
|
+
<div class="k-preview-pane-header">
|
356
|
+
<kendo-dropdownbutton
|
357
|
+
[svgIcon]="exportIcon"
|
358
|
+
[data]="exportDropdownItems"
|
359
|
+
textField="text"
|
360
|
+
fillMode="flat"
|
361
|
+
(itemClick)="onExport($event)"
|
362
|
+
>
|
363
|
+
Export
|
364
|
+
</kendo-dropdownbutton>
|
365
|
+
</div>
|
366
|
+
<div class="k-preview-pane-content">
|
367
|
+
<kendo-chart [transitions]="false">
|
368
|
+
<kendo-chart-title
|
369
|
+
[text]="stateService.state.title?.text"
|
370
|
+
[font]="stateService.state.title?.font"
|
371
|
+
[color]="stateService.state.title?.color"
|
372
|
+
></kendo-chart-title>
|
373
|
+
<kendo-chart-subtitle
|
374
|
+
[text]="stateService.state.subtitle?.text"
|
375
|
+
[font]="stateService.state.subtitle?.font"
|
376
|
+
[color]="stateService.state.subtitle?.color"
|
377
|
+
></kendo-chart-subtitle>
|
378
|
+
<kendo-chart-area
|
379
|
+
[background]="stateService.state.area?.background"
|
380
|
+
[margin]="stateService.state.area?.margin"
|
381
|
+
>
|
382
|
+
</kendo-chart-area>
|
383
|
+
<kendo-chart-category-axis *ngIf="stateService.state.categoryAxis">
|
384
|
+
<kendo-chart-category-axis-item
|
385
|
+
*ngFor="let axis of stateService.state.categoryAxis"
|
386
|
+
[categories]="axis.categories"
|
387
|
+
[title]="{
|
388
|
+
text: axis.title?.text,
|
389
|
+
font: axis.title?.font,
|
390
|
+
color: axis.title?.color
|
391
|
+
}"
|
392
|
+
[labels]="{
|
393
|
+
rotation: { angle: $any(axis.labels)?.rotation },
|
394
|
+
font: axis.labels?.font,
|
395
|
+
color: axis.labels?.color
|
396
|
+
}"
|
397
|
+
[reverse]="axis.reverse"
|
398
|
+
>
|
399
|
+
</kendo-chart-category-axis-item>
|
400
|
+
<kendo-chart-value-axis *ngIf="stateService.state.valueAxis">
|
401
|
+
<kendo-chart-value-axis-item
|
402
|
+
*ngFor="let axis of stateService.state.valueAxis"
|
403
|
+
[title]="{
|
404
|
+
text: axis.title?.text,
|
405
|
+
font: axis.title?.font,
|
406
|
+
color: axis.title?.color
|
407
|
+
}"
|
408
|
+
[labels]="{
|
409
|
+
rotation: { angle: $any(axis.labels)?.rotation },
|
410
|
+
font: axis.labels?.font,
|
411
|
+
color: axis.labels?.color
|
412
|
+
}"
|
413
|
+
>
|
414
|
+
</kendo-chart-value-axis-item>
|
415
|
+
</kendo-chart-value-axis>
|
416
|
+
</kendo-chart-category-axis>
|
417
|
+
<kendo-chart-series>
|
418
|
+
<kendo-chart-series-item
|
419
|
+
*ngFor="let series of stateService.state.series"
|
420
|
+
[type]="series.type"
|
421
|
+
[data]="series.data"
|
422
|
+
[stack]="series.stack"
|
423
|
+
[field]="series.field"
|
424
|
+
[categoryField]="series.categoryField"
|
425
|
+
[name]="series.name"
|
426
|
+
[color]="series.color"
|
427
|
+
[labels]="{ visible: series.labels?.visible }"
|
428
|
+
[xField]="series.xField"
|
429
|
+
[yField]="series.yField"
|
430
|
+
>
|
431
|
+
</kendo-chart-series-item>
|
432
|
+
</kendo-chart-series>
|
433
|
+
<kendo-chart-x-axis>
|
434
|
+
<kendo-chart-x-axis-item
|
435
|
+
*ngFor="let axis of stateService.state.categoryAxis"
|
436
|
+
[categories]="axis.categories"
|
437
|
+
[title]="{
|
438
|
+
text: axis.title?.text,
|
439
|
+
font: axis.title?.font,
|
440
|
+
color: axis.title?.color
|
441
|
+
}"
|
442
|
+
[labels]="{
|
443
|
+
rotation: { angle: $any(axis.labels)?.rotation },
|
444
|
+
font: axis.labels?.font,
|
445
|
+
color: axis.labels?.color
|
446
|
+
}"
|
447
|
+
[reverse]="axis.reverse"
|
448
|
+
>
|
449
|
+
</kendo-chart-x-axis-item>
|
450
|
+
</kendo-chart-x-axis>
|
451
|
+
<kendo-chart-y-axis>
|
452
|
+
<kendo-chart-y-axis-item
|
453
|
+
*ngFor="let axis of stateService.state.valueAxis"
|
454
|
+
[title]="{
|
455
|
+
text: axis.title?.text,
|
456
|
+
font: axis.title?.font,
|
457
|
+
color: axis.title?.color
|
458
|
+
}"
|
459
|
+
[labels]="{
|
460
|
+
rotation: { angle: $any(axis.labels)?.rotation },
|
461
|
+
font: axis.labels?.font,
|
462
|
+
color: axis.labels?.color
|
463
|
+
}"
|
464
|
+
>
|
465
|
+
</kendo-chart-y-axis-item>
|
466
|
+
</kendo-chart-y-axis>
|
467
|
+
<kendo-chart-legend
|
468
|
+
[visible]="stateService.state.legend?.visible"
|
469
|
+
[position]="stateService.state.legend?.position"
|
470
|
+
[labels]="stateService.state.legend?.labels"
|
471
|
+
>
|
472
|
+
</kendo-chart-legend>
|
473
|
+
</kendo-chart>
|
474
|
+
</div>
|
475
|
+
</kendo-splitter-pane>
|
476
|
+
<kendo-splitter-pane class="k-chart-wizard-property-pane" [collapsible]="true" size="30%">
|
477
|
+
<kendo-tabstrip [keepTabContent]="true">
|
478
|
+
<kendo-tabstrip-tab title="Chart" [selected]="true">
|
479
|
+
<ng-template kendoTabContent>
|
480
|
+
<kendo-chart-wizard-property-pane-chart-tab>
|
481
|
+
</kendo-chart-wizard-property-pane-chart-tab>
|
482
|
+
</ng-template>
|
483
|
+
</kendo-tabstrip-tab>
|
484
|
+
<kendo-tabstrip-tab title="Data">
|
485
|
+
<ng-template kendoTabContent>
|
486
|
+
<kendo-chart-wizard-property-pane-data-tab> </kendo-chart-wizard-property-pane-data-tab>
|
487
|
+
</ng-template>
|
488
|
+
</kendo-tabstrip-tab>
|
489
|
+
<kendo-tabstrip-tab title="Format">
|
490
|
+
<ng-template kendoTabContent>
|
491
|
+
<kendo-chart-wizard-property-pane-format-tab>
|
492
|
+
</kendo-chart-wizard-property-pane-format-tab>
|
493
|
+
</ng-template>
|
494
|
+
</kendo-tabstrip-tab>
|
495
|
+
</kendo-tabstrip>
|
496
|
+
</kendo-splitter-pane>
|
497
|
+
</kendo-splitter>
|
498
|
+
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
499
|
+
</kendo-window>
|
500
|
+
`,
|
501
|
+
standalone: true,
|
502
|
+
imports: [
|
503
|
+
WindowComponent,
|
504
|
+
SplitterComponent,
|
505
|
+
SplitterPaneComponent,
|
506
|
+
DropDownButtonComponent,
|
507
|
+
ChartComponent,
|
508
|
+
TitleComponent,
|
509
|
+
SubtitleComponent,
|
510
|
+
ChartAreaComponent,
|
511
|
+
NgIf,
|
512
|
+
CategoryAxisComponent,
|
513
|
+
NgFor,
|
514
|
+
CategoryAxisItemComponent,
|
515
|
+
ValueAxisComponent,
|
516
|
+
ValueAxisItemComponent,
|
517
|
+
SeriesComponent,
|
518
|
+
SeriesItemComponent,
|
519
|
+
XAxisComponent,
|
520
|
+
XAxisItemComponent,
|
521
|
+
YAxisComponent,
|
522
|
+
YAxisItemComponent,
|
523
|
+
LegendComponent,
|
524
|
+
TabStripComponent,
|
525
|
+
TabStripTabComponent,
|
526
|
+
TabContentDirective,
|
527
|
+
ChartWizardPropertyPaneChartTabComponent,
|
528
|
+
ChartWizardPropertyPaneFormatTabComponent,
|
529
|
+
ChartWizardPropertyPaneDataTabComponent,
|
530
|
+
WatermarkOverlayComponent
|
531
|
+
]
|
532
|
+
}]
|
533
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.StateService }]; }, propDecorators: { data: [{
|
534
|
+
type: Input
|
535
|
+
}], defaultState: [{
|
536
|
+
type: Input
|
537
|
+
}], exportOptions: [{
|
538
|
+
type: Input
|
539
|
+
}], close: [{
|
540
|
+
type: Output
|
541
|
+
}], export: [{
|
542
|
+
type: Output
|
543
|
+
}], dir: [{
|
544
|
+
type: HostBinding,
|
545
|
+
args: ['attr.dir']
|
546
|
+
}], chart: [{
|
547
|
+
type: ViewChild,
|
548
|
+
args: [ChartComponent]
|
549
|
+
}], propertyPane: [{
|
550
|
+
type: ViewChild,
|
551
|
+
args: [ChartWizardPropertyPaneChartTabComponent]
|
552
|
+
}] } });
|
@@ -0,0 +1,53 @@
|
|
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 { NgModule } from '@angular/core';
|
6
|
+
import { ThemeService } from '@progress/kendo-angular-charts';
|
7
|
+
import { PopupService } from '@progress/kendo-angular-popup';
|
8
|
+
import { ResizeBatchService } from '@progress/kendo-angular-common';
|
9
|
+
import { IconsService } from '@progress/kendo-angular-icons';
|
10
|
+
import { DialogContainerService, DialogService, WindowContainerService, WindowService, } from '@progress/kendo-angular-dialog';
|
11
|
+
import { KENDO_CHARTWIZARD } from './directives';
|
12
|
+
import * as i0 from "@angular/core";
|
13
|
+
import * as i1 from "./chart-wizard.component";
|
14
|
+
import * as i2 from "./grid-integration/grid-chart-wizard.directive";
|
15
|
+
//IMPORTANT: NgModule export kept for backwards compatibility
|
16
|
+
/**
|
17
|
+
* A [module](link:site.data.urls.angular['ngmoduleapi']) that includes the Chart Wizard component and directives.
|
18
|
+
*
|
19
|
+
* Imports the ChartWizardModule into your application
|
20
|
+
* [root module](link:site.data.urls.angular['ngmodules']#angular-modularity) or any other sub-module
|
21
|
+
* that will use the Chart Wizard component.
|
22
|
+
*/
|
23
|
+
export class ChartWizardModule {
|
24
|
+
}
|
25
|
+
ChartWizardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
26
|
+
ChartWizardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardModule, imports: [i1.ChartWizardComponent, i2.ChartWizardGridBindingDirective], exports: [i1.ChartWizardComponent, i2.ChartWizardGridBindingDirective] });
|
27
|
+
ChartWizardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardModule, providers: [
|
28
|
+
ThemeService,
|
29
|
+
PopupService,
|
30
|
+
ResizeBatchService,
|
31
|
+
IconsService,
|
32
|
+
DialogContainerService,
|
33
|
+
DialogService,
|
34
|
+
WindowService,
|
35
|
+
WindowContainerService
|
36
|
+
], imports: [i1.ChartWizardComponent] });
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChartWizardModule, decorators: [{
|
38
|
+
type: NgModule,
|
39
|
+
args: [{
|
40
|
+
imports: [...KENDO_CHARTWIZARD],
|
41
|
+
exports: [...KENDO_CHARTWIZARD],
|
42
|
+
providers: [
|
43
|
+
ThemeService,
|
44
|
+
PopupService,
|
45
|
+
ResizeBatchService,
|
46
|
+
IconsService,
|
47
|
+
DialogContainerService,
|
48
|
+
DialogService,
|
49
|
+
WindowService,
|
50
|
+
WindowContainerService
|
51
|
+
]
|
52
|
+
}]
|
53
|
+
}] });
|
@@ -0,0 +1,27 @@
|
|
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
|
+
// TODO: Extract to kendo-charts
|
6
|
+
import { getter } from "@progress/kendo-common";
|
7
|
+
/**
|
8
|
+
* Maps data rows to the Chart Wizard data format.
|
9
|
+
*
|
10
|
+
* @returns collection that can be used as Chart Wizard.
|
11
|
+
*/
|
12
|
+
export function getWizardDataFromDataRows(dataRows) {
|
13
|
+
const result = [];
|
14
|
+
dataRows.forEach(item => {
|
15
|
+
const { dataItem, dataColumns } = item;
|
16
|
+
const row = [];
|
17
|
+
dataColumns.forEach(column => {
|
18
|
+
row.push({
|
19
|
+
field: column.title || column.field,
|
20
|
+
value: getter(column.field)(dataItem)
|
21
|
+
});
|
22
|
+
});
|
23
|
+
result.push(row);
|
24
|
+
});
|
25
|
+
return result;
|
26
|
+
}
|
27
|
+
// End: Extract to kendo-charts
|
@@ -0,0 +1,5 @@
|
|
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
|
+
export * from './get-wizard-data-from-data-rows';
|