@bryntum/chart-angular-thin 7.2.4 → 7.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/bryntum-chart-angular-thin.umd.js +150 -29
- package/bundles/bryntum-chart-angular-thin.umd.js.map +1 -1
- package/esm2015/lib/bryntum-chart.component.js +61 -21
- package/esm2015/lib/chart.module.js +5 -4
- package/esm2015/lib/shadowdom.helper.js +82 -0
- package/fesm2015/bryntum-chart-angular-thin.js +145 -24
- package/fesm2015/bryntum-chart-angular-thin.js.map +1 -1
- package/lib/bryntum-chart.component.d.ts +91 -147
- package/lib/chart.module.d.ts +2 -1
- package/lib/shadowdom.helper.d.ts +3 -0
- package/package.json +1 -1
- package/src/lib/bryntum-chart.component.ts +148 -156
- package/src/lib/bryntum-theme-combo.component.ts +127 -0
- package/src/lib/chart.module.ts +2 -1
- package/src/lib/shadowdom.helper.ts +91 -0
|
@@ -7,24 +7,23 @@ import { Component, ElementRef, EventEmitter, Output, Input, SimpleChange, Simpl
|
|
|
7
7
|
|
|
8
8
|
import WrapperHelper from './wrapper.helper';
|
|
9
9
|
|
|
10
|
-
import { AlignSpec, Base, Color, Container, DomConfig, KeyMapConfig, Layout, MaskConfig, MenuItemConfig, MenuItemEntry, Model, ModelConfig, Rectangle, Scroller, ScrollerConfig, TabConfig, ToolbarItems, TooltipConfig, VueConfig, Widget } from '@bryntum/core-thin';
|
|
10
|
+
import { AlignSpec, Base, Color, Container, DomConfig, KeyMapConfig, Layout, MaskConfig, MenuItemConfig, MenuItemEntry, Model, ModelConfig, ReactJSX, Rectangle, Scroller, ScrollerConfig, TabConfig, ToolbarItems, TooltipConfig, VueConfig, Widget } from '@bryntum/core-thin';
|
|
11
11
|
import { Chart, ChartListeners, ChartTooltipConfig, ChartContainerItemConfig, ChartContainerLayoutConfig, DataSeries, DataSeriesRole, Font } from '@bryntum/chart-thin';
|
|
12
12
|
|
|
13
|
-
import { StringHelper } from '@bryntum/core-thin';
|
|
13
|
+
import { DomHelper, StringHelper } from '@bryntum/core-thin';
|
|
14
|
+
import { initThemeInShadowRoots } from './shadowdom.helper';
|
|
14
15
|
|
|
15
16
|
export type BryntumChartProps = {
|
|
16
17
|
// Configs
|
|
17
18
|
/**
|
|
18
19
|
* Element (or element id) to adopt as this Widget's encapsulating element. The widget's
|
|
19
20
|
* content will be placed inside this element.
|
|
20
|
-
* ...
|
|
21
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-adopt)
|
|
21
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-adopt)
|
|
22
22
|
*/
|
|
23
23
|
adopt ? : HTMLElement|string
|
|
24
24
|
/**
|
|
25
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)
|
|
26
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-align)
|
|
28
27
|
*/
|
|
29
28
|
align ? : AlignSpec|string
|
|
30
29
|
/**
|
|
@@ -54,15 +53,13 @@ export type BryntumChartProps = {
|
|
|
54
53
|
/**
|
|
55
54
|
* A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject
|
|
56
55
|
* 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)
|
|
56
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ariaDescription)
|
|
59
57
|
*/
|
|
60
58
|
ariaDescription ? : string
|
|
61
59
|
/**
|
|
62
60
|
* A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject as
|
|
63
61
|
* the `aria-label` attribute.
|
|
64
|
-
* ...
|
|
65
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ariaLabel)
|
|
62
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ariaLabel)
|
|
66
63
|
*/
|
|
67
64
|
ariaLabel ? : string
|
|
68
65
|
/**
|
|
@@ -97,8 +94,7 @@ export type BryntumChartProps = {
|
|
|
97
94
|
/**
|
|
98
95
|
* An object where property names with a truthy value indicate which events should bubble up the ownership
|
|
99
96
|
* hierarchy when triggered.
|
|
100
|
-
* ...
|
|
101
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-bubbleEvents)
|
|
97
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-bubbleEvents)
|
|
102
98
|
*/
|
|
103
99
|
bubbleEvents ? : object
|
|
104
100
|
/**
|
|
@@ -107,15 +103,13 @@ export type BryntumChartProps = {
|
|
|
107
103
|
bubbleScaleFactor ? : number
|
|
108
104
|
/**
|
|
109
105
|
* Set to `false` to not call onXXX method names (e.g. `onShow`, `onClick`), as an easy way to listen for events.
|
|
110
|
-
* ...
|
|
111
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-callOnFunctions)
|
|
106
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-callOnFunctions)
|
|
112
107
|
*/
|
|
113
108
|
callOnFunctions ? : boolean
|
|
114
109
|
/**
|
|
115
110
|
* By default, if an event handler throws an exception, the error propagates up the stack and the
|
|
116
111
|
* application state is undefined. Code which follows the event handler will *not* be executed.
|
|
117
|
-
* ...
|
|
118
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-catchEventHandlerExceptions)
|
|
112
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-catchEventHandlerExceptions)
|
|
119
113
|
*/
|
|
120
114
|
catchEventHandlerExceptions ? : boolean
|
|
121
115
|
/**
|
|
@@ -141,15 +135,13 @@ export type BryntumChartProps = {
|
|
|
141
135
|
* Custom CSS classes to add to element.
|
|
142
136
|
* May be specified as a space separated string, or as an object in which property names
|
|
143
137
|
* with truthy values are used as the class names:
|
|
144
|
-
* ...
|
|
145
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-cls)
|
|
138
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-cls)
|
|
146
139
|
*/
|
|
147
140
|
cls ? : string|object
|
|
148
141
|
/**
|
|
149
142
|
* Applies the specified color to the widget, by setting the `--b-primary` CSS variable in the widgets
|
|
150
143
|
* `style` block.
|
|
151
|
-
* ...
|
|
152
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-color)
|
|
144
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-color)
|
|
153
145
|
*/
|
|
154
146
|
color ? : Color
|
|
155
147
|
/**
|
|
@@ -173,8 +165,7 @@ export type BryntumChartProps = {
|
|
|
173
165
|
* Custom CSS classes to add to the [contentElement](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-contentElement).
|
|
174
166
|
* May be specified as a space separated string, or as an object in which property names
|
|
175
167
|
* with truthy values are used as the class names:
|
|
176
|
-
* ...
|
|
177
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-contentElementCls)
|
|
168
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-contentElementCls)
|
|
178
169
|
*/
|
|
179
170
|
contentElementCls ? : string|object
|
|
180
171
|
/**
|
|
@@ -202,8 +193,7 @@ export type BryntumChartProps = {
|
|
|
202
193
|
/**
|
|
203
194
|
* A [query](https://bryntum.com/products/chart/docs/api/Core/widget/Container#function-query) selector function which can identify the descendant widget to which
|
|
204
195
|
* focus should be directed by default.
|
|
205
|
-
* ...
|
|
206
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-defaultFocus)
|
|
196
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-defaultFocus)
|
|
207
197
|
* @param {Core.widget.Widget} widget Widget passed to method
|
|
208
198
|
* @returns {boolean} truthy value if widget is the default one
|
|
209
199
|
*/
|
|
@@ -213,16 +203,15 @@ export type BryntumChartProps = {
|
|
|
213
203
|
*/
|
|
214
204
|
defaults ? : ChartContainerItemConfig
|
|
215
205
|
/**
|
|
216
|
-
* Check for CSS compatibility issues
|
|
217
|
-
*
|
|
218
|
-
* [
|
|
206
|
+
* Check for CSS compatibility and inclusion related issues and try to auto fix them. Performs the following
|
|
207
|
+
* checks:
|
|
208
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-detectCSSCompatibilityIssues)
|
|
219
209
|
*/
|
|
220
210
|
detectCSSCompatibilityIssues ? : boolean
|
|
221
211
|
/**
|
|
222
212
|
* 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
|
|
223
213
|
* cannot be focused, uses a different rendition (usually greyish) and does not allow selecting its value.
|
|
224
|
-
* ...
|
|
225
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-disabled)
|
|
214
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-disabled)
|
|
226
215
|
*/
|
|
227
216
|
disabled ? : boolean|'inert'
|
|
228
217
|
/**
|
|
@@ -230,25 +219,21 @@ export type BryntumChartProps = {
|
|
|
230
219
|
* [strips collection](https://bryntum.com/products/chart/docs/api/Core/widget/Panel#config-strips). Typical values for this config are `'top'`,
|
|
231
220
|
* `'bottom'`, `'left'`, or `'right'`, which cause the widget to be placed on that side of the panel's
|
|
232
221
|
* body. Such widgets are called "edge strips".
|
|
233
|
-
* ...
|
|
234
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-dock)
|
|
222
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-dock)
|
|
235
223
|
*/
|
|
236
224
|
dock ? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
|
|
237
225
|
/**
|
|
238
226
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
|
|
239
227
|
* Set to `true` to be able to drag a widget freely on the page. Or set to an object with a ´handleSelector´
|
|
240
228
|
* property which controls when a drag should start.
|
|
241
|
-
* ...
|
|
242
|
-
*
|
|
229
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-draggable)
|
|
230
|
+
* @property {string} handleSelector CSS selector used to determine if drag can be started from a mouse-downed element inside the widget
|
|
243
231
|
*/
|
|
244
|
-
draggable ? : boolean|
|
|
245
|
-
handleSelector?: string
|
|
246
|
-
}
|
|
232
|
+
draggable ? : boolean|object
|
|
247
233
|
/**
|
|
248
234
|
* An object specifying attributes to assign to the root element of this widget.
|
|
249
235
|
* Set `null` value to attribute to remove it.
|
|
250
|
-
* ...
|
|
251
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-elementAttributes)
|
|
236
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-elementAttributes)
|
|
252
237
|
*/
|
|
253
238
|
elementAttributes ? : Record<string, string|null>
|
|
254
239
|
extraData ? : any
|
|
@@ -290,25 +275,21 @@ export type BryntumChartProps = {
|
|
|
290
275
|
hidden ? : boolean
|
|
291
276
|
/**
|
|
292
277
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
|
|
293
|
-
* ...
|
|
294
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-hideAnimation)
|
|
278
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-hideAnimation)
|
|
295
279
|
*/
|
|
296
280
|
hideAnimation ? : boolean|object
|
|
297
281
|
/**
|
|
298
282
|
* Specify `true` to make this container hide when it has no visible children (Either empty
|
|
299
283
|
* or all children hidden).
|
|
300
|
-
* ...
|
|
301
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-hideWhenEmpty)
|
|
284
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-hideWhenEmpty)
|
|
302
285
|
*/
|
|
303
286
|
hideWhenEmpty ? : boolean
|
|
304
287
|
/**
|
|
305
288
|
* The HTML to display initially or a function returning the markup (called at widget construction time).
|
|
306
|
-
* ...
|
|
307
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-html)
|
|
289
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-html)
|
|
308
290
|
* @param {Core.widget.Widget} widget The calling Widget
|
|
309
|
-
* @returns {string}
|
|
310
291
|
*/
|
|
311
|
-
html ? : string|((widget: Widget) =>
|
|
292
|
+
html ? : string|((widget: Widget) => void)|DomConfig|DomConfig[]|VueConfig|ReactJSX
|
|
312
293
|
/**
|
|
313
294
|
* The CSS class(es) to add when HTML content is being applied to this widget.
|
|
314
295
|
*/
|
|
@@ -319,16 +300,14 @@ export type BryntumChartProps = {
|
|
|
319
300
|
id ? : string
|
|
320
301
|
/**
|
|
321
302
|
* Determines if the widgets read-only state should be controlled by its parent.
|
|
322
|
-
* ...
|
|
323
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ignoreParentReadOnly)
|
|
303
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ignoreParentReadOnly)
|
|
324
304
|
*/
|
|
325
305
|
ignoreParentReadOnly ? : boolean
|
|
326
306
|
/**
|
|
327
307
|
* Convenience setting to align input fields of child widgets. By default, the Field input element is
|
|
328
308
|
* placed immediately following the `label`. If you prefer to have all input fields aligned to the
|
|
329
309
|
* right, set this config to `'end'`.
|
|
330
|
-
* ...
|
|
331
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-inputFieldAlign)
|
|
310
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-inputFieldAlign)
|
|
332
311
|
*/
|
|
333
312
|
inputFieldAlign ? : 'start'|'end'
|
|
334
313
|
/**
|
|
@@ -350,16 +329,14 @@ export type BryntumChartProps = {
|
|
|
350
329
|
/**
|
|
351
330
|
* An object containing typed child widget config objects or Widgets. May also be specified
|
|
352
331
|
* as an array.
|
|
353
|
-
* ...
|
|
354
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-items)
|
|
332
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-items)
|
|
355
333
|
*/
|
|
356
334
|
items ? : Record<string, ChartContainerItemConfig|MenuItemEntry>|(ChartContainerItemConfig|MenuItemEntry|Widget)[]
|
|
357
335
|
/**
|
|
358
336
|
* An object whose keys are the [key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) name
|
|
359
337
|
* and optional modifier prefixes: `'Ctrl+'`, `'Alt+'`, `'Meta+'`, and `'Shift+'` (case-insensitive). The values
|
|
360
338
|
* are the name of the instance method to call when the keystroke is received.
|
|
361
|
-
* ...
|
|
362
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-keyMap)
|
|
339
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-keyMap)
|
|
363
340
|
*/
|
|
364
341
|
keyMap ? : Record<string, KeyMapConfig>
|
|
365
342
|
/**
|
|
@@ -368,8 +345,7 @@ export type BryntumChartProps = {
|
|
|
368
345
|
label ? : string
|
|
369
346
|
/**
|
|
370
347
|
* Convenience setting to use same label placement on all child widgets.
|
|
371
|
-
* ...
|
|
372
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-labelPosition)
|
|
348
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-labelPosition)
|
|
373
349
|
*/
|
|
374
350
|
labelPosition ? : 'before'|'above'|'align-before'|'auto'|null
|
|
375
351
|
/**
|
|
@@ -377,23 +353,25 @@ export type BryntumChartProps = {
|
|
|
377
353
|
* For pie and donut chart, it defines the data values to use as slice labels.
|
|
378
354
|
*/
|
|
379
355
|
labels ? : DataSeries
|
|
356
|
+
/**
|
|
357
|
+
* Sets `labelWidth´ for all children of this Container, that does not define their own `labelWidth`.
|
|
358
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-labelWidth)
|
|
359
|
+
*/
|
|
360
|
+
labelWidth ? : number|null
|
|
380
361
|
/**
|
|
381
362
|
* The short name of a helper class which manages rendering and styling of child items.
|
|
382
|
-
* ...
|
|
383
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-layout)
|
|
363
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-layout)
|
|
384
364
|
*/
|
|
385
365
|
layout ? : string|ChartContainerLayoutConfig
|
|
386
366
|
/**
|
|
387
367
|
* The CSS style properties to apply to the [contentElement](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-contentElement).
|
|
388
|
-
* ...
|
|
389
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-layoutStyle)
|
|
368
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-layoutStyle)
|
|
390
369
|
*/
|
|
391
370
|
layoutStyle ? : object
|
|
392
371
|
/**
|
|
393
372
|
* 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
|
|
394
373
|
* instances only when this Container is rendered, rather than eagerly at construct time.
|
|
395
|
-
* ...
|
|
396
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-lazyItems)
|
|
374
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-lazyItems)
|
|
397
375
|
*/
|
|
398
376
|
lazyItems ? : Record<string, ChartContainerItemConfig>|ChartContainerItemConfig[]|Widget[]
|
|
399
377
|
/**
|
|
@@ -408,16 +386,14 @@ export type BryntumChartProps = {
|
|
|
408
386
|
legendScale ? : number
|
|
409
387
|
/**
|
|
410
388
|
* The listener set for this object.
|
|
411
|
-
* ...
|
|
412
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-listeners)
|
|
389
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-listeners)
|
|
413
390
|
*/
|
|
414
391
|
listeners ? : ChartListeners
|
|
415
392
|
/**
|
|
416
393
|
* A class translations of which are used for translating this entity.
|
|
417
394
|
* This is often used when translations of an item are defined on its container class.
|
|
418
395
|
* For example:
|
|
419
|
-
* ...
|
|
420
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-localeClass)
|
|
396
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-localeClass)
|
|
421
397
|
*/
|
|
422
398
|
localeClass ? : typeof Base
|
|
423
399
|
/**
|
|
@@ -429,8 +405,7 @@ export type BryntumChartProps = {
|
|
|
429
405
|
* In case there is a need to localize not typical value (not a String value or a field with re-defined setter/getter),
|
|
430
406
|
* you could use 'localeKey' meta configuration.
|
|
431
407
|
* Example:
|
|
432
|
-
* ...
|
|
433
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-localizableProperties)
|
|
408
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-localizableProperties)
|
|
434
409
|
*/
|
|
435
410
|
localizableProperties ? : string[]
|
|
436
411
|
/**
|
|
@@ -460,8 +435,7 @@ export type BryntumChartProps = {
|
|
|
460
435
|
maxHeight ? : string|number
|
|
461
436
|
/**
|
|
462
437
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
|
|
463
|
-
* ...
|
|
464
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-maximizeOnMobile)
|
|
438
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-maximizeOnMobile)
|
|
465
439
|
*/
|
|
466
440
|
maximizeOnMobile ? : number|string
|
|
467
441
|
/**
|
|
@@ -495,18 +469,15 @@ export type BryntumChartProps = {
|
|
|
495
469
|
* When this is configured as `true` a [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
|
|
496
470
|
* is used to monitor this element for size changes caused by either style manipulation, or by CSS
|
|
497
471
|
* layout.
|
|
498
|
-
* ...
|
|
499
|
-
*
|
|
472
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-monitorResize)
|
|
473
|
+
* @property {boolean} immediate Set to `true` to receive resize notifications immediately.
|
|
500
474
|
*/
|
|
501
|
-
monitorResize ? : boolean|
|
|
502
|
-
immediate?: boolean
|
|
503
|
-
}
|
|
475
|
+
monitorResize ? : boolean|object
|
|
504
476
|
/**
|
|
505
477
|
* 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)
|
|
506
478
|
* config. For example, a specialized [Menu](https://bryntum.com/products/chart/docs/api/Core/widget/Menu) subclass may have a `namedItems` default
|
|
507
479
|
* value defined like this:
|
|
508
|
-
* ...
|
|
509
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-namedItems)
|
|
480
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-namedItems)
|
|
510
481
|
*/
|
|
511
482
|
namedItems ? : Record<string, ChartContainerItemConfig>
|
|
512
483
|
/**
|
|
@@ -517,8 +488,7 @@ export type BryntumChartProps = {
|
|
|
517
488
|
* 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
|
|
518
489
|
* not participate in the standard layout of that widget, and must be positioned relatively to that
|
|
519
490
|
* widget's [contentElement](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-contentElement).
|
|
520
|
-
* ...
|
|
521
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-positioned)
|
|
491
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-positioned)
|
|
522
492
|
*/
|
|
523
493
|
positioned ? : boolean
|
|
524
494
|
/**
|
|
@@ -529,50 +499,45 @@ export type BryntumChartProps = {
|
|
|
529
499
|
/**
|
|
530
500
|
* Whether this widget is read-only. This is only valid if the widget is an input
|
|
531
501
|
* field, <strong>or contains input fields at any depth</strong>.
|
|
532
|
-
* ...
|
|
533
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-readOnly)
|
|
502
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-readOnly)
|
|
534
503
|
*/
|
|
535
504
|
readOnly ? : boolean
|
|
536
505
|
/**
|
|
537
506
|
* [Record](https://bryntum.com/products/chart/docs/api/Core/data/Model) whose values will be used to populate fields in the container.
|
|
538
|
-
* ...
|
|
539
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-record)
|
|
507
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-record)
|
|
540
508
|
*/
|
|
541
509
|
record ? : Model
|
|
542
510
|
relayStoreEvents ? : boolean
|
|
543
511
|
/**
|
|
544
512
|
* Either a default `rendition` to apply to all child widgets, or a map of renditions keyed by child widget
|
|
545
513
|
* `type`.
|
|
546
|
-
* ...
|
|
547
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-rendition)
|
|
514
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-rendition)
|
|
548
515
|
*/
|
|
549
516
|
rendition ? : string|Record<string, string>|null
|
|
550
517
|
/**
|
|
551
518
|
* Configure as `true` to have the component display a translucent ripple when its
|
|
552
519
|
* [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
|
|
553
520
|
* current theme supports ripples</em>. Out of the box, only the Material theme supports ripples.
|
|
554
|
-
* ...
|
|
555
|
-
* [
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
clip?: string
|
|
562
|
-
}
|
|
521
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ripple)
|
|
522
|
+
* @property {string} [delegate] A CSS selector to filter which child elements trigger ripples. By default, the ripple is clipped to the triggering element.
|
|
523
|
+
* @property {string} [color] A CSS color name or specification.
|
|
524
|
+
* @property {number} [radius] The ending radius of the ripple. Note that it will be clipped by the target element by default.
|
|
525
|
+
* @property {string} [clip] A string which describes how to clip the ripple if it is not to be clipped to the default element. Either the property of the widget to use as the clipping element, or a selector to allow clipping to the closest matching ancestor to the target element.
|
|
526
|
+
*/
|
|
527
|
+
ripple ? : boolean|object
|
|
563
528
|
/**
|
|
564
|
-
*
|
|
565
|
-
*
|
|
529
|
+
* The ARIA role to apply to this widget's element. By default, this is set to `'presentation'` to avoid
|
|
530
|
+
* accidentally applying a role which may interfere with screen readers.
|
|
531
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-role)
|
|
566
532
|
*/
|
|
567
|
-
role ? :
|
|
533
|
+
role ? : string
|
|
568
534
|
/**
|
|
569
535
|
* 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`
|
|
570
536
|
*/
|
|
571
537
|
rootElement ? : ShadowRoot|HTMLElement
|
|
572
538
|
/**
|
|
573
539
|
* This may be configured as `true` to make the widget's element use the `direction:rtl` style.
|
|
574
|
-
* ...
|
|
575
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-rtl)
|
|
540
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-rtl)
|
|
576
541
|
*/
|
|
577
542
|
rtl ? : boolean
|
|
578
543
|
/**
|
|
@@ -580,8 +545,7 @@ export type BryntumChartProps = {
|
|
|
580
545
|
* in both axes. May be an object containing boolean `overflowX` and `overflowY` properties which are
|
|
581
546
|
* applied to CSS style properties `overflowX` and `overflowY`. If they are boolean, they are translated to
|
|
582
547
|
* CSS overflow properties thus:
|
|
583
|
-
* ...
|
|
584
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-scrollable)
|
|
548
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-scrollable)
|
|
585
549
|
*/
|
|
586
550
|
scrollable ? : boolean|ScrollerConfig|Scroller
|
|
587
551
|
/**
|
|
@@ -607,8 +571,7 @@ export type BryntumChartProps = {
|
|
|
607
571
|
seriesLineThickness ? : number
|
|
608
572
|
/**
|
|
609
573
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
|
|
610
|
-
* ...
|
|
611
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-showAnimation)
|
|
574
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-showAnimation)
|
|
612
575
|
*/
|
|
613
576
|
showAnimation ? : boolean|object
|
|
614
577
|
/**
|
|
@@ -658,8 +621,7 @@ export type BryntumChartProps = {
|
|
|
658
621
|
subtitle ? : string
|
|
659
622
|
/**
|
|
660
623
|
* The font to use for the chart subtitle.
|
|
661
|
-
* ...
|
|
662
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-subtitleFont)
|
|
624
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-subtitleFont)
|
|
663
625
|
*/
|
|
664
626
|
subtitleFont ? : Font
|
|
665
627
|
/**
|
|
@@ -670,15 +632,13 @@ export type BryntumChartProps = {
|
|
|
670
632
|
* 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
|
|
671
633
|
* [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
|
|
672
634
|
* this widget:
|
|
673
|
-
* ...
|
|
674
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tab)
|
|
635
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tab)
|
|
675
636
|
*/
|
|
676
637
|
tab ? : boolean|TabConfig
|
|
677
638
|
/**
|
|
678
639
|
* When this container is used as a tab in a TabPanel, these items are added to the
|
|
679
640
|
* [TabBar](https://bryntum.com/products/chart/docs/api/Core/widget/TabBar) when this container is the active tab.
|
|
680
|
-
* ...
|
|
681
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tabBarItems)
|
|
641
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tabBarItems)
|
|
682
642
|
*/
|
|
683
643
|
tabBarItems ? : ToolbarItems[]|Widget[]
|
|
684
644
|
/**
|
|
@@ -687,21 +647,18 @@ export type BryntumChartProps = {
|
|
|
687
647
|
tag ? : string
|
|
688
648
|
/**
|
|
689
649
|
* Text alignment: 'left', 'center' or 'right'. Also accepts direction neutral 'start' and 'end'.
|
|
690
|
-
* ...
|
|
691
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-textAlign)
|
|
650
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-textAlign)
|
|
692
651
|
*/
|
|
693
652
|
textAlign ? : 'left'|'center'|'right'|'start'|'end'
|
|
694
653
|
/**
|
|
695
654
|
* Specify `true` for a container used to show text markup. It will apply the CSS class `b-text-content`
|
|
696
655
|
* which specifies a default max-width that makes long text more readable.
|
|
697
|
-
* ...
|
|
698
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-textContent)
|
|
656
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-textContent)
|
|
699
657
|
*/
|
|
700
658
|
textContent ? : boolean
|
|
701
659
|
/**
|
|
702
660
|
* The font to use for tick labels on the chart axes.
|
|
703
|
-
* ...
|
|
704
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tickFont)
|
|
661
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tickFont)
|
|
705
662
|
*/
|
|
706
663
|
tickFont ? : Font
|
|
707
664
|
/**
|
|
@@ -714,8 +671,7 @@ export type BryntumChartProps = {
|
|
|
714
671
|
title ? : string
|
|
715
672
|
/**
|
|
716
673
|
* The font to use for the chart title.
|
|
717
|
-
* ...
|
|
718
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-titleFont)
|
|
674
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-titleFont)
|
|
719
675
|
*/
|
|
720
676
|
titleFont ? : Font
|
|
721
677
|
/**
|
|
@@ -724,8 +680,7 @@ export type BryntumChartProps = {
|
|
|
724
680
|
titlePadding ? : object
|
|
725
681
|
/**
|
|
726
682
|
* Tooltip for the widget, either as a string or as a Tooltip config object.
|
|
727
|
-
* ...
|
|
728
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tooltip)
|
|
683
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tooltip)
|
|
729
684
|
*/
|
|
730
685
|
tooltip ? : string|TooltipConfig|null
|
|
731
686
|
type ? : 'chart'
|
|
@@ -733,8 +688,7 @@ export type BryntumChartProps = {
|
|
|
733
688
|
* Custom CSS class name suffixes to apply to the elements rendered by this widget. This may be specified
|
|
734
689
|
* as a space separated string, an array of strings, or as an object in which property names with truthy
|
|
735
690
|
* values are used as the class names.
|
|
736
|
-
* ...
|
|
737
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ui)
|
|
691
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ui)
|
|
738
692
|
*/
|
|
739
693
|
ui ? : string|object
|
|
740
694
|
/**
|
|
@@ -750,14 +704,12 @@ export type BryntumChartProps = {
|
|
|
750
704
|
width ? : string|number
|
|
751
705
|
/**
|
|
752
706
|
* The x position for the widget.
|
|
753
|
-
* ...
|
|
754
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-x)
|
|
707
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-x)
|
|
755
708
|
*/
|
|
756
709
|
x ? : number
|
|
757
710
|
/**
|
|
758
711
|
* The y position for the widget.
|
|
759
|
-
* ...
|
|
760
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-y)
|
|
712
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-y)
|
|
761
713
|
*/
|
|
762
714
|
y ? : number
|
|
763
715
|
|
|
@@ -864,6 +816,7 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
864
816
|
'label',
|
|
865
817
|
'labelPosition',
|
|
866
818
|
'labels',
|
|
819
|
+
'labelWidth',
|
|
867
820
|
'layout',
|
|
868
821
|
'layoutStyle',
|
|
869
822
|
'lazyItems',
|
|
@@ -994,7 +947,6 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
994
947
|
|
|
995
948
|
private static bryntumProps: string[] = BryntumChartComponent.bryntumFeatureNames.concat([
|
|
996
949
|
'alignSelf',
|
|
997
|
-
'anchorSize',
|
|
998
950
|
'animate',
|
|
999
951
|
'animationDuration',
|
|
1000
952
|
'appendTo',
|
|
@@ -1020,9 +972,7 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
1020
972
|
'field',
|
|
1021
973
|
'fillColorField',
|
|
1022
974
|
'flex',
|
|
1023
|
-
'focusVisible',
|
|
1024
975
|
'gridColor',
|
|
1025
|
-
'hasChanges',
|
|
1026
976
|
'height',
|
|
1027
977
|
'hidden',
|
|
1028
978
|
'html',
|
|
@@ -1031,13 +981,12 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
1031
981
|
'insertBefore',
|
|
1032
982
|
'insertFirst',
|
|
1033
983
|
'interactive',
|
|
1034
|
-
'isSettingValues',
|
|
1035
|
-
'isValid',
|
|
1036
984
|
'items',
|
|
1037
985
|
'keyMap',
|
|
1038
986
|
'label',
|
|
1039
987
|
'labelPosition',
|
|
1040
988
|
'labels',
|
|
989
|
+
'labelWidth',
|
|
1041
990
|
'layout',
|
|
1042
991
|
'layoutStyle',
|
|
1043
992
|
'legendPosition',
|
|
@@ -1124,9 +1073,7 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
1124
1073
|
@Input() defaults ! : ChartContainerItemConfig;
|
|
1125
1074
|
@Input() detectCSSCompatibilityIssues ! : boolean;
|
|
1126
1075
|
@Input() dock ! : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object;
|
|
1127
|
-
@Input() draggable ! : boolean|
|
|
1128
|
-
handleSelector?: string
|
|
1129
|
-
};
|
|
1076
|
+
@Input() draggable ! : boolean|object;
|
|
1130
1077
|
@Input() elementAttributes ! : Record<string, string|null>;
|
|
1131
1078
|
@Input() floating ! : boolean;
|
|
1132
1079
|
@Input() hideAnimation ! : boolean|object;
|
|
@@ -1141,19 +1088,12 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
1141
1088
|
@Input() localizableProperties ! : string[];
|
|
1142
1089
|
@Input() maskDefaults ! : MaskConfig;
|
|
1143
1090
|
@Input() masked ! : boolean|string|MaskConfig;
|
|
1144
|
-
@Input() monitorResize ! : boolean|
|
|
1145
|
-
immediate?: boolean
|
|
1146
|
-
};
|
|
1091
|
+
@Input() monitorResize ! : boolean|object;
|
|
1147
1092
|
@Input() namedItems ! : Record<string, ChartContainerItemConfig>;
|
|
1148
1093
|
@Input() positioned ! : boolean;
|
|
1149
1094
|
@Input() preventTooltipOnTouch ! : boolean;
|
|
1150
1095
|
@Input() relayStoreEvents ! : boolean;
|
|
1151
|
-
@Input() ripple ! : boolean|
|
|
1152
|
-
delegate?: string
|
|
1153
|
-
color?: string
|
|
1154
|
-
radius?: number
|
|
1155
|
-
clip?: string
|
|
1156
|
-
};
|
|
1096
|
+
@Input() ripple ! : boolean|object;
|
|
1157
1097
|
@Input() rootElement ! : ShadowRoot|HTMLElement;
|
|
1158
1098
|
@Input() scrollAction ! : 'hide'|'realign'|null;
|
|
1159
1099
|
@Input() showAnimation ! : boolean|object;
|
|
@@ -1197,7 +1137,7 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
1197
1137
|
@Input() gridColor ! : string;
|
|
1198
1138
|
@Input() height ! : number|string;
|
|
1199
1139
|
@Input() hidden ! : boolean;
|
|
1200
|
-
@Input() html ! : string|((widget: Widget) => string)|DomConfig|DomConfig[]|VueConfig;
|
|
1140
|
+
@Input() html ! : string|((widget: Widget) => void)|DomConfig|DomConfig[]|VueConfig|ReactJSX|(string|((widget: Widget) => void)|DomConfig|DomConfig[]|VueConfig|ReactJSX);
|
|
1201
1141
|
@Input() id ! : string;
|
|
1202
1142
|
@Input() inputFieldAlign ! : 'start'|'end';
|
|
1203
1143
|
@Input() insertBefore ! : HTMLElement|string;
|
|
@@ -1208,6 +1148,7 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
1208
1148
|
@Input() label ! : string;
|
|
1209
1149
|
@Input() labelPosition ! : 'before'|'above'|'align-before'|'auto'|null;
|
|
1210
1150
|
@Input() labels ! : DataSeries;
|
|
1151
|
+
@Input() labelWidth ! : number|null;
|
|
1211
1152
|
@Input() layout ! : Layout|string|ChartContainerLayoutConfig;
|
|
1212
1153
|
@Input() layoutStyle ! : object;
|
|
1213
1154
|
@Input() legendPosition ! : 'top'|'right'|'bottom'|'left'|'inline-start'|'inline-end';
|
|
@@ -1226,7 +1167,7 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
1226
1167
|
@Input() readOnly ! : boolean;
|
|
1227
1168
|
@Input() record ! : Model;
|
|
1228
1169
|
@Input() rendition ! : string|Record<string, string>|null;
|
|
1229
|
-
@Input() role ! : DataSeriesRole;
|
|
1170
|
+
@Input() role ! : DataSeriesRole|string;
|
|
1230
1171
|
@Input() rtl ! : boolean;
|
|
1231
1172
|
@Input() scrollable ! : Scroller|boolean|ScrollerConfig;
|
|
1232
1173
|
@Input() series ! : DataSeries[];
|
|
@@ -1256,13 +1197,8 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
1256
1197
|
@Input() y ! : number;
|
|
1257
1198
|
|
|
1258
1199
|
// Properties only
|
|
1259
|
-
@Input()
|
|
1260
|
-
@Input()
|
|
1261
|
-
@Input() hasChanges ! : boolean;
|
|
1262
|
-
@Input() isSettingValues ! : boolean;
|
|
1263
|
-
@Input() isValid ! : boolean;
|
|
1264
|
-
@Input() parent ! : Widget;
|
|
1265
|
-
@Input() values ! : Record<string, object>;
|
|
1200
|
+
@Input() parent ! : Widget;
|
|
1201
|
+
@Input() values ! : Record<string, object>;
|
|
1266
1202
|
|
|
1267
1203
|
// Events emitters
|
|
1268
1204
|
/**
|
|
@@ -1276,7 +1212,7 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
1276
1212
|
* @param {object} event Event object
|
|
1277
1213
|
* @param {Core.widget.Widget} event.source The widget being hidden.
|
|
1278
1214
|
*/
|
|
1279
|
-
@Output() onBeforeHide: any = new EventEmitter<((event: { source: Widget }) =>
|
|
1215
|
+
@Output() onBeforeHide: any = new EventEmitter<((event: { source: Widget }) => boolean|void)|string>();
|
|
1280
1216
|
/**
|
|
1281
1217
|
* Fired before this container will load record values into its child fields. This is useful if you
|
|
1282
1218
|
* want to modify the UI before data is loaded (e.g. set some input field to be readonly)
|
|
@@ -1293,8 +1229,7 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
1293
1229
|
@Output() onBeforeShow: any = new EventEmitter<((event: { source: Widget|any }) => Promise<boolean>|boolean|void)|string>();
|
|
1294
1230
|
/**
|
|
1295
1231
|
* Fires when any other event is fired from the object.
|
|
1296
|
-
* ...
|
|
1297
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#event-catchAll)
|
|
1232
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#event-catchAll)
|
|
1298
1233
|
* @param {object} event Event object
|
|
1299
1234
|
* @param {{[key: string]: any, type: string}} event.event The Object that contains event details
|
|
1300
1235
|
* @param {string} event.event.type The type of the event which is caught by the listener
|
|
@@ -1352,8 +1287,7 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
1352
1287
|
/**
|
|
1353
1288
|
* Triggered when a widget which had been in a non-visible state for any reason
|
|
1354
1289
|
* achieves visibility.
|
|
1355
|
-
* ...
|
|
1356
|
-
* [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#event-paint)
|
|
1290
|
+
* [More...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#event-paint)
|
|
1357
1291
|
* @param {object} event Event object
|
|
1358
1292
|
* @param {Core.widget.Widget} event.source The widget being painted.
|
|
1359
1293
|
* @param {boolean} event.firstPaint `true` if this is the first paint.
|
|
@@ -1449,11 +1383,69 @@ export class BryntumChartComponent implements OnInit, OnDestroy {
|
|
|
1449
1383
|
WrapperHelper.devWarningContainer(instanceName, containerParam);
|
|
1450
1384
|
}
|
|
1451
1385
|
|
|
1386
|
+
// In shadow DOM (e.g. Angular ViewEncapsulation.ShadowDom), theme CSS from document.head
|
|
1387
|
+
// does not cascade into the shadow root. Inject a matching <link> so Bryntum's CSS check
|
|
1388
|
+
// finds the theme. The @font-face rules from component styles are also extracted to
|
|
1389
|
+
// document scope so document.fonts detects them (shadow-root @font-face is not reliably
|
|
1390
|
+
// included in document.fonts across all browsers).
|
|
1391
|
+
const shadowRoot = elementRef.nativeElement.getRootNode();
|
|
1392
|
+
if (shadowRoot instanceof ShadowRoot) {
|
|
1393
|
+
initThemeInShadowRoots();
|
|
1394
|
+
BryntumChartComponent.ensureFontsInDocument(shadowRoot);
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1452
1397
|
// @ts-ignore
|
|
1453
1398
|
me.instance = instanceName === 'Widget' ? Widget.create(bryntumConfig) : new instanceClass(bryntumConfig);
|
|
1454
1399
|
|
|
1455
1400
|
}
|
|
1456
1401
|
|
|
1402
|
+
/**
|
|
1403
|
+
* Extracts all @font-face declarations from a shadow root's stylesheets and adds them to
|
|
1404
|
+
* document.head as a single <style> element. This is needed because @font-face rules inside
|
|
1405
|
+
* a shadow root are not reliably included in document.fonts across all browsers, causing
|
|
1406
|
+
* Bryntum's CSS compatibility check to incorrectly report missing fonts.
|
|
1407
|
+
* Safe to call multiple times — the extraction runs only once per page.
|
|
1408
|
+
*/
|
|
1409
|
+
private static ensureFontsInDocument(shadowRoot: ShadowRoot): void {
|
|
1410
|
+
if (document.querySelector('#b-shadow-root-fonts')) {
|
|
1411
|
+
return;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
const fontFaceRules: string[] = [];
|
|
1415
|
+
|
|
1416
|
+
const extractFromSheet = (sheet: CSSStyleSheet): void => {
|
|
1417
|
+
try {
|
|
1418
|
+
const rules = sheet.cssRules;
|
|
1419
|
+
for (let i = 0; i < rules.length; i++) {
|
|
1420
|
+
if (rules[i].type === CSSRule.FONT_FACE_RULE) {
|
|
1421
|
+
fontFaceRules.push(rules[i].cssText);
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
catch (_e) {
|
|
1426
|
+
// Cross-origin access may throw; silently skip
|
|
1427
|
+
}
|
|
1428
|
+
};
|
|
1429
|
+
|
|
1430
|
+
// adoptedStyleSheets (Angular 14+ / modern browsers)
|
|
1431
|
+
const adoptedSheets: CSSStyleSheet[] = (shadowRoot as any).adoptedStyleSheets ?? [];
|
|
1432
|
+
adoptedSheets.forEach(sheet => extractFromSheet(sheet));
|
|
1433
|
+
|
|
1434
|
+
// <style> elements (older Angular or fallback)
|
|
1435
|
+
shadowRoot.querySelectorAll('style').forEach(el => {
|
|
1436
|
+
if (el.sheet) {
|
|
1437
|
+
extractFromSheet(el.sheet);
|
|
1438
|
+
}
|
|
1439
|
+
});
|
|
1440
|
+
|
|
1441
|
+
if (fontFaceRules.length > 0) {
|
|
1442
|
+
const style = document.createElement('style');
|
|
1443
|
+
style.id = 'b-shadow-root-fonts';
|
|
1444
|
+
style.textContent = fontFaceRules.join('\n');
|
|
1445
|
+
document.head.appendChild(style);
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1457
1449
|
/**
|
|
1458
1450
|
* Watch for changes
|
|
1459
1451
|
* @param changes
|