charjs 4.4.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +38 -0
  3. package/auto/auto.cjs +6 -0
  4. package/auto/auto.d.ts +4 -0
  5. package/auto/auto.js +6 -0
  6. package/auto/package.json +14 -0
  7. package/dist/chart.cjs +11530 -0
  8. package/dist/chart.cjs.map +1 -0
  9. package/dist/chart.js +11482 -0
  10. package/dist/chart.js.map +1 -0
  11. package/dist/chart.umd.js +14 -0
  12. package/dist/chart.umd.js.map +1 -0
  13. package/dist/chunks/helpers.segment.cjs +2875 -0
  14. package/dist/chunks/helpers.segment.cjs.map +1 -0
  15. package/dist/chunks/helpers.segment.js +2749 -0
  16. package/dist/chunks/helpers.segment.js.map +1 -0
  17. package/dist/controllers/controller.bar.d.ts +62 -0
  18. package/dist/controllers/controller.bubble.d.ts +35 -0
  19. package/dist/controllers/controller.doughnut.d.ts +64 -0
  20. package/dist/controllers/controller.line.d.ts +13 -0
  21. package/dist/controllers/controller.pie.d.ts +3 -0
  22. package/dist/controllers/controller.polarArea.d.ts +35 -0
  23. package/dist/controllers/controller.radar.d.ts +19 -0
  24. package/dist/controllers/controller.scatter.d.ts +20 -0
  25. package/dist/controllers/index.d.ts +8 -0
  26. package/dist/core/core.adapters.d.ts +93 -0
  27. package/dist/core/core.animation.d.ts +21 -0
  28. package/dist/core/core.animations.d.ts +22 -0
  29. package/dist/core/core.animations.defaults.d.ts +1 -0
  30. package/dist/core/core.animator.d.ts +67 -0
  31. package/dist/core/core.config.d.ts +86 -0
  32. package/dist/core/core.controller.d.ts +257 -0
  33. package/dist/core/core.datasetController.d.ts +251 -0
  34. package/dist/core/core.defaults.d.ts +80 -0
  35. package/dist/core/core.element.d.ts +21 -0
  36. package/dist/core/core.interaction.d.ts +92 -0
  37. package/dist/core/core.layouts.d.ts +88 -0
  38. package/dist/core/core.layouts.defaults.d.ts +1 -0
  39. package/dist/core/core.plugins.d.ts +61 -0
  40. package/dist/core/core.registry.d.ts +90 -0
  41. package/dist/core/core.scale.autoskip.d.ts +19 -0
  42. package/dist/core/core.scale.d.ts +343 -0
  43. package/dist/core/core.scale.defaults.d.ts +1 -0
  44. package/dist/core/core.ticks.d.ts +31 -0
  45. package/dist/core/core.typedRegistry.d.ts +33 -0
  46. package/dist/core/index.d.ts +15 -0
  47. package/dist/elements/element.arc.d.ts +50 -0
  48. package/dist/elements/element.bar.d.ts +32 -0
  49. package/dist/elements/element.line.d.ts +87 -0
  50. package/dist/elements/element.point.d.ts +39 -0
  51. package/dist/elements/index.d.ts +4 -0
  52. package/dist/helpers/helpers.canvas.d.ts +75 -0
  53. package/dist/helpers/helpers.collection.d.ts +68 -0
  54. package/dist/helpers/helpers.color.d.ts +13 -0
  55. package/dist/helpers/helpers.config.d.ts +31 -0
  56. package/dist/helpers/helpers.config.types.d.ts +41 -0
  57. package/dist/helpers/helpers.core.d.ts +147 -0
  58. package/dist/helpers/helpers.curve.d.ts +17 -0
  59. package/dist/helpers/helpers.dom.d.ts +55 -0
  60. package/dist/helpers/helpers.easing.d.ts +40 -0
  61. package/dist/helpers/helpers.extras.d.ts +45 -0
  62. package/dist/helpers/helpers.interpolation.d.ts +22 -0
  63. package/dist/helpers/helpers.intl.d.ts +1 -0
  64. package/dist/helpers/helpers.math.d.ts +84 -0
  65. package/dist/helpers/helpers.options.d.ts +97 -0
  66. package/dist/helpers/helpers.rtl.d.ts +10 -0
  67. package/dist/helpers/helpers.segment.d.ts +65 -0
  68. package/dist/helpers/index.d.ts +15 -0
  69. package/dist/helpers.cjs +135 -0
  70. package/dist/helpers.cjs.map +1 -0
  71. package/dist/helpers.js +9 -0
  72. package/dist/helpers.js.map +1 -0
  73. package/dist/index.d.ts +12 -0
  74. package/dist/index.umd.d.ts +5 -0
  75. package/dist/platform/index.d.ts +5 -0
  76. package/dist/platform/platform.base.d.ts +63 -0
  77. package/dist/platform/platform.basic.d.ts +10 -0
  78. package/dist/platform/platform.dom.d.ts +19 -0
  79. package/dist/plugins/index.d.ts +7 -0
  80. package/dist/plugins/plugin.colors.d.ts +11 -0
  81. package/dist/plugins/plugin.decimation.d.ts +10 -0
  82. package/dist/plugins/plugin.filler/filler.drawing.d.ts +1 -0
  83. package/dist/plugins/plugin.filler/filler.helper.d.ts +14 -0
  84. package/dist/plugins/plugin.filler/filler.options.d.ts +30 -0
  85. package/dist/plugins/plugin.filler/filler.segment.d.ts +36 -0
  86. package/dist/plugins/plugin.filler/filler.target.d.ts +9 -0
  87. package/dist/plugins/plugin.filler/filler.target.stack.d.ts +14 -0
  88. package/dist/plugins/plugin.filler/index.d.ts +12 -0
  89. package/dist/plugins/plugin.filler/simpleArc.d.ts +12 -0
  90. package/dist/plugins/plugin.legend.d.ts +114 -0
  91. package/dist/plugins/plugin.subtitle.d.ts +27 -0
  92. package/dist/plugins/plugin.title.d.ts +61 -0
  93. package/dist/plugins/plugin.tooltip.d.ts +288 -0
  94. package/dist/scales/index.d.ts +6 -0
  95. package/dist/scales/scale.category.d.ts +21 -0
  96. package/dist/scales/scale.linear.d.ts +10 -0
  97. package/dist/scales/scale.linearbase.d.ts +20 -0
  98. package/dist/scales/scale.logarithmic.d.ts +25 -0
  99. package/dist/scales/scale.radialLinear.d.ts +63 -0
  100. package/dist/scales/scale.time.d.ts +130 -0
  101. package/dist/scales/scale.timeseries.d.ts +39 -0
  102. package/dist/types/animation.d.ts +34 -0
  103. package/dist/types/basic.d.ts +3 -0
  104. package/dist/types/color.d.ts +1 -0
  105. package/dist/types/geometric.d.ts +52 -0
  106. package/dist/types/index.d.ts +3842 -0
  107. package/dist/types/layout.d.ts +65 -0
  108. package/dist/types/utils.d.ts +30 -0
  109. package/dist/types.d.ts +10 -0
  110. package/ehgjqftj.cjs +1 -0
  111. package/helpers/helpers.cjs +1 -0
  112. package/helpers/helpers.d.ts +1 -0
  113. package/helpers/helpers.js +1 -0
  114. package/helpers/package.json +14 -0
  115. package/package.json +126 -0
