@thoughtspot/ts-chart-sdk 0.0.1-alpha.1 → 0.0.1-alpha.10

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.
Files changed (109) hide show
  1. package/cjs/index.d.ts +1 -0
  2. package/cjs/index.d.ts.map +1 -1
  3. package/cjs/index.js +1 -0
  4. package/cjs/index.js.map +1 -1
  5. package/cjs/main/custom-chart-context.d.ts +10 -2
  6. package/cjs/main/custom-chart-context.d.ts.map +1 -1
  7. package/cjs/main/custom-chart-context.js +117 -2
  8. package/cjs/main/custom-chart-context.js.map +1 -1
  9. package/cjs/main/custom-chart-context.spec.js +320 -0
  10. package/cjs/main/custom-chart-context.spec.js.map +1 -1
  11. package/cjs/main/post-message-event-bridge.js +1 -1
  12. package/cjs/main/post-message-event-bridge.js.map +1 -1
  13. package/cjs/main/post-message-event-bridge.spec.js +5 -3
  14. package/cjs/main/post-message-event-bridge.spec.js.map +1 -1
  15. package/cjs/react/mocks/custom-chart-context-mock.d.ts +3 -0
  16. package/cjs/react/mocks/custom-chart-context-mock.d.ts.map +1 -0
  17. package/cjs/react/mocks/custom-chart-context-mock.js +100 -0
  18. package/cjs/react/mocks/custom-chart-context-mock.js.map +1 -0
  19. package/cjs/react/use-custom-chart-context.d.ts +4 -0
  20. package/cjs/react/use-custom-chart-context.d.ts.map +1 -0
  21. package/cjs/react/use-custom-chart-context.js +95 -0
  22. package/cjs/react/use-custom-chart-context.js.map +1 -0
  23. package/cjs/react/use-custom-chart-context.spec.d.ts +2 -0
  24. package/cjs/react/use-custom-chart-context.spec.d.ts.map +1 -0
  25. package/cjs/react/use-custom-chart-context.spec.js +391 -0
  26. package/cjs/react/use-custom-chart-context.spec.js.map +1 -0
  27. package/cjs/react/use-custom-chart-context.util.d.ts +6 -0
  28. package/cjs/react/use-custom-chart-context.util.d.ts.map +1 -0
  29. package/cjs/react/use-custom-chart-context.util.js +60 -0
  30. package/cjs/react/use-custom-chart-context.util.js.map +1 -0
  31. package/cjs/react/use-custom-chart-types.d.ts +23 -0
  32. package/cjs/react/use-custom-chart-types.d.ts.map +1 -0
  33. package/cjs/react/use-custom-chart-types.js +3 -0
  34. package/cjs/react/use-custom-chart-types.js.map +1 -0
  35. package/cjs/types/chart-to-ts-event.types.d.ts +54 -4
  36. package/cjs/types/chart-to-ts-event.types.d.ts.map +1 -1
  37. package/cjs/types/chart-to-ts-event.types.js +14 -1
  38. package/cjs/types/chart-to-ts-event.types.js.map +1 -1
  39. package/cjs/types/common.types.d.ts +2 -0
  40. package/cjs/types/common.types.d.ts.map +1 -1
  41. package/cjs/types/ts-to-chart-event.types.d.ts +23 -1
  42. package/cjs/types/ts-to-chart-event.types.d.ts.map +1 -1
  43. package/cjs/types/ts-to-chart-event.types.js +2 -0
  44. package/cjs/types/ts-to-chart-event.types.js.map +1 -1
  45. package/cjs/types/visual-prop.types.d.ts +27 -1
  46. package/cjs/types/visual-prop.types.d.ts.map +1 -1
  47. package/dist/ts-chart-sdk.d.ts +151 -23
  48. package/lib/index.d.ts +1 -0
  49. package/lib/index.d.ts.map +1 -1
  50. package/lib/index.js +1 -0
  51. package/lib/index.js.map +1 -1
  52. package/lib/main/custom-chart-context.d.ts +10 -2
  53. package/lib/main/custom-chart-context.d.ts.map +1 -1
  54. package/lib/main/custom-chart-context.js +118 -3
  55. package/lib/main/custom-chart-context.js.map +1 -1
  56. package/lib/main/custom-chart-context.spec.js +317 -0
  57. package/lib/main/custom-chart-context.spec.js.map +1 -1
  58. package/lib/main/post-message-event-bridge.js +1 -1
  59. package/lib/main/post-message-event-bridge.js.map +1 -1
  60. package/lib/main/post-message-event-bridge.spec.js +5 -3
  61. package/lib/main/post-message-event-bridge.spec.js.map +1 -1
  62. package/lib/react/mocks/custom-chart-context-mock.d.ts +3 -0
  63. package/lib/react/mocks/custom-chart-context-mock.d.ts.map +1 -0
  64. package/lib/react/mocks/custom-chart-context-mock.js +94 -0
  65. package/lib/react/mocks/custom-chart-context-mock.js.map +1 -0
  66. package/lib/react/use-custom-chart-context.d.ts +4 -0
  67. package/lib/react/use-custom-chart-context.d.ts.map +1 -0
  68. package/lib/react/use-custom-chart-context.js +68 -0
  69. package/lib/react/use-custom-chart-context.js.map +1 -0
  70. package/lib/react/use-custom-chart-context.spec.d.ts +2 -0
  71. package/lib/react/use-custom-chart-context.spec.d.ts.map +1 -0
  72. package/lib/react/use-custom-chart-context.spec.js +363 -0
  73. package/lib/react/use-custom-chart-context.spec.js.map +1 -0
  74. package/lib/react/use-custom-chart-context.util.d.ts +6 -0
  75. package/lib/react/use-custom-chart-context.util.d.ts.map +1 -0
  76. package/lib/react/use-custom-chart-context.util.js +51 -0
  77. package/lib/react/use-custom-chart-context.util.js.map +1 -0
  78. package/lib/react/use-custom-chart-types.d.ts +23 -0
  79. package/lib/react/use-custom-chart-types.d.ts.map +1 -0
  80. package/lib/react/use-custom-chart-types.js +2 -0
  81. package/lib/react/use-custom-chart-types.js.map +1 -0
  82. package/lib/types/chart-to-ts-event.types.d.ts +54 -4
  83. package/lib/types/chart-to-ts-event.types.d.ts.map +1 -1
  84. package/lib/types/chart-to-ts-event.types.js +13 -0
  85. package/lib/types/chart-to-ts-event.types.js.map +1 -1
  86. package/lib/types/common.types.d.ts +2 -0
  87. package/lib/types/common.types.d.ts.map +1 -1
  88. package/lib/types/ts-to-chart-event.types.d.ts +23 -1
  89. package/lib/types/ts-to-chart-event.types.d.ts.map +1 -1
  90. package/lib/types/ts-to-chart-event.types.js +2 -0
  91. package/lib/types/ts-to-chart-event.types.js.map +1 -1
  92. package/lib/types/visual-prop.types.d.ts +27 -1
  93. package/lib/types/visual-prop.types.d.ts.map +1 -1
  94. package/package.json +8 -2
  95. package/src/index.ts +1 -0
  96. package/src/main/custom-chart-context.spec.ts +426 -0
  97. package/src/main/custom-chart-context.ts +244 -3
  98. package/src/main/post-message-event-bridge.spec.ts +5 -3
  99. package/src/main/post-message-event-bridge.ts +1 -1
  100. package/src/react/mocks/custom-chart-context-mock.ts +114 -0
  101. package/src/react/use-custom-chart-context.spec.tsx +464 -0
  102. package/src/react/use-custom-chart-context.tsx +180 -0
  103. package/src/react/use-custom-chart-context.util.ts +101 -0
  104. package/src/react/use-custom-chart-types.ts +70 -0
  105. package/src/types/chart-to-ts-event.types.ts +215 -3
  106. package/src/types/common.types.ts +15 -1
  107. package/src/types/ts-to-chart-event.types.ts +70 -0
  108. package/src/types/visual-prop.types.ts +137 -0
  109. package/lib/dist/ts-chart-sdk.d.ts +0 -312
