@bryntum/chart-angular-thin 7.1.1 → 7.1.2

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.
@@ -0,0 +1,1487 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ /**
3
+ * Angular wrapper for Bryntum Chart
4
+ */
5
+
6
+ import { Component, ElementRef, EventEmitter, Output, Input, SimpleChange, SimpleChanges, OnDestroy, OnInit } from '@angular/core';
7
+
8
+ import WrapperHelper from './wrapper.helper';
9
+
10
+ import { AlignSpec, Base, Container, DomConfig, KeyMapConfig, Layout, MaskConfig, MenuItemConfig, MenuItemEntry, Model, ModelConfig, Rectangle, Scroller, ScrollerConfig, TabConfig, ToolbarItems, TooltipConfig, VueConfig, Widget } from '@bryntum/core-thin';
11
+ import { Chart, ChartListeners, ChartTooltipConfig, ChartContainerItemConfig, ChartContainerLayoutConfig, DataSeries, DataSeriesRole, Font } from '@bryntum/chart-thin';
12
+
13
+ import { StringHelper } from '@bryntum/core-thin';
14
+
15
+ export type BryntumChartProps = {
16
+ // Configs
17
+ /**
18
+ * Element (or element id) to adopt as this Widget's encapsulating element. The widget's
19
+ * content will be placed inside this element.
20
+ * ...
21
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-adopt)
22
+ */
23
+ adopt ? : HTMLElement|string
24
+ /**
25
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
26
+ * ...
27
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-align)
28
+ */
29
+ align ? : AlignSpec|string
30
+ /**
31
+ * When this widget is a child of a [Container](https://bryntum.com/products/chart/docs/api/Core/widget/Container), it will by default be participating in a
32
+ * flexbox layout. This config allows you to set this widget's
33
+ * [align-self](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self) style.
34
+ */
35
+ alignSelf ? : string
36
+ /**
37
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating) and being shown through [showBy](#Core/widget/Widget#function-showBy).*
38
+ * `true` to show a connector arrow pointing to the align target.
39
+ */
40
+ anchor ? : boolean
41
+ /**
42
+ * Whether to animate chart data changes.
43
+ */
44
+ animate ? : boolean
45
+ /**
46
+ * Set the duration in milliseconds for all animations.
47
+ */
48
+ animationDuration ? : number
49
+ /**
50
+ * Element (or the id of an element) to append this widget's element to. Can be configured, or set once at
51
+ * runtime. To access the element of a rendered widget, see [element](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-element).
52
+ */
53
+ appendTo ? : HTMLElement|string
54
+ /**
55
+ * A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject
56
+ * into an element which will be linked using the `aria-describedby` attribute.
57
+ * ...
58
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ariaDescription)
59
+ */
60
+ ariaDescription ? : string
61
+ /**
62
+ * A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject as
63
+ * the `aria-label` attribute.
64
+ * ...
65
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ariaLabel)
66
+ */
67
+ ariaLabel ? : string
68
+ /**
69
+ * Update assigned [record](https://bryntum.com/products/chart/docs/api/Core/widget/Container#config-record) automatically on field changes
70
+ */
71
+ autoUpdateRecord ? : boolean
72
+ /**
73
+ * The stroke color used for the axis lines and ticks, or `null` for theme default.
74
+ */
75
+ axisColor ? : string
76
+ /**
77
+ * The text color used for the axis labels / ticks, or `null` to use `axisColor`.
78
+ */
79
+ axisLabelColor ? : string
80
+ /**
81
+ * The chart background color, or `null` for transparent.
82
+ */
83
+ background ? : string
84
+ /**
85
+ * (Optional) The name of a field in the chart data to use as the background color for each data point.
86
+ */
87
+ backgroundColorField ? : string
88
+ /**
89
+ * Layout direction for the bar chart type.
90
+ */
91
+ barDirection ? : 'vertical'|'horizontal'
92
+ /**
93
+ * An object where property names with a truthy value indicate which events should bubble up the ownership
94
+ * hierarchy when triggered.
95
+ * ...
96
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-bubbleEvents)
97
+ */
98
+ bubbleEvents ? : object
99
+ /**
100
+ * Scale factor to apply to the computed size of bubbles in the bubble chart type.
101
+ */
102
+ bubbleScaleFactor ? : number
103
+ /**
104
+ * Set to `false` to not call onXXX method names (e.g. `onShow`, `onClick`), as an easy way to listen for events.
105
+ * ...
106
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-callOnFunctions)
107
+ */
108
+ callOnFunctions ? : boolean
109
+ /**
110
+ * By default, if an event handler throws an exception, the error propagates up the stack and the
111
+ * application state is undefined. Code which follows the event handler will *not* be executed.
112
+ * ...
113
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-catchEventHandlerExceptions)
114
+ */
115
+ catchEventHandlerExceptions ? : boolean
116
+ /**
117
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
118
+ * Set to `true` to centre the Widget in browser viewport space.
119
+ */
120
+ centered ? : boolean
121
+ /**
122
+ * Padding around the entire chart area, in pixels.
123
+ */
124
+ chartPadding ? : object
125
+ /**
126
+ * Chart tooltip configuration object. Configures the tooltip that appears when hovering over chart data points.
127
+ * This follows the Chartjs tooltip configuration specification. This will only be applied if [showTooltips](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#property-showTooltips)
128
+ * is `true`.
129
+ */
130
+ chartTooltip ? : ChartTooltipConfig
131
+ /**
132
+ * Basic type of chart.
133
+ */
134
+ chartType ? : 'line'|'bar'|'pie'|'donut'|'scatter'|'bubble'|'radar'
135
+ /**
136
+ * Custom CSS classes to add to element.
137
+ * May be specified as a space separated string, or as an object in which property names
138
+ * with truthy values are used as the class names:
139
+ * ...
140
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-cls)
141
+ */
142
+ cls ? : string|object
143
+ /**
144
+ * Applies the specified color to the widget, by setting the `--b-primary` CSS variable in the widgets
145
+ * `style` block.
146
+ * ...
147
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-color)
148
+ */
149
+ color ? : string
150
+ /**
151
+ * Programmatic control over which column to start in when used in a grid layout.
152
+ */
153
+ column ? : number
154
+ config ? : object
155
+ /**
156
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating) or [positioned](#Core/widget/Widget#config-positioned).*
157
+ * Element, Widget or Rectangle to which this Widget is constrained.
158
+ */
159
+ constrainTo ? : HTMLElement|Widget|Rectangle
160
+ /**
161
+ * The HTML content that coexists with sibling elements which may have been added to the
162
+ * [contentElement](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-contentElement) by plugins and features.
163
+ * When specifying html, this widget's element will also have the [htmlCls](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-htmlCls)
164
+ * class added to its classList, to allow targeted styling.
165
+ */
166
+ content ? : string
167
+ /**
168
+ * Custom CSS classes to add to the [contentElement](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-contentElement).
169
+ * May be specified as a space separated string, or as an object in which property names
170
+ * with truthy values are used as the class names:
171
+ * ...
172
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-contentElementCls)
173
+ */
174
+ contentElementCls ? : string|object
175
+ /**
176
+ * The data records or objects containing data to display in the chart.
177
+ */
178
+ data ? : Model[]|object[]|ModelConfig[]
179
+ /**
180
+ * When this Widget configuration is used in the Grid's RowExpander feature's `widget` config, provide the
181
+ * field on the expanded record to use for populating this widget's store (if applicable)
182
+ */
183
+ dataField ? : string
184
+ /**
185
+ * The shape to use for data point markers, or `'none'` for no markers.
186
+ */
187
+ dataPointShape ? : 'square'|'circle'|'diamond'|'triangle'|'none'
188
+ /**
189
+ * Object to apply to elements dataset (each key will be used as a data-attribute on the element)
190
+ */
191
+ dataset ? : Record<string, string>
192
+ /**
193
+ * The name of the property to set when a single value is to be applied to this Widget. Such as when used
194
+ * in a grid WidgetColumn, this is the property to which the column's `field` is applied.
195
+ */
196
+ defaultBindProperty ? : string
197
+ /**
198
+ * A [query](https://bryntum.com/products/chart/docs/api/Core/widget/Container#function-query) selector function which can identify the descendant widget to which
199
+ * focus should be directed by default.
200
+ * ...
201
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-defaultFocus)
202
+ * @param {Core.widget.Widget} widget Widget passed to method
203
+ * @returns {boolean} truthy value if widget is the default one
204
+ */
205
+ defaultFocus ? : ((widget: Widget) => boolean)|string
206
+ /**
207
+ * A config object containing default settings to apply to all child widgets.
208
+ */
209
+ defaults ? : ChartContainerItemConfig
210
+ /**
211
+ * Check for CSS compatibility issues when upgrading to v7. Performs the following checks:
212
+ * ...
213
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-detectCSSCompatibilityIssues)
214
+ */
215
+ detectCSSCompatibilityIssues ? : boolean
216
+ /**
217
+ * Disable or enable the widget. It is similar to [readOnly](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-readOnly) except a disabled widget
218
+ * cannot be focused, uses a different rendition (usually greyish) and does not allow selecting its value.
219
+ * ...
220
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-disabled)
221
+ */
222
+ disabled ? : boolean|'inert'
223
+ /**
224
+ * Controls the placement of this widget when it is added to a [panel's ](https://bryntum.com/products/chart/docs/api/Core/widget/Panel)
225
+ * [strips collection](https://bryntum.com/products/chart/docs/api/Core/widget/Panel#config-strips). Typical values for this config are `'top'`,
226
+ * `'bottom'`, `'left'`, or `'right'`, which cause the widget to be placed on that side of the panel's
227
+ * body. Such widgets are called "edge strips".
228
+ * ...
229
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-dock)
230
+ */
231
+ dock ? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
232
+ /**
233
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
234
+ * Set to `true` to be able to drag a widget freely on the page. Or set to an object with a ´handleSelector´
235
+ * property which controls when a drag should start.
236
+ * ...
237
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-draggable)
238
+ */
239
+ draggable ? : boolean|{
240
+ handleSelector?: string
241
+ }
242
+ /**
243
+ * An object specifying attributes to assign to the root element of this widget.
244
+ * Set `null` value to attribute to remove it.
245
+ * ...
246
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-elementAttributes)
247
+ */
248
+ elementAttributes ? : Record<string, string|null>
249
+ extraData ? : any
250
+ /**
251
+ * The name of the record field containing the data for this series.
252
+ */
253
+ field ? : string
254
+ /**
255
+ * When this widget is a child of a [Container](https://bryntum.com/products/chart/docs/api/Core/widget/Container), it will by default be participating in a
256
+ * flexbox layout. This config allows you to set this widget's
257
+ * [flex](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) style.
258
+ * This may be configured as a single number or a `&lt;flex-grow&gt; &lt;flex-shrink&gt; &lt;flex-basis&gt;` format string.
259
+ * numeric-only values are interpreted as the `flex-grow` value.
260
+ */
261
+ flex ? : number|string
262
+ /**
263
+ * Set to `true` to move the widget out of the document flow and position it
264
+ * absolutely in browser viewport space.
265
+ */
266
+ floating ? : boolean
267
+ /**
268
+ * The stroke color used for the grid lines, or `null` for theme default.
269
+ */
270
+ gridColor ? : string
271
+ /**
272
+ * Widget's height, used to set element `style.height`. Either specify a valid height string or a number,
273
+ * which will get 'px' appended. We recommend using CSS as the primary way to control height, but in some
274
+ * cases this config is convenient.
275
+ */
276
+ height ? : string|number
277
+ /**
278
+ * Configure with true to make widget initially hidden.
279
+ */
280
+ hidden ? : boolean
281
+ /**
282
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
283
+ * ...
284
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-hideAnimation)
285
+ */
286
+ hideAnimation ? : boolean|object
287
+ /**
288
+ * Specify `true` to make this container hide when it has no visible children (Either empty
289
+ * or all children hidden).
290
+ * ...
291
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-hideWhenEmpty)
292
+ */
293
+ hideWhenEmpty ? : boolean
294
+ /**
295
+ * The HTML to display initially or a function returning the markup (called at widget construction time).
296
+ * ...
297
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-html)
298
+ * @param {Core.widget.Widget} widget The calling Widget
299
+ * @returns {string}
300
+ */
301
+ html ? : string|((widget: Widget) => string)|DomConfig|DomConfig[]|VueConfig
302
+ /**
303
+ * The CSS class(es) to add when HTML content is being applied to this widget.
304
+ */
305
+ htmlCls ? : string|object
306
+ /**
307
+ * Widget id, if not specified one will be generated. Also used for lookups through Widget.getById
308
+ */
309
+ id ? : string
310
+ /**
311
+ * Determines if the widgets read-only state should be controlled by its parent.
312
+ * ...
313
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ignoreParentReadOnly)
314
+ */
315
+ ignoreParentReadOnly ? : boolean
316
+ /**
317
+ * Convenience setting to align input fields of child widgets. By default, the Field input element is
318
+ * placed immediately following the `label`. If you prefer to have all input fields aligned to the
319
+ * right, set this config to `'end'`.
320
+ * ...
321
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-inputFieldAlign)
322
+ */
323
+ inputFieldAlign ? : 'start'|'end'
324
+ /**
325
+ * Element (or element id) to insert this widget before. If provided, [appendTo](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
326
+ */
327
+ insertBefore ? : HTMLElement|string
328
+ /**
329
+ * Element (or element id) to append this widget element to, as a first child. If provided, [appendTo](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
330
+ */
331
+ insertFirst ? : HTMLElement|string
332
+ /**
333
+ * Whether to do dynamic highlighting and other interactivity as the mouse cursor moves over the chart.
334
+ */
335
+ interactive ? : boolean
336
+ /**
337
+ * An optional CSS class to add to child items of this container.
338
+ */
339
+ itemCls ? : string
340
+ /**
341
+ * An object containing typed child widget config objects or Widgets. May also be specified
342
+ * as an array.
343
+ * ...
344
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-items)
345
+ */
346
+ items ? : Record<string, ChartContainerItemConfig|MenuItemEntry>|(ChartContainerItemConfig|MenuItemEntry|Widget)[]
347
+ /**
348
+ * An object whose keys are the [key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) name
349
+ * and optional modifier prefixes: `'Ctrl+'`, `'Alt+'`, `'Meta+'`, and `'Shift+'` (case-insensitive). The values
350
+ * are the name of the instance method to call when the keystroke is received.
351
+ * ...
352
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-keyMap)
353
+ */
354
+ keyMap ? : Record<string, KeyMapConfig>
355
+ /**
356
+ * The name of the series to display in the legend.
357
+ */
358
+ label ? : string
359
+ /**
360
+ * Convenience setting to use same label placement on all child widgets.
361
+ * ...
362
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-labelPosition)
363
+ */
364
+ labelPosition ? : 'before'|'above'|'align-before'|'auto'|null
365
+ /**
366
+ * For line and bar charts, this series defines the data values to use as ticks for the x-axis.
367
+ * For pie and donut chart, it defines the data values to use as slice labels.
368
+ */
369
+ labels ? : DataSeries
370
+ /**
371
+ * The short name of a helper class which manages rendering and styling of child items.
372
+ * ...
373
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-layout)
374
+ */
375
+ layout ? : string|ChartContainerLayoutConfig
376
+ /**
377
+ * The CSS style properties to apply to the [contentElement](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-contentElement).
378
+ * ...
379
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-layoutStyle)
380
+ */
381
+ layoutStyle ? : object
382
+ /**
383
+ * An array of [child item](https://bryntum.com/products/chart/docs/api/Core/widget/Container#config-items) *config objects* which is to be converted into
384
+ * instances only when this Container is rendered, rather than eagerly at construct time.
385
+ * ...
386
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-lazyItems)
387
+ */
388
+ lazyItems ? : Record<string, ChartContainerItemConfig>|ChartContainerItemConfig[]|Widget[]
389
+ /**
390
+ * Where the chart's legend should appear relative to the main chart content.
391
+ * Options `inline-start` and `inline-end` function as in CSS, with horizontal positioning
392
+ * controlled by RTL mode.
393
+ */
394
+ legendPosition ? : 'top'|'right'|'bottom'|'left'|'inline-start'|'inline-end'
395
+ /**
396
+ * Optional scale factor to increase or decrease the size of the chart legend.
397
+ */
398
+ legendScale ? : number
399
+ /**
400
+ * The listener set for this object.
401
+ * ...
402
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-listeners)
403
+ */
404
+ listeners ? : ChartListeners
405
+ /**
406
+ * A class translations of which are used for translating this entity.
407
+ * This is often used when translations of an item are defined on its container class.
408
+ * For example:
409
+ * ...
410
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-localeClass)
411
+ */
412
+ localeClass ? : typeof Base
413
+ /**
414
+ * Set to `false` to disable localization of this object.
415
+ */
416
+ localizable ? : boolean
417
+ /**
418
+ * List of properties which values should be translated automatically upon a locale applying.
419
+ * In case there is a need to localize not typical value (not a String value or a field with re-defined setter/getter),
420
+ * you could use 'localeKey' meta configuration.
421
+ * Example:
422
+ * ...
423
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-localizableProperties)
424
+ */
425
+ localizableProperties ? : string[]
426
+ /**
427
+ * Widget's margin. This may be configured as a single number or a `TRBL` format string.
428
+ * numeric-only values are interpreted as pixels.
429
+ */
430
+ margin ? : number|string
431
+ /**
432
+ * This config object contains the defaults for the [Mask](https://bryntum.com/products/chart/docs/api/Core/widget/Mask) created for the
433
+ * [masked](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-masked) config. Any properties specified in the `masked` config will override these
434
+ * values.
435
+ */
436
+ maskDefaults ? : MaskConfig
437
+ /**
438
+ * Set to `true` to apply the default mask to the widget. Alternatively, this can be the mask message or a
439
+ * [Mask](https://bryntum.com/products/chart/docs/api/Core/widget/Mask) config object.
440
+ */
441
+ masked ? : boolean|string|MaskConfig
442
+ /**
443
+ * Max value for the Y axis, for chart types that have one.
444
+ */
445
+ max ? : number
446
+ /**
447
+ * The element's maxHeight. Can be either a String or a Number (which will have 'px' appended). Note that
448
+ * like [height](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
449
+ */
450
+ maxHeight ? : string|number
451
+ /**
452
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
453
+ * ...
454
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-maximizeOnMobile)
455
+ */
456
+ maximizeOnMobile ? : number|string
457
+ /**
458
+ * The maximum tick rotation in degrees.
459
+ */
460
+ maxTickLabelRotation ? : number
461
+ /**
462
+ * The elements maxWidth. Can be either a String or a Number (which will have 'px' appended). Note that
463
+ * like [width](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
464
+ */
465
+ maxWidth ? : string|number
466
+ /**
467
+ * Min value for the Y axis, for chart types that have one.
468
+ */
469
+ min ? : number
470
+ /**
471
+ * The element's minHeight. Can be either a String or a Number (which will have 'px' appended). Note that
472
+ * like [height](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
473
+ */
474
+ minHeight ? : string|number
475
+ /**
476
+ * The minimum tick rotation in degrees.
477
+ */
478
+ minTickLabelRotation ? : number
479
+ /**
480
+ * The elements minWidth. Can be either a String or a Number (which will have 'px' appended). Note that
481
+ * like [width](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
482
+ */
483
+ minWidth ? : string|number
484
+ /**
485
+ * When this is configured as `true` a [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
486
+ * is used to monitor this element for size changes caused by either style manipulation, or by CSS
487
+ * layout.
488
+ * ...
489
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-monitorResize)
490
+ */
491
+ monitorResize ? : boolean|{
492
+ immediate?: boolean
493
+ }
494
+ /**
495
+ * An object containing default config objects which may be referenced by name in the [items](https://bryntum.com/products/chart/docs/api/Core/widget/Container#config-items)
496
+ * config. For example, a specialized [Menu](https://bryntum.com/products/chart/docs/api/Core/widget/Menu) subclass may have a `namedItems` default
497
+ * value defined like this:
498
+ * ...
499
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-namedItems)
500
+ */
501
+ namedItems ? : Record<string, ChartContainerItemConfig>
502
+ /**
503
+ * The owning Widget of this Widget. If this Widget is directly contained (that is, it is one of the
504
+ * [items](https://bryntum.com/products/chart/docs/api/Core/widget/Container#property-items) of a Container), this config will be ignored. In this case
505
+ * the owner is <strong>always</strong> the encapsulating Container.
506
+ * ...
507
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-owner)
508
+ */
509
+ owner ? : Widget|any
510
+ /**
511
+ * Radius of data points, in pixels.
512
+ */
513
+ pointSize ? : number
514
+ /**
515
+ * Set to `true` when a widget is rendered into another widget's [contentElement](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-contentElement), but must
516
+ * not participate in the standard layout of that widget, and must be positioned relatively to that
517
+ * widget's [contentElement](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-contentElement).
518
+ * ...
519
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-positioned)
520
+ */
521
+ positioned ? : boolean
522
+ /**
523
+ * Prevent tooltip from being displayed on touch devices. Useful for example for buttons that display a
524
+ * menu on click etc, since the tooltip would be displayed at the same time.
525
+ */
526
+ preventTooltipOnTouch ? : boolean
527
+ /**
528
+ * Whether this widget is read-only. This is only valid if the widget is an input
529
+ * field, <strong>or contains input fields at any depth</strong>.
530
+ * ...
531
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-readOnly)
532
+ */
533
+ readOnly ? : boolean
534
+ /**
535
+ * [Record](https://bryntum.com/products/chart/docs/api/Core/data/Model) whose values will be used to populate fields in the container.
536
+ * ...
537
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-record)
538
+ */
539
+ record ? : Model
540
+ relayStoreEvents ? : boolean
541
+ /**
542
+ * Either a default `rendition` to apply to all child widgets, or a map of renditions keyed by child widget
543
+ * `type`.
544
+ * ...
545
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-rendition)
546
+ */
547
+ rendition ? : string|Record<string, string>|null
548
+ /**
549
+ * Configure as `true` to have the component display a translucent ripple when its
550
+ * [focusElement](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-focusElement), or [element](#Core/widget/Widget#property-element) is tapped <em>if the
551
+ * current theme supports ripples</em>. Out of the box, only the Material theme supports ripples.
552
+ * ...
553
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ripple)
554
+ */
555
+ ripple ? : boolean|{
556
+ delegate?: string
557
+ color?: string
558
+ radius?: number
559
+ clip?: string
560
+ }
561
+ /**
562
+ * (Optional) Required when using certain chart types, for example `scatter`, where series can be arbitrarily
563
+ * assigned to different axes. The `role` determines how this series is used in the chart.
564
+ */
565
+ role ? : DataSeriesRole
566
+ /**
567
+ * If you are rendering this widget to a shadow root inside a web component, set this config to the shadowRoot. If not inside a web component, set it to `document.body`
568
+ */
569
+ rootElement ? : ShadowRoot|HTMLElement
570
+ /**
571
+ * This may be configured as `true` to make the widget's element use the `direction:rtl` style.
572
+ * ...
573
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-rtl)
574
+ */
575
+ rtl ? : boolean
576
+ /**
577
+ * Specifies whether (and optionally in which axes) a Widget may scroll. `true` means this widget may scroll
578
+ * in both axes. May be an object containing boolean `overflowX` and `overflowY` properties which are
579
+ * applied to CSS style properties `overflowX` and `overflowY`. If they are boolean, they are translated to
580
+ * CSS overflow properties thus:
581
+ * ...
582
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-scrollable)
583
+ */
584
+ scrollable ? : boolean|ScrollerConfig|Scroller
585
+ /**
586
+ * Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
587
+ * Valid values: ´null´: do nothing, ´hide´: hide the widget or ´realign´: realign to the target if possible.
588
+ */
589
+ scrollAction ? : 'hide'|'realign'|null
590
+ /**
591
+ * One or more data series to display in the chart.
592
+ */
593
+ series ? : DataSeries[]
594
+ /**
595
+ * The type of stroke to use for data series lines.
596
+ */
597
+ seriesLineDash ? : 'dot'|'dash'|'solid'
598
+ /**
599
+ * The opacity of data series lines, from zero to one.
600
+ */
601
+ seriesLineOpacity ? : number
602
+ /**
603
+ * The thickness of data series lines, in pixels.
604
+ */
605
+ seriesLineThickness ? : number
606
+ /**
607
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
608
+ * ...
609
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-showAnimation)
610
+ */
611
+ showAnimation ? : boolean|object
612
+ /**
613
+ * Whether to show the chart's control button menu, for example, the download button.
614
+ */
615
+ showControls ? : boolean
616
+ /**
617
+ * Whether to show the chart's legend.
618
+ */
619
+ showLegend ? : boolean
620
+ /**
621
+ * Whether to show data point markers on the chart.
622
+ */
623
+ showPoints ? : boolean
624
+ /**
625
+ * Whether to show the chart subtitle.
626
+ */
627
+ showSubtitle ? : boolean
628
+ /**
629
+ * Whether to show tick marks and labels on the chart axes.
630
+ */
631
+ showTicks ? : boolean
632
+ /**
633
+ * Whether to show the chart title.
634
+ */
635
+ showTitle ? : boolean
636
+ /**
637
+ * Whether to show tooltips when the mouse cursor hovers over chart elements.
638
+ */
639
+ showTooltips ? : boolean
640
+ /**
641
+ * Set to `false` to not show the tooltip when this widget is [disabled](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-disabled)
642
+ */
643
+ showTooltipWhenDisabled ? : boolean
644
+ /**
645
+ * Programmatic control over how many columns to span when used in a grid layout.
646
+ */
647
+ span ? : number
648
+ /**
649
+ * Specify `true` to match fields by their `name` property only when assigning a [record](https://bryntum.com/products/chart/docs/api/Core/widget/Container#config-record),
650
+ * without falling back to `ref`.
651
+ */
652
+ strictRecordMapping ? : boolean
653
+ /**
654
+ * The chart subtitle.
655
+ */
656
+ subtitle ? : string
657
+ /**
658
+ * The font to use for the chart subtitle.
659
+ * ...
660
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-subtitleFont)
661
+ */
662
+ subtitleFont ? : Font
663
+ /**
664
+ * Padding around the chart subtitle, in pixels.
665
+ */
666
+ subtitlePadding ? : object
667
+ /**
668
+ * A configuration for the [tab](https://bryntum.com/products/chart/docs/api/Core/widget/Tab) created for this widget when it is placed in a
669
+ * [TabPanel](https://bryntum.com/products/chart/docs/api/Core/widget/TabPanel). For example, this config can be used to control the icon of the `tab` for
670
+ * this widget:
671
+ * ...
672
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tab)
673
+ */
674
+ tab ? : boolean|TabConfig
675
+ /**
676
+ * When this container is used as a tab in a TabPanel, these items are added to the
677
+ * [TabBar](https://bryntum.com/products/chart/docs/api/Core/widget/TabBar) when this container is the active tab.
678
+ * ...
679
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tabBarItems)
680
+ */
681
+ tabBarItems ? : ToolbarItems[]|Widget[]
682
+ /**
683
+ * The tag name of this Widget's root element
684
+ */
685
+ tag ? : string
686
+ /**
687
+ * Text alignment: 'left', 'center' or 'right'. Also accepts direction neutral 'start' and 'end'.
688
+ * ...
689
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-textAlign)
690
+ */
691
+ textAlign ? : 'left'|'center'|'right'|'start'|'end'
692
+ /**
693
+ * Specify `true` for a container used to show text markup. It will apply the CSS class `b-text-content`
694
+ * which specifies a default max-width that makes long text more readable.
695
+ * ...
696
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-textContent)
697
+ */
698
+ textContent ? : boolean
699
+ /**
700
+ * The font to use for tick labels on the chart axes.
701
+ * ...
702
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tickFont)
703
+ */
704
+ tickFont ? : Font
705
+ /**
706
+ * Set the color of the tick mark lines in the axis area, or `null` to default to [axisColor](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-axisColor).
707
+ */
708
+ tickMarkColor ? : string
709
+ /**
710
+ * The chart title.
711
+ */
712
+ title ? : string
713
+ /**
714
+ * The font to use for the chart title.
715
+ * ...
716
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-titleFont)
717
+ */
718
+ titleFont ? : Font
719
+ /**
720
+ * Padding around the chart title, in pixels.
721
+ */
722
+ titlePadding ? : object
723
+ /**
724
+ * Tooltip for the widget, either as a string or as a Tooltip config object.
725
+ * ...
726
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tooltip)
727
+ */
728
+ tooltip ? : string|TooltipConfig|null
729
+ type ? : 'chart'
730
+ /**
731
+ * Custom CSS class name suffixes to apply to the elements rendered by this widget. This may be specified
732
+ * as a space separated string, an array of strings, or as an object in which property names with truthy
733
+ * values are used as the class names.
734
+ * ...
735
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ui)
736
+ */
737
+ ui ? : string|object
738
+ /**
739
+ * A widgets weight determines its position among siblings when added to a [Container](https://bryntum.com/products/chart/docs/api/Core/widget/Container).
740
+ * Higher weights go further down.
741
+ */
742
+ weight ? : number
743
+ /**
744
+ * Widget's width, used to set element `style.width`. Either specify a valid width string or a number, which
745
+ * will get 'px' appended. We recommend using CSS as the primary way to control width, but in some cases
746
+ * this config is convenient.
747
+ */
748
+ width ? : string|number
749
+ /**
750
+ * The x position for the widget.
751
+ * ...
752
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-x)
753
+ */
754
+ x ? : number
755
+ /**
756
+ * The y position for the widget.
757
+ * ...
758
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-y)
759
+ */
760
+ y ? : number
761
+
762
+ }
763
+
764
+ @Component({
765
+ selector : 'bryntum-chart',
766
+ template : ''
767
+ })
768
+ export class BryntumChartComponent implements OnInit, OnDestroy {
769
+
770
+ public static instanceClass = Chart;
771
+
772
+ public static instanceName = 'Chart';
773
+
774
+ private static bryntumEvents: string[] = [
775
+ 'onBeforeDestroy',
776
+ 'onBeforeHide',
777
+ 'onBeforeSetRecord',
778
+ 'onBeforeShow',
779
+ 'onCatchAll',
780
+ 'onDestroy',
781
+ 'onDirtyStateChange',
782
+ 'onElementCreated',
783
+ 'onFocusIn',
784
+ 'onFocusOut',
785
+ 'onHide',
786
+ 'onPaint',
787
+ 'onReadOnly',
788
+ 'onRecompose',
789
+ 'onResize',
790
+ 'onShow'
791
+ ];
792
+
793
+ private static bryntumFeatureNames: string[] = [
794
+
795
+ ];
796
+
797
+ private static bryntumConfigs: string[] = BryntumChartComponent.bryntumFeatureNames.concat([
798
+ 'adopt',
799
+ 'align',
800
+ 'alignSelf',
801
+ 'anchor',
802
+ 'animate',
803
+ 'animationDuration',
804
+ 'appendTo',
805
+ 'ariaDescription',
806
+ 'ariaLabel',
807
+ 'autoUpdateRecord',
808
+ 'axisColor',
809
+ 'axisLabelColor',
810
+ 'background',
811
+ 'backgroundColorField',
812
+ 'barDirection',
813
+ 'bubbleEvents',
814
+ 'bubbleScaleFactor',
815
+ 'callOnFunctions',
816
+ 'catchEventHandlerExceptions',
817
+ 'centered',
818
+ 'chartPadding',
819
+ 'chartTooltip',
820
+ 'chartType',
821
+ 'cls',
822
+ 'color',
823
+ 'column',
824
+ 'config',
825
+ 'constrainTo',
826
+ 'content',
827
+ 'contentElementCls',
828
+ 'data',
829
+ 'dataField',
830
+ 'dataPointShape',
831
+ 'dataset',
832
+ 'defaultBindProperty',
833
+ 'defaultFocus',
834
+ 'defaults',
835
+ 'detectCSSCompatibilityIssues',
836
+ 'disabled',
837
+ 'dock',
838
+ 'draggable',
839
+ 'elementAttributes',
840
+ 'extraData',
841
+ 'field',
842
+ 'flex',
843
+ 'floating',
844
+ 'gridColor',
845
+ 'height',
846
+ 'hidden',
847
+ 'hideAnimation',
848
+ 'hideWhenEmpty',
849
+ 'html',
850
+ 'htmlCls',
851
+ 'id',
852
+ 'ignoreParentReadOnly',
853
+ 'inputFieldAlign',
854
+ 'insertBefore',
855
+ 'insertFirst',
856
+ 'interactive',
857
+ 'itemCls',
858
+ 'items',
859
+ 'keyMap',
860
+ 'label',
861
+ 'labelPosition',
862
+ 'labels',
863
+ 'layout',
864
+ 'layoutStyle',
865
+ 'lazyItems',
866
+ 'legendPosition',
867
+ 'legendScale',
868
+ 'listeners',
869
+ 'localeClass',
870
+ 'localizable',
871
+ 'localizableProperties',
872
+ 'margin',
873
+ 'maskDefaults',
874
+ 'masked',
875
+ 'max',
876
+ 'maxHeight',
877
+ 'maximizeOnMobile',
878
+ 'maxTickLabelRotation',
879
+ 'maxWidth',
880
+ 'min',
881
+ 'minHeight',
882
+ 'minTickLabelRotation',
883
+ 'minWidth',
884
+ 'monitorResize',
885
+ 'namedItems',
886
+ 'owner',
887
+ 'pointSize',
888
+ 'positioned',
889
+ 'preventTooltipOnTouch',
890
+ 'readOnly',
891
+ 'record',
892
+ 'relayStoreEvents',
893
+ 'rendition',
894
+ 'ripple',
895
+ 'role',
896
+ 'rootElement',
897
+ 'rtl',
898
+ 'scrollable',
899
+ 'scrollAction',
900
+ 'series',
901
+ 'seriesLineDash',
902
+ 'seriesLineOpacity',
903
+ 'seriesLineThickness',
904
+ 'showAnimation',
905
+ 'showControls',
906
+ 'showLegend',
907
+ 'showPoints',
908
+ 'showSubtitle',
909
+ 'showTicks',
910
+ 'showTitle',
911
+ 'showTooltips',
912
+ 'showTooltipWhenDisabled',
913
+ 'span',
914
+ 'strictRecordMapping',
915
+ 'subtitle',
916
+ 'subtitleFont',
917
+ 'subtitlePadding',
918
+ 'tab',
919
+ 'tabBarItems',
920
+ 'tag',
921
+ 'textAlign',
922
+ 'textContent',
923
+ 'tickFont',
924
+ 'tickMarkColor',
925
+ 'title',
926
+ 'titleFont',
927
+ 'titlePadding',
928
+ 'tooltip',
929
+ 'type',
930
+ 'ui',
931
+ 'weight',
932
+ 'width',
933
+ 'x',
934
+ 'y'
935
+ ]);
936
+
937
+ private static bryntumConfigsOnly: string[] = [
938
+ 'adopt',
939
+ 'align',
940
+ 'anchor',
941
+ 'ariaDescription',
942
+ 'ariaLabel',
943
+ 'autoUpdateRecord',
944
+ 'bubbleEvents',
945
+ 'centered',
946
+ 'color',
947
+ 'config',
948
+ 'constrainTo',
949
+ 'contentElementCls',
950
+ 'dataField',
951
+ 'defaultBindProperty',
952
+ 'defaultFocus',
953
+ 'defaults',
954
+ 'detectCSSCompatibilityIssues',
955
+ 'dock',
956
+ 'draggable',
957
+ 'elementAttributes',
958
+ 'floating',
959
+ 'hideAnimation',
960
+ 'hideWhenEmpty',
961
+ 'htmlCls',
962
+ 'ignoreParentReadOnly',
963
+ 'itemCls',
964
+ 'lazyItems',
965
+ 'listeners',
966
+ 'localeClass',
967
+ 'localizable',
968
+ 'localizableProperties',
969
+ 'maskDefaults',
970
+ 'masked',
971
+ 'monitorResize',
972
+ 'namedItems',
973
+ 'owner',
974
+ 'positioned',
975
+ 'preventTooltipOnTouch',
976
+ 'relayStoreEvents',
977
+ 'ripple',
978
+ 'rootElement',
979
+ 'scrollAction',
980
+ 'showAnimation',
981
+ 'showTooltipWhenDisabled',
982
+ 'tab',
983
+ 'tabBarItems',
984
+ 'tag',
985
+ 'textAlign',
986
+ 'textContent',
987
+ 'type',
988
+ 'ui',
989
+ 'weight'
990
+ ];
991
+
992
+ private static bryntumProps: string[] = BryntumChartComponent.bryntumFeatureNames.concat([
993
+ 'alignSelf',
994
+ 'anchorSize',
995
+ 'animate',
996
+ 'animationDuration',
997
+ 'appendTo',
998
+ 'axisColor',
999
+ 'axisLabelColor',
1000
+ 'background',
1001
+ 'backgroundColorField',
1002
+ 'barDirection',
1003
+ 'bubbleScaleFactor',
1004
+ 'callOnFunctions',
1005
+ 'catchEventHandlerExceptions',
1006
+ 'chartPadding',
1007
+ 'chartTooltip',
1008
+ 'chartType',
1009
+ 'cls',
1010
+ 'column',
1011
+ 'content',
1012
+ 'data',
1013
+ 'dataPointShape',
1014
+ 'dataset',
1015
+ 'disabled',
1016
+ 'extraData',
1017
+ 'field',
1018
+ 'flex',
1019
+ 'focusVisible',
1020
+ 'gridColor',
1021
+ 'hasChanges',
1022
+ 'height',
1023
+ 'hidden',
1024
+ 'html',
1025
+ 'id',
1026
+ 'inputFieldAlign',
1027
+ 'insertBefore',
1028
+ 'insertFirst',
1029
+ 'interactive',
1030
+ 'isSettingValues',
1031
+ 'isValid',
1032
+ 'items',
1033
+ 'keyMap',
1034
+ 'label',
1035
+ 'labelPosition',
1036
+ 'labels',
1037
+ 'layout',
1038
+ 'layoutStyle',
1039
+ 'legendPosition',
1040
+ 'legendScale',
1041
+ 'margin',
1042
+ 'max',
1043
+ 'maxHeight',
1044
+ 'maximizeOnMobile',
1045
+ 'maxTickLabelRotation',
1046
+ 'maxWidth',
1047
+ 'min',
1048
+ 'minHeight',
1049
+ 'minTickLabelRotation',
1050
+ 'minWidth',
1051
+ 'parent',
1052
+ 'pointSize',
1053
+ 'readOnly',
1054
+ 'record',
1055
+ 'rendition',
1056
+ 'role',
1057
+ 'rtl',
1058
+ 'scrollable',
1059
+ 'series',
1060
+ 'seriesLineDash',
1061
+ 'seriesLineOpacity',
1062
+ 'seriesLineThickness',
1063
+ 'showControls',
1064
+ 'showLegend',
1065
+ 'showPoints',
1066
+ 'showSubtitle',
1067
+ 'showTicks',
1068
+ 'showTitle',
1069
+ 'showTooltips',
1070
+ 'span',
1071
+ 'strictRecordMapping',
1072
+ 'subtitle',
1073
+ 'subtitleFont',
1074
+ 'subtitlePadding',
1075
+ 'tickFont',
1076
+ 'tickMarkColor',
1077
+ 'title',
1078
+ 'titleFont',
1079
+ 'titlePadding',
1080
+ 'tooltip',
1081
+ 'values',
1082
+ 'width',
1083
+ 'x',
1084
+ 'y'
1085
+ ]);
1086
+
1087
+ private elementRef: ElementRef;
1088
+ public instance!: Chart;
1089
+
1090
+ private bryntumConfig = {
1091
+ adopt : undefined,
1092
+ appendTo : undefined,
1093
+ href : undefined,
1094
+ angularComponent : this,
1095
+ features : {},
1096
+ listeners : {}
1097
+ };
1098
+
1099
+ constructor(element: ElementRef) {
1100
+ this.elementRef = element;
1101
+ }
1102
+
1103
+ // Configs only
1104
+ @Input() adopt ! : HTMLElement|string;
1105
+ @Input() align ! : AlignSpec|string;
1106
+ @Input() anchor ! : boolean;
1107
+ @Input() ariaDescription ! : string;
1108
+ @Input() ariaLabel ! : string;
1109
+ @Input() autoUpdateRecord ! : boolean;
1110
+ @Input() bubbleEvents ! : object;
1111
+ @Input() centered ! : boolean;
1112
+ @Input() color ! : string;
1113
+ @Input() config ! : object;
1114
+ @Input() constrainTo ! : HTMLElement|Widget|Rectangle;
1115
+ @Input() contentElementCls ! : string|object;
1116
+ @Input() dataField ! : string;
1117
+ @Input() defaultBindProperty ! : string;
1118
+ @Input() defaultFocus ! : ((widget: Widget) => boolean)|string;
1119
+ @Input() defaults ! : ChartContainerItemConfig;
1120
+ @Input() detectCSSCompatibilityIssues ! : boolean;
1121
+ @Input() dock ! : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object;
1122
+ @Input() draggable ! : boolean|{
1123
+ handleSelector?: string
1124
+ };
1125
+ @Input() elementAttributes ! : Record<string, string|null>;
1126
+ @Input() floating ! : boolean;
1127
+ @Input() hideAnimation ! : boolean|object;
1128
+ @Input() hideWhenEmpty ! : boolean;
1129
+ @Input() htmlCls ! : string|object;
1130
+ @Input() ignoreParentReadOnly ! : boolean;
1131
+ @Input() itemCls ! : string;
1132
+ @Input() lazyItems ! : Record<string, ChartContainerItemConfig>|ChartContainerItemConfig[]|Widget[];
1133
+ @Input() listeners ! : ChartListeners;
1134
+ @Input() localeClass ! : typeof Base;
1135
+ @Input() localizable ! : boolean;
1136
+ @Input() localizableProperties ! : string[];
1137
+ @Input() maskDefaults ! : MaskConfig;
1138
+ @Input() masked ! : boolean|string|MaskConfig;
1139
+ @Input() monitorResize ! : boolean|{
1140
+ immediate?: boolean
1141
+ };
1142
+ @Input() namedItems ! : Record<string, ChartContainerItemConfig>;
1143
+ @Input() owner ! : Widget|any;
1144
+ @Input() positioned ! : boolean;
1145
+ @Input() preventTooltipOnTouch ! : boolean;
1146
+ @Input() relayStoreEvents ! : boolean;
1147
+ @Input() ripple ! : boolean|{
1148
+ delegate?: string
1149
+ color?: string
1150
+ radius?: number
1151
+ clip?: string
1152
+ };
1153
+ @Input() rootElement ! : ShadowRoot|HTMLElement;
1154
+ @Input() scrollAction ! : 'hide'|'realign'|null;
1155
+ @Input() showAnimation ! : boolean|object;
1156
+ @Input() showTooltipWhenDisabled ! : boolean;
1157
+ @Input() tab ! : boolean|TabConfig;
1158
+ @Input() tabBarItems ! : ToolbarItems[]|Widget[];
1159
+ @Input() tag ! : string;
1160
+ @Input() textAlign ! : 'left'|'center'|'right'|'start'|'end';
1161
+ @Input() textContent ! : boolean;
1162
+ @Input() type ! : 'chart';
1163
+ @Input() ui ! : string|object;
1164
+ @Input() weight ! : number;
1165
+
1166
+ // Configs and properties
1167
+ @Input() alignSelf ! : string;
1168
+ @Input() animate ! : boolean;
1169
+ @Input() animationDuration ! : number;
1170
+ @Input() appendTo ! : HTMLElement|string;
1171
+ @Input() axisColor ! : string;
1172
+ @Input() axisLabelColor ! : string;
1173
+ @Input() background ! : string;
1174
+ @Input() backgroundColorField ! : string;
1175
+ @Input() barDirection ! : 'vertical'|'horizontal';
1176
+ @Input() bubbleScaleFactor ! : number;
1177
+ @Input() callOnFunctions ! : boolean;
1178
+ @Input() catchEventHandlerExceptions ! : boolean;
1179
+ @Input() chartPadding ! : object;
1180
+ @Input() chartTooltip ! : ChartTooltipConfig;
1181
+ @Input() chartType ! : 'line'|'bar'|'pie'|'donut'|'scatter'|'bubble'|'radar';
1182
+ @Input() cls ! : string|object;
1183
+ @Input() column ! : number;
1184
+ @Input() content ! : string;
1185
+ @Input() data ! : Model[]|object[]|ModelConfig[];
1186
+ @Input() dataPointShape ! : 'square'|'circle'|'diamond'|'triangle'|'none';
1187
+ @Input() dataset ! : object|Record<string, string>;
1188
+ @Input() disabled ! : boolean|'inert';
1189
+ @Input() extraData ! : any;
1190
+ @Input() field ! : string;
1191
+ @Input() flex ! : number|string;
1192
+ @Input() gridColor ! : string;
1193
+ @Input() height ! : number|string;
1194
+ @Input() hidden ! : boolean;
1195
+ @Input() html ! : string|((widget: Widget) => string)|DomConfig|DomConfig[]|VueConfig;
1196
+ @Input() id ! : string;
1197
+ @Input() inputFieldAlign ! : 'start'|'end';
1198
+ @Input() insertBefore ! : HTMLElement|string;
1199
+ @Input() insertFirst ! : HTMLElement|string;
1200
+ @Input() interactive ! : boolean;
1201
+ @Input() items ! : (ChartContainerItemConfig|MenuItemConfig|Widget)[]|Record<string, ChartContainerItemConfig|MenuItemConfig>|Widget[]|Record<string, ChartContainerItemConfig|MenuItemEntry>|(ChartContainerItemConfig|MenuItemEntry|Widget)[];
1202
+ @Input() keyMap ! : Record<string, KeyMapConfig>;
1203
+ @Input() label ! : string;
1204
+ @Input() labelPosition ! : 'before'|'above'|'align-before'|'auto'|null;
1205
+ @Input() labels ! : DataSeries;
1206
+ @Input() layout ! : Layout|string|ChartContainerLayoutConfig;
1207
+ @Input() layoutStyle ! : object;
1208
+ @Input() legendPosition ! : 'top'|'right'|'bottom'|'left'|'inline-start'|'inline-end';
1209
+ @Input() legendScale ! : number;
1210
+ @Input() margin ! : number|string;
1211
+ @Input() max ! : number;
1212
+ @Input() maxHeight ! : string|number;
1213
+ @Input() maximizeOnMobile ! : number|string;
1214
+ @Input() maxTickLabelRotation ! : number;
1215
+ @Input() maxWidth ! : string|number;
1216
+ @Input() min ! : number;
1217
+ @Input() minHeight ! : string|number;
1218
+ @Input() minTickLabelRotation ! : number;
1219
+ @Input() minWidth ! : string|number;
1220
+ @Input() pointSize ! : number;
1221
+ @Input() readOnly ! : boolean;
1222
+ @Input() record ! : Model;
1223
+ @Input() rendition ! : string|Record<string, string>|null;
1224
+ @Input() role ! : DataSeriesRole;
1225
+ @Input() rtl ! : boolean;
1226
+ @Input() scrollable ! : Scroller|boolean|ScrollerConfig;
1227
+ @Input() series ! : DataSeries[];
1228
+ @Input() seriesLineDash ! : 'dot'|'dash'|'solid';
1229
+ @Input() seriesLineOpacity ! : number;
1230
+ @Input() seriesLineThickness ! : number;
1231
+ @Input() showControls ! : boolean;
1232
+ @Input() showLegend ! : boolean;
1233
+ @Input() showPoints ! : boolean;
1234
+ @Input() showSubtitle ! : boolean;
1235
+ @Input() showTicks ! : boolean;
1236
+ @Input() showTitle ! : boolean;
1237
+ @Input() showTooltips ! : boolean;
1238
+ @Input() span ! : number;
1239
+ @Input() strictRecordMapping ! : boolean;
1240
+ @Input() subtitle ! : string;
1241
+ @Input() subtitleFont ! : Font;
1242
+ @Input() subtitlePadding ! : object;
1243
+ @Input() tickFont ! : Font;
1244
+ @Input() tickMarkColor ! : string;
1245
+ @Input() title ! : string;
1246
+ @Input() titleFont ! : Font;
1247
+ @Input() titlePadding ! : object;
1248
+ @Input() tooltip ! : string|TooltipConfig|null;
1249
+ @Input() width ! : number|string;
1250
+ @Input() x ! : number;
1251
+ @Input() y ! : number;
1252
+
1253
+ // Properties only
1254
+ @Input() anchorSize ! : number[];
1255
+ @Input() focusVisible ! : boolean;
1256
+ @Input() hasChanges ! : boolean;
1257
+ @Input() isSettingValues ! : boolean;
1258
+ @Input() isValid ! : boolean;
1259
+ @Input() parent ! : Widget;
1260
+ @Input() values ! : Record<string, object>;
1261
+
1262
+ // Events emitters
1263
+ /**
1264
+ * Fires before an object is destroyed.
1265
+ * @param {object} event Event object
1266
+ * @param {Core.Base} event.source The Object that is being destroyed.
1267
+ */
1268
+ @Output() onBeforeDestroy: any = new EventEmitter<((event: { source: Base }) => void)|string>();
1269
+ /**
1270
+ * Triggered before a widget is hidden. Return `false` to prevent the action.
1271
+ * @param {object} event Event object
1272
+ * @param {Core.widget.Widget} event.source The widget being hidden.
1273
+ */
1274
+ @Output() onBeforeHide: any = new EventEmitter<((event: { source: Widget }) => Promise<boolean>|boolean|void)|string>();
1275
+ /**
1276
+ * Fired before this container will load record values into its child fields. This is useful if you
1277
+ * want to modify the UI before data is loaded (e.g. set some input field to be readonly)
1278
+ * @param {object} event Event object
1279
+ * @param {Core.widget.Container} event.source The container
1280
+ * @param {Core.data.Model} event.record The record
1281
+ */
1282
+ @Output() onBeforeSetRecord: any = new EventEmitter<((event: { source: Container, record: Model }) => void)|string>();
1283
+ /**
1284
+ * Triggered before a widget is shown. Return `false` to prevent the action.
1285
+ * @param {object} event Event object
1286
+ * @param {Core.widget.Widget,any} event.source The widget being shown
1287
+ */
1288
+ @Output() onBeforeShow: any = new EventEmitter<((event: { source: Widget|any }) => Promise<boolean>|boolean|void)|string>();
1289
+ /**
1290
+ * Fires when any other event is fired from the object.
1291
+ * ...
1292
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#event-catchAll)
1293
+ * @param {object} event Event object
1294
+ * @param {{[key: string]: any, type: string}} event.event The Object that contains event details
1295
+ * @param {string} event.event.type The type of the event which is caught by the listener
1296
+ */
1297
+ @Output() onCatchAll: any = new EventEmitter<((event: {[key: string]: any, type: string}) => void)|string>();
1298
+ /**
1299
+ * Fires when an object is destroyed.
1300
+ * @param {object} event Event object
1301
+ * @param {Core.Base} event.source The Object that is being destroyed.
1302
+ */
1303
+ @Output() onDestroy: any = new EventEmitter<((event: { source: Base }) => void)|string>();
1304
+ /**
1305
+ * Fires when a field is mutated and the state of the [hasChanges](https://bryntum.com/products/chart/docs/api/Core/widget/Container#property-hasChanges) property changes
1306
+ * @param {object} event Event object
1307
+ * @param {Core.widget.Container} event.source The container.
1308
+ * @param {boolean} event.dirty The dirty state of the Container - `true` if there are any fields which have been changed since initial load.
1309
+ */
1310
+ @Output() onDirtyStateChange: any = new EventEmitter<((event: { source: Container, dirty: boolean }) => void)|string>();
1311
+ /**
1312
+ * Triggered when a widget's [element](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-element) is available.
1313
+ * @param {object} event Event object
1314
+ * @param {HTMLElement} event.element The Widget's element.
1315
+ */
1316
+ @Output() onElementCreated: any = new EventEmitter<((event: { element: HTMLElement }) => void)|string>();
1317
+ /**
1318
+ * Fired when focus enters this Widget.
1319
+ * @param {object} event Event object
1320
+ * @param {Core.widget.Widget} event.source This Widget
1321
+ * @param {HTMLElement} event.fromElement The element which lost focus.
1322
+ * @param {HTMLElement} event.toElement The element which gained focus.
1323
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
1324
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
1325
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
1326
+ */
1327
+ @Output() onFocusIn: any = new EventEmitter<((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string>();
1328
+ /**
1329
+ * Fired when focus exits this Widget's ownership tree. This is different from a `blur` event.
1330
+ * focus moving from within this Widget's ownership tree, even if there are floating widgets
1331
+ * will not trigger this event. This is when focus exits this widget completely.
1332
+ * @param {object} event Event object
1333
+ * @param {Core.widget.Widget} event.source This Widget
1334
+ * @param {HTMLElement} event.fromElement The element which lost focus.
1335
+ * @param {HTMLElement} event.toElement The element which gained focus.
1336
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
1337
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
1338
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
1339
+ */
1340
+ @Output() onFocusOut: any = new EventEmitter<((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string>();
1341
+ /**
1342
+ * Triggered after a widget was hidden
1343
+ * @param {object} event Event object
1344
+ * @param {Core.widget.Widget} event.source The widget
1345
+ */
1346
+ @Output() onHide: any = new EventEmitter<((event: { source: Widget }) => void)|string>();
1347
+ /**
1348
+ * Triggered when a widget which had been in a non-visible state for any reason
1349
+ * achieves visibility.
1350
+ * ...
1351
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#event-paint)
1352
+ * @param {object} event Event object
1353
+ * @param {Core.widget.Widget} event.source The widget being painted.
1354
+ * @param {boolean} event.firstPaint `true` if this is the first paint.
1355
+ */
1356
+ @Output() onPaint: any = new EventEmitter<((event: { source: Widget, firstPaint: boolean }) => void)|string>();
1357
+ /**
1358
+ * Fired when a Widget's read only state is toggled
1359
+ * @param {object} event Event object
1360
+ * @param {boolean} event.readOnly Read only or not
1361
+ */
1362
+ @Output() onReadOnly: any = new EventEmitter<((event: { readOnly: boolean }) => void)|string>();
1363
+ /**
1364
+ * This event is fired after a widget's elements have been synchronized due to a direct or indirect call
1365
+ * to [recompose](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#function-recompose), if this results in some change to the widget's rendered DOM elements.
1366
+ */
1367
+ @Output() onRecompose: any = new EventEmitter<(() => void)|string>();
1368
+ /**
1369
+ * Fired when the encapsulating element of a Widget resizes *only when [monitorResize](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-monitorResize) is `true`*.
1370
+ * @param {object} event Event object
1371
+ * @param {Core.widget.Widget} event.source This Widget
1372
+ * @param {number} event.width The new width
1373
+ * @param {number} event.height The new height
1374
+ * @param {number} event.oldWidth The old width
1375
+ * @param {number} event.oldHeight The old height
1376
+ */
1377
+ @Output() onResize: any = new EventEmitter<((event: { source: Widget, width: number, height: number, oldWidth: number, oldHeight: number }) => void)|string>();
1378
+ /**
1379
+ * Triggered after a widget is shown.
1380
+ * @param {object} event Event object
1381
+ * @param {Core.widget.Widget} event.source The widget
1382
+ */
1383
+ @Output() onShow: any = new EventEmitter<((event: { source: Widget }) => void)|string>();
1384
+
1385
+ /**
1386
+ * Create and append the underlying widget
1387
+ */
1388
+ ngOnInit(): void {
1389
+ const
1390
+ me = this,
1391
+ {
1392
+ elementRef,
1393
+ bryntumConfig
1394
+ } = me,
1395
+ {
1396
+ instanceClass,
1397
+ instanceName,
1398
+ bryntumConfigs,
1399
+ bryntumEvents
1400
+ } = BryntumChartComponent;
1401
+
1402
+ bryntumConfigs.filter(prop => prop in this).forEach(prop => {
1403
+ // @ts-ignore
1404
+ WrapperHelper.applyPropValue(bryntumConfig, prop, this[prop]);
1405
+ if (['features', 'config'].includes(prop)) {
1406
+ WrapperHelper.devWarningConfigProp(instanceName, prop);
1407
+ }
1408
+ });
1409
+ // @ts-ignore
1410
+ bryntumEvents.filter(event => this[event] && this[event].observers.length > 0).forEach(event => {
1411
+ const
1412
+ uncapitalize = (str: string) => str.charAt(0).toLowerCase() + str.slice(1),
1413
+ eventName = (str: string) => uncapitalize(str.slice(2));
1414
+
1415
+ // @ts-ignore
1416
+ bryntumConfig.listeners[eventName(event)] = e => {
1417
+ // @ts-ignore
1418
+ me[event].emit(e);
1419
+ // EventEmitter does not return values in the normal way, work around it by setting `returnValue` flag
1420
+ // in Angular listeners
1421
+ return e.returnValue;
1422
+ };
1423
+ });
1424
+
1425
+ // If component has no container specified in config then use adopt to Wrapper's element
1426
+ const
1427
+ containerParam = [
1428
+ 'adopt',
1429
+ 'appendTo',
1430
+ 'insertAfter',
1431
+ 'insertBefore'
1432
+ // @ts-ignore
1433
+ ].find(prop => bryntumConfig[prop]);
1434
+ if (!containerParam) {
1435
+ if (instanceName === 'Button' || elementRef.nativeElement.getRootNode() instanceof ShadowRoot) {
1436
+ // Button should always be <a> or <button> inside owner element
1437
+ bryntumConfig.appendTo = elementRef.nativeElement;
1438
+ }
1439
+ else {
1440
+ bryntumConfig.adopt = elementRef.nativeElement;
1441
+ }
1442
+ }
1443
+ else {
1444
+ WrapperHelper.devWarningContainer(instanceName, containerParam);
1445
+ }
1446
+
1447
+ // @ts-ignore
1448
+ me.instance = instanceName === 'Widget' ? Widget.create(bryntumConfig) : new instanceClass(bryntumConfig);
1449
+
1450
+ }
1451
+
1452
+ /**
1453
+ * Watch for changes
1454
+ * @param changes
1455
+ */
1456
+ ngOnChanges(changes: SimpleChanges): void {
1457
+ const
1458
+ { instance } = this,
1459
+ { instanceName } = BryntumChartComponent;
1460
+ if (!instance) {
1461
+ return;
1462
+ }
1463
+ // Iterate over all changes
1464
+ Object.entries(changes).forEach(([prop, change]) => {
1465
+ const
1466
+ newValue = (change as SimpleChange).currentValue,
1467
+ { instance } = this,
1468
+ { bryntumConfigsOnly, bryntumProps } = BryntumChartComponent;
1469
+ if (bryntumProps.includes(prop)) {
1470
+ WrapperHelper.applyPropValue(instance, prop, newValue, false);
1471
+ if (bryntumConfigsOnly.includes(prop)) {
1472
+ WrapperHelper.devWarningUpdateProp(instanceName, prop);
1473
+ }
1474
+ }
1475
+ });
1476
+ }
1477
+
1478
+ /**
1479
+ * Destroy the component
1480
+ */
1481
+ ngOnDestroy(): void {
1482
+ // @ts-ignore
1483
+ if (this.instance && this.instance.destroy) {
1484
+ this.instance.destroy();
1485
+ }
1486
+ }
1487
+ }