@bryntum/chart-react-thin 7.1.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.
@@ -0,0 +1,1094 @@
1
+ /**
2
+ * React wrapper for Bryntum Chart
3
+ */
4
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
+ import React, { RefObject } from 'react';
6
+ import { AlignSpec, Base, Container, DomConfig, KeyMapConfig, Layout, MaskConfig, MenuItemConfig, MenuItemEntry, Model, ModelConfig, Rectangle, Scroller, ScrollerConfig, TabConfig, ToolbarItems, TooltipConfig, VueConfig, Widget } from '@bryntum/core-thin';
7
+ import { Chart, ChartListeners, ChartTooltipConfig, ChartContainerItemConfig, ChartContainerLayoutConfig, DataSeries, DataSeriesRole, Font } from '@bryntum/chart-thin';
8
+
9
+ import { createWidget, shouldComponentUpdate, processWidgetContent } from './WrapperHelper.js';
10
+
11
+ export type BryntumChartProps = {
12
+ // Configs
13
+ /**
14
+ * Element (or element id) to adopt as this Widget's encapsulating element. The widget's
15
+ * content will be placed inside this element.
16
+ * ...
17
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-adopt)
18
+ */
19
+ adopt? : HTMLElement|string
20
+ /**
21
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
22
+ * ...
23
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-align)
24
+ */
25
+ align? : AlignSpec|string
26
+ /**
27
+ * 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
28
+ * flexbox layout. This config allows you to set this widget's
29
+ * [align-self](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self) style.
30
+ */
31
+ alignSelf? : string
32
+ /**
33
+ * *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).*
34
+ * `true` to show a connector arrow pointing to the align target.
35
+ */
36
+ anchor? : boolean
37
+ /**
38
+ * Whether to animate chart data changes.
39
+ */
40
+ animate? : boolean
41
+ /**
42
+ * Set the duration in milliseconds for all animations.
43
+ */
44
+ animationDuration? : number
45
+ /**
46
+ * Element (or the id of an element) to append this widget's element to. Can be configured, or set once at
47
+ * runtime. To access the element of a rendered widget, see [element](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-element).
48
+ */
49
+ appendTo? : HTMLElement|string
50
+ /**
51
+ * A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject
52
+ * into an element which will be linked using the `aria-describedby` attribute.
53
+ * ...
54
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ariaDescription)
55
+ */
56
+ ariaDescription? : string
57
+ /**
58
+ * A localizable string (May contain `'L{}'` tokens which resolve in the locale file) to inject as
59
+ * the `aria-label` attribute.
60
+ * ...
61
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ariaLabel)
62
+ */
63
+ ariaLabel? : string
64
+ /**
65
+ * Update assigned [record](https://bryntum.com/products/chart/docs/api/Core/widget/Container#config-record) automatically on field changes
66
+ */
67
+ autoUpdateRecord? : boolean
68
+ /**
69
+ * The stroke color used for the axis lines and ticks, or `null` for theme default.
70
+ */
71
+ axisColor? : string
72
+ /**
73
+ * The text color used for the axis labels / ticks, or `null` to use `axisColor`.
74
+ */
75
+ axisLabelColor? : string
76
+ /**
77
+ * The chart background color, or `null` for transparent.
78
+ */
79
+ background? : string
80
+ /**
81
+ * (Optional) The name of a field in the chart data to use as the background color for each data point.
82
+ */
83
+ backgroundColorField? : string
84
+ /**
85
+ * Layout direction for the bar chart type.
86
+ */
87
+ barDirection? : 'vertical'|'horizontal'
88
+ /**
89
+ * An object where property names with a truthy value indicate which events should bubble up the ownership
90
+ * hierarchy when triggered.
91
+ * ...
92
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-bubbleEvents)
93
+ */
94
+ bubbleEvents? : object
95
+ /**
96
+ * Scale factor to apply to the computed size of bubbles in the bubble chart type.
97
+ */
98
+ bubbleScaleFactor? : number
99
+ /**
100
+ * Set to `false` to not call onXXX method names (e.g. `onShow`, `onClick`), as an easy way to listen for events.
101
+ * ...
102
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-callOnFunctions)
103
+ */
104
+ callOnFunctions? : boolean
105
+ /**
106
+ * By default, if an event handler throws an exception, the error propagates up the stack and the
107
+ * application state is undefined. Code which follows the event handler will *not* be executed.
108
+ * ...
109
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-catchEventHandlerExceptions)
110
+ */
111
+ catchEventHandlerExceptions? : boolean
112
+ /**
113
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
114
+ * Set to `true` to centre the Widget in browser viewport space.
115
+ */
116
+ centered? : boolean
117
+ /**
118
+ * Padding around the entire chart area, in pixels.
119
+ */
120
+ chartPadding? : object
121
+ /**
122
+ * Chart tooltip configuration object. Configures the tooltip that appears when hovering over chart data points.
123
+ * 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)
124
+ * is `true`.
125
+ */
126
+ chartTooltip? : ChartTooltipConfig
127
+ /**
128
+ * Basic type of chart.
129
+ */
130
+ chartType? : 'line'|'bar'|'pie'|'donut'|'scatter'|'bubble'|'radar'
131
+ /**
132
+ * Custom CSS classes to add to element.
133
+ * May be specified as a space separated string, or as an object in which property names
134
+ * with truthy values are used as the class names:
135
+ * ...
136
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-cls)
137
+ */
138
+ cls? : string|object
139
+ /**
140
+ * Applies the specified color to the widget, by setting the `--b-primary` CSS variable in the widgets
141
+ * `style` block.
142
+ * ...
143
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-color)
144
+ */
145
+ color? : string
146
+ /**
147
+ * Programmatic control over which column to start in when used in a grid layout.
148
+ */
149
+ column? : number
150
+ config? : object
151
+ /**
152
+ * *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).*
153
+ * Element, Widget or Rectangle to which this Widget is constrained.
154
+ */
155
+ constrainTo? : HTMLElement|Widget|Rectangle
156
+ /**
157
+ * The HTML content that coexists with sibling elements which may have been added to the
158
+ * [contentElement](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-contentElement) by plugins and features.
159
+ * When specifying html, this widget's element will also have the [htmlCls](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-htmlCls)
160
+ * class added to its classList, to allow targeted styling.
161
+ */
162
+ content? : string
163
+ /**
164
+ * Custom CSS classes to add to the [contentElement](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-contentElement).
165
+ * May be specified as a space separated string, or as an object in which property names
166
+ * with truthy values are used as the class names:
167
+ * ...
168
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-contentElementCls)
169
+ */
170
+ contentElementCls? : string|object
171
+ /**
172
+ * The data records or objects containing data to display in the chart.
173
+ */
174
+ data? : Model[]|object[]|ModelConfig[]
175
+ /**
176
+ * When this Widget configuration is used in the Grid's RowExpander feature's `widget` config, provide the
177
+ * field on the expanded record to use for populating this widget's store (if applicable)
178
+ */
179
+ dataField? : string
180
+ /**
181
+ * The shape to use for data point markers, or `'none'` for no markers.
182
+ */
183
+ dataPointShape? : 'square'|'circle'|'diamond'|'triangle'|'none'
184
+ /**
185
+ * Object to apply to elements dataset (each key will be used as a data-attribute on the element)
186
+ */
187
+ dataset? : Record<string, string>
188
+ /**
189
+ * The name of the property to set when a single value is to be applied to this Widget. Such as when used
190
+ * in a grid WidgetColumn, this is the property to which the column's `field` is applied.
191
+ */
192
+ defaultBindProperty? : string
193
+ /**
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
195
+ * focus should be directed by default.
196
+ * ...
197
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-defaultFocus)
198
+ * @param {Core.widget.Widget} widget Widget passed to method
199
+ * @returns {boolean} truthy value if widget is the default one
200
+ */
201
+ defaultFocus? : ((widget: Widget) => boolean)|string
202
+ /**
203
+ * A config object containing default settings to apply to all child widgets.
204
+ */
205
+ defaults? : ChartContainerItemConfig
206
+ /**
207
+ * Check for CSS compatibility issues when upgrading to v7. Performs the following checks:
208
+ * ...
209
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-detectCSSCompatibilityIssues)
210
+ */
211
+ detectCSSCompatibilityIssues? : boolean
212
+ /**
213
+ * 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
214
+ * cannot be focused, uses a different rendition (usually greyish) and does not allow selecting its value.
215
+ * ...
216
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-disabled)
217
+ */
218
+ disabled? : boolean|'inert'
219
+ /**
220
+ * Controls the placement of this widget when it is added to a [panel's ](https://bryntum.com/products/chart/docs/api/Core/widget/Panel)
221
+ * [strips collection](https://bryntum.com/products/chart/docs/api/Core/widget/Panel#config-strips). Typical values for this config are `'top'`,
222
+ * `'bottom'`, `'left'`, or `'right'`, which cause the widget to be placed on that side of the panel's
223
+ * body. Such widgets are called "edge strips".
224
+ * ...
225
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-dock)
226
+ */
227
+ dock? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
228
+ /**
229
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
230
+ * Set to `true` to be able to drag a widget freely on the page. Or set to an object with a ´handleSelector´
231
+ * property which controls when a drag should start.
232
+ * ...
233
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-draggable)
234
+ */
235
+ draggable? : boolean|{
236
+ handleSelector?: string
237
+ }
238
+ /**
239
+ * An object specifying attributes to assign to the root element of this widget.
240
+ * Set `null` value to attribute to remove it.
241
+ * ...
242
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-elementAttributes)
243
+ */
244
+ elementAttributes? : Record<string, string|null>
245
+ extraData? : any
246
+ /**
247
+ * The name of the record field containing the data for this series.
248
+ */
249
+ field? : string
250
+ /**
251
+ * 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
252
+ * flexbox layout. This config allows you to set this widget's
253
+ * [flex](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) style.
254
+ * This may be configured as a single number or a `&lt;flex-grow&gt; &lt;flex-shrink&gt; &lt;flex-basis&gt;` format string.
255
+ * numeric-only values are interpreted as the `flex-grow` value.
256
+ */
257
+ flex? : number|string
258
+ /**
259
+ * Set to `true` to move the widget out of the document flow and position it
260
+ * absolutely in browser viewport space.
261
+ */
262
+ floating? : boolean
263
+ /**
264
+ * The stroke color used for the grid lines, or `null` for theme default.
265
+ */
266
+ gridColor? : string
267
+ /**
268
+ * Widget's height, used to set element `style.height`. Either specify a valid height string or a number,
269
+ * which will get 'px' appended. We recommend using CSS as the primary way to control height, but in some
270
+ * cases this config is convenient.
271
+ */
272
+ height? : string|number
273
+ /**
274
+ * Configure with true to make widget initially hidden.
275
+ */
276
+ hidden? : boolean
277
+ /**
278
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
279
+ * ...
280
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-hideAnimation)
281
+ */
282
+ hideAnimation? : boolean|object
283
+ /**
284
+ * Specify `true` to make this container hide when it has no visible children (Either empty
285
+ * or all children hidden).
286
+ * ...
287
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-hideWhenEmpty)
288
+ */
289
+ hideWhenEmpty? : boolean
290
+ /**
291
+ * The HTML to display initially or a function returning the markup (called at widget construction time).
292
+ * ...
293
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-html)
294
+ * @param {Core.widget.Widget} widget The calling Widget
295
+ * @returns {string}
296
+ */
297
+ html? : string|((widget: Widget) => string)|DomConfig|DomConfig[]|VueConfig
298
+ /**
299
+ * The CSS class(es) to add when HTML content is being applied to this widget.
300
+ */
301
+ htmlCls? : string|object
302
+ /**
303
+ * Widget id, if not specified one will be generated. Also used for lookups through Widget.getById
304
+ */
305
+ id? : string
306
+ /**
307
+ * Determines if the widgets read-only state should be controlled by its parent.
308
+ * ...
309
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ignoreParentReadOnly)
310
+ */
311
+ ignoreParentReadOnly? : boolean
312
+ /**
313
+ * Convenience setting to align input fields of child widgets. By default, the Field input element is
314
+ * placed immediately following the `label`. If you prefer to have all input fields aligned to the
315
+ * right, set this config to `'end'`.
316
+ * ...
317
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-inputFieldAlign)
318
+ */
319
+ inputFieldAlign? : 'start'|'end'
320
+ /**
321
+ * 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.
322
+ */
323
+ insertBefore? : HTMLElement|string
324
+ /**
325
+ * 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.
326
+ */
327
+ insertFirst? : HTMLElement|string
328
+ /**
329
+ * Whether to do dynamic highlighting and other interactivity as the mouse cursor moves over the chart.
330
+ */
331
+ interactive? : boolean
332
+ /**
333
+ * An optional CSS class to add to child items of this container.
334
+ */
335
+ itemCls? : string
336
+ /**
337
+ * An object containing typed child widget config objects or Widgets. May also be specified
338
+ * as an array.
339
+ * ...
340
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-items)
341
+ */
342
+ items? : Record<string, ChartContainerItemConfig|MenuItemEntry>|(ChartContainerItemConfig|MenuItemEntry|Widget)[]
343
+ /**
344
+ * An object whose keys are the [key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) name
345
+ * and optional modifier prefixes: `'Ctrl+'`, `'Alt+'`, `'Meta+'`, and `'Shift+'` (case-insensitive). The values
346
+ * are the name of the instance method to call when the keystroke is received.
347
+ * ...
348
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-keyMap)
349
+ */
350
+ keyMap? : Record<string, KeyMapConfig>
351
+ /**
352
+ * The name of the series to display in the legend.
353
+ */
354
+ label? : string
355
+ /**
356
+ * Convenience setting to use same label placement on all child widgets.
357
+ * ...
358
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-labelPosition)
359
+ */
360
+ labelPosition? : 'before'|'above'|'align-before'|'auto'|null
361
+ /**
362
+ * For line and bar charts, this series defines the data values to use as ticks for the x-axis.
363
+ * For pie and donut chart, it defines the data values to use as slice labels.
364
+ */
365
+ labels? : DataSeries
366
+ /**
367
+ * The short name of a helper class which manages rendering and styling of child items.
368
+ * ...
369
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-layout)
370
+ */
371
+ layout? : string|ChartContainerLayoutConfig
372
+ /**
373
+ * The CSS style properties to apply to the [contentElement](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-contentElement).
374
+ * ...
375
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-layoutStyle)
376
+ */
377
+ layoutStyle? : object
378
+ /**
379
+ * 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
380
+ * instances only when this Container is rendered, rather than eagerly at construct time.
381
+ * ...
382
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-lazyItems)
383
+ */
384
+ lazyItems? : Record<string, ChartContainerItemConfig>|ChartContainerItemConfig[]|Widget[]
385
+ /**
386
+ * Where the chart's legend should appear relative to the main chart content.
387
+ * Options `inline-start` and `inline-end` function as in CSS, with horizontal positioning
388
+ * controlled by RTL mode.
389
+ */
390
+ legendPosition? : 'top'|'right'|'bottom'|'left'|'inline-start'|'inline-end'
391
+ /**
392
+ * Optional scale factor to increase or decrease the size of the chart legend.
393
+ */
394
+ legendScale? : number
395
+ /**
396
+ * The listener set for this object.
397
+ * ...
398
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-listeners)
399
+ */
400
+ listeners? : ChartListeners
401
+ /**
402
+ * A class translations of which are used for translating this entity.
403
+ * This is often used when translations of an item are defined on its container class.
404
+ * For example:
405
+ * ...
406
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-localeClass)
407
+ */
408
+ localeClass? : typeof Base
409
+ /**
410
+ * Set to `false` to disable localization of this object.
411
+ */
412
+ localizable? : boolean
413
+ /**
414
+ * List of properties which values should be translated automatically upon a locale applying.
415
+ * In case there is a need to localize not typical value (not a String value or a field with re-defined setter/getter),
416
+ * you could use 'localeKey' meta configuration.
417
+ * Example:
418
+ * ...
419
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-localizableProperties)
420
+ */
421
+ localizableProperties? : string[]
422
+ /**
423
+ * Widget's margin. This may be configured as a single number or a `TRBL` format string.
424
+ * numeric-only values are interpreted as pixels.
425
+ */
426
+ margin? : number|string
427
+ /**
428
+ * This config object contains the defaults for the [Mask](https://bryntum.com/products/chart/docs/api/Core/widget/Mask) created for the
429
+ * [masked](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-masked) config. Any properties specified in the `masked` config will override these
430
+ * values.
431
+ */
432
+ maskDefaults? : MaskConfig
433
+ /**
434
+ * Set to `true` to apply the default mask to the widget. Alternatively, this can be the mask message or a
435
+ * [Mask](https://bryntum.com/products/chart/docs/api/Core/widget/Mask) config object.
436
+ */
437
+ masked? : boolean|string|MaskConfig
438
+ /**
439
+ * Max value for the Y axis, for chart types that have one.
440
+ */
441
+ max? : number
442
+ /**
443
+ * The element's maxHeight. Can be either a String or a Number (which will have 'px' appended). Note that
444
+ * like [height](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
445
+ */
446
+ maxHeight? : string|number
447
+ /**
448
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
449
+ * ...
450
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-maximizeOnMobile)
451
+ */
452
+ maximizeOnMobile? : number|string
453
+ /**
454
+ * The maximum tick rotation in degrees.
455
+ */
456
+ maxTickLabelRotation? : number
457
+ /**
458
+ * The elements maxWidth. Can be either a String or a Number (which will have 'px' appended). Note that
459
+ * like [width](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
460
+ */
461
+ maxWidth? : string|number
462
+ /**
463
+ * Min value for the Y axis, for chart types that have one.
464
+ */
465
+ min? : number
466
+ /**
467
+ * The element's minHeight. Can be either a String or a Number (which will have 'px' appended). Note that
468
+ * like [height](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-height), *reading* the value will return the numeric value in pixels.
469
+ */
470
+ minHeight? : string|number
471
+ /**
472
+ * The minimum tick rotation in degrees.
473
+ */
474
+ minTickLabelRotation? : number
475
+ /**
476
+ * The elements minWidth. Can be either a String or a Number (which will have 'px' appended). Note that
477
+ * like [width](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-width), *reading* the value will return the numeric value in pixels.
478
+ */
479
+ minWidth? : string|number
480
+ /**
481
+ * When this is configured as `true` a [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
482
+ * is used to monitor this element for size changes caused by either style manipulation, or by CSS
483
+ * layout.
484
+ * ...
485
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-monitorResize)
486
+ */
487
+ monitorResize? : boolean|{
488
+ immediate?: boolean
489
+ }
490
+ /**
491
+ * 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)
492
+ * config. For example, a specialized [Menu](https://bryntum.com/products/chart/docs/api/Core/widget/Menu) subclass may have a `namedItems` default
493
+ * value defined like this:
494
+ * ...
495
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-namedItems)
496
+ */
497
+ namedItems? : Record<string, ChartContainerItemConfig>
498
+ /**
499
+ * The owning Widget of this Widget. If this Widget is directly contained (that is, it is one of the
500
+ * [items](https://bryntum.com/products/chart/docs/api/Core/widget/Container#property-items) of a Container), this config will be ignored. In this case
501
+ * the owner is <strong>always</strong> the encapsulating Container.
502
+ * ...
503
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-owner)
504
+ */
505
+ owner? : Widget|any
506
+ /**
507
+ * Radius of data points, in pixels.
508
+ */
509
+ pointSize? : number
510
+ /**
511
+ * 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
512
+ * not participate in the standard layout of that widget, and must be positioned relatively to that
513
+ * widget's [contentElement](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-contentElement).
514
+ * ...
515
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-positioned)
516
+ */
517
+ positioned? : boolean
518
+ /**
519
+ * Prevent tooltip from being displayed on touch devices. Useful for example for buttons that display a
520
+ * menu on click etc, since the tooltip would be displayed at the same time.
521
+ */
522
+ preventTooltipOnTouch? : boolean
523
+ /**
524
+ * Whether this widget is read-only. This is only valid if the widget is an input
525
+ * field, <strong>or contains input fields at any depth</strong>.
526
+ * ...
527
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-readOnly)
528
+ */
529
+ readOnly? : boolean
530
+ /**
531
+ * [Record](https://bryntum.com/products/chart/docs/api/Core/data/Model) whose values will be used to populate fields in the container.
532
+ * ...
533
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-record)
534
+ */
535
+ record? : Model
536
+ relayStoreEvents? : boolean
537
+ /**
538
+ * Either a default `rendition` to apply to all child widgets, or a map of renditions keyed by child widget
539
+ * `type`.
540
+ * ...
541
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-rendition)
542
+ */
543
+ rendition? : string|Record<string, string>|null
544
+ /**
545
+ * Configure as `true` to have the component display a translucent ripple when its
546
+ * [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
547
+ * current theme supports ripples</em>. Out of the box, only the Material theme supports ripples.
548
+ * ...
549
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ripple)
550
+ */
551
+ ripple? : boolean|{
552
+ delegate?: string
553
+ color?: string
554
+ radius?: number
555
+ clip?: string
556
+ }
557
+ /**
558
+ * (Optional) Required when using certain chart types, for example `scatter`, where series can be arbitrarily
559
+ * assigned to different axes. The `role` determines how this series is used in the chart.
560
+ */
561
+ role? : DataSeriesRole
562
+ /**
563
+ * 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`
564
+ */
565
+ rootElement? : ShadowRoot|HTMLElement
566
+ /**
567
+ * This may be configured as `true` to make the widget's element use the `direction:rtl` style.
568
+ * ...
569
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-rtl)
570
+ */
571
+ rtl? : boolean
572
+ /**
573
+ * Specifies whether (and optionally in which axes) a Widget may scroll. `true` means this widget may scroll
574
+ * in both axes. May be an object containing boolean `overflowX` and `overflowY` properties which are
575
+ * applied to CSS style properties `overflowX` and `overflowY`. If they are boolean, they are translated to
576
+ * CSS overflow properties thus:
577
+ * ...
578
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-scrollable)
579
+ */
580
+ scrollable? : boolean|ScrollerConfig|Scroller
581
+ /**
582
+ * Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
583
+ * Valid values: ´null´: do nothing, ´hide´: hide the widget or ´realign´: realign to the target if possible.
584
+ */
585
+ scrollAction? : 'hide'|'realign'|null
586
+ /**
587
+ * One or more data series to display in the chart.
588
+ */
589
+ series? : DataSeries[]
590
+ /**
591
+ * The type of stroke to use for data series lines.
592
+ */
593
+ seriesLineDash? : 'dot'|'dash'|'solid'
594
+ /**
595
+ * The opacity of data series lines, from zero to one.
596
+ */
597
+ seriesLineOpacity? : number
598
+ /**
599
+ * The thickness of data series lines, in pixels.
600
+ */
601
+ seriesLineThickness? : number
602
+ /**
603
+ * *Only valid if this Widget is [floating](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#config-floating).*
604
+ * ...
605
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-showAnimation)
606
+ */
607
+ showAnimation? : boolean|object
608
+ /**
609
+ * Whether to show the chart's control button menu, for example, the download button.
610
+ */
611
+ showControls? : boolean
612
+ /**
613
+ * Whether to show the chart's legend.
614
+ */
615
+ showLegend? : boolean
616
+ /**
617
+ * Whether to show data point markers on the chart.
618
+ */
619
+ showPoints? : boolean
620
+ /**
621
+ * Whether to show the chart subtitle.
622
+ */
623
+ showSubtitle? : boolean
624
+ /**
625
+ * Whether to show tick marks and labels on the chart axes.
626
+ */
627
+ showTicks? : boolean
628
+ /**
629
+ * Whether to show the chart title.
630
+ */
631
+ showTitle? : boolean
632
+ /**
633
+ * Whether to show tooltips when the mouse cursor hovers over chart elements.
634
+ */
635
+ showTooltips? : boolean
636
+ /**
637
+ * 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)
638
+ */
639
+ showTooltipWhenDisabled? : boolean
640
+ /**
641
+ * Programmatic control over how many columns to span when used in a grid layout.
642
+ */
643
+ span? : number
644
+ /**
645
+ * 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),
646
+ * without falling back to `ref`.
647
+ */
648
+ strictRecordMapping? : boolean
649
+ /**
650
+ * The chart subtitle.
651
+ */
652
+ subtitle? : string
653
+ /**
654
+ * The font to use for the chart subtitle.
655
+ * ...
656
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-subtitleFont)
657
+ */
658
+ subtitleFont? : Font
659
+ /**
660
+ * Padding around the chart subtitle, in pixels.
661
+ */
662
+ subtitlePadding? : object
663
+ /**
664
+ * 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
665
+ * [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
666
+ * this widget:
667
+ * ...
668
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tab)
669
+ */
670
+ tab? : boolean|TabConfig
671
+ /**
672
+ * When this container is used as a tab in a TabPanel, these items are added to the
673
+ * [TabBar](https://bryntum.com/products/chart/docs/api/Core/widget/TabBar) when this container is the active tab.
674
+ * ...
675
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tabBarItems)
676
+ */
677
+ tabBarItems? : ToolbarItems[]|Widget[]
678
+ /**
679
+ * The tag name of this Widget's root element
680
+ */
681
+ tag? : string
682
+ /**
683
+ * Text alignment: 'left', 'center' or 'right'. Also accepts direction neutral 'start' and 'end'.
684
+ * ...
685
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-textAlign)
686
+ */
687
+ textAlign? : 'left'|'center'|'right'|'start'|'end'
688
+ /**
689
+ * Specify `true` for a container used to show text markup. It will apply the CSS class `b-text-content`
690
+ * which specifies a default max-width that makes long text more readable.
691
+ * ...
692
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-textContent)
693
+ */
694
+ textContent? : boolean
695
+ /**
696
+ * The font to use for tick labels on the chart axes.
697
+ * ...
698
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tickFont)
699
+ */
700
+ tickFont? : Font
701
+ /**
702
+ * 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).
703
+ */
704
+ tickMarkColor? : string
705
+ /**
706
+ * The chart title.
707
+ */
708
+ title? : string
709
+ /**
710
+ * The font to use for the chart title.
711
+ * ...
712
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-titleFont)
713
+ */
714
+ titleFont? : Font
715
+ /**
716
+ * Padding around the chart title, in pixels.
717
+ */
718
+ titlePadding? : object
719
+ /**
720
+ * Tooltip for the widget, either as a string or as a Tooltip config object.
721
+ * ...
722
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-tooltip)
723
+ */
724
+ tooltip? : string|TooltipConfig|null
725
+ type? : 'chart'
726
+ /**
727
+ * Custom CSS class name suffixes to apply to the elements rendered by this widget. This may be specified
728
+ * as a space separated string, an array of strings, or as an object in which property names with truthy
729
+ * values are used as the class names.
730
+ * ...
731
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-ui)
732
+ */
733
+ ui? : string|object
734
+ /**
735
+ * A widgets weight determines its position among siblings when added to a [Container](https://bryntum.com/products/chart/docs/api/Core/widget/Container).
736
+ * Higher weights go further down.
737
+ */
738
+ weight? : number
739
+ /**
740
+ * Widget's width, used to set element `style.width`. Either specify a valid width string or a number, which
741
+ * will get 'px' appended. We recommend using CSS as the primary way to control width, but in some cases
742
+ * this config is convenient.
743
+ */
744
+ width? : string|number
745
+ /**
746
+ * The x position for the widget.
747
+ * ...
748
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-x)
749
+ */
750
+ x? : number
751
+ /**
752
+ * The y position for the widget.
753
+ * ...
754
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#config-y)
755
+ */
756
+ y? : number
757
+
758
+ // Events
759
+ /**
760
+ * Fires before an object is destroyed.
761
+ * @param {object} event Event object
762
+ * @param {Core.Base} event.source The Object that is being destroyed.
763
+ */
764
+ onBeforeDestroy? : ((event: { source: Base }) => void)|string
765
+ /**
766
+ * Triggered before a widget is hidden. Return `false` to prevent the action.
767
+ * @param {object} event Event object
768
+ * @param {Core.widget.Widget} event.source The widget being hidden.
769
+ */
770
+ onBeforeHide? : ((event: { source: Widget }) => Promise<boolean>|boolean|void)|string
771
+ /**
772
+ * Fired before this container will load record values into its child fields. This is useful if you
773
+ * want to modify the UI before data is loaded (e.g. set some input field to be readonly)
774
+ * @param {object} event Event object
775
+ * @param {Core.widget.Container} event.source The container
776
+ * @param {Core.data.Model} event.record The record
777
+ */
778
+ onBeforeSetRecord? : ((event: { source: Container, record: Model }) => void)|string
779
+ /**
780
+ * Triggered before a widget is shown. Return `false` to prevent the action.
781
+ * @param {object} event Event object
782
+ * @param {Core.widget.Widget,any} event.source The widget being shown
783
+ */
784
+ onBeforeShow? : ((event: { source: Widget|any }) => Promise<boolean>|boolean|void)|string
785
+ /**
786
+ * Fires when any other event is fired from the object.
787
+ * ...
788
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#event-catchAll)
789
+ * @param {object} event Event object
790
+ * @param {{[key: string]: any, type: string}} event.event The Object that contains event details
791
+ * @param {string} event.event.type The type of the event which is caught by the listener
792
+ */
793
+ onCatchAll? : ((event: {[key: string]: any, type: string}) => void)|string
794
+ /**
795
+ * Fires when an object is destroyed.
796
+ * @param {object} event Event object
797
+ * @param {Core.Base} event.source The Object that is being destroyed.
798
+ */
799
+ onDestroy? : ((event: { source: Base }) => void)|string
800
+ /**
801
+ * 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
802
+ * @param {object} event Event object
803
+ * @param {Core.widget.Container} event.source The container.
804
+ * @param {boolean} event.dirty The dirty state of the Container - `true` if there are any fields which have been changed since initial load.
805
+ */
806
+ onDirtyStateChange? : ((event: { source: Container, dirty: boolean }) => void)|string
807
+ /**
808
+ * Triggered when a widget's [element](https://bryntum.com/products/chart/docs/api/Core/widget/Widget#property-element) is available.
809
+ * @param {object} event Event object
810
+ * @param {HTMLElement} event.element The Widget's element.
811
+ */
812
+ onElementCreated? : ((event: { element: HTMLElement }) => void)|string
813
+ /**
814
+ * Fired when focus enters this Widget.
815
+ * @param {object} event Event object
816
+ * @param {Core.widget.Widget} event.source This Widget
817
+ * @param {HTMLElement} event.fromElement The element which lost focus.
818
+ * @param {HTMLElement} event.toElement The element which gained focus.
819
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
820
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
821
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
822
+ */
823
+ onFocusIn? : ((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string
824
+ /**
825
+ * Fired when focus exits this Widget's ownership tree. This is different from a `blur` event.
826
+ * focus moving from within this Widget's ownership tree, even if there are floating widgets
827
+ * will not trigger this event. This is when focus exits this widget completely.
828
+ * @param {object} event Event object
829
+ * @param {Core.widget.Widget} event.source This Widget
830
+ * @param {HTMLElement} event.fromElement The element which lost focus.
831
+ * @param {HTMLElement} event.toElement The element which gained focus.
832
+ * @param {Core.widget.Widget} event.fromWidget The widget which lost focus.
833
+ * @param {Core.widget.Widget} event.toWidget The widget which gained focus.
834
+ * @param {boolean} event.backwards `true` if the `toElement` is before the `fromElement` in document order.
835
+ */
836
+ onFocusOut? : ((event: { source: Widget, fromElement: HTMLElement, toElement: HTMLElement, fromWidget: Widget, toWidget: Widget, backwards: boolean }) => void)|string
837
+ /**
838
+ * Triggered after a widget was hidden
839
+ * @param {object} event Event object
840
+ * @param {Core.widget.Widget} event.source The widget
841
+ */
842
+ onHide? : ((event: { source: Widget }) => void)|string
843
+ /**
844
+ * Triggered when a widget which had been in a non-visible state for any reason
845
+ * achieves visibility.
846
+ * ...
847
+ * [View online docs...](https://bryntum.com/products/chart/docs/api/Chart/widget/Chart#event-paint)
848
+ * @param {object} event Event object
849
+ * @param {Core.widget.Widget} event.source The widget being painted.
850
+ * @param {boolean} event.firstPaint `true` if this is the first paint.
851
+ */
852
+ onPaint? : ((event: { source: Widget, firstPaint: boolean }) => void)|string
853
+ /**
854
+ * Fired when a Widget's read only state is toggled
855
+ * @param {object} event Event object
856
+ * @param {boolean} event.readOnly Read only or not
857
+ */
858
+ onReadOnly? : ((event: { readOnly: boolean }) => void)|string
859
+ /**
860
+ * This event is fired after a widget's elements have been synchronized due to a direct or indirect call
861
+ * 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.
862
+ */
863
+ onRecompose? : (() => void)|string
864
+ /**
865
+ * 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`*.
866
+ * @param {object} event Event object
867
+ * @param {Core.widget.Widget} event.source This Widget
868
+ * @param {number} event.width The new width
869
+ * @param {number} event.height The new height
870
+ * @param {number} event.oldWidth The old width
871
+ * @param {number} event.oldHeight The old height
872
+ */
873
+ onResize? : ((event: { source: Widget, width: number, height: number, oldWidth: number, oldHeight: number }) => void)|string
874
+ /**
875
+ * Triggered after a widget is shown.
876
+ * @param {object} event Event object
877
+ * @param {Core.widget.Widget} event.source The widget
878
+ */
879
+ onShow? : ((event: { source: Widget }) => void)|string
880
+
881
+ }
882
+
883
+ export class BryntumChart extends React.Component<BryntumChartProps> {
884
+
885
+ static instanceClass = Chart;
886
+
887
+ static instanceName = 'Chart';
888
+
889
+ processWidgetContent = processWidgetContent;
890
+
891
+ static configNames = [
892
+ 'adopt',
893
+ 'align',
894
+ 'anchor',
895
+ 'ariaDescription',
896
+ 'ariaLabel',
897
+ 'autoUpdateRecord',
898
+ 'bubbleEvents',
899
+ 'centered',
900
+ 'color',
901
+ 'config',
902
+ 'constrainTo',
903
+ 'contentElementCls',
904
+ 'dataField',
905
+ 'defaultBindProperty',
906
+ 'defaultFocus',
907
+ 'defaults',
908
+ 'detectCSSCompatibilityIssues',
909
+ 'dock',
910
+ 'draggable',
911
+ 'elementAttributes',
912
+ 'floating',
913
+ 'hideAnimation',
914
+ 'hideWhenEmpty',
915
+ 'htmlCls',
916
+ 'ignoreParentReadOnly',
917
+ 'itemCls',
918
+ 'lazyItems',
919
+ 'listeners',
920
+ 'localeClass',
921
+ 'localizable',
922
+ 'localizableProperties',
923
+ 'maskDefaults',
924
+ 'masked',
925
+ 'monitorResize',
926
+ 'namedItems',
927
+ 'owner',
928
+ 'positioned',
929
+ 'preventTooltipOnTouch',
930
+ 'relayStoreEvents',
931
+ 'ripple',
932
+ 'rootElement',
933
+ 'scrollAction',
934
+ 'showAnimation',
935
+ 'showTooltipWhenDisabled',
936
+ 'tab',
937
+ 'tabBarItems',
938
+ 'tag',
939
+ 'textAlign',
940
+ 'textContent',
941
+ 'type',
942
+ 'ui',
943
+ 'weight'
944
+ ];
945
+
946
+ static propertyConfigNames = [
947
+ 'alignSelf',
948
+ 'animate',
949
+ 'animationDuration',
950
+ 'appendTo',
951
+ 'axisColor',
952
+ 'axisLabelColor',
953
+ 'background',
954
+ 'backgroundColorField',
955
+ 'barDirection',
956
+ 'bubbleScaleFactor',
957
+ 'callOnFunctions',
958
+ 'catchEventHandlerExceptions',
959
+ 'chartPadding',
960
+ 'chartTooltip',
961
+ 'chartType',
962
+ 'cls',
963
+ 'column',
964
+ 'content',
965
+ 'data',
966
+ 'dataPointShape',
967
+ 'dataset',
968
+ 'disabled',
969
+ 'extraData',
970
+ 'field',
971
+ 'flex',
972
+ 'gridColor',
973
+ 'height',
974
+ 'hidden',
975
+ 'html',
976
+ 'id',
977
+ 'inputFieldAlign',
978
+ 'insertBefore',
979
+ 'insertFirst',
980
+ 'interactive',
981
+ 'items',
982
+ 'keyMap',
983
+ 'label',
984
+ 'labelPosition',
985
+ 'labels',
986
+ 'layout',
987
+ 'layoutStyle',
988
+ 'legendPosition',
989
+ 'legendScale',
990
+ 'margin',
991
+ 'max',
992
+ 'maxHeight',
993
+ 'maximizeOnMobile',
994
+ 'maxTickLabelRotation',
995
+ 'maxWidth',
996
+ 'min',
997
+ 'minHeight',
998
+ 'minTickLabelRotation',
999
+ 'minWidth',
1000
+ 'onBeforeDestroy',
1001
+ 'onBeforeHide',
1002
+ 'onBeforeSetRecord',
1003
+ 'onBeforeShow',
1004
+ 'onCatchAll',
1005
+ 'onDestroy',
1006
+ 'onDirtyStateChange',
1007
+ 'onElementCreated',
1008
+ 'onFocusIn',
1009
+ 'onFocusOut',
1010
+ 'onHide',
1011
+ 'onPaint',
1012
+ 'onReadOnly',
1013
+ 'onRecompose',
1014
+ 'onResize',
1015
+ 'onShow',
1016
+ 'pointSize',
1017
+ 'readOnly',
1018
+ 'record',
1019
+ 'rendition',
1020
+ 'role',
1021
+ 'rtl',
1022
+ 'scrollable',
1023
+ 'series',
1024
+ 'seriesLineDash',
1025
+ 'seriesLineOpacity',
1026
+ 'seriesLineThickness',
1027
+ 'showControls',
1028
+ 'showLegend',
1029
+ 'showPoints',
1030
+ 'showSubtitle',
1031
+ 'showTicks',
1032
+ 'showTitle',
1033
+ 'showTooltips',
1034
+ 'span',
1035
+ 'strictRecordMapping',
1036
+ 'subtitle',
1037
+ 'subtitleFont',
1038
+ 'subtitlePadding',
1039
+ 'tickFont',
1040
+ 'tickMarkColor',
1041
+ 'title',
1042
+ 'titleFont',
1043
+ 'titlePadding',
1044
+ 'tooltip',
1045
+ 'width',
1046
+ 'x',
1047
+ 'y'
1048
+ ];
1049
+
1050
+ static propertyNames = [
1051
+ 'anchorSize',
1052
+ 'focusVisible',
1053
+ 'hasChanges',
1054
+ 'isSettingValues',
1055
+ 'isValid',
1056
+ 'parent',
1057
+ 'values'
1058
+ ];
1059
+
1060
+ // Component instance
1061
+ instance!: Chart;
1062
+
1063
+ // Component element
1064
+ element! : HTMLElement;
1065
+
1066
+ componentDidMount(): void {
1067
+ this.instance = createWidget(this);
1068
+ }
1069
+
1070
+ componentWillUnmount(): void {
1071
+ // @ts-ignore
1072
+ this.instance?.destroy?.();
1073
+ }
1074
+
1075
+ /**
1076
+ * Component about to be updated, from changing a prop using state.
1077
+ * React to it depending on what changed and prevent react from re-rendering our component.
1078
+ * @param nextProps
1079
+ * @param nextState
1080
+ * @returns {boolean}
1081
+ */
1082
+ shouldComponentUpdate(nextProps: Readonly<BryntumChartProps>, nextState: Readonly<{}>): boolean {
1083
+ return shouldComponentUpdate(this, nextProps, nextState);
1084
+ }
1085
+
1086
+ render(): React.ReactNode {
1087
+
1088
+ const className = `b-react-chart-container`;
1089
+ return (
1090
+ <div className={className} ref={(element) => (this.element = element!)}></div>
1091
+ );
1092
+
1093
+ }
1094
+ }