@@ -8,6 +8,60 @@
8
8
  * Copyright: ThoughtSpot Inc. 2023
9
9
  */
10
10
 
11
+ /**
12
+ * Configuration for input validation rules
13
+ */
14
+ export interface InputValidation {
15
+ /**
16
+ * Determines if the input is required.
17
+ *
18
+ * @version SDK: 0.0.1-alpha.3 | ThoughtSpot:
19
+ */
20
+ required?: boolean;
21
+ /**
22
+ * Error message to display when input is required but not provided.
23
+ *
24
+ * @version SDK: 0.0.1-alpha.3 | ThoughtSpot:
25
+ */
26
+ requiredError?: string;
27
+ /**
28
+ * Regular expression pattern to validate the input against.
29
+ *
30
+ * @version SDK: 0.0.1-alpha.3 | ThoughtSpot:
31
+ */
32
+ regex?: string;
33
+ /**
34
+ * Error message to display when input doesn't match the regex pattern.
35
+ *
36
+ * @version SDK: 0.0.1-alpha.3 | ThoughtSpot:
37
+ */
38
+ regexError?: string;
39
+ /**
40
+ * Minimum length required for the input.
41
+ *
42
+ * @version SDK: 0.0.1-alpha.3 | ThoughtSpot:
43
+ */
44
+ minLength?: number;
45
+ /**
46
+ * Error message to display when input length is less than the required minimum.
47
+ *
48
+ * @version SDK: 0.0.1-alpha.3 | ThoughtSpot:
49
+ */
50
+ minLengthError?: string;
51
+ /**
52
+ * Range of values allowed for the input.
53
+ *
54
+ * @version SDK: 0.0.1-alpha.3 | ThoughtSpot:
55
+ */
56
+ range?: string;
57
+ /**
58
+ * Error message to display when input value is outside the allowed range.
59
+ *
60
+ * @version SDK: 0.0.1-alpha.3 | ThoughtSpot:
61
+ */
62
+ rangeError?: string;
63
+ }
64
+
11
65
  /**
12
66
  * Text Form Element for the visual props editor
13
67
  *
@@ -53,6 +107,79 @@ export interface TextInputFormDetail {
53
107
  * @version SDK: 0.1 | ThoughtSpot:
54
108
  */
