UNPKG

31.9 kBTypeScriptView Raw
1/**
2 * ============================================================================
3 * IMPORTS
4 * ============================================================================
5 * @hidden
6 */
7import { Container, IContainerProperties, IContainerAdapters, IContainerEvents } from "./Container";
8import { List, IListEvents } from "./utils/List";
9import { OrderedListTemplate, ISortedListEvents } from "./utils/SortedList";
10import { Animation } from "./utils/Animation";
11import { Dictionary } from "./utils/Dictionary";
12import { IDisposer } from "./utils/Disposer";
13import { Export } from "./export/Export";
14import { DataSource } from "./data/DataSource";
15import { Responsive } from "./utils/Responsive";
16import { DataItem } from "./DataItem";
17import { IRange } from "./defs/IRange";
18import * as $type from "./utils/Type";
19/**
20 * ============================================================================
21 * REQUISITES
22 * ============================================================================
23 * @hidden
24 */
25/**
26 * A list of available types for calculated values.
27 */
28export declare type CalculatedValue = "value" | "percent" | "change" | "changePercent" | "startChangePercent" | "startChange" | "previousChangePercent" | "previousChange" | "sum" | "absoluteSum" | "average" | "open" | "close" | "low" | "high" | "count" | "total" | "totalPercent" | "stack" | "stackTrue";
29/**
30 * Defines properties for [[Component]].
31 */
32export interface IComponentProperties extends IContainerProperties {
33 /**
34 * Maximum zoom factor of a component.
35 */
36 maxZoomFactor?: number;
37 /**
38 * Maximum zoom declination (how much out of 0-1 range it will allow to step out)
39 *
40 * @ignore
41 * @default 0.5
42 */
43 maxZoomDeclination?: number;
44 /**
45 * Use this for [[CategoryAxis]] or [[DateAxis]].
46 *
47 * Allows restricting zoom in beyond certain number of categories or base
48 * intervals.
49 *
50 * The chart will not zoom in beyond this number of items.
51 *
52 * @default 1
53 */
54 minZoomCount?: number;
55 /**
56 * Use this for [[CategoryAxis]] or [[DateAxis]].
57 *
58 * Limits how many categories or base intervals can be shown at the same
59 * time.
60 *
61 * If there are more items in the chart, the chart will auto-zoom.
62 *
63 * @default 0 (no limit)
64 */
65 maxZoomCount?: number;
66}
67/**
68 * Defines data fields for [[Component]].
69 */
70export interface IComponentDataFields {
71 /**
72 * Data.
73 */
74 data?: string;
75 /**
76 * ID.
77 */
78 id?: string;
79}
80/**
81 * Defines events for [[Component]].
82 */
83export interface IComponentEvents extends IContainerEvents {
84 /**
85 * Invoked when range of the currently selected data is validated.
86 *
87 * @todo: change to datarangevalidated?
88 */
89 datarangechanged: {};
90 /**
91 * Invoked when the raw data for the component changes.
92 */
93 datavalidated: {};
94 /**
95 * Invoked when value(s) of the element's data items are validated.
96 */
97 dataitemsvalidated: {};
98 /**
99 * Invoked just before element is validated (after changes).
100 */
101 beforedatavalidated: {};
102 /**
103 * Invoked when range change animation starts
104 */
105 rangechangestarted: {};
106 /**
107 * Invoked when range change animation ends
108 */
109 rangechangeended: {};
110 /**
111 * Invoked when start position changes.
112 *
113 * Please note that `startchanged` event is dispatched immediately after
114 * zoom occurs, so some related properties (e.g. `minZoomed` on [[ValueAxis]])
115 * might not be yet updated.
116 *
117 * Use `startendchanged` event instead if you need to rely on updated
118 * zoom-related values.
119 */
120 startchanged: {};
121 /**
122 * Invoked when end position changes
123 *
124 * Please note that `endhanged` event is dispatched immediately after
125 * zoom occurs, so some related properties (e.g. `maxZoomed` on [[ValueAxis]])
126 * might not be yet updated.
127 *
128 * Use `startendchanged` event instead if you need to rely on updated
129 * zoom-related values.
130 */
131 endchanged: {};
132 /**
133 * Invoked when start or end position changes, unlike startchanged/endchanged
134 * this event is fired not immediately but at the end of a cycle.
135 */
136 startendchanged: {};
137}
138/**
139 * Defines adapters
140 * Includes both the [[Adapter]] definitions and properties
141 * @see {@link Adapter}
142 */
143export interface IComponentAdapters extends IContainerAdapters, IComponentProperties {
144 /**
145 * Applied after [[Component]] retrieves data value from data context
146 * (raw data), but before it is provided to [[DataItem]].
147 */
148 dataContextValue: {
149 value: any;
150 field: string;
151 dataItem: DataItem;
152 };
153 /**
154 * Applied to chart's data before it is retrieved for use.
155 */
156 data: any[];
157 start: number;
158 end: number;
159}
160/**
161 * ============================================================================
162 * MAIN CLASS
163 * ============================================================================
164 * @hidden
165 */
166/**
167 * A Component represents an independent functional element or control, that
168 * can have it's own behavior, children, data, etc.
169 *
170 * A few examples of a Component: [[Legend]], [[Series]], [[Scrollbar]].
171 *
172 * @see {@link IComponentEvents} for a list of available events
173 * @see {@link IComponentAdapters} for a list of available Adapters
174 * @important
175 */
176export declare class Component extends Container {
177 /**
178 * Defines available data fields.
179 */
180 _dataFields: IComponentDataFields;
181 /**
182 * Holds data field names.
183 *
184 * Data fields define connection beween [[DataItem]] and actual properties
185 * in raw data.
186 */
187 dataFields: this["_dataFields"];
188 /**
189 * Defines available properties.
190 */
191 _properties: IComponentProperties;
192 /**
193 * Defines available adapters.
194 */
195 _adapter: IComponentAdapters;
196 /**
197 * Defines available events.
198 */
199 _events: IComponentEvents;
200 /**
201 * Holds the data for the component.
202 *
203 * @ignore Exclude from docs
204 */
205 protected _data: $type.Optional<any[]>;
206 /**
207 * A [[Component]] which provides data to this component (like Chart provides
208 * data for Series).
209 */
210 dataProvider: $type.Optional<Component>;
211 /**
212 * A list of [[DataSource]] definitions of external data source.
213 *
214 * @ignore Exclude from docs
215 */
216 protected _dataSources: {
217 [index: string]: DataSource;
218 };
219 /**
220 * An instance of [[Responsive]].
221 *
222 * @ignore Exclude from docs
223 */
224 protected _responsive: $type.Optional<Responsive>;
225 /**
226 * This is used when only new data is invalidated (if added using `addData`
227 * method).
228 *
229 * @ignore Exclude from docs
230 */
231 protected _parseDataFrom: number;
232 /**
233 *
234 * @ignore Exclude from docs
235 * @todo Description
236 */
237 protected _dataUsers: $type.Optional<List<Component>>;
238 /**
239 * Holds the disposers for the dataItems and dataUsers
240 *
241 * @ignore Exclude from docs
242 */
243 protected _dataDisposers: Array<IDisposer>;
244 /**
245 * Identifies the type of the [[DataItem]] used in this element.
246 */
247 _dataItem: DataItem;
248 /**
249 * List of element's source data items.
250 *
251 * @ignore Exclude from docs
252 */
253 protected _dataItems: $type.Optional<OrderedListTemplate<this["_dataItem"]>>;
254 /**
255 * Holds aggregated data items.
256 *
257 * @ignore
258 */
259 _dataSets: Dictionary<string, OrderedListTemplate<this["_dataItem"]>>;
260 /**
261 * Currently selected "data set".
262 *
263 * If it's set to `""`, main data set (unaggregated data) is used.
264 */
265 protected _currentDataSetId: string;
266 /**
267 * [_startIndex description]
268 *
269 * @ignore Exclude from docs
270 */
271 protected _startIndex: $type.Optional<number>;
272 /**
273 * [_endIndex description]
274 *
275 * @ignore Exclude from docs
276 */
277 protected _endIndex: $type.Optional<number>;
278 /**
279 * [_start description]
280 *
281 * @ignore Exclude from docs
282 */
283 protected _start: number;
284 /**
285 * [_end description]
286 *
287 * @ignore Exclude from docs
288 */
289 protected _end: number;
290 /**
291 * [_finalStart description]
292 *
293 * @ignore Exclude from docs
294 */
295 protected _finalStart: $type.Optional<number>;
296 /**
297 * [_finalEnd description]
298 *
299 * @ignore Exclude from docs
300 */
301 protected _finalEnd: $type.Optional<number>;
302 /**
303 * If set to `true`, changing data range in element will not trigger
304 * `daterangechanged` event.
305 */
306 skipRangeEvent: boolean;
307 /**
308 * Whenever selected scope changes (chart is zoomed or panned), for example
309 * by interaction from a Scrollbar, or API, a chart needs to reposition
310 * its contents.
311 *
312 * `rangeChangeDuration` influences how this is performed.
313 *
314 * If set to zero (0), the change will happen instantenously.
315 *
316 * If set to non-zero value, the chart will gradually animate into new
317 * position for the set amount of milliseconds.
318 *
319 * @default 0
320 * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
321 */
322 rangeChangeDuration: number;
323 /**
324 * An easing function to use for range change animation.
325 *
326 * @see {@link Ease}
327 * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
328 */
329 rangeChangeEasing: (value: number) => number;
330 /**
331 * A reference to a currently playing range change [[Animation]] object.
332 *
333 * @ignore Exclude from docs
334 */
335 rangeChangeAnimation: $type.Optional<Animation>;
336 /**
337 * A duration (ms) of each data parsing step. A Component parses its data in
338 * chunks in order to avoid completely freezing the machine when large data
339 * sets are used. This setting will control how many milliseconds should pass
340 * when parsing data until parser stops for a brief moment to let other
341 * processes catch up.
342 */
343 parsingStepDuration: number;
344 /**
345 * [dataInvalid description]
346 *
347 * @ignore Exclude from docs
348 * @todo Description
349 */
350 dataInvalid: boolean;
351 /**
352 *
353 * @ignore Exclude from docs
354 */
355 rawDataInvalid: boolean;
356 /**
357 * [dataRangeInvalid description]
358 *
359 * @ignore Exclude from docs
360 * @todo Description
361 */
362 dataRangeInvalid: boolean;
363 /**
364 * [dataItemsInvalid description]
365 *
366 * @ignore Exclude from docs
367 * @todo Description
368 */
369 dataItemsInvalid: boolean;
370 /**
371 * If set to a non-zero number the element will "animate" data values of its
372 * children.
373 *
374 * This will happen on first load and whenever data values change.
375 *
376 * Enabling interpolation will mean that elements will transit smoothly into
377 * new values rather than updating instantly.
378 *
379 * @default 0
380 * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
381 */
382 interpolationDuration: number;
383 /**
384 * An easing function to use for interpolating values when transiting from
385 * one source value to another.
386 *
387 * @default cubicOut
388 * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
389 * @see {@link Ease}
390 */
391 interpolationEasing: (value: number) => number;
392 /**
393 * Indicates whether transition between data item's values should start and
394 * play out all at once, or with a small delay (as defined by
395 * `sequencedInterpolationDelay`) for each subsequent data item.
396 *
397 * @default true
398 * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
399 */
400 sequencedInterpolation: boolean;
401 /**
402 * A delay (ms) to wait between animating each subsequent data item's
403 * interpolation animation.
404 *
405 * Relative only if `sequencedInterpolation = true`.
406 *
407 * @default 0
408 * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations
409 */
410 sequencedInterpolationDelay: number;
411 /**
412 * A progress (0-1) for the data validation process.
413 *
414 * @ignore Exclude from docs
415 */
416 dataValidationProgress: number;
417 /**
418 * [_prevStartIndex description]
419 *
420 * @ignore Exclude from docs
421 * @todo Description
422 */
423 protected _prevStartIndex: $type.Optional<number>;
424 /**
425 * [_prevEndIndex description]
426 *
427 * @ignore Exclude from docs
428 * @todo Description
429 */
430 protected _prevEndIndex: $type.Optional<number>;
431 /**
432 * Sometimes we need to process more dataItems then actually is
433 * selected (for example, not to cut lines at the end/beginning).
434 * However when calculating averages, min, max, etc we need not to include
435 * them. So we store `workingStartIndex` and `workingEndIndex` to know which
436 * dataItems should be included and which should not.
437 */
438 /**
439 * [_workingStartIndex description]
440 *
441 * @ignore Exclude from docs
442 * @todo Description
443 */
444 protected _workingStartIndex: $type.Optional<number>;
445 /**
446 * [_workingEndIndex description]
447 *
448 * @ignore Exclude from docs
449 * @todo Description
450 */
451 protected _workingEndIndex: $type.Optional<number>;
452 protected _addAllDataItems: boolean;
453 protected _showOnInitDisposer2: IDisposer;
454 protected _usesData: boolean;
455 /**
456 * Constructor
457 */
458 constructor();
459 /**
460 * Returns a new/empty DataItem of the type appropriate for this object.
461 *
462 * @see {@link DataItem}
463 * @return Data Item
464 */
465 protected createDataItem(): this["_dataItem"];
466 /**
467 * [handleDataUserAdded description]
468 *
469 * @ignore Exclude from docs
470 * @todo Description
471 * @param event Event object
472 */
473 protected handleDataUserAdded(event: IListEvents<Component>["inserted"]): void;
474 /**
475 * [handleDataItemValueChange description]
476 *
477 * @ignore Exclude from docs
478 * @todo Description
479 */
480 handleDataItemValueChange(dataItem?: this["_dataItem"], name?: string): void;
481 /**
482 * [handleDataItemWorkingValueChange description]
483 *
484 * @ignore Exclude from docs
485 */
486 handleDataItemWorkingValueChange(dataItem?: this["_dataItem"], name?: string): void;
487 /**
488 * [handleDataItemWorkingLocationChange description]
489 *
490 * @ignore Exclude from docs
491 */
492 handleDataItemWorkingLocationChange(dataItem?: this["_dataItem"], name?: string): void;
493 /**
494 * [handleDataItemCalculatedValueChange description]
495 *
496 * @ignore Exclude from docs
497 */
498 handleDataItemCalculatedValueChange(dataItem?: this["_dataItem"], name?: string): void;
499 /**
500 * [handleDataItemPropertyChange description]
501 *
502 * @ignore Exclude from docs
503 */
504 handleDataItemPropertyChange(dataItem?: this["_dataItem"], name?: string): void;
505 /**
506 * Populates a [[DataItem]] width data from data source.
507 *
508 * Loops through all the fields and if such a field is found in raw data
509 * object, a corresponding value on passed in `dataItem` is set.
510 *
511 * @ignore Exclude from docs
512 * @param item
513 */
514 protected processDataItem(dataItem: this["_dataItem"], dataContext?: Object): void;
515 /**
516 *
517 * When validating raw data, instead of processing data item, we update it
518 *
519 * @ignore Exclude from docs
520 * @param item
521 */
522 protected updateDataItem(dataItem: this["_dataItem"]): void;
523 /**
524 * [validateDataElements description]
525 *
526 * @ignore Exclude from docs
527 * @todo Description
528 */
529 protected validateDataElements(): void;
530 /**
531 * Validates this element and its related elements.
532 *
533 * @ignore Exclude from docs
534 */
535 validate(): void;
536 /**
537 * [validateDataElement description]
538 *
539 * @ignore Exclude from docs
540 * @param dataItem [description]
541 */
542 validateDataElement(dataItem: this["_dataItem"]): void;
543 /**
544 * Adds one or several (array) of data items to the existing data.
545 *
546 * @param rawDataItem One or many raw data item objects
547 */
548 addData(rawDataItem: Object | Object[], removeCount?: number, skipRaw?: boolean): void;
549 /**
550 * Removes elements from the beginning of data
551 *
552 * @param count number of elements to remove
553 */
554 removeData(count: $type.Optional<number>, skipRaw?: boolean): void;
555 /**
556 * Triggers a data (re)parsing.
557 *
558 * @ignore Exclude from docs
559 */
560 invalidateData(): void;
561 /**
562 * [invalidateDataUsers description]
563 *
564 * @ignore Exclude from docs
565 * @todo Description
566 */
567 invalidateDataUsers(): void;
568 /**
569 * Invalidates data values. When data array is not changed, but values within
570 * it changes, we invalidate data so that component would process changes.
571 *
572 * @ignore Exclude from docs
573 */
574 invalidateDataItems(): void;
575 /**
576 * Invalidates data range. This is done when data which must be shown
577 * changes (chart is zoomed for example).
578 *
579 * @ignore Exclude from docs
580 */
581 invalidateDataRange(): void;
582 /**
583 * Processes data range.
584 *
585 * @todo Description
586 * @ignore Exclude from docs
587 */
588 validateDataRange(): void;
589 /**
590 * [sliceData description]
591 *
592 * @todo Description
593 * @ignore Exclude from docs
594 */
595 protected sliceData(): void;
596 /**
597 * [rangeChangeUpdate description]
598 *
599 * @todo Description
600 * @ignore Exclude from docs
601 */
602 protected rangeChangeUpdate(): void;
603 /**
604 * [appendDataItems description]
605 *
606 * @todo Description
607 * @ignore Exclude from docs
608 */
609 protected appendDataItems(): void;
610 /**
611 * If you want to have a smooth transition from one data values to another, you change your raw data and then you must call this method.
612 * then instead of redrawing everything, the chart will check raw data and smoothly transit from previous to new data
613 */
614 invalidateRawData(): void;
615 /**
616 * @ignore
617 */
618 validateRawData(): void;
619 /**
620 * Destroys this object and all related data.
621 */
622 dispose(): void;
623 /**
624 * @ignore
625 */
626 disposeData(): void;
627 protected getDataItem(dataContext?: any): this["_dataItem"];
628 /**
629 * Validates (processes) data.
630 *
631 * @ignore Exclude from docs
632 */
633 validateData(): void;
634 /**
635 * Validates (processes) data items.
636 *
637 * @ignore Exclude from docs
638 */
639 validateDataItems(): void;
640 /**
641 * Sets source (raw) data for the element. The "data" is always an `Array`
642 * of objects.
643 *
644 * IMPORTANT: The order of data items in `data` array is important as it
645 * might affect chart look and behavior. [More details](https://www.amcharts.com/docs/v4/concepts/data/#Order_of_data_items).
646 *
647 * @param value Data
648 */
649 /**
650 * Returns element's source (raw) data.
651 *
652 * @return Data
653 */
654 data: any[];
655 protected setData(value: any[]): void;
656 /**
657 * Returns (creates if necessary) a [[DataSource]] bound to any specific
658 * property.
659 *
660 * For example if I want to bind `data` to an external JSON file, I'd create
661 * a DataSource for it.
662 *
663 * @param property Property to bind external data to
664 * @return A DataSource for property
665 */
666 getDataSource(property: string): DataSource;
667 /**
668 *A [[DataSource]] to be used for loading Component's data.
669 *
670 * @see {@link https://www.amcharts.com/docs/v4/concepts/loading-external-data/} for more on loading external data
671 * @param value Data source
672 */
673 /**
674 * @return Data source
675 */
676 dataSource: DataSource;
677 /**
678 * Initiates loading of the external data via [[DataSource]].
679 *
680 * @ignore Exclude from docs
681 */
682 protected loadData(property: string): void;
683 /**
684 * This function is called by the [[DataSource]]'s `dateFields` adapater
685 * so that particular chart types can popuplate this setting with their
686 * own type-specific data fields so they are parsed properly.
687 *
688 * @ignore Exclude from docs
689 * @param value Array of date fields
690 * @return Array of date fields populated with chart's date fields
691 */
692 protected dataSourceDateFields(value: string[]): string[];
693 /**
694 * This function is called by the [[DataSource]]'s `numberFields` adapater
695 * so that particular chart types can popuplate this setting with their
696 * own type-specific data fields so they are parsed properly.
697 *
698 * @ignore Exclude from docs
699 * @param value Array of number fields
700 * @return Array of number fields populated with chart's number fields
701 */
702 protected dataSourceNumberFields(value: string[]): string[];
703 /**
704 *
705 * @ignore Exclude from docs
706 * @todo Description
707 * @param list [description]
708 * @param dataFields [description]
709 * @param targetList [description]
710 * @return [description]
711 */
712 protected populateDataSourceFields(list: string[], dataFields: {
713 [index: string]: string;
714 }, targetList: string[]): string[];
715 /**
716 * Sets events on a [[DataSource]].
717 *
718 * @ignore Exclude from docs
719 */
720 protected setDataSourceEvents(ds: DataSource, property?: string): void;
721 /**
722 * A [[Responsive]] instance to be used when applying conditional
723 * property values.
724 *
725 * NOTE: Responsive features are currently in development and may not work
726 * as expected, if at all.
727 *
728 * @param value Responsive rules handler
729 */
730 /**
731 * @return Responsive rules handler
732 */
733 responsive: Responsive;
734 /**
735 * Sets current zoom.
736 *
737 * The range uses relative values from 0 to 1, with 0 marking beginning and 1
738 * marking end of the available data range.
739 *
740 * This method will not have any effect when called on a chart object.
741 * Since the chart can have a number of axes and series, each with its own
742 * data, the meaning of "range" is very ambiguous.
743 *
744 * To zoom the chart use `zoom*` methods on its respective axes.
745 *
746 * @param range Range
747 * @param skipRangeEvent Should rangechanged event not be triggered?
748 * @param instantly Do not animate?
749 * @return Actual modidied range (taking `maxZoomFactor` into account)
750 */
751 zoom(range: IRange, skipRangeEvent?: boolean, instantly?: boolean, declination?: number): IRange;
752 /**
753 * Zooms to specific data items using their index in data.
754 *
755 * This method will not have any effect when called on a chart object.
756 * Since the chart can have a number of axes and series, each with its own
757 * data, the meaning of "index" is very ambiguous.
758 *
759 * To zoom the chart use `zoom*` methods on its respective axes.
760 *
761 * @param startIndex Index of the starting data item
762 * @param endIndex Index of the ending data item
763 * @param skipRangeEvent Should rangechanged event not be triggered?
764 * @param instantly Do not animate?
765 */
766 zoomToIndexes(startIndex: number, endIndex: number, skipRangeEvent?: boolean, instantly?: boolean): void;
767 /**
768 * A current zoom factor (0-1). 1 meaning fully zoomed out. (showing all of
769 * the available data)
770 *
771 * @return Zoom factor
772 */
773 readonly zoomFactor: number;
774 /**
775 * Max available `zoomFactor`.
776 *
777 * The element will not allow zoom to occur beyond this factor.
778 *
779 * [[DateAxis]] and [[CategoryAxis]] calculate this atutomatically so that
780 * category axis could be zoomed to one category and date axis allows to be
781 * zoomed up to one base interval.
782 *
783 * In case you want to restrict category or date axis to be zoomed to more
784 * than one category or more than one base interval, use `minZoomCount`
785 * property (set it to `> 1`).
786 *
787 * Default value of [[ValueAxis]]'s `maxZoomFactor` is `1000`.
788 *
789 * Feel free to modify it to allow bigger zoom or to restrict zooming.
790 *
791 * @param value Maximum zoomFactor
792 */
793 /**
794 * @return Maximum zoomFactor
795 */
796 maxZoomFactor: number;
797 /**
798 * Max zoom declination.
799 *
800 * @ignore
801 * @default 1
802 * @param value Maximum zoom declination
803 */
804 /**
805 * @ignore
806 * @return Maximum zoom declination
807 */
808 maxZoomDeclination: number;
809 /**
810 * Sets current starting index.
811 *
812 * @ignore Exclude from docs
813 * @param value Start index
814 */
815 /**
816 * Current starting index.
817 *
818 * @return Start index
819 */
820 startIndex: number;
821 /**
822 * @ignore
823 * @todo:review description
824 * returns item's relative position by the index of the item
825 * @param index
826 */
827 indexToPosition(index: number): number;
828 /**
829 * Sets current ending index.
830 *
831 * @ignore Exclude from docs
832 * @param value End index
833 */
834 /**
835 * Current ending index.
836 *
837 * @return End index
838 */
839 endIndex: number;
840 /**
841 * Start of the current data range (zoom).
842 *
843 * These are relative values from 0 (beginning) to 1 (end).
844 *
845 * @param value Start (0-1)
846 */
847 /**
848 * @return Start (0-1)
849 */
850 start: number;
851 /**
852 * End of the current data range (zoom).
853 *
854 * These are relative values from 0 (beginning) to 1 (end).
855 *
856 * @param value End (0-1)
857 */
858 /**
859 * @return End (0-1)
860 */
861 end: number;
862 /**
863 * [removeFromInvalids description]
864 *
865 * @ignore Exclude from docs
866 * @todo Description
867 */
868 protected removeFromInvalids(): void;
869 /**
870 * Returns a list of source [[DataItem]] objects currently used in the chart.
871 *
872 * @return List of data items
873 */
874 readonly dataItems: OrderedListTemplate<this["_dataItem"]>;
875 /**
876 * Holds data items for data sets (usually aggregated data).
877 *
878 * @ignore
879 * @since 4.7.0
880 * @return Data sets
881 */
882 readonly dataSets: Dictionary<string, OrderedListTemplate<this["_dataItem"]>>;
883 /**
884 * Makes the chart use particular data set.
885 *
886 * If `id` is not provided or there is no such data set, main data will be
887 * used.
888 *
889 * @ignore
890 * @since 4.7.0
891 * @param id Data set id
892 */
893 setDataSet(id: string): boolean;
894 /**
895 * Returns id of the currently used data set, or `undefined` if main data set
896 * is in use.
897 *
898 * @since 4.7.0
899 * @return Current data set id
900 */
901 readonly currentDataSetId: string;
902 /**
903 * Returns reference to "main" data set (unaggregated data as it was supplied
904 * in `data`).
905 *
906 * @since 4.7.0
907 * @return Main data set
908 */
909 readonly mainDataSet: OrderedListTemplate<this["_dataItem"]>;
910 /**
911 * Updates the indexes for the dataItems
912 *
913 * @ignore Exclude from docs
914 */
915 protected _updateDataItemIndexes(startIndex: number): void;
916 /**
917 * Processes newly added [[DataItem]] as well as triggers data re-validation.
918 *
919 * @ignore Exclude from docs
920 * @param event [description]
921 */
922 protected handleDataItemAdded(event: ISortedListEvents<DataItem>["inserted"]): void;
923 /**
924 * removes [[DataItem]] as well as triggers data re-validation.
925 *
926 * @ignore Exclude from docs
927 * @param event [description]
928 */
929 protected handleDataItemRemoved(event: ISortedListEvents<DataItem>["removed"]): void;
930 /**
931 * Binds a data element's field to a specific field in raw data.
932 * For example, for the very basic column chart you'd want to bind a `value`
933 * field to a field in data, such as `price`.
934 *
935 * Some more advanced Components, like [[CandlestickSeries]] need several
936 * data fields bound to data, such as ones for open, high, low and close
937 * values.
938 *
939 * @todo Example
940 * @param field Field name
941 * @param value Field name in data
942 */
943 bindDataField<Key extends keyof this["_dataFields"]>(field: Key, value: this["_dataFields"][Key]): void;
944 /**
945 * Invalidates processed data.
946 *
947 * @ignore Exclude from docs
948 */
949 invalidateProcessedData(): void;
950 /**
951 * [resetProcessedRange description]
952 *
953 * @ignore Exclude from docs
954 * @todo Description
955 */
956 resetProcessedRange(): void;
957 /**
958 * Returns all other [[Component]] objects that are using this element's
959 * data.
960 *
961 * @ignore Exclude from docs
962 * @todo Description (review)
963 * @return [description]
964 */
965 readonly dataUsers: List<Component>;
966 /**
967 * Returns a clone of this element.
968 *
969 * @return Clone
970 */
971 clone(): this;
972 /**
973 * Copies all parameters from another [[Component]].
974 *
975 * @param source Source Component
976 */
977 copyFrom(source: this): void;
978 /**
979 * Invalidates the whole element, including all its children, causing
980 * complete re-parsing of data and redraw.
981 *
982 * Use sparingly!
983 */
984 reinit(): void;
985 /**
986 * Add an adapter for data.
987 *
988 * @return Exporting
989 */
990 protected getExporting(): Export;
991 private _exportData;
992 protected setDisabled(value: boolean): boolean;
993 /**
994 * @ignore
995 */
996 protected setShowOnInit(value: boolean): void;
997 protected setBaseId(value: string): void;
998 /**
999 * Use this for [[CategoryAxis]] or [[DateAxis]].
1000 *
1001 * Allows restricting zoom in beyond certain number of categories or base
1002 * intervals.
1003 *
1004 * @default 1
1005 * @param value Min zoom count
1006 */
1007 /**
1008 * @return Min zoom count
1009 */
1010 minZoomCount: number;
1011 /**
1012 * Use this for [[CategoryAxis]] or [[DateAxis]].
1013 *
1014 * Limits how many categories or base intervals can be shown at the same
1015 * time.
1016 *
1017 * If there are more items in the chart, the chart will auto-zoom.
1018 *
1019 * @default 0 (no limit)
1020 * @since 4.6.2
1021 * @param value Max zoom count
1022 */
1023 /**
1024 * @return Max zoom count
1025 */
1026 maxZoomCount: number;
1027 /**
1028 * Called during the System.update method
1029 *
1030 * @ignore Exclude from docs
1031 */
1032 _systemCheckIfValidate(): boolean;
1033 /**
1034 * Adds easing functions to "function" fields.
1035 *
1036 * @param field Field name
1037 * @return Assign as function?
1038 */
1039 protected asFunction(field: string): boolean;
1040}