@@ -0,0 +1,7 @@
1
+ export { default as Colors } from "./plugin.colors.js";
2
+ export { default as Decimation } from "./plugin.decimation.js";
3
+ export { default as Filler } from "./plugin.filler/index.js";
4
+ export { default as Legend } from "./plugin.legend.js";
5
+ export { default as SubTitle } from "./plugin.subtitle.js";
6
+ export { default as Title } from "./plugin.title.js";
7
+ export { default as Tooltip } from "./plugin.tooltip.js";
@@ -0,0 +1,11 @@
1
+ import type { Chart } from '../types.js';
2
+ export interface ColorsPluginOptions {
3
+ enabled?: boolean;
4
+ forceOverride?: boolean;
5
+ }
6
+ declare const _default: {
7
+ id: string;
8
+ defaults: ColorsPluginOptions;
9
+ beforeLayout(chart: Chart, _args: any, options: ColorsPluginOptions): void;
10
+ };
11
+ export default _default;
@@ -0,0 +1,10 @@
1
+ declare namespace _default {
2
+ const id: string;
3
+ namespace defaults {
4
+ const algorithm: string;
5
+ const enabled: boolean;
6
+ }
7
+ function beforeElementsUpdate(chart: any, args: any, options: any): void;
8
+ function destroy(chart: any): void;
9
+ }
10
+ export default _default;
@@ -0,0 +1 @@
1
+ export function _drawfill(ctx: any, source: any, area: any): void;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @param {PointElement[] | { x: number; y: number; }} boundary
3
+ * @param {LineElement} line
4
+ * @return {LineElement?}
5
+ */
6
+ export function _createBoundaryLine(boundary: PointElement[] | {
7
+ x: number;
8
+ y: number;
9
+ }, line: LineElement): LineElement | null;
10
+ export function _shouldApplyFill(source: any): boolean;
11
+ export type Chart = import('../../core/core.controller.js').default;
12
+ export type Scale = import('../../core/core.scale.js').default;
13
+ export type PointElement = import('../../elements/element.point.js').default;
14
+ import { LineElement } from "../../elements/index.js";
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @typedef { import('../../core/core.scale.js').default } Scale
3
+ * @typedef { import('../../elements/element.line.js').default } LineElement
4
+ * @typedef { import('../../types/index.js').FillTarget } FillTarget
5
+ * @typedef { import('../../types/index.js').ComplexFillTarget } ComplexFillTarget
6
+ */
7
+ export function _resolveTarget(sources: any, index: any, propagate: any): any;
8
+ /**
9
+ * @param {LineElement} line
10
+ * @param {number} index
11
+ * @param {number} count
12
+ */
13
+ export function _decodeFill(line: LineElement, index: number, count: number): any;
14
+ /**
15
+ * @param {FillTarget | ComplexFillTarget} fill
16
+ * @param {Scale} scale
17
+ * @returns {number | null}
18
+ */
19
+ export function _getTargetPixel(fill: FillTarget | ComplexFillTarget, scale: Scale): number | null;
20
+ /**
21
+ * @param {FillTarget | ComplexFillTarget} fill
22
+ * @param {Scale} scale
23
+ * @param {number} startValue
24
+ * @returns {number | undefined}
25
+ */
26
+ export function _getTargetValue(fill: FillTarget | ComplexFillTarget, scale: Scale, startValue: number): number | undefined;
27
+ export type Scale = import('../../core/core.scale.js').default;
28
+ export type LineElement = import('../../elements/element.line.js').default;
29
+ export type FillTarget = import('../../types/index.js').FillTarget;
30
+ export type ComplexFillTarget = import('../../types/index.js').ComplexFillTarget;
@@ -0,0 +1,36 @@
1
+ export function _segments(line: any, target: any, property: any): ({
2
+ source: any;
3
+ target: {
4
+ property: any;
5
+ start: any;
6
+ end: any;
7
+ };
8
+ start: any;
9
+ end: any;
10
+ } | {
11
+ source: {
12
+ start: number;
13
+ end: number;
14
+ loop: boolean;
15
+ style?: any;
16
+ };
17
+ target: {
18
+ start: number;
19
+ end: number;
20
+ loop: boolean;
21
+ style?: any;
22
+ };
23
+ start: {
24
+ [x: number]: any;
25
+ };
26
+ end: {
27
+ [x: number]: any;
28
+ };
29
+ })[];
30
+ export function _getBounds(property: any, first: any, last: any, loop: any): {
31
+ property: any;
32
+ start: any;
33
+ end: any;
34
+ };
35
+ export function _pointsFromSegments(boundary: any, line: any): any[];
36
+ export function _findSegmentEnd(start: any, end: any, points: any): any;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @typedef { import('../../core/core.controller.js').default } Chart
3
+ * @typedef { import('../../core/core.scale.js').default } Scale
4
+ * @typedef { import('../../elements/element.point.js').default } PointElement
5
+ */
6
+ export function _getTarget(source: any): any;
7
+ export type Chart = import('../../core/core.controller.js').default;
8
+ export type Scale = import('../../core/core.scale.js').default;
9
+ export type PointElement = import('../../elements/element.point.js').default;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @param {{ chart: Chart; scale: Scale; index: number; line: LineElement; }} source
3
+ * @return {LineElement}
4
+ */
5
+ export function _buildStackLine(source: {
6
+ chart: Chart;
7
+ scale: Scale;
8
+ index: number;
9
+ line: LineElement;
10
+ }): LineElement;
11
+ export type Chart = import('../../core/core.controller.js').default;
12
+ export type Scale = import('../../core/core.scale.js').default;
13
+ export type PointElement = import('../../elements/element.point.js').default;
14
+ import { LineElement } from "../../elements/index.js";
@@ -0,0 +1,12 @@
1
+ declare namespace _default {
2
+ const id: string;
3
+ function afterDatasetsUpdate(chart: any, _args: any, options: any): void;
4
+ function beforeDraw(chart: any, _args: any, options: any): void;
5
+ function beforeDatasetsDraw(chart: any, _args: any, options: any): void;
6
+ function beforeDatasetDraw(chart: any, args: any, options: any): void;
7
+ namespace defaults {
8
+ const propagate: boolean;
9
+ const drawTime: string;
10
+ }
11
+ }
12
+ export default _default;
@@ -0,0 +1,12 @@
1
+ export class simpleArc {
2
+ constructor(opts: any);
3
+ x: any;
4
+ y: any;
5
+ radius: any;
6
+ pathSegment(ctx: any, bounds: any, opts: any): boolean;
7
+ interpolate(point: any): {
8
+ x: any;
9
+ y: any;
10
+ angle: any;
11
+ };
12
+ }
@@ -0,0 +1,114 @@
1
+ export class Legend extends Element<import("../types/basic.js").AnyObject, import("../types/basic.js").AnyObject> {
2
+ /**
3
+ * @param {{ ctx: any; options: any; chart: any; }} config
4
+ */
5
+ constructor(config: {
6
+ ctx: any;
7
+ options: any;
8
+ chart: any;
9
+ });
10
+ _added: boolean;
11
+ legendHitBoxes: any[];
12
+ /**
13
+ * @private
14
+ */
15
+ private _hoveredItem;
16
+ doughnutMode: boolean;
17
+ chart: any;
18
+ options: any;
19
+ ctx: any;
20
+ legendItems: any;
21
+ columnSizes: any[];
22
+ lineWidths: number[];
23
+ maxHeight: any;
24
+ maxWidth: any;
25
+ top: any;
26
+ bottom: any;
27
+ left: any;
28
+ right: any;
29
+ height: any;
30
+ width: any;
31
+ _margins: any;
32
+ position: any;
33
+ weight: any;
34
+ fullSize: any;
35
+ update(maxWidth: any, maxHeight: any, margins: any): void;
36
+ setDimensions(): void;
37
+ buildLabels(): void;
38
+ fit(): void;
39
+ /**
40
+ * @private
41
+ */
42
+ private _fitRows;
43
+ _fitCols(titleHeight: any, labelFont: any, boxWidth: any, _itemHeight: any): any;
44
+ adjustHitBoxes(): void;
45
+ isHorizontal(): boolean;
46
+ draw(): void;
47
+ /**
48
+ * @private
49
+ */
50
+ private _draw;
51
+ /**
52
+ * @protected
53
+ */
54
+ protected drawTitle(): void;
55
+ /**
56
+ * @private
57
+ */
58
+ private _computeTitleHeight;
59
+ /**
60
+ * @private
61
+ */
62
+ private _getLegendItemAt;
63
+ /**
64
+ * Handle an event
65
+ * @param {ChartEvent} e - The event to handle
66
+ */
67
+ handleEvent(e: ChartEvent): void;
68
+ }
69
+ declare namespace _default {
70
+ export const id: string;
71
+ export { Legend as _element };
72
+ export function start(chart: any, _args: any, options: any): void;
73
+ export function stop(chart: any): void;
74
+ export function beforeUpdate(chart: any, _args: any, options: any): void;
75
+ export function afterUpdate(chart: any): void;
76
+ export function afterEvent(chart: any, args: any): void;
77
+ export namespace defaults {
78
+ const display: boolean;
79
+ const position: string;
80
+ const align: string;
81
+ const fullSize: boolean;
82
+ const reverse: boolean;
83
+ const weight: number;
84
+ function onClick(e: any, legendItem: any, legend: any): void;
85
+ const onHover: any;
86
+ const onLeave: any;
87
+ namespace labels {
88
+ function color(ctx: any): any;
89
+ const boxWidth: number;
90
+ const padding: number;
91
+ function generateLabels(chart: any): any;
92
+ }
93
+ namespace title {
94
+ export function color_1(ctx: any): any;
95
+ export { color_1 as color };
96
+ const display_1: boolean;
97
+ export { display_1 as display };
98
+ const position_1: string;
99
+ export { position_1 as position };
100
+ export const text: string;
101
+ }
102
+ }
103
+ export namespace descriptors {
104
+ export function _scriptable(name: any): boolean;
105
+ export namespace labels_1 {
106
+ export function _scriptable_1(name: any): boolean;
107
+ export { _scriptable_1 as _scriptable };
108
+ }
109
+ export { labels_1 as labels };
110
+ }
111
+ }
112
+ export default _default;
113
+ export type ChartEvent = import('../types/index.js').ChartEvent;
114
+ import Element from "../core/core.element.js";
@@ -0,0 +1,27 @@
1
+ declare namespace _default {
2
+ const id: string;
3
+ function start(chart: any, _args: any, options: any): void;
4
+ function stop(chart: any): void;
5
+ function beforeUpdate(chart: any, _args: any, options: any): void;
6
+ namespace defaults {
7
+ export const align: string;
8
+ export const display: boolean;
9
+ export namespace font {
10
+ const weight: string;
11
+ }
12
+ export const fullSize: boolean;
13
+ export const padding: number;
14
+ export const position: string;
15
+ export const text: string;
16
+ const weight_1: number;
17
+ export { weight_1 as weight };
18
+ }
19
+ namespace defaultRoutes {
20
+ const color: string;
21
+ }
22
+ namespace descriptors {
23
+ const _scriptable: boolean;
24
+ const _indexable: boolean;
25
+ }
26
+ }
27
+ export default _default;
@@ -0,0 +1,61 @@
1
+ export class Title extends Element<import("../types/basic.js").AnyObject, import("../types/basic.js").AnyObject> {
2
+ /**
3
+ * @param {{ ctx: any; options: any; chart: any; }} config
4
+ */
5
+ constructor(config: {
6
+ ctx: any;
7
+ options: any;
8
+ chart: any;
9
+ });
10
+ chart: any;
11
+ options: any;
12
+ ctx: any;
13
+ _padding: import("../types.js").ChartArea;
14
+ top: number;
15
+ bottom: any;
16
+ left: number;
17
+ right: any;
18
+ width: any;
19
+ height: any;
20
+ position: any;
21
+ weight: any;
22
+ fullSize: any;
23
+ update(maxWidth: any, maxHeight: any): void;
24
+ isHorizontal(): boolean;
25
+ _drawArgs(offset: any): {
26
+ titleX: any;
27
+ titleY: any;
28
+ maxWidth: number;
29
+ rotation: number;
30
+ };
31
+ draw(): void;
32
+ }
33
+ declare namespace _default {
34
+ export const id: string;
35
+ export { Title as _element };
36
+ export function start(chart: any, _args: any, options: any): void;
37
+ export function stop(chart: any): void;
38
+ export function beforeUpdate(chart: any, _args: any, options: any): void;
39
+ export namespace defaults {
40
+ export const align: string;
41
+ export const display: boolean;
42
+ export namespace font {
43
+ const weight: string;
44
+ }
45
+ export const fullSize: boolean;
46
+ export const padding: number;
47
+ export const position: string;
48
+ export const text: string;
49
+ const weight_1: number;
50
+ export { weight_1 as weight };
51
+ }
52
+ export namespace defaultRoutes {
53
+ const color: string;
54
+ }
55
+ export namespace descriptors {
56
+ const _scriptable: boolean;
57
+ const _indexable: boolean;
58
+ }
59
+ }
60
+ export default _default;
61
+ import Element from "../core/core.element.js";
@@ -0,0 +1,288 @@
1
+ export class Tooltip extends Element<import("../types/basic.js").AnyObject, import("../types/basic.js").AnyObject> {
2
+ /**
3
+ * @namespace Chart.Tooltip.positioners
4
+ */
5
+ static positioners: {
6
+ /**
7
+ * Average mode places the tooltip at the average position of the elements shown
8
+ */
9
+ average(items: any): false | {
10
+ x: number;
11
+ y: number;
12
+ };
13
+ /**
14
+ * Gets the tooltip position nearest of the item nearest to the event position
15
+ */
16
+ nearest(items: any, eventPosition: any): false | {
17
+ x: any;
18
+ y: any;
19
+ };
20
+ };
21
+ constructor(config: any);
22
+ opacity: number;
23
+ _active: any[];
24
+ _eventPosition: any;
25
+ _size: {
26
+ width: number;
27
+ height: number;
28
+ };
29
+ _cachedAnimations: Readonly<Animations>;
30
+ _tooltipItems: any[];
31
+ $animations: any;
32
+ $context: any;
33
+ chart: any;
34
+ options: any;
35
+ dataPoints: {
36
+ chart: import("../core/core.controller.js").default;
37
+ label: any;
38
+ parsed: any;
39
+ raw: any;
40
+ formattedValue: any;
41
+ dataset: any;
42
+ dataIndex: number;
43
+ datasetIndex: number;
44
+ element: Element<import("../types/basic.js").AnyObject, import("../types/basic.js").AnyObject>;
45
+ }[];
46
+ title: any;
47
+ beforeBody: any;
48
+ body: any[];
49
+ afterBody: any;
50
+ footer: any;
51
+ xAlign: any;
52
+ yAlign: any;
53
+ x: any;
54
+ y: any;
55
+ height: number;
56
+ width: number;
57
+ caretX: any;
58
+ caretY: any;
59
+ labelColors: any[];
60
+ labelPointStyles: any[];
61
+ labelTextColors: any[];
62
+ initialize(options: any): void;
63
+ /**
64
+ * @private
65
+ */
66
+ private _resolveAnimations;
67
+ /**
68
+ * @protected
69
+ */
70
+ protected getContext(): any;
71
+ getTitle(context: any, options: any): any;
72
+ getBeforeBody(tooltipItems: any, options: any): any;
73
+ getBody(tooltipItems: any, options: any): any[];
74
+ getAfterBody(tooltipItems: any, options: any): any;
75
+ getFooter(tooltipItems: any, options: any): any;
76
+ /**
77
+ * @private
78
+ */
79
+ private _createItems;
80
+ update(changed: any, replay: any): void;
81
+ drawCaret(tooltipPoint: any, ctx: any, size: any, options: any): void;
82
+ getCaretPosition(tooltipPoint: any, size: any, options: any): {
83
+ x1: any;
84
+ x2: any;
85
+ x3: any;
86
+ y1: any;
87
+ y2: any;
88
+ y3: any;
89
+ };
90
+ drawTitle(pt: any, ctx: any, options: any): void;
91
+ /**
92
+ * @private
93
+ */
94
+ private _drawColorBox;
95
+ drawBody(pt: any, ctx: any, options: any): void;
96
+ drawFooter(pt: any, ctx: any, options: any): void;
97
+ drawBackground(pt: any, ctx: any, tooltipSize: any, options: any): void;
98
+ /**
99
+ * Update x/y animation targets when _active elements are animating too
100
+ * @private
101
+ */
102
+ private _updateAnimationTarget;
103
+ /**
104
+ * Determine if the tooltip will draw anything
105
+ * @returns {boolean} True if the tooltip will render
106
+ */
107
+ _willRender(): boolean;
108
+ draw(ctx: any): void;
109
+ /**
110
+ * Get active elements in the tooltip
111
+ * @returns {Array} Array of elements that are active in the tooltip
112
+ */
113
+ getActiveElements(): any[];
114
+ /**
115
+ * Set active elements in the tooltip
116
+ * @param {array} activeElements Array of active datasetIndex/index pairs.
117
+ * @param {object} eventPosition Synthetic event position used in positioning
118
+ */
119
+ setActiveElements(activeElements: any[], eventPosition: object): void;
120
+ _ignoreReplayEvents: boolean;
121
+ /**
122
+ * Handle an event
123
+ * @param {ChartEvent} e - The event to handle
124
+ * @param {boolean} [replay] - This is a replayed event (from update)
125
+ * @param {boolean} [inChartArea] - The event is inside chartArea
126
+ * @returns {boolean} true if the tooltip changed
127
+ */
128
+ handleEvent(e: ChartEvent, replay?: boolean, inChartArea?: boolean): boolean;
129
+ /**
130
+ * Helper for determining the active elements for event
131
+ * @param {ChartEvent} e - The event to handle
132
+ * @param {InteractionItem[]} lastActive - Previously active elements
133
+ * @param {boolean} [replay] - This is a replayed event (from update)
134
+ * @param {boolean} [inChartArea] - The event is inside chartArea
135
+ * @returns {InteractionItem[]} - Active elements
136
+ * @private
137
+ */
138
+ private _getActiveElements;
139
+ /**
140
+ * Determine if the active elements + event combination changes the
141
+ * tooltip position
142
+ * @param {array} active - Active elements
143
+ * @param {ChartEvent} e - Event that triggered the position change
144
+ * @returns {boolean} True if the position has changed
145
+ */
146
+ _positionChanged(active: any[], e: ChartEvent): boolean;
147
+ }
148
+ declare namespace _default {
149
+ export const id: string;
150
+ export { Tooltip as _element };
151
+ export { positioners };
152
+ export function afterInit(chart: any, _args: any, options: any): void;
153
+ export function beforeUpdate(chart: any, _args: any, options: any): void;
154
+ export function reset(chart: any, _args: any, options: any): void;
155
+ export function afterDraw(chart: any): void;
156
+ export function afterEvent(chart: any, args: any): void;
157
+ export namespace defaults {
158
+ export const enabled: boolean;
159
+ export const external: any;
160
+ export const position: string;
161
+ export const backgroundColor: string;
162
+ export const titleColor: string;
163
+ export namespace titleFont {
164
+ const weight: string;
165
+ }
166
+ export const titleSpacing: number;
167
+ export const titleMarginBottom: number;
168
+ export const titleAlign: string;
169
+ export const bodyColor: string;
170
+ export const bodySpacing: number;
171
+ export const bodyFont: {};
172
+ export const bodyAlign: string;
173
+ export const footerColor: string;
174
+ export const footerSpacing: number;
175
+ export const footerMarginTop: number;
176
+ export namespace footerFont {
177
+ const weight_1: string;
178
+ export { weight_1 as weight };
179
+ }
180
+ export const footerAlign: string;
181
+ export const padding: number;
182
+ export const caretPadding: number;
183
+ export const caretSize: number;
184
+ export const cornerRadius: number;
185
+ export function boxHeight(ctx: any, opts: any): any;
186
+ export function boxWidth(ctx: any, opts: any): any;
187
+ export const multiKeyBackground: string;
188
+ export const displayColors: boolean;
189
+ export const boxPadding: number;
190
+ export const borderColor: string;
191
+ export const borderWidth: number;
192
+ export namespace animation {
193
+ const duration: number;
194
+ const easing: string;
195
+ }
196
+ export namespace animations {
197
+ namespace numbers {
198
+ const type: string;
199
+ const properties: string[];
200
+ }
201
+ namespace opacity {
202
+ const easing_1: string;
203
+ export { easing_1 as easing };
204
+ const duration_1: number;
205
+ export { duration_1 as duration };
206
+ }
207
+ }
208
+ export { defaultCallbacks as callbacks };
209
+ }
210
+ export namespace defaultRoutes {
211
+ const bodyFont_1: string;
212
+ export { bodyFont_1 as bodyFont };
213
+ const footerFont_1: string;
214
+ export { footerFont_1 as footerFont };
215
+ const titleFont_1: string;
216
+ export { titleFont_1 as titleFont };
217
+ }
218
+ export namespace descriptors {
219
+ export function _scriptable(name: any): boolean;
220
+ export const _indexable: boolean;
221
+ export namespace callbacks {
222
+ const _scriptable_1: boolean;
223
+ export { _scriptable_1 as _scriptable };
224
+ const _indexable_1: boolean;
225
+ export { _indexable_1 as _indexable };
226
+ }
227
+ export namespace animation_1 {
228
+ const _fallback: boolean;
229
+ }
230
+ export { animation_1 as animation };
231
+ export namespace animations_1 {
232
+ const _fallback_1: string;
233
+ export { _fallback_1 as _fallback };
234
+ }
235
+ export { animations_1 as animations };
236
+ }
237
+ export const additionalOptionScopes: string[];
238
+ }
239
+ export default _default;
240
+ export type Chart = import('../platform/platform.base.js').Chart;
241
+ export type ChartEvent = import('../types/index.js').ChartEvent;
242
+ export type ActiveElement = import('../types/index.js').ActiveElement;
243
+ export type InteractionItem = import('../core/core.interaction.js').InteractionItem;
244
+ import Element from "../core/core.element.js";
245
+ import Animations from "../core/core.animations.js";
246
+ declare namespace positioners {
247
+ /**
248
+ * Average mode places the tooltip at the average position of the elements shown
249
+ */
250
+ function average(items: any): false | {
251
+ x: number;
252
+ y: number;
253
+ };
254
+ /**
255
+ * Gets the tooltip position nearest of the item nearest to the event position
256
+ */
257
+ function nearest(items: any, eventPosition: any): false | {
258
+ x: any;
259
+ y: any;
260
+ };
261
+ }
262
+ declare namespace defaultCallbacks {
263
+ export { noop as beforeTitle };
264
+ export function title(tooltipItems: any): any;
265
+ export { noop as afterTitle };
266
+ export { noop as beforeBody };
267
+ export { noop as beforeLabel };
268
+ export function label(tooltipItem: any): any;
269
+ export function labelColor(tooltipItem: any): {
270
+ borderColor: any;
271
+ backgroundColor: any;
272
+ borderWidth: any;
273
+ borderDash: any;
274
+ borderDashOffset: any;
275
+ borderRadius: number;
276
+ };
277
+ export function labelTextColor(): any;
278
+ export function labelPointStyle(tooltipItem: any): {
279
+ pointStyle: any;
280
+ rotation: any;
281
+ };
282
+ export { noop as afterLabel };
283
+ export { noop as afterBody };
284
+ export { noop as beforeFooter };
285
+ export { noop as footer };
286
+ export { noop as afterFooter };
287
+ }
288
+ import { noop } from "../helpers/helpers.core.js";
@@ -0,0 +1,6 @@
1
+ export { default as CategoryScale } from "./scale.category.js";
2
+ export { default as LinearScale } from "./scale.linear.js";
3
+ export { default as LogarithmicScale } from "./scale.logarithmic.js";
4
+ export { default as RadialLinearScale } from "./scale.radialLinear.js";
5
+ export { default as TimeScale } from "./scale.time.js";
6
+ export { default as TimeSeriesScale } from "./scale.timeseries.js";