55
109
  defaultValue?: string;
110
+ /**
111
+ * inputValidation config for input field
112
+ *
113
+ * @version SDK: 0.0.1-alpha.3 | ThoughtSpot:
114
+ */
115
+ inputValidation?: InputValidation;
116
+ }
117
+
118
+ /**
119
+ * Number Form Element for the visual props editor
120
+ *
121
+ * @group Visual Properties Editor
122
+ */
123
+ export interface NumberInputFormDetail {
124
+ type: 'number';
125
+ /**
126
+ * Key to store the value
127
+ *
128
+ * @version SDK: 0.0.1-alpha.7 | ThoughtSpot:
129
+ */
130
+ key: string;
131
+ /**
132
+ * I18n'ed string to show on the form label
133
+ *
134
+ * @version SDK: 0.0.1-alpha.7 | ThoughtSpot:
135
+ */
136
+ label?: string;
137
+ /**
138
+ * Default value
139
+ *
140
+ * @version SDK: 0.0.1-alpha.7 | ThoughtSpot:
141
+ */
142
+ defaultValue?: number;
143
+ /**
144
+ * inputValidation config for input field
145
+ *
146
+ * @version SDK: 0.0.1-alpha.7 | ThoughtSpot:
147
+ */
148
+ inputValidation?: InputValidation;
149
+ }
150
+
151
+ /**
152
+ * Color Picker Form Element for the visual props editor
153
+ *
154
+ * @group Visual Properties Editor
155
+ */
156
+ export interface ColorPickerFormDetail {
157
+ type: 'colorpicker';
158
+ /**
159
+ * Key to store the value
160
+ *
161
+ * @version SDK: 0.0.1-alpha.7 | ThoughtSpot:
162
+ */
163
+ key: string;
164
+ /**
165
+ * I18n'ed string to show on the form label
166
+ *
167
+ * @version SDK: 0.0.1-alpha.7 | ThoughtSpot:
168
+ */
169
+ label?: string;
170
+ /**
171
+ * Display selected color with font or with color only
172
+ *
173
+ * @default COLOR
174
+ * @version SDK: 0.0.1-alpha.7 | ThoughtSpot:
175
+ */
176
+ selectorType?: 'FONT' | 'COLOR';
177
+ /**
178
+ * Default value
179
+ *
180
+ * @version SDK: 0.0.1-alpha.7 | ThoughtSpot:
181
+ */
182
+ defaultValue?: string;
56
183
  }
57
184
 
58
185
  /**
@@ -206,6 +333,14 @@ export interface Section {
206
333
  * @version SDK: 0.1 | ThoughtSpot:
207
334
  */
208
335
  alignment?: 'row' | 'column';
336
+ /**
337
+ * Defines form layout in the view for the section.
338
+ * default will be 'accordion' for first section if nothing specified
339
+ * and will be 'none' for all nested section.
340
+ *
341
+ * @version SDK: 0.0.1-alpha.3 | ThoughtSpot:
342
+ */
343
+ layoutType?: 'accordion' | 'tab' | 'none';
209
344
  }
210
345
 
211
346
  /**
@@ -216,6 +351,8 @@ export interface Section {
216
351
  export type PropElement =
217
352
  | Section
218
353
  | TextInputFormDetail
354
+ | NumberInputFormDetail
355
+ | ColorPickerFormDetail
219
356
  | ToggleFormDetail
220
357
  | CheckboxFormDetail
221
358
  | RadioButtonFormDetail
@@ -1,312 +0,0 @@
1
- // Generated by dts-bundle v0.7.3
2
-
3
- export interface ChartConfigDimension {
4
- key: string;
5
- columns: ChartColumn[];
6
- }
7
- export interface ChartConfig {
8
- key: string;
9
- dimensions: ChartConfigDimension[];
10
- }
11
- export type DataArray = {
12
- columnId: string;
13
- columnDataType: DataType;
14
- dataValue: any[];
15
- };
16
- export type QueryData = {
17
- data: DataArray[];
18
- completionRatio: number;
19
- samplingRatio: number;
20
- totalRowCount: number;
21
- };
22
- export interface ChartModel {
23
- columns: ChartColumn[];
24
- data?: QueryData[];
25
- sortInfo?: any;
26
- visualProps?: VisualProps;
27
- config: {
28
- chartConfig?: ChartConfig[];
29
- };
30
- }
31
- export type ValidationResponse = {
32
- isValid: boolean;
33
- validationErrorMessage?: string[];
34
- };
35
- export type VisualProps = JSON;
36
- type CustomStylingConfig = any;
37
- export interface AppConfig {
38
- styleConfig?: CustomStylingConfig;
39
- appOptions?: {
40
- isMobile?: boolean;
41
- isPrintMode?: boolean;
42
- isDebugMode?: boolean;
43
- };
44
- localeOptions?: {
45
- locale: string;
46
- quarterStartMonth: string;
47
- sessionTimezone: string;
48
- };
49
- customCalendarConfig?: any;
50
- }
51
- export {};
52
-
53
- export interface ChartConfigSection {
54
- key: string;
55
- label: string;
56
- maxColumnCount?: number;
57
- allowMeasureColumns?: boolean;
58
- allowAttributeColumns?: boolean;
59
- allowTimeSeriesColumns?: boolean;
60
- }
61
- export interface ChartConfigEditorDefinition {
62
- key: string;
63
- label?: string;
64
- descriptionText?: string;
65
- columnSections: ChartConfigSection[];
66
- }
67
-
68
- export interface TextInputFormDetail {
69
- type: 'text';
70
- key: string;
71
- label?: string;
72
- password?: boolean;
73
- multiline?: boolean;
74
- placeholder?: string;
75
- defaultValue?: string;
76
- }
77
- export interface ToggleFormDetail {
78
- type: 'toggle';
79
- key: string;
80
- label?: string;
81
- defaultValue?: boolean;
82
- }
83
- export interface CheckboxFormDetail {
84
- type: 'checkbox';
85
- key: string;
86
- label?: string;
87
- defaultValue?: boolean;
88
- }
89
- export interface RadioButtonFormDetail {
90
- type: 'radio';
91
- key: string;
92
- label?: string;
93
- defaultValue?: string;
94
- values: string[];
95
- }
96
- export interface DropDownFormDetail {
97
- type: 'dropdown';
98
- key: string;
99
- label?: string;
100
- defaultValue?: string;
101
- values: string[];
102
- }
103
- export interface Section {
104
- type: 'section';
105
- key: string;
106
- label?: string;
107
- children?: PropElement[];
108
- alignment?: 'row' | 'column';
109
- }
110
- export type PropElement = Section | TextInputFormDetail | ToggleFormDetail | CheckboxFormDetail | RadioButtonFormDetail | DropDownFormDetail;
111
- export interface VisualPropEditorDefinition {
112
- elements: PropElement[];
113
- }
114
-
115
- export enum ColumnType {
116
- UNKNOWN = 0,
117
- MEASURE = 1,
118
- ATTRIBUTE = 2
119
- }
120
- export enum DataType {
121
- UNKNOWN = 0,
122
- BOOL = 1,
123
- CHAR = 2,
124
- INT32 = 3,
125
- INT64 = 4,
126
- FLOAT = 5,
127
- DOUBLE = 6,
128
- DATE = 7,
129
- DATE_TIME = 8,
130
- TIME = 9,
131
- MAX_TYPE = 10
132
- }
133
- export enum ColumnTimeBucket {
134
- NO_BUCKET = 0,
135
- DAILY = 1,
136
- WEEKLY = 2,
137
- MONTHLY = 3,
138
- QUARTERLY = 4,
139
- YEARLY = 5,
140
- HOURLY = 6,
141
- AUTO = 7,
142
- HOUR_OF_DAY = 8,
143
- DAY_OF_WEEK = 9,
144
- DAY_OF_MONTH = 10,
145
- DAY_OF_QUARTER = 11,
146
- DAY_OF_YEAR = 12,
147
- WEEK_OF_MONTH = 13,
148
- WEEK_OF_QUARTER = 14,
149
- WEEK_OF_YEAR = 15,
150
- MONTH_OF_QUARTER = 16,
151
- MONTH_OF_YEAR = 17,
152
- QUARTER_OF_YEAR = 18
153
- }
154
- export enum FormatType {
155
- NONE = 0,
156
- PATTERN = 1,
157
- PERCENTAGE = 2,
158
- CURRENCY = 3
159
- }
160
- export enum CurrencyFormatType {
161
- USER_LOCALE = 0,
162
- COLUMN = 1,
163
- ISO_CODE = 2
164
- }
165
- export interface CurrencyFormat {
166
- type: CurrencyFormatType;
167
- column: string;
168
- isoCode: string;
169
- }
170
- export interface ColumnFormat {
171
- type: FormatType;
172
- pattern?: string;
173
- currencyFormat?: CurrencyFormat;
174
- }
175
- export interface ChartColumn {
176
- id: string;
177
- name: string;
178
- type: ColumnType;
179
- timeBucket: ColumnTimeBucket;
180
- dataType: DataType;
181
- format?: ColumnFormat;
182
- }
183
-
184
- export enum ChartToTSEvent {
185
- OpenContextMenu = "OpenContextMenu",
186
- CloseContextMenu = "CloseContextMenu",
187
- OpenAxisMenu = "OpenAxisMenu",
188
- CloseAxisMenu = "CloseAxisMenu",
189
- RenderStart = "RenderStart",
190
- RenderError = "RenderError",
191
- RenderComplete = "RenderComplete",
192
- UpdateVisualProps = "UpdateVisualProps"
193
- }
194
- export interface ChartToTSEventsPayloadMap {
195
- [ChartToTSEvent.OpenContextMenu]: OpenContextMenuEventPayload;
196
- [ChartToTSEvent.CloseContextMenu]: null;
197
- [ChartToTSEvent.RenderStart]: null;
198
- [ChartToTSEvent.RenderComplete]: null;
199
- [ChartToTSEvent.RenderError]: RenderErrorEventPayload;
200
- [ChartToTSEvent.UpdateVisualProps]: UpdateVisualPropsEventPayload;
201
- }
202
- type UpdateVisualPropsEventPayload = VisualProps;
203
- export interface PointVal {
204
- columnId: string;
205
- value: any;
206
- }
207
- export interface Point {
208
- tuple: PointVal[];
209
- }
210
- export interface CustomAction {
211
- id: string;
212
- label: string;
213
- icon: string;
214
- onClick: (...args: any[]) => void;
215
- }
216
- export interface OpenContextMenuEventPayload {
217
- event: Pick<PointerEvent, 'x' | 'y' | 'clientX' | 'clientY' | 'pageX' | 'pageY' | 'screenX' | 'screenY'>;
218
- clickedPoint: Point;
219
- selectedPoints?: Point[];
220
- customActions?: CustomAction[];
221
- }
222
- interface RenderErrorEventPayload {
223
- hasError: boolean;
224
- error: any;
225
- }
226
- export enum ErrorType {
227
- MultipleContextsNotSupported = "MultipleContextsNotSupported"
228
- }
229
- export {};
230
-
231
- export enum TSToChartEvent {
232
- Initialize = "Initialize",
233
- GetDataQuery = "GetDataQuery",
234
- ChartConfigValidate = "ChartConfigValidate",
235
- ChartModelUpdate = "ChartModelUpdate",
236
- DataUpdate = "DataUpdate",
237
- TriggerRenderChart = "TriggerRenderChart",
238
- VisualPropsValidate = "VisualPropsValidate",
239
- VisualPropsUpdate = "VisualPropsUpdate"
240
- }
241
- export interface TSToChartEventsPayloadMap {
242
- [TSToChartEvent.ChartModelUpdate]: (payload: ChartModelUpdateEventPayload) => void;
243
- [TSToChartEvent.DataUpdate]: (payload: DataUpdateEventPayload) => void;
244
- [TSToChartEvent.VisualPropsUpdate]: (payload: VisualPropsUpdateEventPayload) => void;
245
- }
246
- export interface TSToChartInternalEventsPayloadMap {
247
- [TSToChartEvent.Initialize]: (payload: InitializeEventPayload) => InitializeEventResponsePayload;
248
- [TSToChartEvent.GetDataQuery]: (payload: GetDataQueryPayload) => GetDataQueryResponsePayload;
249
- [TSToChartEvent.ChartConfigValidate]: (payload: ChartConfigValidateEventPayload) => ValidationResponse;
250
- [TSToChartEvent.VisualPropsValidate]: (payload: VisualPropsValidateEventPayload) => ValidationResponse;
251
- [TSToChartEvent.TriggerRenderChart]: () => void;
252
- }
253
- export interface InitializeEventPayload {
254
- chartModel: ChartModel;
255
- appConfig?: AppConfig;
256
- componentId: string;
257
- hostUrl: string;
258
- }
259
- export interface InitializeEventResponsePayload {
260
- isConfigValid: boolean;
261
- defaultChartConfig: ChartConfig[];
262
- chartConfigEditorDefinition?: ChartConfigEditorDefinition[];
263
- visualPropEditorDefinition?: VisualPropEditorDefinition;
264
- }
265
- export interface GetDataQueryPayload {
266
- config: ChartConfig[];
267
- }
268
- export interface Query {
269
- queryColumns: ChartColumn[];
270
- queryParams?: {
271
- offset?: number;
272
- size?: number;
273
- };
274
- }
275
- export interface GetDataQueryResponsePayload {
276
- queries: Query[];
277
- }
278
- export interface ChartModelUpdateEventPayload {
279
- chartModel: ChartModel;
280
- }
281
- export interface DataUpdateEventPayload {
282
- data: QueryData[];
283
- }
284
- export interface VisualPropsUpdateEventPayload {
285
- visualProps: VisualProps;
286
- }
287
- export interface VisualPropsValidateEventPayload {
288
- visualProps: VisualProps;
289
- }
290
- export interface ChartConfigValidateEventPayload {
291
- chartConfig: ChartConfig[];
292
- }
293
-
294
- export type CustomChartContextProps = {
295
- getDefaultChartConfig: (chartModel: ChartModel) => ChartConfig[];
296
- getQueriesFromChartConfig: (chartConfig: ChartConfig[]) => Query[];
297
- renderChart: (ctx: CustomChartContext) => Promise<void>;
298
- validateConfig?: (updatedConfig: ChartConfig[], chartModel: ChartModel) => ValidationResponse;
299
- validateVisualProps?: (updatedVisualProps: VisualProps, chartModel: ChartModel) => ValidationResponse;
300
- chartConfigEditorDefinition?: ChartConfigEditorDefinition[];
301
- visualPropEditorDefinition?: VisualPropEditorDefinition;
302
- };
303
- export class CustomChartContext {
304
- constructor(chartContextProps: CustomChartContextProps);
305
- initialize: () => Promise<void>;
306
- on<T extends keyof TSToChartEventsPayloadMap>(eventType: T, callbackFn: TSToChartEventsPayloadMap[T]): void;
307
- destroy(): void;
308
- getChartModel: () => ChartModel;
309
- emitEvent<T extends keyof ChartToTSEventsPayloadMap>(eventType: T, eventPayload: ChartToTSEventsPayloadMap[T]): Promise<any>;
310
- }
311
- export const getChartContext: (customChartConfig: CustomChartContextProps) => Promise<CustomChartContext>;
312
-