· 5 years ago · May 21, 2020, 02:24 PM
1/** TypeScript definition file for ZoomCharts 1.18.12 */
2
3declare module ZoomCharts.Configuration {
4 /* tslint:disable */
5
6 export interface IGeoRectangle {
7 east: number;
8 north: number;
9 south: number;
10 west: number;
11 }
12 export abstract class BaseApi {
13 /** Adds the given data to whatever data the chart has currently loaded. The chart will automatically be updated
14 to display this new data if it falls within the currently visible bounds. */
15 public addData(data: BaseDataObjectBase,
16 /** the ID of the data source that will be updated. The default value is `default`. */
17 sourceId?: string): void;
18 /**
19 @deprecated use settings.parentChart instead. */
20 public addSubchartContainer(container: HTMLElement): void;
21 public back(): this;
22 public clearHistory(): this;
23 /** Applies one of the built-in themes to the chart. This is an alternative to calling
24 `updateSettings({ theme: ZoomCharts.$this.themes.dark })`. */
25 public customize(
26 /** The name of the theme to be applied, must be one of the values defined in the `$this.themes` static property. */
27 name: string): this;
28 /** Launches a file download that contains an image or the data of the current state of the chart.
29
30 Note that in some browsers calling this method will send the data to a proxy. When handling sensitive data you should install the proxy
31 on your own server, see `advanced.exportProxyURL` setting. */
32 public export(
33 /** The format in which the data will be exported. */
34 type: "png" | "jpg" | "pdf" | "csv" | "xlsx",
35 /** Specifies the dimensions for the image formats. */
36 dimensions?: BaseExportDimensions,
37 /** Specifies if the resulting image should have transparent background. This setting is only valid for `png` image format. Default is `false`.
38
39 Note that if `area.style.fillColor` is set, this will have no effect. */
40 transparent?: boolean): void;
41 /** Saves the current chart state as a data-URI.
42
43 If image type is specified, the URI can be used as the image source in `<img src="">`.
44
45 Note that some output settings might require sending the data to a proxy. When handling sensitive data you should install the proxy
46 on your own server, see `advanced.exportProxyURL` setting. */
47 public exportAsString(
48 /** The format in which the data will be exported. */
49 type: "png" | "jpg" | "pdf" | "csv" | "xlsx",
50 /** The callback that will be invoked once the result is generated. */
51 callback: (
52 /** The data-uri that contains the generated image or data file. */
53 dataUri: string,
54 /** The mime type of the generated file. */
55 mimeType: string,
56 /** The extension of the generated file. */
57 extension: string) => void,
58 /** Specifies the dimensions for the image formats. */
59 dimensions?: BaseExportDimensions,
60 /** Specifies if the resulting image should have transparent background. This setting is only valid for `png` image format. Default is `false`.
61
62 Note that if `area.style.fillColor` is set, this will have no effect. */
63 transparent?: boolean): void;
64 /** Returns the dimensions for the image exported with `exportImageAsString`.
65 @deprecated use `exportImageGetDimensions` instead */
66 public exportGetDimensions(dimensions: BaseExportDimensions): {
67 width: number;
68 height: number;
69 scale: number;
70 chartWidth: number;
71 chartHeight: number;
72 };
73 /** Saves the current chart state as an image.
74
75 Note that this method does not support custom DPI setting, for that `exportAsString` method has to be used.
76 @deprecated use `exportAsString` instead. */
77 public exportImageAsString(type: "png" | "jpg" | "pdf" | "csv" | "xlsx", dimensions: BaseExportDimensions, transparent: boolean): string;
78 /** Returns the dimensions for the image exported with `exportImageAsString`. */
79 public exportImageGetDimensions(dimensions: BaseExportDimensions): {
80 width: number;
81 height: number;
82 scale: number;
83 chartWidth: number;
84 chartHeight: number;
85 };
86 /** Gets or sets the fullscreen state of the chart. */
87 public fullscreen(
88 /** specify `true` or `false` to set the state, omit the value to get the current state. */
89 isFullscreen?: boolean): boolean;
90 public home(): boolean;
91 /** Removes an event listener that was added by a call to `on` or by specifying it in settings.
92 Note that the listener must be the exact same reference, which means that anonymous functions should not be used in call to `on`. */
93 public off(
94 /** the type of the event. Please see the documentation for `on` about valid values. */
95 name: string, listener: (event: BaseMouseEvent, args: BaseChartEventArguments) => void): boolean;
96 /** Adds event listener. */
97 public on(
98 /** The type of the event for which the listener will be added. See method overloads for valid values. */
99 name: string,
100 /** The callback function. It receives two arguments - the mouse event data and a separate object containing chart specific information. */
101 listener: (event: BaseMouseEvent, args: BaseChartEventArguments) => void): void;
102 /** Adds an event listener for when the current view has changed (usually after panning and navigation). */
103 public on(name: "chartUpdate", listener: (event: BaseMouseEvent, args: BaseChartEventArguments) => void): void;
104 /** Adds an event listener for the mouse click (or touch tap) event. */
105 public on(name: "click", listener: (event: BaseMouseEvent, args: BaseChartEventArguments) => void): void;
106 /** Adds an event listener for the mouse double click (or touch double tap) event. */
107 public on(name: "doubleClick", listener: (event: BaseMouseEvent, args: BaseChartEventArguments) => void): void;
108 /** Adds an event listener for the mouse click (or touch tap) event. */
109 public on(name: "error", listener: (
110 /** An empty mouse event. */
111 event: BaseMouseEvent, args: BaseChartErrorEventArguments) => void): void;
112 /** Adds an event listener for when the currently hovered item has changed. */
113 public on(name: "hoverChange", listener: (event: BaseMouseEvent, args: BaseChartEventArguments) => void): void;
114 /** Adds an event listener for pointer down event. */
115 public on(name: "pointerDown", listener: (event: BaseMouseEvent, args: BaseChartEventArguments) => void): void;
116 /** Adds an event listener for pointer down event. */
117 public on(name: "dataUpdated", listener: (event: BaseMouseEvent, args: BaseChartEventArguments) => void): void;
118 /** Adds an event listener for when chart placement on screen changes. Note that this is called on every animation frame. */
119 public on(name: "positionChange", listener: (event: BaseMouseEvent, args: BaseChartEventArguments) => void): void;
120 /** Adds an event listener for the mouse right click (or touch longpress) event. */
121 public on(name: "rightClick", listener: (event: BaseMouseEvent, args: BaseChartEventArguments) => void): void;
122 /** Adds an event listener for when the currently selected item or items have changed. */
123 public on(name: "selectionChange", listener: (event: BaseMouseEvent, args: BaseChartEventArguments) => void): void;
124 /** Adds an event listener for when the settings are updated through the API. */
125 public on(name: "settingsChange", listener: (event: BaseMouseEvent, args: BaseChartSettingsChangeEventArguments) => void): void;
126 /** Adds an event listener for the mouse triple click (or touch triple tap) event. */
127 public on(name: "tripleClick", listener: (event: BaseMouseEvent, args: BaseChartEventArguments) => void): void;
128 /** Does immediate repaint. Use to sync updates between multiple charts. */
129 public paintNow(force?: boolean): this;
130 public profiler(): BaseProfiler;
131 /** Clears data cache and loads new data. The current view is preserved. */
132 public reloadData(sourceId?: string): void;
133 /** Removes chart from DOM. This method is automatically called when you create a new chart within the same container element.
134
135 This method should always be called when the chart HTML element is removed as otherwise there might be additional resources such
136 as event handlers remaining that will prevent the browser from properly releasing memory. */
137 public remove(): void;
138 /** Replaces the data already in the data cache with the given values. */
139 public replaceData(data: BaseDataObjectBase,
140 /** the ID of the data source that will be updated. The default value is `default`. */
141 sourceId?: string): void;
142 /** Updates the chart settings but instead of merging some settings that are arrays or dictionaries (such as `data`)
143 these collections are replaced completely. For example, this allows removal of series or value axis within TimeChart. */
144 public replaceSettings(changes: BaseSettings): this;
145 public restoreState(state: string, animate?: boolean): void;
146 /** Decrements the suspend counter that was set using `suspendPaint()` method.
147
148 This method also automatically schedules an async repaint. */
149 public resumePaint(): void;
150 /** Saves the current chart state as an image.
151 @deprecated use `exportAsString` instead */
152 public saveAsImage(type: "png" | "jpg" | "pdf" | "csv" | "xlsx", dimensions: BaseExportDimensions, transparent: boolean): string;
153 public saveState(): string;
154 /** Suspends the animation of the chart until `resumePaint()` is called.
155
156 This should be used when the chart element is hidden from the user to conserve browser resources.
157
158 Note that if `suspendPaint()` is called multiple time then `resumePaint()` has to be called the same number of times. */
159 public suspendPaint(): void;
160 /** Gets the name of the chart the JavaScript object references. For example 'PieChart' or 'TimeChart'. This field is read-only. */
161 public typeName: string;
162 /** Re-evaluate data filters on next paint. */
163 public updateFilters(): void;
164 /** Updates the chart settings. Only the settings that have to be changed should be passed. Note that some arrays
165 and dictionaries (such as `data`) are merged by the ID values - if instead they should be replaced, use
166 [`replaceSettings()`](#doc_replaceSettings) method. */
167 public updateSettings(changes: BaseSettings): this;
168 /** Call when the container size has been changed to update the chart. */
169 public updateSize(): this;
170 /** Re-evaluate style for all objects on next paint. */
171 public updateStyle(): void;
172 }
173 /** Describes the base properties shared between all events raised by the different charts. */
174 export interface BaseChartErrorEventArguments extends BaseChartEventArguments {
175 /** Any additional arguments that were passed to the error handler. */
176 arg: any;
177 /** The error message. */
178 message: string;
179 }
180 /** Describes the base properties shared between all events raised by the different charts. */
181 export interface BaseChartEventArguments {
182 /** The chart object for which the event has been raised. */
183 chart: BaseApi;
184 clickCredits?: boolean;
185 credits?: {
186 url: string;
187 urlTarget: string;
188 };
189 origin: string;
190 }
191 /** Describes the base properties shared between all events raised by the different charts. */
192 export interface BaseChartSettingsChangeEventArguments extends BaseChartEventArguments {
193 changes?: BaseSettings;
194 }
195 export interface BaseDataErrorResponse extends BaseDataObjectBase {
196 /** If the data could not be retrieved, this field can be used to instruct the chart to cancel the data request and log an error.
197 Note that in most cases this field should not be used in favor of returning the correct HTTP status code (such as 404 or 500) so that
198 the browser and any proxies do not cache the response. */
199 error?: string;
200 }
201 export interface BaseDataObjectBase {
202 /** Store any additional data values within this field. Although it is possible to extend the data object itself with additional fields
203 it is not recommended to do so because a future ZoomCharts version could introduce a known parameter with the same name thus changing the
204 behavior of an existing chart. */
205 extra?: any;
206 }
207 export interface BaseExportDimensions {
208 /** Specifies the DPI setting used to calculate the pixel size if `unit` is specified as `mm`.
209
210 Note that because of browser API limits the metadata of the resulting image will always specify `DPI=96` even
211 though the pixel size will be calculated correctly. */
212 dpi?: number;
213 /** Specifies the width of the resulting image. If not given, the current width of the chart element
214 is used instead.
215
216 If the `width` is also specified but the aspect ratio is different from the chart, the image will be
217 aligned in the top-left corner. */
218 height?: number;
219 /** Specifies a scale factor to the resulting image. A value of `2` will result in both the `width`
220 and `height` being multiplied by `2`. */
221 scaling?: number;
222 /** Specifies the unit in which the `width` and `height` values are given. */
223 unit?: "mm" | "px";
224 /** Specifies the width of the resulting image. If not given, the current width of the chart element
225 is used instead.
226
227 If the `height` is also specified but the aspect ratio is different from the chart, the image will be
228 aligned in the top-left corner. */
229 width?: number;
230 }
231 export interface BaseSettingsClassMap {
232 }
233 export interface BaseLabel {
234 hheight: number;
235 hwidth: number;
236 /** The style settings used to render this label. */
237 style: BaseSettingsLabelStyle;
238 /** The text the label renders. This property overrides the text specified in the style settings. */
239 text: string;
240 visible: boolean;
241 }
242 /** Represents a single pointer. On multitouch, separate event for each pointer will be fired. */
243 export interface BaseMouseEvent {
244 altKey: boolean;
245 changedPointerCount: number;
246 consumed: boolean;
247 ctrlKey: boolean;
248 cursor: "default" | "help" | "move" | "pointer" | "progress" | "text" | "wait" | "e-resize" | "ne-resize" | "nw-resize" | "n-resize" | "se-resize" | "sw-resize" | "s-resize" | "w-resize" | "ns-resize" | "crosshair";
249 defaultPrevented: boolean;
250 distance(p: {
251 x: number;
252 y: number;
253 }): number;
254 dx: number;
255 dy: number;
256 identifier: string;
257 isRightMB: boolean;
258 /** Verifies if the original event described by this instance is within a specified distance of the given position. */
259 isWithinDistance(
260 /** The mouse event/pointer to which this instance is compered */
261 current: {
262 pageX: number;
263 pageY: number;
264 timeStamp: number;
265 },
266 /** The distance, in pixels, non-inclusive, below which the method will return positive */
267 dist: number,
268 /** Time, in milliseconds. If specified, also verifies that the original event did not occur too long ago. */
269 maxAge?: number): boolean;
270 pageX: number;
271 pageY: number;
272 pressed: boolean;
273 preventDefault(): void;
274 shiftKey: boolean;
275 /** only on up event */
276 swipeDown: boolean;
277 /** only on up event */
278 swipeLeft: boolean;
279 /** only on up event */
280 swipeRight: boolean;
281 swipeSpeed: number;
282 /** only on up event */
283 swipeUp: boolean;
284 target: HTMLElement;
285 timeStamp: number;
286 touch: boolean;
287 vx: number;
288 vy: number;
289 wheelx: number;
290 wheely: number;
291 x: number;
292 y: number;
293 }
294 export interface BaseProfiler {
295 hasPendingRequests(): boolean;
296 measureFps(measureFpsIters: number, measureFpsCallback: (fps: number, iterations: number, time: number) => void): boolean;
297 }
298 export interface BaseSettings {
299 advanced?: BaseSettingsAdvanced;
300 /** Chart area related settings. */
301 area?: BaseSettingsArea;
302 /** The URL root where the ZoomCharts library and assets are located. For example, if the base.css file is available at
303 'http://server/css/zoomcharts/zc.css' then this value should be set to 'http://server/css/zoomcharts/'.
304 Note that the library will try to determine its location automatically by searching the included script tags.
305 So this property can be skipped if the assets folder is located next to 'zoomcharts.js' file on the server. */
306 assetsUrlBase?: string;
307 callbacks?: BaseSettingsCallbacks;
308 /** Element of the page where the chart will be inserted. Any HTML element should work, for example you can use a `<div>`.
309
310 Any contents of the element will be cleared - this behavior can be used to specify a loading message as the initial content,
311 for example `<div>Chart is being initialized...</div>`.
312
313 Note that a single element can host only one chart. If the same container is given to another chart, the previous chart will
314 be automatically disposed.
315
316 Unless `parentChart` is specified, the value of the property is mandatory and can only be specified while creating the chart,
317 not with `updateSettings`. The value can be either an ID of an existing element or a reference to a DOM element. */
318 container?: string | HTMLElement;
319 /** Settings for displaying chart credits. Use it as a reference to additional data sources if necessery.
320
321 
322
323 Note that even if credits enabled on page load, it's possible to hide on exported images. */
324 credits?: BaseSettingsCredits;
325 /** Settings used to load data into chart. Customise preferred data source feeding methods.
326 You can use one of these options: url, data function, preloaded data. */
327 data?: Array<BaseSettingsData>;
328 /** The events used to handle user interaction with UI elements. */
329 events?: BaseSettingsEvents<BaseChartEventArguments, BaseChartEventArguments>;
330 /** Customise chart resize handles or animation duration settings. */
331 interaction?: BaseSettingsInteraction;
332 legend?: BaseSettingsLegend;
333 /** Localizeable strings including export type options and useful default buttons used for chart interaction.
334 Buttons like to navigate back, set the chart on full screen and others. */
335 localization?: BaseSettingsLocalization;
336 /** The parent chart within which the new chart will be rendered. If this property is specified, `container` cannot be
337 specified.
338
339 Use `area.left`, `area.top`, `area.width` and `area.height` settings to position the subchart within parent chart. */
340 parentChart?: BaseApi;
341 /** Theme to apply. You can either use this to share configuration objects between multiple charts or use one of the predefined
342 themes. */
343 theme?: BaseSettings;
344 /** The chart's main title. */
345 title?: BaseSettingsTitle;
346 /** Adjustable settings to manage default and custom toolbar items, as well as toolbar overall appearance. */
347 toolbar?: BaseSettingsToolbar;
348 }
349 export interface BaseSettingsAdvanced {
350 /** List of assets to load from assets directory. This should be used to load CSS of JS files that
351 are required for the chart to work.
352
353 If `required` is specified, it can be used to determine at runtime if the file has to be included.
354 For example, `zc.css` is only included if the page does not already defines the class `.DVSL-suppress-default-styles { color: #abc }`
355 (note that the `color: #abc` rule has to be defined since that rule is verified and not the class as a whole).
356
357 Note that in order to support older browsers such as Android 4.1, it is required for any `.css` asset
358 to define the `required` delegate that can be used to verify if the asset has been loaded. */
359 assets?: Array<string | {
360 url?: string;
361 /** a delegate that should return `true` if the assets has to be loaded and `false` if it can be skipped. */
362 required?: () => boolean;
363 }>;
364 /** Specifies if the image requests issued by the chart are issued with `crossOrigin: anonymous` attribute.
365
366 Setting this to `true` enables using of images hosted on other servers for chart export. However it requires
367 that all image resources used provide `Access-Control-Allow-Origin` header in the response.
368
369 Note that currently the chart only uses this header when requesting images. It is not used when requesting
370 other assets like scripts or stylesheets. */
371 crossOriginHeader?: "anonymous" | "use-credentials";
372 /** Specifies a delegate that provides the data for the CSV and Excel export options. If this is specified the
373 chart will enable CSV and Excel export even if by default these options are not available. For charts that provide
374 the data export by default, the function receives the default data set and can convert that. */
375 dataExportFunction?: (
376 /** The default data set if the chart supports data export. */
377 data: Array<Array<string | number | Date | boolean>>,
378 /** The callback that has to be called once the data is available. */
379 callback: (data: Array<Array<string | number | Date | boolean>>) => void) => void;
380 /** The page size in milimeters for the exported PDF documents. For A4 use `[210, 297]` (this is the default),
381 for letter size use `[215.9, 279.4]`. The first number is the width, the second is the height. */
382 exportPdfSize?: [number, number];
383 /** URL for export proxy requests. To host the service on your own server, please visit <https://github.com/zoomcharts/proxy-export-dotnet/>. */
384 exportProxyURL?: string;
385 /** Enables high resolution rendering on high DPI screens. As performance is varied across different browsers, disable this to
386 improve the performance of your application.
387
388 This setting can either be set to `false` to disable the scaling, `true` to render according to the browser DPI setting
389 and a number to force a constant scale, ignoring browser DPI settings. */
390 highDPI?: number | boolean;
391 /** Whether to store entire label into bitmap. Use it to improve the performance of your application. */
392 labelCache?: boolean;
393 /** Whether to store labels that are rendered rotated in the cache. */
394 labelCacheRotated?: boolean;
395 /** Whether to show verbose logging. */
396 logging?: boolean;
397 /** Maximum height in pixels of the canvas object.
398
399 When the height exceeds this value, the canvas is scaled up to match the required resolution. For example, if the maximum height is
400 set to 4096px but the container height is 5000px, the canvas will be rendered at 2500px height with the scale factor of 2. */
401 maxCanvasHeight?: number;
402 /** Maximum width in pixels of the canvas object.
403
404 When the width exceeds this value, the canvas is scaled up to match the required resolution. For example, if the maximum width is
405 set to 4096px but the container width is 5000px, the canvas will be rendered at 2500px width with the scale factor of 2. */
406 maxCanvasWidth?: number;
407 /** Pointer related settings. */
408 pointer?: BaseSettingsAdvancedPointer;
409 /** Whether to show frames per second on the chart. */
410 showFPS?: boolean;
411 /** Whether to show the current timestamp on the chart. Use only for debugging. */
412 showTimestamp?: boolean;
413 /** Whether to show the trail of each touch pointer and also display pointers that are no longer active.
414 For this setting to have effect, `showTouches` must be `true`. */
415 showTouchTrail?: boolean;
416 /** Whether to use debugging option to paint pointer trails on screen. */
417 showTouches?: boolean;
418 /** Miscellaneous style settings. */
419 style?: BaseSettingsAdvancedStyle;
420 /** CSS class for current theme. Used to reference chart container in CSS files. */
421 themeCSSClass?: string;
422 /** Whether to use requestAnimationFrame for requested paint instead of setTimeout. */
423 useAnimationFrame?: boolean;
424 }
425 export interface BaseSettingsAdvancedPointer {
426 /** Pixels pointer can move around and still be registered as a click. */
427 clickSensitivity?: number;
428 /** Pixels pointer can move around and still be registered as double click. */
429 doubleClickSensitivity?: number;
430 /** Maximum time in ms between clicks to register a double click. */
431 doubleClickTimeout?: number;
432 /** The distance in pixels the pointer is allowed to be moved before the long-press event is cancelled. */
433 longPressSensitivity?: number;
434 /** Time in ms the pointer has to be hold to register a long press (an alternative to clicking the right mouse button). */
435 longPressTimeout?: number;
436 /** Specifies if the mouse wheel is only captured when the chart has focus. Setting this to `true` will require that the
437 user first clicks the chart area. */
438 mouseWheelRequiresFocus?: boolean;
439 /** If enabled, normal click event is not sent when user performs a double click. A not so nice side effect is that any on click
440 actions are delayed by the double click timeout. Set to false if you are not relying on double click events. */
441 noClickOnDoubleClick?: boolean;
442 /** Specifies if the chart container is scrolled into view once the chart is clicked.
443
444 Note that the scroll happens on a click, if the pointer is used to for example, drag
445 the chart, it will not scroll into view so that the user interaction works properly. */
446 scrollIntoView?: boolean;
447 /** Time window to use for pointer speed estimation. */
448 speedAveragingPeriod?: number;
449 }
450 export interface BaseSettingsAdvancedStyle {
451 /** Loading arc animation style */
452 loadingArcStyle?: {
453 lineColor?: string;
454 lineWidth?: number;
455 /** Specifies the location of the loading indicator and the status message as well. */
456 location?: "corner" | "center" | "hidden";
457 /** Loading arc radius. */
458 r?: number;
459 };
460 /** The background that is drawn under the message. The box includes the loading indicator as well.
461
462 Note that the background is not drawn if the loading indicator is shown without this background. */
463 messageBackgroundStyle?: BaseSettingsAdvancedStyleMessageBackground;
464 /** Message text. Note that the text position is taken from `loadingArcStyle.location`. */
465 messageTextStyle?: BaseSettingsTextStyle;
466 }
467 export interface BaseSettingsAdvancedStyleMessageBackground extends BaseSettingsBackgroundStyle {
468 /** The inner padding of the background box. */
469 padding?: number;
470 }
471 export interface BaseSettingsArea {
472 /** Height of the chart. If undefined the chart height will adapt to container element. */
473 height?: number;
474 /** The horizontal position of the chart. This setting only applies when this chart is nested within another by using `parentChart` setting. */
475 left?: number;
476 /** The maximum chart height. Chart will not resize below this. */
477 maxHeight?: number;
478 /** The maximum chart width. The chart will not resize below this */
479 maxWidth?: number;
480 /** The minimum chart height. Chart will not resize below this. */
481 minHeight?: number;
482 /** The minimum chart width. The chart will not resize below this */
483 minWidth?: number;
484 /** Area style. */
485 style?: BaseSettingsAreaStyle;
486 /** The vertical position of the chart. This setting only applies when this chart is nested within another by using `parentChart` setting. */
487 top?: number;
488 /** Width of the chart. If undefined the chart width will adapt to container element. */
489 width?: number;
490 }
491 export interface BaseSettingsAreaStyle {
492 /** Background fill color of chart area */
493 fillColor?: string;
494 /** Background image of chart area. */
495 image?: string;
496 /** The foreground fill color of the chart area. `rgba()` with alpha transparency should be used */
497 overlayColor?: string;
498 }
499 export interface BaseSettingsBackgroundStyle extends BaseSettingsLineStyle {
500 fillColor?: string | CanvasGradient;
501 shadowBlur?: number;
502 shadowColor?: string;
503 shadowOffsetX?: number;
504 shadowOffsetY?: number;
505 }
506 export interface BaseSettingsCallbacks {
507 renderFinish?: () => void;
508 renderStart?: () => void;
509 }
510 export interface BaseSettingsChartPanel {
511 /** Panel alignment */
512 align?: "left" | "right" | "top" | "bottom" | "center" | "fill";
513 /** Whether allow packing over other panels */
514 floating?: boolean;
515 /** The location of the panel */
516 location?: "outside" | "inside" | "external";
517 /** Margin around the panel */
518 margin?: number;
519 /** Panel side */
520 side?: "top" | "bottom" | "left" | "right";
521 }
522 export interface BaseSettingsCredits {
523 /** Enable/disable chart credits. Note that it does not affect exported image. */
524 enabled?: boolean;
525 /** Whether to render credits on the exported image. Note that it does not affect chart. */
526 enabledOnExport?: boolean;
527 /** URL of credits image. */
528 image?: string;
529 /** The URL of the credits image that will be used for the export. By default the same image is used for both export and displaying on the screen. */
530 imageExport?: string;
531 /** Image scaling. Use to embed higher resolution images. */
532 imageScaling?: number;
533 /** Specifies the image location */
534 location?: "inside" | "outside";
535 /** URL to open on click. */
536 url?: string;
537 /** The name of the frame that will be used to open the URL. */
538 urlTarget?: string;
539 }
540 export interface BaseSettingsData {
541 /** Data loading format. Currently most charts only support JSON. */
542 format?: "JSON" | "GeoJSON";
543 /** Data id used for series to reference specific data source. */
544 id?: string;
545 /** Max number of parallel data requests to issue. More requests will result in faster loading, but might put heavy load on server. */
546 numberOfParallelRequests?: number;
547 /** Delegate that can be used to process data returned by the server for the HTTP request issued by the chart. */
548 postprocessorFunction?: (
549 /** The raw data received from the server. */
550 data: string) => string;
551 /** Provides the ability to embed chart data directly into the chart configuration.
552
553 This data can be complete or act as the initial data where the rest will be requested dynamically using
554 `url` or `dataFunction`. */
555 preloaded?: BaseDataErrorResponse;
556 /** Timeout in milliseconds for data requests. This timeout only applies to HTTP requests issued by the chart directly. */
557 requestTimeout?: number;
558 /** URL that is used to load data */
559 url?: string;
560 /** List of extra parameters to pass with data URL. */
561 urlParameters?: Array<{
562 /** Parameter name. */
563 name?: string;
564 /** Parameter value. */
565 value?: string;
566 }>;
567 }
568 export interface BaseSettingsEvents<TArguments extends BaseChartEventArguments, TClickArguments extends BaseChartEventArguments> {
569 /** Function called on pointer down.
570 Function called on pointer up.
571
572 Function called when pointer drag has happened.
573
574 Function called when mouse pointer is moved.
575
576 Function called when data is loaded/added/replaced/removed.
577
578 Time to wait after last action before firing onChartUpdate event. */
579 chartUpdateDelay?: number;
580 /** Function called when whenever current view has changed. Usually after panning and navigation. Use to update any linked views.
581 Note that this is also fired after chart initialization and API methods. Use args.origin field to determine event's origin. */
582 onChartUpdate?: (
583 /** An empty mouse event. */
584 event: BaseMouseEvent, args: TArguments) => void;
585 /** Function called when user clicks on chart. */
586 onClick?: (
587 /** The mouse event. */
588 event: BaseMouseEvent, args: TClickArguments) => void;
589 /** Function called when user double clicks on chart. */
590 onDoubleClick?: (
591 /** The mouse event. */
592 event: BaseMouseEvent, args: TClickArguments) => void;
593 /** Function called when error occurs, default behavior is log to console. */
594 onError?: (
595 /** The mouse event that was the cause of the error. */
596 event: BaseMouseEvent, args: BaseChartErrorEventArguments) => void;
597 /** Function called when object pointer is on changes. */
598 onHoverChange?: (
599 /** The mouse event. */
600 event: BaseMouseEvent, args: TArguments) => void;
601 /** Function called whenever chart placement on screen changes. Note that this is called on every animation frame and is intended
602 for painting overlays only. */
603 onPositionChange?: (
604 /** The mouse event that caused the event (if any) */
605 event: BaseMouseEvent, args: TArguments) => void;
606 /** Function called when user right clicks on chart. */
607 onRightClick?: (
608 /** The mouse event. */
609 event: BaseMouseEvent, args: TClickArguments) => void;
610 /** Function called when selected slices has changed. */
611 onSelectionChange?: (
612 /** The mouse event. */
613 event: BaseMouseEvent, args: TArguments) => void;
614 /** Function called when settings are changed. */
615 onSettingsChange?: (
616 /** An empty mouse event. */
617 event: BaseMouseEvent, args: BaseChartSettingsChangeEventArguments) => void;
618 /** Function called when user triple clicks on chart. Use it for custom function call. */
619 onTripleClick?: (
620 /** The mouse event. */
621 event: BaseMouseEvent, args: TClickArguments) => void;
622 }
623 export interface BaseSettingsInteraction {
624 /** Controls chart resize handles.
625
626 It's a horizontal line right below any chart to handle whole chart resizes by small steps.
627
628 Note that the full screen button used as a main alternative to get a full screen by one click. */
629 resizing?: BaseSettingsResizer;
630 }
631 export interface BaseSettingsLabelStyle {
632 /** Text alignment. */
633 align?: "center" | "right" | "left";
634 /** The angle at which the label are rotated */
635 angle?: number;
636 /** Ratio between label sizes in different dimensions */
637 aspectRatio?: number;
638 /** Background style including fill color. */
639 backgroundStyle?: BaseSettingsBackgroundStyle;
640 /** Radius of item border. Similar to CSS border radius property. Zero radius will show a rectangle */
641 borderRadius?: number;
642 /** Extra data associated with the label */
643 extra?: any;
644 /** Label image. */
645 image?: string;
646 /** Slicing to use tiled images. Array of 4 values: [left, top, width, height] */
647 imageSlicing?: [number, number, number, number];
648 /** Vertical space between the lines of text. In multiples of text line height. */
649 lineSpacing?: number;
650 /** Margin around label text */
651 margin?: number;
652 /** Maximum width of the label. */
653 maxWidth?: number;
654 /** Padding between item content and item border. */
655 padding?: number;
656 /** Label text. */
657 text?: string;
658 /** Text style including fill color and font. */
659 textStyle?: BaseSettingsTextStyle;
660 }
661 export interface BaseSettingsLegend {
662 /** Advanced settings which may change in the future. */
663 advanced?: BaseSettingsLegendAdvanced;
664 /** Show/hide chart legend. */
665 enabled?: boolean;
666 /** Whether to order entries to get possibly equal number of items into columns or rows. If false, once the row or column is full of entries,
667 the next element will be first in the new row or column/rows. */
668 equalizeRowsColumns?: boolean;
669 /** Maximum height of the legend. If null, all available vertical space of chart will be consumed to set as much entries as possible.
670 It coincides with the chart height if legend panel side is on a left or right. */
671 height?: number;
672 /** Settings related to the user interaction with the legend. */
673 interaction?: BaseSettingsLegendInteraction;
674 /** Vertical space between the lines of text. */
675 lineSpacing?: number;
676 /** Margin around each legend entry. */
677 margin?: number;
678 /** Visual element of legend entry with appropriate style to a slice color it corresponds. The content of each legend marker is the
679 same as info popup appearing while hovering on slice. */
680 marker?: BaseSettingsLegendMarker;
681 /** Max number of symbols used in one line of text that applies to any legend entry. */
682 maxLineSymbols?: number;
683 /** Minium height of the legend. */
684 minHeight?: number;
685 /** Minium width of the legend. */
686 minWidth?: number;
687 /** Max number of columns. Use in conjunction with side parameter under the legend panel should be right or left in order to arrange entries by columns. */
688 numberOfColumns?: number;
689 /** Max number of rows. Use in conjunction with side parameter under the legend panel that should be set as bottom or top in order to arrange entries by rows. */
690 numberOfRows?: number;
691 /** Padding around each entry text and marker. */
692 padding?: number;
693 /** Legend enclosing panel settings. */
694 panel?: BaseSettingsLegendPanel;
695 /** Text settings displaying in legend entries. */
696 text?: BaseSettingsTextStyle;
697 /** Maximum width of the legend. If null, all available horizontal space of chart will be consumed to set as much entries as possible.
698 It coincides with the chart width if legend panel side is on a top or bottom. */
699 width?: number;
700 }
701 export interface BaseSettingsLegendAdvanced {
702 /** Background color for selected legend entry. */
703 selectedBackground?: string;
704 /** Border color for selected legend entry. */
705 selectedBorder?: string;
706 }
707 export interface BaseSettingsLegendInteraction {
708 /** Specifies if the legend can be interacted with by clicking each entry to select the particular item. */
709 click?: boolean;
710 }
711 export interface BaseSettingsLegendMarker {
712 /** Marker position relative to text */
713 alignment?: "left" | "right";
714 /** Line color around marker shape */
715 lineColor?: string;
716 /** Marker size. */
717 size?: number;
718 }
719 export interface BaseSettingsLegendPanel extends BaseSettingsChartPanel {
720 padding?: number;
721 }
722 export interface BaseSettingsLineStyle {
723 lineColor?: string;
724 lineDash?: Array<number>;
725 lineWidth?: number;
726 }
727 export interface BaseSettingsLocalization {
728 /** Text used on menu close button. */
729 closeButton?: string;
730 /** Error message when data request has failed. */
731 dataRequestFailed?: string;
732 /** Error message when the browser does not support launching file save dialog from the script without
733 using `advanced.exportProxyURL` and that setting has been disabled. */
734 exportNotAvailable?: string;
735 /** Message to show when data loading is in progress. */
736 loadingLabel?: string;
737 /** Strings used in toolbars. */
738 toolbar?: BaseSettingsLocalizationToolbar;
739 }
740 export interface BaseSettingsLocalizationToolbar {
741 backButton?: string;
742 backTitle?: string;
743 exportButton?: string;
744 exportCSV?: string;
745 exportJpeg?: string;
746 exportPDF?: string;
747 exportPNG?: string;
748 exportTitle?: string;
749 exportXLS?: string;
750 fullscreenButton?: string;
751 fullscreenTitle?: string;
752 zoomoutButton?: string;
753 zoomoutTitle?: string;
754 }
755 export interface BaseSettingsResizer {
756 /** Enable/disable chart resizing. */
757 enabled?: boolean;
758 /** Whether to fix chart aspect ratio while resizing. */
759 fixedAspect?: boolean;
760 /** Distance from chart edge that will be used for resizing. */
761 grabDistance?: number;
762 /** Max pointer distance from chart edge when resize handle appears. */
763 visibilityDistance?: number;
764 }
765 export interface BaseSettingsTextStyle {
766 fillColor?: string;
767 font?: string;
768 /** The color of the ouline around the text. Specify `null` to disable the outline. */
769 outlineColor?: string;
770 /** Specify how the edges of the ouline will be calculated. For details on the specific values please see the MDN documentation.
771
772 Note that for certain serif fonts (such as Calibri) this property has no effect - since the font glyphs have rounded edges, the
773 outline will be rounded. */
774 outlineJoin?: "miter" | "round" | "bevel";
775 /** The width of the outline in pixels. */
776 outlineWidth?: number;
777 shadowBlur?: number;
778 shadowColor?: string;
779 shadowOffsetX?: number;
780 shadowOffsetY?: number;
781 }
782 export interface BaseSettingsTitle {
783 /** Advanced settings */
784 advanced?: {
785 /** Determine the position of the title relative to the toolbars
786 false - adds title first, then toolbar
787 true - adds toolbar first, then title. Note, `toolbar.location` should be "outside" for this to have effect */
788 addAfterToolbar?: boolean;
789 };
790 /** Alignment of the title text. */
791 align?: "center" | "left" | "right";
792 /** Show/hide chart title */
793 enabled?: boolean;
794 /** Whether to display title on the exported image. Note that it does not affect chart. */
795 enabledOnExport?: boolean;
796 /** Where the title is located in the chart */
797 location?: "inside" | "outside";
798 /** Margin around title text, in px. */
799 margin?: number;
800 /** Title style */
801 style?: {
802 fillColor?: string;
803 font?: string;
804 };
805 /** Title text. */
806 text?: string;
807 /** Vertical alignment of the title text. */
808 verticalAlign?: "top" | "bottom" | "center";
809 }
810 export interface BaseSettingsToolbar {
811 /** Toolbar align. Note that it can be overridden for individual items using item.align. Also Use 'top' or 'bottom'
812 sides in conjunction with 'left', 'right' align or use 'left', 'right' sides with 'top', 'bottom'. */
813 align?: "left" | "right" | "top" | "bottom";
814 /** Whether to show back button in toolbar. */
815 back?: boolean;
816 /** CSS class name for the toolbar HTML panel. */
817 cssClass?: string;
818 /** Show/hide toolbar. */
819 enabled?: boolean;
820 /** Whether to show export dropdown in toolbar. */
821 export?: boolean;
822 /** Specifies what options will be provided for the user in the Export dropdown. Specifying `null` here
823 will enable all options.
824
825 Note that some charts do not support `XLSX` or `CSV` option so enabling it here will not have any effect.
826
827 Currently the order of the types given in this array are ignored. */
828 exportOptions?: Array<"png" | "jpg" | "pdf" | "csv" | "xlsx">;
829 /** A list of user defined items to show in toolbar. These are displayed in addition to the
830 `items` collection (which includes the default buttons). */
831 extraItems?: Array<string | BaseSettingsToolbarItem>;
832 /** Whether to show the fullscreen button on the toolbar. */
833 fullscreen?: boolean;
834 /** Whether the toolbar will "stick" at the edge when scrolling */
835 isSticky?: boolean;
836 /** A list of toolbar items. If this is specified, it overrides all the default buttons.
837
838 Use `extraItems` to specify items that should be displayed in addition to the defaults. */
839 items?: Array<string | BaseSettingsToolbarItem>;
840 /** Toolbar location inside chart. */
841 location?: "auto" | "inside" | "outside";
842 /** Whether to show or hide labels next to toolbar items by default. Note that it can be overridden for individual items using item.showLabels. */
843 showLabels?: boolean;
844 /** Toolbar placement side. Note that it can be overridden for individual items using item.side. */
845 side?: "left" | "right" | "top" | "bottom";
846 /** Whether to show the zoom out button. */
847 zoomOut?: boolean;
848 }
849 export interface BaseSettingsToolbarItem extends BaseSettingsToolbarItemBase {
850 /** Item align. */
851 align?: "left" | "right" | "top" | "bottom";
852 /** An array of nested items. Setting this will display a dropdown item instead of a simple button.
853
854 Note that nested dropdowns are not supported. */
855 dropDownItems?: Array<BaseSettingsToolbarItemBase>;
856 /** Built in toolbar item name. Note that not all buttons are available for all charts. */
857 item?: "back" | "displayPeriod" | "displayUnit" | "export" | "fit" | "freeze" | "fullscreen" | "logScale" | "rearrange" | "zoomOut" | "zoomControl";
858 /** Item location */
859 location?: "inside" | "outside";
860 /** Whether to show button label. Use `false` to hide the label, `true` to show the label always and `null` to show the label when there is
861 enough room in the toolbar. */
862 showLabel?: boolean;
863 /** Item side. */
864 side?: "left" | "right" | "top" | "bottom";
865 }
866 export interface BaseSettingsToolbarItemBase {
867 /** CSS class name. */
868 cssClass?: string;
869 /** Determines if the toolbar item is rendered as disabled. Disabled item do not fire the `onClick` handler
870 when clicked. */
871 enabled?: boolean;
872 /** Item image, URL to image. */
873 image?: string;
874 /** Item label */
875 label?: string;
876 /** Function to execute on item click. */
877 onClick?: (event: MouseEvent, chart: BaseApi) => void;
878 /** Item title, shown on hover. */
879 title?: string;
880 }
881 export enum BaseSettingsValueAxisBaseLineLabelMode {
882 /** The label is drawn always if the line itself is visible. */
883 always = 2,
884 /** Unless the zero line is not visible, the label is drawn always for outside axis. For value axis that are located inside the chart area
885 the label is only drawn if the value axis also shows negative values. */
886 auto = 1,
887 /** The label is never drawn. */
888 never = 0,
889 }
890 export interface FacetChartFacet {
891 activeItemId: string;
892 count: number;
893 data: PieChartPieData;
894 from: number;
895 getActiveItem(): FacetChartItem;
896 id: string;
897 items: Array<FacetChartItem>;
898 left: number;
899 loading: boolean;
900 offset: number;
901 opacity: number;
902 parentItem: FacetChartItem;
903 rebuild: boolean;
904 right: number;
905 to: number;
906 totalCount: number;
907 }
908 /** Describes the base properties shared between all events raised by the different charts. */
909 export interface FacetChartChartClickEventArguments extends FacetChartChartEventArguments {
910 clickFacet: FacetChartFacet;
911 clickItem: FacetChartItem;
912 /** Specifies the source of the click event. */
913 clickOrigin: "item" | "label";
914 }
915 /** Describes the base properties shared between all events raised by the different charts. */
916 export interface FacetChartChartEventArguments extends BaseChartEventArguments {
917 count: number;
918 facet: FacetChartFacet;
919 hoverItem: FacetChartItem;
920 /** `True` if the cursor is directly hovering a marker on a line series. `False` otherwise. */
921 hoverMarker: boolean;
922 /** The series that is currently directly under the cursor. `null` if the cursor is not hovering over data or is hovering over empty area. */
923 hoverSeries: FacetChartSettingsSeries;
924 offset: number;
925 selection: Array<FacetChartItem>;
926 }
927 /** Describes a single slice in the data. Can include the nested items for that slice as well. */
928 export interface FacetChartDataObject extends FacetChartDataObjectCommon {
929 /** The ID of the slice. Note that if the ID is set then by default the chart assumes that the
930 slice is expandable. To avoid this, set `style.expandable` to `false`.
931 The slice ID is used to load the nested items and is the same value as the ID of the inner pie
932 object. */
933 id?: string;
934 /** The name of the slice that will be used as the default label text. */
935 name?: string;
936 /** Styles specific to the particular item. Most styles are only applicable if the facetchart shows columns. */
937 style?: FacetChartSettingsFacetStyle;
938 /** Optional subvalues for drilldown. If subvalues are available, then you can either specify them directly, or provide
939 `id` and let the chart request them separately. */
940 subvalues?: Array<FacetChartDataObject>;
941 /** The numeric value of the slice. This is used to calculated the size of the slice. */
942 value: number;
943 }
944 export interface FacetChartDataObjectCommon extends BaseDataObjectBase {
945 id?: string;
946 name?: string;
947 subvalues?: Array<FacetChartDataObject>;
948 }
949 export interface FacetChartDataObjectRoot extends FacetChartDataObjectCommon, BaseDataErrorResponse {
950 /** In the case of a partial load, this specifies the sum of all values in the data source which come **after** the values
951 in the `subvalues` array. If you're doing a partial load, you must specify at least 2 of the following: `afterSum`,
952 `beforeSum`, `sum`. */
953 afterSum?: number;
954 /** In the case of a partial load, this specifies the sum of all values in the data source which come **before** the values
955 in the `subvalues` array. If you're doing a partial load, you must specify at least 2 of the following: `afterSum`,
956 `beforeSum`, `sum`. */
957 beforeSum?: number;
958 /** The ID of the pie for which the data is being loaded. Note that for the initial data request
959 this value has to be empty, otherwise the chart assumes that the data is for a nested object and
960 not for the initial view. */
961 id?: string;
962 /** In the case of a partial load, this specifies the maximum number of entries that was fetched from the data source.
963 This is used to figure out if more data is available. If this field isn't set, or is set and is larger than the count
964 of values in the `subvalues` array, then it is assumed that no more data is available. */
965 limit?: number;
966 /** The name of the root data object. */
967 name?: string;
968 /** In the case of a partial load, this specifies the offset in the data source where the `subvalues` array starts. This
969 parameter is mandatory if you're doing a partial load. */
970 offset?: number;
971 /** Values for this drilldown level. In the case of a partial load, this will contain only a part of all values available
972 in the data source. */
973 subvalues: Array<FacetChartDataObject>;
974 /** In the case of a partial load, this specifies the sum of all values in the data source. If you're doing a partial
975 load, you must specify at least 2 of the following: `afterSum`, `beforeSum`, `sum`. */
976 sum?: number;
977 }
978 export interface FacetChartItem {
979 active: boolean;
980 currentLabel: BaseLabel;
981 data: FacetChartDataObject;
982 expandable: boolean;
983 facet: FacetChartFacet;
984 id: string;
985 index: number;
986 innerFacet: FacetChartFacet;
987 label: string;
988 selected: boolean;
989 url: string;
990 urlTarget: string;
991 values: Array<FacetChartItemValue>;
992 }
993 export interface FacetChartItemValue {
994 currentLabel: BaseLabel;
995 data: FacetChartDataObject;
996 facet: FacetChartFacet;
997 id: string;
998 index: number;
999 label: string;
1000 /** data to preview if previewContents = true */
1001 previewData: Array<number>;
1002 seriesId: string;
1003 style: FacetChartSettingsFacetStyle;
1004 value: number;
1005 }
1006 export interface FacetChartSettings extends LinearChartSettings {
1007 /** Chart area related settings. */
1008 area?: FacetChartSettingsArea;
1009 /** Default series settings for each series rendering type. Use this to configure all series of specific type to get line
1010 or column chart or combination of them. */
1011 chartTypes?: {
1012 /** Series type to render values as vertical bars. */
1013 columns?: FacetChartSettingsSeriesColumns;
1014 /** Series type to connect value points by lines. */
1015 line?: FacetChartSettingsSeriesLines;
1016 };
1017 /** Settings used to load data into chart. Customise preferred data source feeding methods.
1018 You can use one of these options: url, data function, preloaded data. */
1019 data?: Array<FacetChartSettingsData>;
1020 /** The events used to handle user interaction with UI elements. */
1021 events?: LinearChartSettingsEvents<FacetChartChartEventArguments, FacetChartChartClickEventArguments>;
1022 /** Chart x-axis line rendered at the bottom horizontally to display group names under each bar. */
1023 facetAxis?: FacetChartSettingsFacetAxis;
1024 /** Configurable conditions to filter the raw data values for subset of drawing facets. */
1025 filters?: {
1026 /** Determines if zero values are automatically filtered from the data or if they will be displayed. */
1027 allowZeroValues?: boolean;
1028 /** Determine whether to show item or not. */
1029 sliceFilter?: (
1030 /** the item to test */
1031 item: FacetChartDataObject) => boolean;
1032 };
1033 /** A variety of interaction options that includes scrolling, zooming and swipe. */
1034 interaction?: FacetChartSettingsInteraction;
1035 /** Series cluster including name placed on facet axis. */
1036 items?: {
1037 /** Facet item style. */
1038 style?: {
1039 /** Whether to open series item on click */
1040 expandable?: boolean;
1041 /** Facet item text */
1042 label?: string;
1043 };
1044 /** Dynamically determine item style from data. */
1045 styleFunction?: (
1046 /** item to apply predefined style */
1047 item: FacetChartItem,
1048 /** data relevant to item */
1049 itemData: FacetChartDataObject) => void;
1050 };
1051 /** The chart legend by additional interactivity to change the visibility of series it corresponds. */
1052 legend?: LinearChartSettingsLegend;
1053 /** Settings to specify initial view once the page loaded. */
1054 navigation?: {
1055 /** Initial facet drilldown to show. For example ['', 'Firefox', 'Firefox 2.5'] denotes to various browsers grouped by versions. */
1056 initialDrilldown?: Array<string>;
1057 /** Initial scroll offset, number of items from start. */
1058 initialOffset?: number;
1059 };
1060 /** Left, right scroll buttons if additional facets available */
1061 scrollButtons?: FacetChartSettingsScrollButtons;
1062 /** Array of series in the chart. Each of the series can be different type, can use different data source and
1063 aggregation. Additionally, series can be clustered and stacked. */
1064 series?: Array<FacetChartSettingsSeries>;
1065 /** The default series used as the chart dominant data. Use settings.series array to specify actual series. */
1066 seriesDefault?: FacetChartSettingsSeries;
1067 /** Theme to apply. You can either use this to share configuration objects between multiple charts or use one of the predefined
1068 themes. */
1069 theme?: FacetChartSettings;
1070 /** Adjustable settings to manage default and custom toolbar items, as well as toolbar overall appearance. */
1071 toolbar?: FacetChartSettingsToolbar;
1072 }
1073 export interface FacetChartSettingsArea extends LinearChartSettingsArea {
1074 /** Area style. */
1075 style?: FacetChartSettingsAreaStyle;
1076 }
1077 export interface FacetChartSettingsAreaStyle extends LinearChartSettingsAreaStyle {
1078 selection?: FacetChartSettingsAreaStyleSelection;
1079 }
1080 export interface FacetChartSettingsAreaStyleSelection {
1081 /** Specifies if the selection is drawn behind or above the series themselves. */
1082 behindSeries?: boolean;
1083 fillColor?: string;
1084 lineColor?: string;
1085 lineWidth?: number;
1086 }
1087 export interface FacetChartSettingsData extends PieChartSettingsData {
1088 /** Load more chart data. */
1089 dataFunction?: (
1090 /** The ID of the parent slice. `null` when loading the top level data. */
1091 id: string,
1092 /** max number of slices to load on pie */
1093 limit: number,
1094 /** number of slices to skip from start */
1095 offset: number,
1096 /** callback function to execute when data arrived correctly */
1097 success: (data: FacetChartDataObjectRoot) => void,
1098 /** callback function to execute when error occure while loading data */
1099 fail: (result: BaseDataErrorResponse) => void) => void;
1100 /** Provides the ability to embed chart data directly into the chart configuration.
1101
1102 This data can be complete or act as the initial data where the rest will be requested dynamically using
1103 `url` or `dataFunction`. */
1104 preloaded?: FacetChartDataObjectRoot;
1105 /** If set, items will be sorted in descending order using values from this field. You can either specify a single field or an array
1106 of fields.
1107
1108 To sort the values ascending, prefix the field name with `-`, for example, `-value` (without any spaces).
1109
1110 The default value `null` means that the chart does not reorder the data and it is displayed in the order it is given in the
1111 data source.
1112
1113 The callback receives two data objects every iteration, return `0` for equal values, `1` if the first value should be before the other
1114 and `-1` otherwise.
1115
1116 ```javascript
1117 sortField: function (a, b) {
1118 // handle null and undefined values as zeroes
1119 var v1 = a.val || 0;
1120 var v2 = b.val || 0;
1121 if (v1 === v2) return 0;
1122 if (v1 < v2) return 1;
1123 return -1;
1124 }
1125 ``` */
1126 sortField?: string | Array<string> | ((a: FacetChartDataObject, b: FacetChartDataObject) => number);
1127 }
1128 export interface FacetChartSettingsFacetAxis {
1129 /** Default width of one item. Used to calculate initial view. */
1130 defaultUnitWidth?: number;
1131 /** Show/hide facet axis. */
1132 enabled?: boolean;
1133 /** Facet axis name settings. */
1134 labels?: FacetChartSettingsFacetAxisLabels;
1135 /** Maximum width of one item. */
1136 maxUnitWidth?: number;
1137 /** Height of the x axis. */
1138 size?: number;
1139 /** Configures the title for the facet axis.
1140
1141 Note that the title shares space with the facet axis labels. You might need to increase the value of `facetAxis.size`
1142 property so that the labels are not hidden by the title. */
1143 title?: FacetChartSettingsFacetAxisTitleStyle;
1144 /** The width of a single unit that will trigger a zoom-out action when the user swipes up.
1145
1146 Note that the other trigger for zoomout is to swipe up until all the bars fit in half the width of the chart. In this case this unit width
1147 might not have been reached. */
1148 zoomOutUnitWidth?: number;
1149 }
1150 export interface FacetChartSettingsFacetAxisLabels extends BaseSettingsLabelStyle {
1151 /** Specifies if labels with angle that is not multiple of 90 (either horizontal or vertical) are allowed
1152 to overflow the left and right sides of the facet axis.
1153
1154 In the simple case this setting allows the first label with angle -45 degrees to be rendered under the
1155 value axis, giving it slightly more space. */
1156 allowOverflow?: boolean;
1157 enabled?: boolean;
1158 interLabelSpacing?: number;
1159 /** The default text displayed for each value when the data item does not define a specific text. */
1160 text?: string;
1161 }
1162 export interface FacetChartSettingsFacetAxisTitleStyle extends BaseSettingsLabelStyle {
1163 /** Determines if the title is enabled. */
1164 enabled?: boolean;
1165 /** Specifies the default title that is used if the data does not define a `name` property.
1166
1167 Note that `useFacetName` property can be used to disable reading the `name` property so that this
1168 value is always used. */
1169 text?: string;
1170 /** Determines if the `name` property from the data overrides the `text` value in these settings. */
1171 useFacetName?: boolean;
1172 }
1173 export interface FacetChartSettingsFacetStyle extends FacetChartSettingsSeriesColumnsStyle {
1174 /** Specifies if the item can be expanded. */
1175 expandable?: boolean;
1176 }
1177 export interface FacetChartSettingsInteraction extends LinearChartSettingsInteraction {
1178 /** Chart animation settings. */
1179 animation?: {
1180 /** Duration of scroll animation. */
1181 scrollDuration?: number;
1182 };
1183 /** Interaction mode. Note that `selection.enabled` can be used to disable the selection completely.
1184
1185 Values:
1186 - `drilldown` - performs drill down on click, if item is not expandable, selects it
1187 - `select` - selects items
1188 - `toggle` - toggle selects items. */
1189 mode?: "drilldown" | "select" | "toggle";
1190 /** Configurable settings for select option. Note that the selection style is configured by `area.style.selection`. */
1191 selection?: FacetChartSettingsInteractionSelection;
1192 }
1193 export interface FacetChartSettingsInteractionSelection {
1194 /** Enable/disable selection. Setting this to `false` disabled the selection by clicking on the chart,
1195 however the selection can still be set using the API.
1196
1197 Disabling the selection interaction could enable some advanced scenarios where the data is highly
1198 dynamic but the selection state must always be consistent with some outside state. */
1199 enabled?: boolean;
1200 /** Distance in pixels to both sides of an item that is still considered as a hover/click on the item. */
1201 tolerance?: number;
1202 }
1203 export interface FacetChartSettingsScrollButtons {
1204 /** Show/hide left, right scroll buttons if additional facets available. */
1205 enabled?: boolean;
1206 /** Whether to display title on the exported image. Note that it does not affect chart. */
1207 enabledOnExport?: boolean;
1208 /** Button height or width. */
1209 size?: number;
1210 /** Scroll button style */
1211 style?: {
1212 fillColor?: string;
1213 hoverFillColor?: string;
1214 hoverLineColor?: string;
1215 lineColor?: string;
1216 };
1217 }
1218 export interface FacetChartSettingsSeries extends LinearChartSettingsSeries {
1219 /** Data manipulation settings used for default series. */
1220 data?: FacetChartSettingsSeriesData;
1221 /** Series type. */
1222 type?: "columns" | "line";
1223 }
1224 export interface FacetChartSettingsSeriesColumns extends LinearChartSettingsSeriesColumns {
1225 /** Data manipulation settings used for default series. */
1226 data?: FacetChartSettingsSeriesData;
1227 /** Default column style. */
1228 style?: FacetChartSettingsSeriesColumnsStyle;
1229 }
1230 export interface FacetChartSettingsSeriesColumnsStyle extends LinearChartSettingsSeriesColumnsStyle {
1231 /** Set to `true` in order to display a "preview" of the value distribution in each column.
1232 The line color is specified in `previewLineColor` */
1233 previewContents?: boolean;
1234 /** The color of the line used to draw the distribution if `previewContents` is `true`. */
1235 previewLineColor?: string;
1236 }
1237 export interface FacetChartSettingsSeriesData extends LinearChartSettingsSeriesData {
1238 /** Object property of subvalue that will be used for series data aggregation. An alternative is to use `valueFunction`. If neither are specified
1239 the field `value` is implied. */
1240 field?: string;
1241 /** Retrieves the individual value used for calculations from the data array. This is an alternative for specifying `index`. */
1242 valueFunction?: (
1243 /** entry in data values array where the value at index 0 is the timestamp */
1244 data: Array<number> | FacetChartDataObject) => number;
1245 }
1246 export interface FacetChartSettingsSeriesLines extends LinearChartSettingsSeriesLines {
1247 /** Data manipulation settings used for default series. */
1248 data?: FacetChartSettingsSeriesData;
1249 /** Default style for line type series. */
1250 style?: FacetChartSettingsSeriesLinesStyle;
1251 }
1252 export interface FacetChartSettingsSeriesLinesStyle extends LinearChartSettingsSeriesLinesStyle {
1253 /** Enables customizing the marker for each particular data point. The function receives an array of all horizontal indices that are being painted and
1254 an array of vertical positions for each marker. Both arrays have the same length.
1255
1256 The output has to be an array of the same length where each entry represents a marker that will be drawn for that value. If the array contains a `null` value
1257 that specific marker is not drawn.
1258
1259 Note that this method is not used when the marker is drawn for the legend entry.
1260
1261 This method will be invoked on each frame so it is important that it is optimized for performance. */
1262 markerStyleFunction?: (
1263 /** The items for which the markers can be displayed. */
1264 items: Array<FacetChartItemValue>, verticalPositions: Array<number>) => Array<LinearChartSettingsSeriesStyleMarker>;
1265 }
1266 export interface FacetChartSettingsToolbar extends BaseSettingsToolbar {
1267 /** Show/hide toolbar. */
1268 enabled?: boolean;
1269 /** A list of toolbar items. If this is specified, it overrides all the default buttons.
1270
1271 Use `extraItems` to specify items that should be displayed in addition to the defaults. */
1272 items?: Array<BaseSettingsToolbarItem>;
1273 /** Whether to show the Lin/Log button in the toolbar. */
1274 logScale?: boolean;
1275 /** Whether to show the zoom out button. */
1276 zoomOut?: boolean;
1277 }
1278 export interface GeoChartAggregationDataObjectNode extends GeoChartGeoDataObjectNode {
1279 /** Contains all original node data objects that have been aggregated into this instance */
1280 aggregatedNodes: Array<GeoChartGeoDataObjectNode>;
1281 aggregatedWeight: number;
1282 }
1283 export interface GeoChartDataObject extends BaseDataErrorResponse {
1284 /** Instructs the chart to clear the data cache before applying this dataset.
1285
1286 This can be used as a temporary workaround to use `GeoChart.addData()` to replace the whole dataset since unlike
1287 `GeoChart.replaceData()` the `addData` method updates existing nodes instead of replacing them, thus enabling things
1288 like radius animations. */
1289 clearCache?: boolean;
1290 east: number;
1291 links?: Array<GeoChartGeoDataObjectLink>;
1292 nodes: Array<GeoChartGeoDataObjectNode>;
1293 north: number;
1294 south: number;
1295 west: number;
1296 }
1297 export interface GeoChartDataRequest {
1298 /** Specifies the latitude coordinates of the grid that is included in the request.
1299 @deprecated use the automatic proximity based aggregation instead */
1300 aggregateLat: Array<number>;
1301 /** Specifies the latitude coordinates of the grid that is included in the request.
1302 @deprecated use the automatic proximity based aggregation instead */
1303 aggregateLng: Array<number>;
1304 /** The value from the configuration.
1305 @deprecated use the automatic proximity based aggregation instead */
1306 aggregateMinItems: number;
1307 east: number;
1308 id: string;
1309 layerId: string;
1310 north: number;
1311 south: number;
1312 west: number;
1313 zoom: number;
1314 }
1315 export interface GeoChartGeoDataObjectLink extends ItemsChartDataObjectLink {
1316 }
1317 export interface GeoChartGeoDataObjectNode extends ItemsChartDataObjectNode {
1318 /** Marks this node as a result for the grid based aggregation. If this is specified, `count` must be as well.
1319 @deprecated use the automatic proximity based aggregation instead */
1320 aggregate?: boolean;
1321 /** Coordinates can specify a point (for example, [0, 2]) or a shape (an array containing separate polygons, where each polygon
1322 is an array of concatenated X/Y coordinate pairs, for example [[0,2,2,2,2,0],[10,10,12,12]])
1323
1324 The first value in the coordinate pair is longitude (east/west) and the second is latitude (north/south). */
1325 coordinates?: [number, number] | Array<Array<number>>;
1326 /** The count of aggregated nodes within the grid cell. Only used if `aggregate` is set to `true`.
1327 @deprecated use the automatic proximity based aggregation insted */
1328 count?: number;
1329 /** If the data object has been generated from GeoJSON, this property will contain the entire feature object from which this data object was created. */
1330 shapeFeature?: any;
1331 /** If the data object has been generated from GeoJSON, this property will contain the entire geometry object from which this data object was created. */
1332 shapeGeometry?: any;
1333 type?: string;
1334 }
1335 export interface GeoChartSettings extends ItemsChartSettings {
1336 /** Chart area related settings. */
1337 area?: GeoChartSettingsArea;
1338 background?: GeoChartSettingsBackground;
1339 /** Settings used to load data into chart. Customise preferred data source feeding methods.
1340 You can use one of these options: url, data function, preloaded data. */
1341 data?: Array<GeoChartSettingsData>;
1342 filters?: {
1343 nodeFilter?: (node: GeoChartGeoDataObjectNode) => boolean;
1344 };
1345 /** Customise chart resize handles or animation duration settings. */
1346 interaction?: GeoChartSettingsInteraction;
1347 /** The default values for specific layer types. Any custom values in specified in `layers` property will be applied on top of the
1348 values specified here, based on the `type` property witin them. */
1349 layerTypes?: {
1350 aggregateOnShapes?: GeoChartSettingsLayerAggregated;
1351 charts?: GeoChartSettingsLayerCharts;
1352 items?: GeoChartSettingsLayerItems;
1353 shapes?: GeoChartSettingsLayerShapes;
1354 };
1355 /** An array of objects. Have a look at "layerTypes" for the possible object types */
1356 layers?: Array<GeoChartSettingsLayerBase>;
1357 /** Specifies the defaults for all layers, independent of the layer type.
1358 @deprecated This section is no longer used, specify the defaults in `layerTypes` section, based on the appropriate layer type. */
1359 layersDefault?: GeoChartSettingsLayerBase;
1360 navigation?: {
1361 drilldownLayer?: string;
1362 initialDrilldown?: Array<string>;
1363 /** Specify latitude of the initial center coordinate (WGS-84 degrees) */
1364 initialLat?: number;
1365 /** Specify longitude of the initial center coordinate (WGS-84 degrees) */
1366 initialLng?: number;
1367 /** Specify the initial zoom level for the chart. (For most chart data sources, valid values are 0..18 inclusive). */
1368 initialZoom?: number;
1369 maxBounds?: {
1370 east?: number;
1371 north?: number;
1372 south?: number;
1373 west?: number;
1374 };
1375 maxZoom?: number;
1376 minZoom?: number;
1377 };
1378 style?: {
1379 fadeTime?: number;
1380 selection?: {
1381 fillColor?: string;
1382 sizeConstant?: number;
1383 sizeProportional?: number;
1384 };
1385 };
1386 /** Theme to apply. You can either use this to share configuration objects between multiple charts or use one of the predefined
1387 themes. */
1388 theme?: GeoChartSettings;
1389 /** Please note that currently toolbar is not supported on GeoChart.
1390 @deprecated */
1391 toolbar?: BaseSettingsToolbar;
1392 }
1393 export interface GeoChartSettingsAggregatedShapeStyle extends BaseSettingsBackgroundStyle {
1394 /** Specifies when the aggregated shape is shown behind the node. */
1395 mode?: GeoChartSettingsAggregatedShapeStyleMode;
1396 }
1397 export enum GeoChartSettingsAggregatedShapeStyleMode {
1398 /** The aggregated shapes will always be shown for all nodes. */
1399 always = 2,
1400 /** The aggregated shape will never be shown. */
1401 disabled = 0,
1402 /** The aggregated shape will only be shown for the hovered node (this is the default). */
1403 hovered = 1,
1404 /** The aggregated shapes will always be shown for selected nodes. */
1405 selected = 3,
1406 }
1407 export interface GeoChartSettingsAggregation {
1408 /** The approximate minimum distance in pixels between two nodes before they are aggregated together. */
1409 distance?: number;
1410 /** Enables/Disables automatic aggregation */
1411 enabled?: boolean;
1412 /** Specifies if nodes where the `weightFunction` returns 0 are completely ignored by the aggregation. This means that they
1413 are not drawn in the convex shape and also are not present in the `aggregatedNodes` property. */
1414 ignoreZeroWeight?: boolean;
1415 /** The last zoom level on which the nodes are automatically agregated. When the chart is zoomed in deeper, the original
1416 nodes will be used instead. */
1417 maxZoom?: number;
1418 /** A delegate that can be used to process aggregated nodes before links are aggregated.
1419 The delegate should modify the given array and mapping information if some nodes should be
1420 aggregated differently. */
1421 postProcessAggregatedNodes?: (
1422 /** The aggregated node objects. */
1423 nodes: Array<GeoChartAggregationDataObjectNode>,
1424 /** A dictionary that maps the original node ID to the aggregated node (the same instance that is present in the `nodes` array). */
1425 map: Dictionary<GeoChartAggregationDataObjectNode>,
1426 /** An empty array that the delegate is expected to fill with aggregated nodes that have been modified. */
1427 modifiedNodes: Array<GeoChartAggregationDataObjectNode>) => void;
1428 /** Function that returns the value used as weight in the aggregation process for each node. */
1429 weightFunction?: (node: GeoChartGeoDataObjectNode) => number;
1430 }
1431 export interface GeoChartSettingsArea extends BaseSettingsArea {
1432 /** Area style. */
1433 style?: GeoChartSettingsAreaStyle;
1434 }
1435 export interface GeoChartSettingsAreaStyle extends BaseSettingsAreaStyle {
1436 }
1437 export interface GeoChartSettingsBackground {
1438 enabled?: boolean;
1439 params?: GeoChartSettingsWmsParams | GeoChartSettingsBackgroundParams;
1440 type?: "tile" | "wms";
1441 url?: string;
1442 }
1443 /** This type matches L.TileLayerOptions type from the Leaflet library. */
1444 export interface GeoChartSettingsBackgroundParams {
1445 /** e.g. "� CloudMade" � the string used by the attribution control, describes
1446 the layer data.
1447
1448 Default value: ''. */
1449 attribution?: string;
1450 /** If set to true, the tile coordinates won't be wrapped by world width (-180
1451 to 180 longitude) or clamped to lie within world height (-90 to 90). Use this
1452 if you use Leaflet for maps that don't reflect the real world (e.g. game, indoor
1453 or photo maps).
1454
1455 Default value: false. */
1456 continuousWorld?: boolean;
1457 /** If true and user is on a retina display, it will request four tiles of half the
1458 specified size and a bigger zoom level in place of one to utilize the high resolution.
1459
1460 Default value: false. */
1461 detectRetina?: boolean;
1462 /** URL to the tile image to show in place of the tile that failed to load.
1463
1464 Default value: ''. */
1465 errorTileUrl?: string;
1466 /** Maximum zoom number the tiles source has available. If it is specified,
1467 the tiles on all zoom levels higher than maxNativeZoom will be loaded from
1468 maxZoom level and auto-scaled.
1469
1470 Default value: null. */
1471 maxNativeZoom?: number;
1472 /** Maximum zoom number.
1473
1474 Default value: 18. */
1475 maxZoom?: number;
1476 /** Minimum zoom number.
1477
1478 Default value: 0. */
1479 minZoom?: number;
1480 /** If set to true, the tiles just won't load outside the world width (-180 to 180
1481 longitude) instead of repeating.
1482
1483 Default value: false. */
1484 noWrap?: boolean;
1485 /** The opacity of the tile layer.
1486
1487 Default value: 1.0. */
1488 opacity?: number;
1489 /** If true, all the tiles that are not visible after panning are placed in a reuse
1490 queue from which they will be fetched when new tiles become visible (as opposed
1491 to dynamically creating new ones). This will in theory keep memory usage
1492 low and eliminate the need for reserving new memory whenever a new tile is
1493 needed.
1494
1495 Default value: false. */
1496 reuseTiles?: boolean;
1497 /** Subdomains of the tile service. Can be passed in the form of one string (where
1498 each letter is a subdomain name) or an array of strings.
1499
1500 Default value: 'abc'. */
1501 subdomains?: string | Array<string>;
1502 /** Tile size (width and height in pixels, assuming tiles are square).
1503
1504 Default value: 256. */
1505 tileSize?: number;
1506 /** If true, inverses Y axis numbering for tiles (turn this on for TMS services).
1507
1508 Default value: false. */
1509 tms?: boolean;
1510 /** If true, all the tiles that are not visible after panning are removed (for
1511 better performance). true by default on mobile WebKit, otherwise false. */
1512 unloadInvisibleTiles?: boolean;
1513 /** If false, new tiles are loaded during panning, otherwise only after it (for
1514 better performance). true by default on mobile WebKit, otherwise false. */
1515 updateWhenIdle?: boolean;
1516 /** The explicit zIndex of the tile layer. Not set by default. */
1517 zIndex?: number;
1518 /** The zoom number used in tile URLs will be offset with this value.
1519
1520 Default value: 0. */
1521 zoomOffset?: number;
1522 /** If set to true, the zoom number used in tile URLs will be reversed (maxZoom
1523 - zoom instead of zoom)
1524
1525 Default value: false. */
1526 zoomReverse?: boolean;
1527 }
1528 export interface GeoChartSettingsData extends ItemsChartSettingsData {
1529 /** Specifies the size of the grid that is included in the request.
1530 @deprecated use the automatic proximity based aggregation instead */
1531 aggregationGridSize?: number;
1532 /** The value will be passed to the data request together with the aggregation grid data.
1533 @deprecated use the automatic proximity based aggregation instead */
1534 aggregationMinCount?: number;
1535 bounds?: [number, number, number, number];
1536 dataFunction?: (request: GeoChartDataRequest, success: (data: GeoChartDataObject) => void, fail: (result: BaseDataErrorResponse) => void) => void;
1537 maxRequestRect?: [number, number];
1538 /** If true, data source will use bounds to limit response, if false, assume all data is returned. */
1539 perBoundsData?: boolean;
1540 /** If true, separate data is requested at each drilldown level. */
1541 perDrilldownData?: boolean;
1542 /** If true, separate data is requested at each zoom level. */
1543 perZoomData?: boolean;
1544 prefetchRatio?: number;
1545 /** Provides the ability to embed chart data directly into the chart configuration.
1546
1547 This data can be complete or act as the initial data where the rest will be requested dynamically using
1548 `url` or `dataFunction`. */
1549 preloaded?: GeoChartDataObject;
1550 /** If true, the data request will include the coordinates for the aggregation grid.
1551 @deprecated use the automatic proximity based aggregation instead */
1552 useGridBasedAggregation?: boolean;
1553 wrapLng?: boolean;
1554 }
1555 export interface GeoChartSettingsInteraction extends ItemsChartSettingsInteraction {
1556 mode?: "drilldown" | "select" | "toggle";
1557 /** Extra interaction options to control such behavior like disabling zoom in on double click. */
1558 zooming?: GeoChartSettingsInteractionZooming;
1559 }
1560 export interface GeoChartSettingsInteractionZooming extends ItemsChartSettingsInteractionZooming {
1561 /** Enables/Disables zoom in on double click. Informs Leaflet not to do this action. */
1562 zoomInOnDoubleClick?: boolean;
1563 }
1564 export interface GeoChartSettingsLayerAggregated extends GeoChartSettingsLayerOverlay {
1565 /** Aggregation function to use. */
1566 aggregation?: "sum" | "min" | "max" | "first" | "last" | "avg" | "count";
1567 /** Data field used for aggregation. */
1568 aggregationField?: string;
1569 /** Custom function to call for aggregation */
1570 aggregationFunction?: (
1571 /** array of nodes matching single shape */
1572 nodesArray: Array<GeoChartGeoDataObjectNode>) => number;
1573 /** The ID of a linked shapes layer. Style changes will be applied to this layer. The shapes layer must be defined before the aggregation layer. */
1574 shapesLayer?: string;
1575 /** Function for applying the aggregated value on node. */
1576 styleFunction?: (
1577 /** shape node style is being applied to */
1578 node: ItemsChartNode,
1579 /** computed aggregate value */
1580 value: number) => void;
1581 }
1582 export interface GeoChartSettingsLayerBase {
1583 data?: {
1584 id?: string;
1585 };
1586 enabled?: boolean;
1587 id?: string;
1588 maxZoom?: number;
1589 minZoom?: number;
1590 name?: string;
1591 /** Forces style re-evaluation on zoom change. Use to provide zoom dependant style. */
1592 perZoomStyle?: boolean;
1593 type?: "shapes" | "items" | "charts" | "aggregateOnShapes";
1594 }
1595 export interface GeoChartSettingsLayerCharts extends GeoChartSettingsLayerOverlay {
1596 /** Chart type to use */
1597 chartType?: "piechart" | "timechart" | "facetchart";
1598 data?: {
1599 /** ID should be `null` because the charts layer does not retrieve data this way. */
1600 id?: string;
1601 };
1602 /** The settings that will be passed to each nested chart. Note that if `settingsFunction` is also specified, these
1603 settings will not be used and `settingsFunction` will be called instead. */
1604 settings?: TimeChartSettings | PieChartSettings | FacetChartSettings;
1605 /** The delegate that will be used to retrieve custom setting for a particular node. This function is called every time the node is modified.
1606 The result should only contain modified settings that will be passed to `chart.updateSettings()`. */
1607 settingsFunction?: (node: ItemsChartNode, data: GeoChartGeoDataObjectNode) => TimeChartSettings | PieChartSettings | FacetChartSettings;
1608 /** The charts layer will take data from shapes or nodes layer and creates a chart for every shape/node. */
1609 shapesLayer?: string;
1610 }
1611 export interface GeoChartSettingsLayerItems extends GeoChartSettingsLayerBase {
1612 /** Controls automatic proximity based aggregation. */
1613 aggregation?: GeoChartSettingsAggregation;
1614 /** Contains settings for the auras drawn beneath the nodes. */
1615 auras?: ItemsChartSettingsNodesLayerAuras;
1616 layout?: GeoChartSettingsNodesLayout;
1617 style?: GeoChartSettingsNodesLayerStyle;
1618 }
1619 export interface GeoChartSettingsLayerOverlay extends GeoChartSettingsLayerBase {
1620 /** The ID of a linked shapes layer. The shapes layer must be defined before the overlay layer. */
1621 shapesLayer?: string;
1622 }
1623 export interface GeoChartSettingsLayerShapes extends GeoChartSettingsLayerBase {
1624 style?: GeoChartSettingsShapesLayerStyle;
1625 }
1626 export interface GeoChartSettingsNodesLayerStyle extends ItemsChartSettingsNodesLayerStyle {
1627 /** The style used to draw convex shapes for the automatically aggregated nodes. */
1628 aggregatedShape?: GeoChartSettingsAggregatedShapeStyle;
1629 }
1630 export interface GeoChartSettingsNodesLayout {
1631 /** Anchor strength, relative to link strength. */
1632 anchorStrength?: number;
1633 /** Layout mode. */
1634 mode?: "dynamic" | "static";
1635 /** Desired distance between nodes. */
1636 nodeSpacing?: number;
1637 }
1638 export interface GeoChartSettingsShapesLayerNodeStyle extends ItemsChartSettingsNodeStyle {
1639 /** Specifies if the node representing the shape can be drilled down into. */
1640 expandable?: boolean;
1641 }
1642 export interface GeoChartSettingsShapesLayerStyle extends GeoChartSettingsNodesLayerStyle {
1643 /** Default node style. */
1644 node?: GeoChartSettingsShapesLayerNodeStyle;
1645 /** Controls shape simplification to improve rendering performance.
1646 Distance in pixels between points to simplify.
1647 Use 0 to disable simplification. */
1648 shapeSimplificationPrecision?: number;
1649 }
1650 /** This type matches L.WMSOptions type from the Leaflet library. */
1651 export interface GeoChartSettingsWmsParams {
1652 /** WMS image format (use 'image/png' for layers with transparency).
1653
1654 Default value: false. */
1655 format?: string;
1656 /** (required) Comma-separated list of WMS layers to show.
1657
1658 Default value: ''. */
1659 layers?: string;
1660 /** Comma-separated list of WMS styles.
1661
1662 Default value: 'image/jpeg'. */
1663 styles?: string;
1664 /** If true, the WMS service will return images with transparency.
1665
1666 Default value: '1.1.1'. */
1667 transparent?: boolean;
1668 /** Version of the WMS service to use. */
1669 version?: string;
1670 }
1671 /** Describes the base properties shared between all events raised by the different charts. */
1672 export interface ItemsChartChartClickEventArguments extends ItemsChartChartEventArguments {
1673 clickItem: BaseLabel;
1674 clickLink: ItemsChartLink;
1675 clickNode: ItemsChartNode;
1676 }
1677 /** Describes the base properties shared between all events raised by the different charts. */
1678 export interface ItemsChartChartEventArguments extends BaseChartEventArguments {
1679 chartX: number;
1680 chartY: number;
1681 hoverItem: ItemsChartItemsLayerLinkItem | ItemsChartItemsLayerNodeItem;
1682 hoverLink: ItemsChartLink;
1683 hoverNode: ItemsChartNode;
1684 selection: Array<ItemsChartNode | ItemsChartLink>;
1685 }
1686 export interface ItemsChartDataObjectBase extends BaseDataErrorResponse {
1687 }
1688 export interface ItemsChartDataObjectLink extends ItemsChartDataObjectBase {
1689 className?: string;
1690 /** The ID of the node where the link originates. */
1691 from: string;
1692 /** The unique identifier of the link. */
1693 id?: string;
1694 style?: ItemsChartSettingsLinkStyle;
1695 /** The ID of the target node. */
1696 to: string;
1697 }
1698 export interface ItemsChartDataObjectNode extends ItemsChartDataObjectBase {
1699 className?: string;
1700 /** The unique identifier of the node. */
1701 id: string;
1702 /** Determines if the node data is complete (when `true`) or if the data is incomplete and only provided
1703 as a placeholder (value `false`).
1704
1705 In most cases this should be specified as `true`, the exception being a scenario where another node contains
1706 a link to this node, that link is included in the data response but the data for this node is not available
1707 so a placeholder is created and the chart will have to issue another data request to load the actual data. */
1708 loaded: boolean;
1709 style?: ItemsChartSettingsNodeStyle;
1710 }
1711 export interface ItemsChartLink extends ItemsChartSettingsLinkStyle {
1712 /** Specifies if the link was used for radial/hierarchy layout (false) or not (true). This flag is ignored (always false) by static/dynamic layouts. */
1713 background: boolean;
1714 /** Data object that this link represents. */
1715 data: ItemsChartDataObjectLink;
1716 /** Node at the start of the link. */
1717 from: ItemsChartNode;
1718 /** Whether or not the mouse cursor is hovering over the link. */
1719 hovered: boolean;
1720 /** ID of the link */
1721 id: string;
1722 /** Specifies if the link is invisible - thus completely skipping the drawing and hit testing. However the link is not removed.
1723 This flag is set only by user code. */
1724 invisible: boolean;
1725 /** Link relevance is used in NetChart when the navigation mode is `focusnodes` and is intended to be a rough measure of how "interesting" a link is.
1726 For information about what relevance is and how it's calculated, see the [Focusnodes algorithm](net-chart/advanced-topics/focusnodes-algorithm-details.html). */
1727 relevance: number;
1728 /** If this is `false`, then the node is visible. If it is `true` or a non-zero a number (a "truthy" value), then the removal animation is in progress.
1729 After the removal animation completes, the node will be hidden. */
1730 removed: number | boolean;
1731 /** Whether or not the link is selected. */
1732 selected: boolean;
1733 /** Node at the end of the link. */
1734 to: ItemsChartNode;
1735 }
1736 /** A visible node. */
1737 export interface ItemsChartNode extends ItemsChartSettingsNodeStyle {
1738 /** Whether or not the node is a background node. This flag is set only by user code. */
1739 background: boolean;
1740 /** Data object that this node represents */
1741 data: ItemsChartDataObjectNode;
1742 /** Data obects for all links that are attached to the node. Note that not all of them may be visible. Only links with both end nodes visible are shown. */
1743 dataLinks: Array<ItemsChartDataObjectLink>;
1744 /** Whether or not the node is expanded. A node counts as "expanded" if all its links are visible. */
1745 expanded: boolean;
1746 focused: boolean;
1747 /** Whether or not the mouse cursor is hovering over the node. */
1748 hovered: boolean;
1749 /** ID of the node */
1750 id: string;
1751 /** Specifies if the node is invisible - thus completely skipping the drawing and hit testing. However the node is not removed.
1752 This flag is set only by user code. */
1753 invisible: boolean;
1754 /** A list of additional items for the particular node. To add or remove items, change this array. */
1755 items: Array<ItemsChartSettingsNodeItem>;
1756 /** Visible links attached to the node. */
1757 links: Array<ItemsChartLink>;
1758 /** Node relevance is used in NetChart when the navigation mode is `focusnodes` and is intended to be a rough measure of how "interesting" a node is.
1759 For information about what relevance is and how it's calculated, see the [Focusnodes algorithm](net-chart/advanced-topics/focusnodes-algorithm-details.html). */
1760 relevance: number;
1761 /** If this is `false`, then the node is visible. If it is `true` or a non-zero a number (a "truthy" value), then the removal animation is in progress.
1762 After the removal animation completes, the node will be hidden. */
1763 removed: number | boolean;
1764 /** Whether or not the node is selected. */
1765 selected: boolean;
1766 /** If true, the node is fixed in place and does not get affected by layout algorithms. This gets set automatically after the user drags a node in NetChart. */
1767 userLock: boolean;
1768 }
1769 export interface ItemsChartItemsLayerLinkItem extends ItemsChartItemsLayerLinkLabel {
1770 /** The style settings used to render this label. */
1771 style: ItemsChartSettingsLinkItem;
1772 }
1773 export interface ItemsChartItemsLayerLinkLabel extends ItemsChartItemsLayerNodeLabel {
1774 /** The style settings used to render this label. */
1775 style: ItemsChartSettingsItemsLayerLinkLabelStyle;
1776 }
1777 export interface ItemsChartItemsLayerNodeItem extends ItemsChartItemsLayerNodeLabel {
1778 /** The style settings used to render this label. */
1779 style: ItemsChartSettingsNodeItem;
1780 }
1781 export interface ItemsChartItemsLayerNodeLabel extends BaseLabel {
1782 /** The style settings used to render this label. */
1783 style: ItemsChartSettingsItemsLayerLabelStyle;
1784 }
1785 export enum ItemsChartNodeAnchorMode {
1786 Fixed = 2,
1787 /** Node if free-floating, */
1788 Floating = 0,
1789 Scene = 1,
1790 }
1791 export interface ItemsChartSettings extends BaseSettings {
1792 advanced?: ItemsChartSettingsAdvanced;
1793 /** Settings used to load data into chart. Customise preferred data source feeding methods.
1794 You can use one of these options: url, data function, preloaded data. */
1795 data?: Array<ItemsChartSettingsData>;
1796 /** The events used to handle user interaction with UI elements. */
1797 events?: BaseSettingsEvents<ItemsChartChartEventArguments, ItemsChartChartClickEventArguments>;
1798 /** Info popup for item - meaning links or nodes - with configurable content rendered. */
1799 info?: {
1800 /** Show/hide info popup */
1801 enabled?: boolean;
1802 /** Returns html string to display in passed links info popup. */
1803 linkContentsFunction?: (
1804 /** link data */
1805 linkData: ItemsChartDataObjectLink,
1806 /** link object */
1807 link: ItemsChartLink,
1808 /** callback function */
1809 asyncCallback: (contents: string) => void) => string;
1810 /** Returns html string to display in passed nodes info popup. */
1811 nodeContentsFunction?: (
1812 /** node data */
1813 nodeData: ItemsChartDataObjectNode,
1814 /** node object */
1815 node: ItemsChartNode,
1816 /** callback function */
1817 callback: (contents: string) => void) => string;
1818 };
1819 /** Customise chart resize handles or animation duration settings. */
1820 interaction?: ItemsChartSettingsInteraction;
1821 /** Configurable link menu with option to specify a range of displaying buttons. */
1822 linkMenu?: ItemsChartSettingsLinkMenu;
1823 /** Configurable node menu with option to specify a range of displaying buttons. */
1824 nodeMenu?: ItemsChartSettingsNodeMenu;
1825 style?: {
1826 };
1827 }
1828 export interface ItemsChartSettingsAdvanced extends BaseSettingsAdvanced {
1829 /** Whether to display a loading indicator on every node, otherwise only a global loading indicator. */
1830 perNodeLoadingIndicator?: boolean;
1831 }
1832 export interface ItemsChartSettingsAuraStyle extends BaseSettingsBackgroundStyle {
1833 /** Whether the aura is enabled and visible */
1834 enabled?: boolean;
1835 /** Group ID for legend. Items in the same group have a different toggle behavior. When all the items in a group are enabled,
1836 clicking an item causes that item to stay enabled and all other items are disabled. Clicking it again enables all items
1837 again. Consequently, at least one item in each group is always enabled. The exception to this is if the group ID is null
1838 (no group) or the group contains only one item. Then the item is toggled on/off individually. */
1839 legendGroupId?: string;
1840 /** Name to show in legend */
1841 nameLegend?: string;
1842 /** Whether or not to show this aura in legend. */
1843 showInLegend?: boolean;
1844 /** Order in which to draw the auras. Auras with bigger order numbers are drawn on top of auras with smaller order numbers.
1845 Auras with equivalent order numbers are drawn ordered by ID. */
1846 zIndex?: number;
1847 }
1848 /** If display attribute is "customShape", SettingsCustomShape are
1849 required to determine how to render the custom shape */
1850 export interface ItemsChartSettingsCustomShape {
1851 /** When drawing links/arrows to the shape it may be desirable to determine the point where the arrow
1852 reaches and touches the respective shape. Given the start point of the ray, this function should return
1853 the distance to the outer border of the shape */
1854 distanceToEdge?: (
1855 /** radius */
1856 r: number,
1857 /** width */
1858 w: number,
1859 /** the ray towards shape */
1860 ddx: number,
1861 /** the ray towards shape */
1862 ddy: number) => number;
1863 /** Function to test if hover action was over the respective shape. The function will be called in the context of the appropriate INode (i.e. "this"=INode). */
1864 hitTest?: (
1865 /** X coordinate of the hit test */
1866 x: number,
1867 /** Y coordinate of the hit test */
1868 y: number,
1869 /** Node scalign factor */
1870 itemScale: number,
1871 /** Previous closest distance. */
1872 prevBest: number) => number;
1873 /** Method performed on update (such as hover). The function will be called in the context of the appropriate INode (i.e. "this"=INode). */
1874 onUpdate?: (
1875 /** The canvas on which the node will be rendered */
1876 context: CanvasRenderingContext2D,
1877 /** The node radius radius, also available as "this.radius" */
1878 radius: number) => {
1879 /** Bounds of the node for the given radius. The values are [x0, y0, x1, y1] for the upper left and lower right corner respectively. */
1880 bounds: [number, number, number, number];
1881 /** One half of the width of the node. */
1882 HWidth: number;
1883 /** One half of the height of the node */
1884 HHeight: number;
1885 /** Optional. The anchor point [x,y] where the links will be attached. If not specified, the anchor points will be left at defaults. */
1886 anchor?: [number, number];
1887 };
1888 /** Function to render the custom shape in canvas 2d context. The function will be called in the context of the appropriate INode (i.e. "this"=INode). */
1889 paint?: (
1890 /** The canvas 2d rendering context for rendering */
1891 context: CanvasRenderingContext2D,
1892 /** The X value of the center coordinate, where node needs to be rendered */
1893 x: number,
1894 /** The Y value of the center coordinate where the node needs to be rendered */
1895 y: number,
1896 /** Half of the width of the node */
1897 hWidth: number,
1898 /** Half of the height of the node */
1899 hHeight: number,
1900 /** Image of the node, if any. */
1901 image: HTMLCanvasElement | HTMLImageElement,
1902 /** Whether or not to paint details (image, label). When the node is zoomed out far enough, the details aren't painted. */
1903 paintDetails: boolean) => void;
1904 /** Function to render the selection shape for custom shape in canvas 2d context.
1905 The function will be called in the context of the appropriate INode (i.e. "this"=INode). */
1906 paintSelection?: (
1907 /** The canvas 2d rendering context for rendering */
1908 context: CanvasRenderingContext2D,
1909 /** The X value of the center coordinate, where node needs to be rendered */
1910 x: number,
1911 /** The Y value of the center coordinate where the node needs to be rendered */
1912 y: number,
1913 /** Half of the width of the node */
1914 hWidth: number,
1915 /** Half of the height of the node */
1916 hHeight: number) => void;
1917 }
1918 export interface ItemsChartSettingsData extends BaseSettingsData {
1919 /** Count of caching items including only links and nodes. */
1920 cacheSize?: number;
1921 /** Specifies the random layout method: grid, tree, uniform. The default is uniform. */
1922 random?: "grid" | "tree" | "uniform";
1923 randomGridLinkProbability?: number;
1924 /** Generates random data. */
1925 randomLinks?: number;
1926 /** Generates random data. Specify a value larger than 0 to enable generating random data. */
1927 randomNodes?: number;
1928 randomTreeDensity?: number;
1929 /** Max number of nodes to submit in a single request. */
1930 requestMaxUnits?: number;
1931 }
1932 export interface ItemsChartSettingsInteraction extends BaseSettingsInteraction {
1933 /** Whether to allow moving nodes around. */
1934 nodesMovable?: boolean;
1935 /** Move chart vertically and horizontally by clicking on the main chart pane and dragging it on any direction. */
1936 panning?: {
1937 /** Enables/disables chart panning. */
1938 enabled?: boolean;
1939 };
1940 /** Select node to expand it or getting path. */
1941 selection?: ItemsChartSettingsInteractionSelection;
1942 /** Zoom in or out by swiping up or down with mouse scroll pad or by using the Zoom-out feature at the top left. */
1943 zooming?: ItemsChartSettingsInteractionZooming;
1944 }
1945 export interface ItemsChartSettingsInteractionSelection {
1946 /** Whether to move nodes outside of screen area. */
1947 allowMoveNodesOffscreen?: boolean;
1948 /** Enable/disable selection. */
1949 enabled?: boolean;
1950 /** Whether to set links selectable. */
1951 linksSelectable?: boolean;
1952 /** Whether to retain nodes location after being moved by the user. */
1953 lockNodesOnMove?: boolean;
1954 /** Whether to set nodes selectable. */
1955 nodesSelectable?: boolean;
1956 /** Max click distance from object that still counts as click on the object. */
1957 tolerance?: number;
1958 }
1959 export interface ItemsChartSettingsInteractionZooming {
1960 /** Whether to auto zoom every time user clicks on the chart. */
1961 autoZoomAfterClick?: boolean;
1962 /** A double-click on empty space will trigger zoom in by this value. Set to null or false to disable double click zooming. */
1963 doubleClickZoom?: number;
1964 /** Whether to zoom by two finger pinch. */
1965 fingers?: boolean;
1966 /** Sensitivity of wheel zoom. */
1967 sensitivity?: number;
1968 /** Whether to zoom by mouse wheel. */
1969 wheel?: boolean;
1970 /** Enable/Disable zoom in on double click. */
1971 zoomInOnDoubleClick?: boolean;
1972 }
1973 export interface ItemsChartSettingsItemClass {
1974 /** Class name */
1975 className?: string;
1976 /** Group ID for legend. Items in the same group have a different toggle behavior. When all the items in a group are enabled,
1977 clicking an item causes that item to stay enabled and all other items are disabled. Clicking it again enables all items
1978 again. Consequently, at least one item in each group is always enabled. The exception to this is if the group ID is null
1979 (no group) or the group contains only one item. Then the item is toggled on/off individually. */
1980 legendGroupId?: string;
1981 /** Name to use in legend */
1982 nameLegend?: string;
1983 /** Whether or not to show in legend. */
1984 showInLegend?: boolean;
1985 }
1986 export interface ItemsChartSettingsItemsLayerItemStyle extends ItemsChartSettingsItemsLayerLabelStyle {
1987 /** Whether to enlarge the item when its parent is being hovered. */
1988 hoverEffect?: boolean;
1989 /** Governs the order of item drawing. Items with negative `zIndex` will be drawn beneath its parent. */
1990 zIndex?: number;
1991 }
1992 export interface ItemsChartSettingsItemsLayerLabelStyle extends BaseSettingsLabelStyle {
1993 /** Whether to apply different scale according to initial size of the link or node. */
1994 scaleWithSize?: boolean;
1995 /** Whether to apply the scale if zoom changes. If false, the label size never changes. */
1996 scaleWithZoom?: boolean;
1997 }
1998 export interface ItemsChartSettingsItemsLayerLinkLabelStyle extends ItemsChartSettingsItemsLayerLabelStyle {
1999 /** Whether to rotate link labels in the same direction as link */
2000 rotateWithLink?: boolean;
2001 }
2002 export interface ItemsChartSettingsItemsLayerStyle {
2003 /** An "all included" style function. */
2004 allObjectsStyleFunction?: (
2005 /** all nodes that currently loaded on the chart */
2006 nodes: Array<ItemsChartNode>,
2007 /** all links that are currently loaded on the chart */
2008 links: Array<ItemsChartLink>) => {
2009 modifiedNodes: Array<ItemsChartNode>;
2010 modifiedLinks: Array<ItemsChartLink>;
2011 };
2012 /** Items are small UI elements that provide extra information. Items are attached to nodes or links and can display a label, image or both. */
2013 item?: ItemsChartSettingsItemsLayerItemStyle;
2014 /** Default link style. */
2015 link?: ItemsChartSettingsLinkStyle;
2016 /** The class rules to apply individual style for link subset. Use known CSS class definition practice.
2017 Define one or more classes by specifying name and style and apply those by node definition. If multiple
2018 classes applied separate them with space and class rules will cascade in order of class definition. */
2019 linkClasses?: Array<ItemsChartSettingsLinkClass>;
2020 /** Link decorations are not painted if link is shorter than this. */
2021 linkDecorationMinSize?: number;
2022 /** Link decoration size calculated as a product of the link radius and scale factor. The value lower than linkDecorationMinSize will take no effect. */
2023 linkDecorationScale?: number;
2024 /** Link details like labels, items are hidden if link width in pixels is below this value. */
2025 linkDetailMinSize?: number;
2026 /** Link details like labels, items are not rendered if chart zoom is below this value. */
2027 linkDetailMinZoom?: number;
2028 /** Additional style to apply when a link is hovered. */
2029 linkHovered?: ItemsChartSettingsLinkStyle;
2030 /** Link text style */
2031 linkLabel?: ItemsChartSettingsItemsLayerLinkLabelStyle;
2032 /** Base node size of link label that scales with link size. */
2033 linkLabelScaleBase?: number;
2034 /** An object defining one or more functions used to calculate node rendering style.
2035 Structure: { 'rule1':function1(nodeObj), 'rule2':function2(nodeObj) }
2036 The functions are executed in lexicographic order whenever node data or links change.
2037 Each function can modify the nodeObj to add specific style elements.
2038 @deprecated use linkStyleFunction instead */
2039 linkRules?: Dictionary<(node: ItemsChartLink) => void>;
2040 /** Additional style to apply when link is selected.
2041
2042 See also the `selection` property that is applied to selected nodes and links. */
2043 linkSelected?: ItemsChartSettingsLinkStyle;
2044 /** A a style function for links. Will be called whenever a link property or data has changed.
2045 Use to dynamically set link style fields. */
2046 linkStyleFunction?: (node: ItemsChartLink) => void;
2047 /** Default node style. */
2048 node?: ItemsChartSettingsNodeStyle;
2049 /** Default node anchor style. */
2050 nodeAnchor?: ItemsChartSettingsNodeAnchorStyle;
2051 /** Additional style to apply for background nodes. */
2052 nodeBackground?: ItemsChartSettingsNodeStyle;
2053 /** The class rules to apply individual style for node subset. Use known CSS class definition practice.
2054 Define one or more classes by specifying name and style and apply those by node definition. If multiple
2055 classes applied separate them with space and class rules will cascade in order of class definition. */
2056 nodeClasses?: Array<ItemsChartSettingsNodeClass>;
2057 /** Node details like labels, items, images are hidden if node width in pixels is below this value. */
2058 nodeDetailMinSize?: number;
2059 /** Node details like labels, items, images are not rendered if chart zoom is below this value. */
2060 nodeDetailMinZoom?: number;
2061 /** Additional style to apply when node is expanded. */
2062 nodeExpanded?: ItemsChartSettingsNodeStyle;
2063 /** Additional style to apply when node is focused. */
2064 nodeFocused?: ItemsChartSettingsNodeStyle;
2065 /** Additional style to apply when a node is hovered. */
2066 nodeHovered?: ItemsChartSettingsNodeStyle;
2067 /** Node label style. */
2068 nodeLabel?: ItemsChartSettingsItemsLayerLabelStyle;
2069 /** Base node size of node label that scales with node size. */
2070 nodeLabelScaleBase?: number;
2071 /** Additional style to apply when a node position is locked. */
2072 nodeLocked?: ItemsChartSettingsNodeStyle;
2073 /** Additional style to apply when node data is not yet loaded. */
2074 nodeNotLoaded?: ItemsChartSettingsNodeStyle;
2075 /** An object defining one or more functions used to calculate node rendering style.
2076 @deprecated use nodeStyleFunction instead */
2077 nodeRules?: Dictionary<(node: ItemsChartNode) => void>;
2078 /** Additional style to apply when node is selected.
2079
2080 See also the `selection` property that is applied to selected nodes and links. */
2081 nodeSelected?: ItemsChartSettingsNodeStyle;
2082 /** A a style function for nodes. Will be called whenever a node property or data has changed.
2083 Use to dynamically set node style fields. */
2084 nodeStyleFunction?: (node: ItemsChartNode) => void;
2085 /** Color for fade out animation of removed objects. */
2086 removedColor?: string;
2087 /** Determines if link radius (width) is automatically scaled when the chart is zoomed in or out.
2088 If set to `null`, the value is inherited from `scaleObjectsWithZoom` */
2089 scaleLinksWithZoom?: boolean;
2090 /** Determines if node radius is automatically scaled when the chart is zoomed in or out.
2091 If `scaleLinksWithZoom` is not set, this value also impacts links. */
2092 scaleObjectsWithZoom?: boolean;
2093 /** The common selection drawn for both links and nodes.
2094
2095 The difference between this and `linkSelected` and `nodeSelected` if that those are applied for each item
2096 individually, while this `selection` style is drawn as a background for all selected items. So if this
2097 specifies a semi-transparent fill color, at no point will there be two overlapping selections visible -
2098 instead one common background polygon will be drawn. */
2099 selection?: {
2100 /** Specifies if the common selection style should be rendered. If this is set to `false`, `nodeSelected`
2101 and `linkSelected` styles should be specified so that the selection can be visualized. */
2102 enabled?: boolean;
2103 /** The fill color of the selection shape. The default `null` means that the same color as the chart background
2104 will be used (assuming `white` when `transparent` is specified). The fill color is required if shadow color
2105 is specified since otherwise the shadow might be invisible. */
2106 fillColor?: string;
2107 /** The outline color of the selection shape. Must be specified for the shadow to be rendered. */
2108 lineColor?: string;
2109 lineWidth?: number;
2110 shadowBlur?: number;
2111 shadowColor?: string;
2112 shadowOffsetX?: number;
2113 shadowOffsetY?: number;
2114 /** Specifies the size in pixels by which the shape size is increased. This value is further multiplied
2115 by the zoom level. */
2116 sizeConstant?: number;
2117 /** The multiplier by which the radius of node is increased to get the selection shape size. Value of 0.2
2118 means that the size is increased by 20% (multiplied by 1.2). */
2119 sizeProportional?: number;
2120 };
2121 }
2122 export interface ItemsChartSettingsLinkClass extends ItemsChartSettingsItemClass {
2123 /** Style settings */
2124 style?: ItemsChartSettingsLinkStyle;
2125 }
2126 /** Link item. */
2127 export interface ItemsChartSettingsLinkItem extends ItemsChartSettingsItemsLayerItemStyle {
2128 /** Offset from link center along link direction. In pixels. */
2129 lx?: number;
2130 /** Offset from link center perpendicular to link direction. In pixels. */
2131 ly?: number;
2132 /** Offset from link center along link direction. A fraction of link length.
2133 Value of -1 places the item at the start of the link.
2134 Value of 1 places the item at the end of the link. */
2135 px?: number;
2136 /** Offset from link center perpendicularly to link direction. A fraction of link radius. */
2137 py?: number;
2138 /** Whether to rotate link labels in the same direction as link */
2139 rotateWithLink?: boolean;
2140 /** X offset from link center in pixels. */
2141 x?: number;
2142 /** Y offset from link center in pixels. */
2143 y?: number;
2144 }
2145 export interface ItemsChartSettingsLinkMenu extends ItemsChartSettingsMenu {
2146 /** Custom buttons for the link menu */
2147 buttons?: Array<ItemsChartSettingsMenuButton>;
2148 /** Prepare html string or DOM element to include in the menu. Called whenever a menu is about to be shown.
2149
2150 If this callback is not defined, the menu will display the label of the element. */
2151 contentsFunction?: (data: ItemsChartDataObjectLink, node: ItemsChartLink, callback: (result: string | HTMLElement) => void) => string | HTMLElement;
2152 }
2153 export interface ItemsChartSettingsLinkStyle {
2154 cursor?: string;
2155 /** Whether this link is considered in calculating a hierarchy layout */
2156 definesLayout?: boolean;
2157 /** null or "U", "D", "L", "R" */
2158 direction?: string;
2159 fillColor?: string;
2160 /** The decoration rendered where the link starts. */
2161 fromDecoration?: "circle" | "arrow";
2162 /** Specifies if the link is invisible - thus completely skipping the drawing and hit testing. This can be used, for example, to hide all links
2163 and showing only ones that meet certain criteria using `linkStyleFunction`. */
2164 invisible?: boolean;
2165 items?: Array<ItemsChartSettingsLinkItem>;
2166 label?: string;
2167 length?: number;
2168 lineDash?: Array<number>;
2169 lineDashBackgroundFillColor?: string;
2170 lineDashShape?: "rectangle" | "triangle" | "hexagon" | "inverseTriangle" | "inverseHexagon" | "diamond";
2171 /** Specifies the width of the line rendered for this link. */
2172 radius?: number;
2173 shadowBlur?: number;
2174 shadowColor?: string;
2175 shadowOffsetX?: number;
2176 shadowOffsetY?: number;
2177 strength?: number;
2178 /** The decoration rendered where the link ends. */
2179 toDecoration?: "circle" | "arrow";
2180 toPieColor?: string;
2181 toPieValue?: number;
2182 }
2183 export interface ItemsChartSettingsMenu {
2184 buttons?: Array<string | ItemsChartSettingsMenuButton>;
2185 /** Prepare html string or DOM element to include in the menu. Called whenever a menu is about to be shown.
2186
2187 If this callback is not defined, the menu will display the label of the element. */
2188 contentsFunction?: (
2189 /** node data */
2190 data: ItemsChartDataObjectBase,
2191 /** node object */
2192 node: ItemsChartNode | ItemsChartLink,
2193 /** callback function if contents are not immediately available */
2194 callback: (
2195 /** New contents to include in the menu */
2196 result: string | HTMLElement) => void) => string | HTMLElement;
2197 /** Show/hide node/link menu. */
2198 enabled?: boolean;
2199 /** Whether to add a view data button to the menu. Useful for debugging. */
2200 showData?: boolean;
2201 }
2202 /** Describes a custom button that is added to the menu. */
2203 export interface ItemsChartSettingsMenuButton {
2204 /** The CSS class that is applied to the HTML link element (the button). */
2205 className?: string;
2206 /** The callback that will be invoked when the menu is clicked. */
2207 onClick?: (
2208 /** The link or node for which the button is being created. */
2209 target: ItemsChartNode | ItemsChartLink,
2210 /** The HTML element that represents the button. */
2211 button: HTMLAnchorElement) => void;
2212 /** The callback that will be invoked when the menu button is first created for the particular object. */
2213 onInit?: (
2214 /** The link or node for which the button is being created. */
2215 target: ItemsChartNode | ItemsChartLink,
2216 /** The HTML element that represents the button. */
2217 button: HTMLAnchorElement) => void;
2218 /** The callback that will be invoked when the menu is being opened after creation. The callback is also
2219 invoked for every button after any menu button is clicked. */
2220 onRefresh?: (
2221 /** The link or node for which the button is being created. */
2222 target: ItemsChartNode | ItemsChartLink,
2223 /** The HTML element that represents the button. */
2224 button: HTMLAnchorElement) => void;
2225 /** The text (HTML is supported) that is displayed within the button. */
2226 text?: string;
2227 /** Tooltip that is displayed while hovering over the button. Leaving `null` uses `text`. */
2228 title?: string;
2229 }
2230 export interface ItemsChartSettingsNodeAnchorStyle {
2231 lineColor?: string;
2232 lineDash?: Array<number>;
2233 lineWidth?: number;
2234 shadowBlur?: number;
2235 shadowColor?: string;
2236 shadowOffsetX?: number;
2237 shadowOffsetY?: number;
2238 }
2239 export interface ItemsChartSettingsNodeClass extends ItemsChartSettingsItemClass {
2240 /** Style settings */
2241 style?: ItemsChartSettingsNodeStyle;
2242 }
2243 /** Node item. */
2244 export interface ItemsChartSettingsNodeItem extends ItemsChartSettingsItemsLayerItemStyle {
2245 /** X offset from node center. A fraction of node width.
2246 Value of -1 places the item at the left edge of the node.
2247 Value of 1 places the item at the right edge of the node. */
2248 px?: number;
2249 /** Y offset from node center. A fraction of node height.
2250 Value of -1 places the item at the top edge of the node.
2251 Value of 1 places the item at the bottom edge of the node. */
2252 py?: number;
2253 /** X offset from node center in pixels. */
2254 x?: number;
2255 /** Y offset from node center in pixels. */
2256 y?: number;
2257 }
2258 export interface ItemsChartSettingsNodeMenu extends ItemsChartSettingsMenu {
2259 /** Buttons to show in the node menu. It is possible to use both custom buttons and built-in buttons. When built-in buttons
2260 are used, they will be shown and hidden as necessary based on the node state. For example, the "unfocus" button will only
2261 be available for focused nodes; the "expand" button will only be available if there are hidden neighbor nodes, etc.
2262
2263 Currently the following built-in buttons are supported:
2264
2265 * `"btn:expand"` - expands the node. All nodes that are linked to this node are shown.
2266 * `"btn:collapse"` - collapses the node. In `focusnodes` navigation this hides all linked nodes with a smaller relevance;
2267 in other navigation modes this hides this node and all linked nodes.
2268 * `"btn:close"` - closes the node. Unavailable for `focusnodes` navigation; in other navigation modes hides all linked nodes
2269 that do not have any links to nodes other than this node or nodes directly linked to this node.
2270 * `"btn:focus"` - focuses the node. This is most useful for `focusnodes` navigation, but available for all navigation modes.
2271 * `"btn:unfocus"` - unfocuses the node. This is most useful for `focusnodes` navigation but available for all navigation modes.
2272 * `"btn:lock"` - pins the node in place and prevents the layout algorithm from moving it around.
2273 * `"btn:unlock"` - unpins the node and allows the layout algorithm to position the node as necessary.
2274 * `"btn:hide"` - Hides this node.
2275 * `"expand"` - Composite setting including `"btn:expand"`, `"btn:collapse"` and `"btn:close"`
2276 * `"focus"` - Composite setting including `"btn:focus"` and `"btn:unfocus"`
2277 * `"lock"` - Composite setting including `"btn:lock"` and `"btn:unlock"`
2278 * `"hide"` - Same as `"btn:hide"`, included for backwards compatibility */
2279 buttons?: Array<string | ItemsChartSettingsMenuButton>;
2280 /** Prepare html string or DOM element to include in the menu. Called whenever a menu is about to be shown.
2281
2282 If this callback is not defined, the menu will display the label of the element. */
2283 contentsFunction?: (data: ItemsChartDataObjectNode, node: ItemsChartNode, callback: (result: string | HTMLElement) => void) => string | HTMLElement;
2284 /** Where the menu is positioned relative to the node */
2285 position?: "center" | "outside";
2286 }
2287 export interface ItemsChartSettingsNodeStyle {
2288 /** Node anchor mode. */
2289 anchorMode?: ItemsChartNodeAnchorMode;
2290 anchorStyle?: ItemsChartSettingsNodeAnchorStyle;
2291 /** Node anchor y position. If not set, initial position will be calculated automatically and conserved.
2292 The coordinate space is dependant on `anchorMode` value.
2293 * anchorMode = "Scene" - the value is in scene coordinates.
2294 * anchorMode = "Display" - the value is in pixels from top-left corner of the chart area. */
2295 anchorX?: number;
2296 /** Node anchor y position. If not set, initial position will be calculated automatically and conserved.
2297 The coordinate space is dependant on `anchorMode` value.
2298 * anchorMode = "Scene" - the value is in scene coordinates.
2299 * anchorMode = "Fixed" - the value is in pixels from top-left corner of the chart area. */
2300 anchorY?: number;
2301 /** When display="rectangle", this setting determines the width/height ratio of the rectangle.
2302 The longest edge of the rectangle will be set to "radius" and the shortest will be calculated from this variable. */
2303 aspectRatio?: number;
2304 /** The ID of one or more auras to which the node belongs. Nodes with the same aura ID will be visually grouped together.
2305
2306 Note that if multiple auras for a single node are specified, `auras.overlap` setting should be set to `true`. */
2307 aura?: string | Array<string>;
2308 coordinates?: Array<number> | Array<Array<number>>;
2309 /** Cursor to show when node is hovered. */
2310 cursor?: string;
2311 /** Custom shape settings supplied, if display == "customShape" */
2312 customShape?: ItemsChartSettingsCustomShape;
2313 /** Valid values: circle (default), text, roundtext, droplet, rectangle, rhombus, diamond, customShape */
2314 display?: string;
2315 /** Controls if node is draggable; Values: draggable false - node cannot be dragged; draggable true - node can be dragged; Default is `true`. */
2316 draggable?: boolean;
2317 fillColor?: string | CanvasGradient;
2318 /** Fill gradient.
2319 For example: [[0,"black"],[0.5,"red"],[1, "orange"]]. */
2320 fillGradient?: GradientDefinition;
2321 /** Forces hierarchy layout to place the node at a specific level */
2322 hierarchyLevel?: number;
2323 /** Forces hierarchy layout to place the node a certain number of
2324 levels above or below it's expected location */
2325 hierarchyOffset?: number;
2326 image?: string;
2327 /** Specifies the image cropping method. Valid values are `false` (disable cropping), `true` (default cropping mode), `"crop"`, `"letterbox"` and `"fit"`. */
2328 imageCropping?: "fit" | boolean | "crop" | "letterbox";
2329 /** Specifies if the node is invisible - thus completely skipping the drawing and hit testing. This can be used, for example, to hide all nodes
2330 and showing only ones that meet certain criteria using `nodeStyleFunction`. */
2331 invisible?: boolean;
2332 /** Additional items that are rendered on and around the node. */
2333 items?: Array<ItemsChartSettingsNodeItem>;
2334 /** The label text that is displayed below the node. Set to an empty string "" to remove the label if it has been added before. */
2335 label?: string;
2336 labelStyle?: ItemsChartSettingsItemsLayerLabelStyle;
2337 lineColor?: string;
2338 lineDash?: Array<number>;
2339 lineWidth?: number;
2340 /** Node opacity. */
2341 opacity?: number;
2342 radius?: number;
2343 shadowBlur?: number;
2344 shadowColor?: string;
2345 shadowOffsetX?: number;
2346 shadowOffsetY?: number;
2347 }
2348 export interface ItemsChartSettingsNodesLayerAuras {
2349 /** The cell size of the grid (in display pixels). Smaller values result in more precise aura calculations but
2350 can be much slower. Note that decreasing the value also increses the memory requirements which can be
2351 significant if the number of auras is large. */
2352 cellSize?: number;
2353 /** Defines the default colors that are applied to auras for whom there are no specific style settings
2354 defined in the `style` property.
2355
2356 If this is set to an empty array, only auras explicitly defined in `style` will be displayed. */
2357 defaultColors?: Array<string>;
2358 /** Default style which applies to all auras. Specific aura styles will override the defaults. */
2359 defaultStyle?: ItemsChartSettingsAuraStyle;
2360 /** The draw limit (0..1) which cells will be considered to belong to the aura.
2361
2362 Larger values result in smaller auras. The cells under the center of the node usually have values close to 1,
2363 while the edges have values close to 0. */
2364 drawLimit?: number;
2365 /** Specifies if the node auras are enabled. */
2366 enabled?: boolean;
2367 /** The multiplier for the node radius that defines the total area of the aura the node emanates.
2368
2369 Note that this defines the size of the aura before the `drawLimit` value is applied to reduce the size
2370 of the aura. */
2371 intensity?: number;
2372 /** Specifies if the auras can be drawn overlapped or if every cell can only belong to a single aura. */
2373 overlap?: boolean;
2374 /** Defines specific styles for each aura. The key of the mapping has to match the aura ID. */
2375 style?: Dictionary<ItemsChartSettingsAuraStyle>;
2376 }
2377 export interface ItemsChartSettingsNodesLayerStyle extends ItemsChartSettingsItemsLayerStyle {
2378 /** Removed object fadeout time. */
2379 fadeTime?: number;
2380 /** style for hidden link hints. */
2381 hiddenLinks?: {
2382 lineColor?: string;
2383 lineWidth?: number;
2384 size?: number;
2385 };
2386 /** Link radius auto distribution method. */
2387 linkAutoScaling?: "linear" | "logaritmic";
2388 /** Link length auto distribution method. */
2389 linkLengthAutoScaling?: "linear" | "logaritmic";
2390 /** Min and max value of link length before zooming is applied. */
2391 linkLengthExtent?: [number, number];
2392 /** Min and max value of link half-width before zooming is applied. */
2393 linkRadiusExtent?: [number, number];
2394 /** Link strength auto distribution method. */
2395 linkStrengthAutoScaling?: "linear" | "logaritmic";
2396 /** Min and max value for link strength. */
2397 linkStrengthExtent?: [number, number];
2398 /** Distance between multiple links between two nodes. */
2399 multilinkSpacing?: number;
2400 /** Controls automatic node scaling. The radii are distributed in the range defined by `nodeRadiusExtent`.
2401
2402 Valid values:
2403 - null - scaling disabled
2404 - linear - distribute node radii linearly
2405 - logaritmic - distribute node radii logarithmicaly
2406 - square - distribute node radii using square function */
2407 nodeAutoScaling?: "linear" | "logarithmic" | "square";
2408 /** Min and max value of node radius, before zooming is applied. To use this, specify `nodeAutoScaling`. */
2409 nodeRadiusExtent?: [number, number];
2410 /** The angle of the self-link in degrees. Limited to 0 < selfLinkAngle <= 90. */
2411 selfLinkAngle?: number;
2412 /** The "height" of the self links, how far away from the node center it will extend. This is a factor of the node radius.
2413 Must be positive. */
2414 selfLinkHeightFactor?: number;
2415 /** The shape of the self-link. "Parabolic" makes sure the ends of the link point towards the center, but the self-link
2416 looks more "squished". "Quadratic" produces a more natural curve, but the ends of the link will not point at the center. */
2417 selfLinkShape?: "quadratic" | "parabolic";
2418 /** The "width" of the self links, how wide in parallel to the node it will extend. This is a factor of the default width,
2419 as determined by the shape. 1 is the default width. Must be non-negative. */
2420 selfLinkWidthFactor?: number;
2421 }
2422 export interface LinearChartSeriesStackData {
2423 config: LinearChartSettingsStack;
2424 data: Array<LinearChartSeriesStackDataItem>;
2425 name: string;
2426 }
2427 export interface LinearChartSeriesStackDataItem {
2428 config: LinearChartSettingsSeries;
2429 name: string;
2430 values: LinearChartSeriesStackDataItemValues;
2431 }
2432 export interface LinearChartSeriesStackDataItemValues {
2433 /** The average value within the range. Only available if the series aggregation is `sum` or `avg`. */
2434 avg: number;
2435 change: number;
2436 count: number;
2437 first: number;
2438 last: number;
2439 max: number;
2440 min: number;
2441 sum: number;
2442 }
2443 export interface LinearChartSettings extends BaseSettings {
2444 /** Chart area related settings. */
2445 area?: LinearChartSettingsArea;
2446 /** Default series settings for each series rendering type. Use this to configure all series of specific type to get line
2447 or column chart or combination of them. */
2448 chartTypes?: {
2449 /** Series type to show an opening and closing value on top of a total variance. */
2450 candlestick?: LinearChartSettingsSeriesCandleStick;
2451 /** Series type to render values as vertical bars. */
2452 columns?: LinearChartSettingsSeriesColumns;
2453 /** Series type to connect value points by lines. */
2454 line?: LinearChartSettingsSeriesLines;
2455 };
2456 /** The events used to handle user interaction with UI elements. */
2457 events?: LinearChartSettingsEvents<BaseChartEventArguments, BaseChartEventArguments>;
2458 horizontal?: boolean;
2459 /** Info popup when hovering over columns or lines. Content returned in a form of html and is relevant to context of series hovered. */
2460 info?: LinearChartSettingsInfoPopup;
2461 /** A variety of interaction options that includes scrolling, zooming and swipe. */
2462 interaction?: LinearChartSettingsInteraction;
2463 legend?: LinearChartSettingsLegend;
2464 /** Localizeable strings including export type options and useful default buttons used for chart interaction.
2465 Buttons like to navigate back, set the chart on full screen and others. */
2466 localization?: LinearChartSettingsLocalization;
2467 /** Array of series in the chart. Each of the series can be different type, can use different data source and
2468 aggregation. Additionally, series can be clustered and stacked. */
2469 series?: Array<LinearChartSettingsSeries>;
2470 /** The default series used as the chart dominant data. Use settings.series array to specify actual series. */
2471 seriesDefault?: LinearChartSettingsSeries;
2472 /** Defines stack settings to use in series. Each property is a stack name and value is stack settings.
2473 Values stack of each series on top of each other in the specified series order. Those, stacked bars help
2474 to visualize data that is a sum of parts, each of which is in a series. */
2475 stacks?: Dictionary<LinearChartSettingsStack>;
2476 /** The default style settings for series. */
2477 style?: {
2478 /** The default colors applied to the series with `type: "columns"`. The colors are applied in order to all series that do not specify an explicit style. */
2479 columnColors?: Array<string>;
2480 /** The default colors applied to the series with `type: "line"`. The colors are applied in order to all series that do not specify an explicit style. */
2481 lineColors?: Array<string>;
2482 };
2483 /** Configures one or more value axis. If no axis are defined, `valueAxisDefault` settings are used to automatically create a single value axis. */
2484 valueAxis?: Dictionary<LinearChartSettingsValueAxis>;
2485 /** The default settings inherited by all value axis. */
2486 valueAxisDefault?: LinearChartSettingsValueAxis;
2487 }
2488 export interface LinearChartSettingsArea extends BaseSettingsArea {
2489 /** Area style. */
2490 style?: LinearChartSettingsAreaStyle;
2491 }
2492 export interface LinearChartSettingsAreaStyle extends BaseSettingsAreaStyle {
2493 /** Style settings when there is no data to display. */
2494 noData?: {
2495 fillColor?: string;
2496 /** Image to show when there is no data to display. */
2497 image?: string;
2498 };
2499 /** Zoom In/Zoom Out animation highlight settings. */
2500 zoomHighlight?: LinearChartSettingsHighlightStyle;
2501 /** Zoom highlight style after zoom animation is finished. */
2502 zoomHighlightInactive?: {
2503 fillColor?: string;
2504 };
2505 }
2506 export interface LinearChartSettingsCandleStickMotionStyle {
2507 /** LHOC pattern style when body part excluded */
2508 bar?: {
2509 lineColor?: string;
2510 lineDash?: Array<number>;
2511 lineWidth?: number;
2512 shadowBlur?: number;
2513 shadowColor?: string;
2514 shadowOffsetX?: number;
2515 shadowOffsetY?: number;
2516 };
2517 /** LHOC pattern style when body part included. Line and shadow properties relevant to candlestick outline including body and shadow part. */
2518 candlestick?: {
2519 fillColor?: string;
2520 /** Candlestick outline color. Including item body outline and shadow stroke style. */
2521 lineColor?: string;
2522 lineDash?: Array<number>;
2523 lineWidth?: number;
2524 shadowBlur?: number;
2525 shadowColor?: string;
2526 shadowOffsetX?: number;
2527 shadowOffsetY?: number;
2528 };
2529 }
2530 export interface LinearChartSettingsEvents<TArguments extends BaseChartEventArguments, TClickArguments extends BaseChartEventArguments> extends BaseSettingsEvents<TArguments, TClickArguments> {
2531 /** Function called when chart scrolling animation is finished. */
2532 onAnimationDone?: (
2533 /** An empty mouse event. */
2534 event: BaseMouseEvent, args: TArguments) => void;
2535 }
2536 export interface LinearChartSettingsHighlightStyle {
2537 /** Fade in duration. It will only be used when the highlight is displayed the first time. If highlight of the same category is already
2538 shown, `fadeCross` will be used instead. */
2539 fadeIn?: number;
2540 /** Fade out duration. It will only be used when the highlight is removed and no highlight of the same category is being shown. */
2541 fadeOut?: number;
2542 fillColor?: string;
2543 }
2544 export interface LinearChartSettingsInfoPopup {
2545 /** Advanced settings relevant to info popup appearance. */
2546 advanced?: {
2547 /** Create custom info contents to display in info popup. */
2548 contentsFunction?: (
2549 /** Data for the info popup */
2550 data: Array<LinearChartSeriesStackData>,
2551 /** The configuration of the series object currently under the cursor */
2552 series: LinearChartSettingsSeries,
2553 /** The range for which the info popup is being built. */
2554 range: [number, number]) => string;
2555 /** Controls how the selection for the info popup is created and what data is displayed. */
2556 scope?: "stack" | "value" | "auto";
2557 /** Specifies if the default header should be included. If set to `false`, the `contentsFunction` should be used to return the header as well. */
2558 showHeader?: boolean;
2559 /** Whether to show only the series under cursor in info popup. If `scope` is set to `value` then the info popup will be empty unless the pointer
2560 hovers over the value bar/line. */
2561 showOnlyHoveredSeries?: boolean;
2562 };
2563 /** List of aggregations that will be shown in the info popup for each series. If none are specified, info popup displays the aggregation
2564 that is specified in the series data configuration.
2565 Available aggregations: sum (default), count, first, last, min, max, avg, change */
2566 aggregations?: Array<string>;
2567 /** Custom containing div for the info popup */
2568 container?: string | HTMLElement;
2569 /** Show/hide info popup */
2570 enabled?: boolean;
2571 /** Specifies the position of the info popup.
2572
2573 Values:
2574 - `inside` - Displays the info popup inside the chart area right below the toolbars. This is the default behavior which is well suited for larger charts.
2575 - `outside` - Displays the info popup above the chart area. This mode is intended for very small charts where the info popup would overlap the whole chart. */
2576 position?: "outside" | "inside";
2577 /** Whether to show series with no data in hovered time period. */
2578 showNoData?: boolean;
2579 /** Whether to show series with null data in the hovered time period. */
2580 showNullData?: boolean;
2581 /** Whether to show series with data equal to zero in hovered time period. */
2582 showZeroData?: boolean;
2583 /** Info popup style. */
2584 style?: {
2585 /** Style used to highlight the values that are shown in the info popup. */
2586 highlight?: LinearChartSettingsHighlightStyle;
2587 };
2588 /** Specifies if the value label render the stacked value (the sum of
2589 all values below it) or just the individual value of the particular
2590 series.
2591
2592 Default value `null` means that the stacked value is used unless the
2593 stack type is set to `based`. */
2594 useStackedValue?: boolean;
2595 /** Prepare custom format values to display in info popup. */
2596 valueFormatterFunction?: (
2597 /** object containing {sum, min, max, first, last, count, avg, change} */
2598 values: LinearChartSeriesStackDataItemValues,
2599 /** series object for the value */
2600 series: LinearChartSettingsSeries) => string;
2601 }
2602 export interface LinearChartSettingsInteraction extends BaseSettingsInteraction {
2603 /** Specifies if the bottom axis should be completely ignored for all interaction mouse and touch events. */
2604 ignoreBottomAxis?: boolean;
2605 /** Configurable settings to manage scroll interaction. */
2606 scrolling?: LinearChartSettingsInteractionScrolling;
2607 /** Sensitivity of Left/Right/Up/Down swipes. Note that `scrolling.swipePageFlipping` must be `true` for this to have any effect. */
2608 swipeSensitivity?: number;
2609 /** Configurable settings to enhance and alleviate zoom interaction. */
2610 zooming?: LinearChartSettingsInteractionZooming;
2611 }
2612 export interface LinearChartSettingsInteractionScrolling {
2613 /** Enables/Disables scrolling. */
2614 enabled?: boolean;
2615 /** Scrolling friction coefficient (chartWidth/ms^2). */
2616 kineticFriction?: number;
2617 /** The maximum time the scroll animation can run, in milliseconds. This does not apply when the user swipes the chart to start
2618 the animation, for that use `kineticFriction` instead. This setting however applies when the visible range is changed by using the toolbar
2619 or API methods.
2620
2621 Set to `null` to disable the limit. */
2622 maxAnimationLength?: number;
2623 /** Whether to use scrolling by full page instead of kinetic scrolling when using swipes (instead of dragging the chart). */
2624 swipePageFlipping?: boolean;
2625 }
2626 export interface LinearChartSettingsInteractionZooming {
2627 /** If set to `false`, all zoom gestures will be disabled, irrespective of how the other properties are configured.
2628 Note that the user will still be able to zoom by drill-down (clicking on values) and by using toolbar. */
2629 enabled?: boolean;
2630 /** Whether to zoom by two finger pinch. */
2631 fingers?: boolean;
2632 /** Max zoom difference when using pinch gesture. */
2633 fingersMaxZoom?: number;
2634 /** Zooming sensitivity for swipe gestures. Bigger values correspond to faster zooming. */
2635 sensitivity?: number;
2636 /** Whether to zoom by swiping up or down. */
2637 swipe?: boolean;
2638 /** How far pointer must be moved up or down in pixels before zooming activates. */
2639 upDownTreshold?: number;
2640 /** Whether to zoom by mouse wheel. */
2641 wheel?: boolean;
2642 /** Zooming sensitivity for mouse wheel. Bigger values correspond to faster zooming. Must be `>= 1.1` */
2643 wheelSensitivity?: number;
2644 /** Zoomed area is highlighted if zoom is changed more number of times than this. */
2645 zoomHighlightThreshold?: number;
2646 }
2647 export interface LinearChartSettingsLegend extends BaseSettingsLegend {
2648 /** Advanced settings which may change in the future. */
2649 advanced?: LinearChartSettingsLegendAdvanced;
2650 /** Visual element of legend entry with appropriate style to a slice color it corresponds. The content of each legend marker is the
2651 same as info popup appearing while hovering on slice. */
2652 marker?: LinearChartSettingsLegendMarker;
2653 /** Legend enclosing panel settings. */
2654 panel?: BaseSettingsLegendPanel;
2655 }
2656 export interface LinearChartSettingsLegendAdvanced extends BaseSettingsLegendAdvanced {
2657 /** Style for legend entry when a disabled series is displayed. */
2658 disabledSeries?: {
2659 fillColor?: string;
2660 lineColor?: string;
2661 textColor?: string;
2662 };
2663 }
2664 export interface LinearChartSettingsLegendMarker extends BaseSettingsLegendMarker {
2665 /** Specifies the shape for markers in the legend. If the value is `null` then the small icon representing the series is drawn. */
2666 shape?: "triangle" | "square" | "rhombus" | "triangle2" | "circle";
2667 }
2668 export interface LinearChartSettingsLocalization extends BaseSettingsLocalization {
2669 /** Text to show on the info popup when there is no data in the selected range. */
2670 noDataLabel?: string;
2671 /** Strings used in toolbars. */
2672 toolbar?: LinearChartSettingsLocalizationToolbar;
2673 /** Default name for series shown in info popup and legend. Note that info popup will not use it if only a single series is being used. */
2674 unnamedSeries?: string;
2675 /** Map from unit prefix to multiplier. Used for value axis formatting. */
2676 valueUnits?: Dictionary<number>;
2677 }
2678 export interface LinearChartSettingsLocalizationToolbar extends BaseSettingsLocalizationToolbar {
2679 /** Linear mode button text. */
2680 linButton?: string;
2681 /** Lin/Log button title. */
2682 linLogTitle?: string;
2683 /** Logarithmic mode button text. */
2684 logButton?: string;
2685 }
2686 export interface LinearChartSettingsSeries {
2687 /** Cluster identifier. Columns with the same cluster id will be placed in same cluster. */
2688 cluster?: string;
2689 /** Data manipulation settings used for default series. */
2690 data?: LinearChartSettingsSeriesData;
2691 /** Enable/disable series. */
2692 enabled?: boolean;
2693 /** A field that can be used to store any additional data with the series object. This can be useful in situations when the
2694 data is required in event handlers, such as `onClick` when the event arguments contain the configuration of the series that
2695 was hovered or clicked. This value is copied by reference. */
2696 extra?: any;
2697 id?: string;
2698 /** Group ID for legend. Items in the same group have a different toggle behavior. When all the items in a group are enabled,
2699 clicking an item causes that item to stay enabled and all other items are disabled. Clicking it again enables all items
2700 again. Consequently, at least one item in each group is always enabled. The exception to this is if the group ID is null
2701 (no group) or the group contains only one item. Then the item is toggled on/off individually. */
2702 legendGroupId?: string;
2703 /** Name to show in the info popup. The same value is also used in the legend unless `nameLegend` is also set. */
2704 name?: string;
2705 /** Name to show in the legend. If not specified, value from the `name` property is shown. */
2706 nameLegend?: string;
2707 /** Whether to show the series name info popup. */
2708 showInInfoPopup?: boolean;
2709 /** Whether to show the series name in legend. */
2710 showInLegend?: boolean;
2711 /** Stack identifier. Series with same stack ID are placed in the same stack. Define a stack with the same identifier to tune the stack. */
2712 stack?: string;
2713 /** Custom style based on series type. See the documentation of the derived classes for available properties. */
2714 style?: LinearChartSettingsSeriesStyle;
2715 /** Series type. */
2716 type?: "candlestick" | "columns" | "line";
2717 /** ID of value axis that this series will use.
2718 Maps to a configuration specified in [valueAxis](full-reference/LinearChartSettings.html#doc_valueAxis) property. */
2719 valueAxis?: string;
2720 }
2721 export interface LinearChartSettingsSeriesCandleStick extends LinearChartSettingsSeries {
2722 /** Info popup localizeable strings */
2723 localization?: {
2724 close?: string;
2725 high?: string;
2726 low?: string;
2727 open?: string;
2728 };
2729 /** Custom style based on series type. See the documentation of the derived classes for available properties. */
2730 style?: LinearChartSettingsSeriesCandleStickStyle;
2731 }
2732 export interface LinearChartSettingsSeriesCandleStickStyle extends LinearChartSettingsSeriesStyle {
2733 /** Item style when open is higher than close */
2734 decrease?: LinearChartSettingsCandleStickMotionStyle;
2735 /** Item style when open is smaller than close */
2736 increase?: LinearChartSettingsCandleStickMotionStyle;
2737 /** Item left and right padding */
2738 padding?: [number, number];
2739 /** Candlestick item representation pattern where difference is wethter to show body part */
2740 pattern?: "candlestick" | "bar";
2741 }
2742 export interface LinearChartSettingsSeriesColumns extends LinearChartSettingsSeries {
2743 /** Default column style. */
2744 style?: LinearChartSettingsSeriesColumnsStyle;
2745 /** Controls if and how the value labels for each column is displayed on the chart. */
2746 valueLabels?: LinearChartSettingsValueLabels;
2747 }
2748 export interface LinearChartSettingsSeriesColumnsStyle extends LinearChartSettingsSeriesStyle {
2749 /** Padding for cluster. 0th element - left padding, 1st element - right padding. */
2750 clusterPadding?: [number, number];
2751 /** Which logical grouping to use for drawing connector lines */
2752 connectorLineID?: string;
2753 /** Where to start drawing the connecting line */
2754 connectorLinePositionX?: "edge" | "center" | "full";
2755 /** Depth for column. Use it to achieve 3D effect. */
2756 depth?: number;
2757 /** Brightness applied to depth components. */
2758 depthBrightness?: number;
2759 /** Whether to draw an outline around the columns */
2760 enableOutlineLines?: boolean;
2761 /** Fill gradient orientation for manual fill gradient mode. In use with fillGradient property.
2762 "null" for default fillGradient mode, "vertical" for vertical gradient, "horizontal" for horizonal rendering" */
2763 fillGradientMode?: "vertical" | "horizontal";
2764 /** Fill gradient type lets you have automated fillGradient steps based on different shapes.
2765 Supported types are: null | cylinder */
2766 fillGradientType?: "cylinder";
2767 /** A linear gradient for color change along a line between the column bottom and upper side.
2768 Specify "1" for no gradiend. Values 0..` will make the bottom part of columns slightly darker. */
2769 gradient?: number;
2770 /** Outline color. */
2771 lineColor?: string;
2772 /** Minimum height of a column in px. */
2773 minHeight?: number;
2774 /** Padding for column. 0th element - left padding, 1st element - right padding. */
2775 padding?: [number, number];
2776 /** Radius for top-left, top-right, bottom-right, bottom-left corner */
2777 radius?: [number, number, number, number];
2778 /** Shadow blur effect range. */
2779 shadowBlur?: number;
2780 /** What factor to scale the column widths by, between 0.0 and 1.0.
2781
2782 If set to 0, the columns will be drawn as lines instead of columns. */
2783 widthScale?: number;
2784 }
2785 export interface LinearChartSettingsSeriesData {
2786 /** Prepare displaying value after data aggregation. */
2787 aggregatedValueFunction?: (
2788 /** aggregated value that is about to be displayed */
2789 value: number,
2790 /** time display unit time stamp in ms */
2791 time: number,
2792 /** display unit */
2793 units: string) => number;
2794 /** Aggregation function to use. Used when data source does not provide data in needed display unit.
2795 Note that when `avg` is used, you should provide `countIndex` so that the calculation is correct even across multiple units. */
2796 aggregation?: "sum" | "min" | "max" | "first" | "last" | "avg" | "count";
2797 /** Method used to fill in time intervals that have no data. Used only for line series. */
2798 noDataPolicy?: "join" | "skip" | "zero";
2799 /** Data source to use if multiple data sources are available. */
2800 source?: string;
2801 /** Retrieves the individual value used for calculations from the data array. This is an alternative for specifying `index`. */
2802 valueFunction?: (
2803 /** entry in data values array where the value at index 0 is the timestamp */
2804 data: Array<number>) => number;
2805 }
2806 export interface LinearChartSettingsSeriesLines extends LinearChartSettingsSeries {
2807 /** Default style for line type series. */
2808 style?: LinearChartSettingsSeriesLinesStyle;
2809 /** Controls if and how the value labels for each line is displayed on the chart. */
2810 valueLabels?: LinearChartSettingsValueLabels;
2811 }
2812 export interface LinearChartSettingsSeriesLinesStyle extends LinearChartSettingsSeriesStyle {
2813 /** Marker highlight data points on line. They can be in different sizes, shapes and colors. */
2814 marker?: LinearChartSettingsSeriesStyleMarker;
2815 /** Enables customizing the marker for each particular data point. The function receives an array of all horizontal indices that are being painted and
2816 an array of vertical positions for each marker. Both arrays have the same length.
2817
2818 The output has to be an array of the same length where each entry represents a marker that will be drawn for that value. If the array contains a `null` value
2819 that specific marker is not drawn.
2820
2821 Note that this method is not used when the marker is drawn for the legend entry.
2822
2823 This method will be invoked on each frame so it is important that it is optimized for performance. */
2824 markerStyleFunction?: (source: Array<any>, verticalPositions: Array<number>) => Array<LinearChartSettingsSeriesStyleMarker>;
2825 /** Shadow blur radius. */
2826 shadowBlur?: number;
2827 /** Whether to draw smoothed line. */
2828 smoothing?: boolean;
2829 /** Whether to draw the line using horizontal segments instead of oblique. */
2830 steps?: boolean;
2831 }
2832 export interface LinearChartSettingsSeriesStyle {
2833 depth?: number;
2834 /** Fill color. */
2835 fillColor?: string;
2836 /** Fill gradient. Allows building a gradient fill, bound to values. Contains array of value-color pairs.
2837 For example: [[-20, 'rgba(0,0,255,0.4)'],[30,'rgba(255,0,0,0.7)']].
2838 If specified fillGradientMode: "horizontal" or "vertical", then value denotes fraction of the column width and must be in interval from 0 to 1 - this feature is available for columns only
2839 For example: [[0,"black"],[0.5,"red"],[1, "orange"]]. */
2840 fillGradient?: GradientDefinition;
2841 /** Fill gradient orientation for manual fill gradient mode. In use with fillGradient property.
2842 "null" for default fillGradient mode, "vertical" for vertical gradient, "horizontal" for horizonal rendering" */
2843 fillGradientMode?: "vertical" | "horizontal";
2844 /** Specifies the URL to the image that will be used as the repeated fill pattern for the series.
2845
2846 When `fillPattern` is specified, `fillGradient` is ignored. If `fillColor` is specified together with `fillPattern`, it will be
2847 used as the background color for the pattern. */
2848 fillPattern?: string;
2849 /** Style settings for the legend item that is rendered for the series. */
2850 legend?: {
2851 /** Configures the marker that is shown in the legend. Note that the default (`shape: null`) means that instead of the
2852 plain marker, an icon representing the series visual style will be used. */
2853 marker?: LinearChartSettingsSeriesStyleMarker;
2854 /** The color used for the label of the legend item. Note that for disabled series [`advanced.disabledSeries.textColor`][1] takes precedence.
2855
2856 [1]: time-chart/api-reference/settings/legend/advanced/disabledSeries/textColor.html */
2857 textColor?: string;
2858 };
2859 lineColor?: string;
2860 /** Array of line dash pattern to have a dashed line. The array contains length of dash followed by length of space in pixels.
2861 A sequence of multiple dash-space values is supported. In case you want to set a solid line, pass empty array: [] */
2862 lineDash?: Array<number>;
2863 /** Width of the line. */
2864 lineWidth?: number;
2865 /** Shadow color of column. If undefined, no shadow will be applied. Leave empty to use default shadow or set your own shadow color. */
2866 shadowColor?: string;
2867 /** Shadow direction, x component. */
2868 shadowOffsetX?: number;
2869 /** Shadow direction, y component. */
2870 shadowOffsetY?: number;
2871 }
2872 export interface LinearChartSettingsSeriesStyleMarker {
2873 /** Marker fill color. If this is not set, then the line color or the fill color of the series is used instead. Use `transparent` to use transparent fill color. */
2874 fillColor?: string;
2875 /** The line color for the marker shape. */
2876 lineColor?: string;
2877 /** The width of the outline for the marker shape. */
2878 lineWidth?: number;
2879 /** Specify the shape of markers on the line. */
2880 shape?: "triangle" | "square" | "rhombus" | "triangle2" | "circle";
2881 /** The width of the marker. In case when circle - interpreted as the diameter. */
2882 width?: number;
2883 }
2884 export interface LinearChartSettingsStack {
2885 /** Whether to fill the entire area under each series or only the
2886 difference between it and the series below.
2887
2888 The default is `true` for based stacks and `false` for everything
2889 else. */
2890 drawFullArea?: boolean;
2891 /** The display name in info popup. */
2892 name?: string;
2893 /** Whether to separate negative values.
2894
2895 The default is `false` for line series but `true` for other series types. */
2896 separateNegativeValues?: boolean;
2897 /** Different representation of stacked series values. */
2898 type?: "normal" | "proportional" | "based";
2899 }
2900 export interface LinearChartSettingsValueAxis {
2901 /** Whether to align the zero value with other axes */
2902 alignZero?: boolean;
2903 /** Always animate value axis */
2904 animate?: "auto" | "always";
2905 /** Whether to show vertical line along value axis */
2906 axisLine?: boolean;
2907 /** Show/hide value axis. */
2908 enabled?: boolean;
2909 /** Whether to force top and bottom values in the hgrid. */
2910 forceTopAndBottomValues?: boolean;
2911 /** Placement of grid lines in relation to series data. */
2912 gridPosition?: "above" | "under";
2913 /** Whether to show horizontal grid lines. Specifying `null` means that only the first value axis will show the horizontal lines,
2914 all other axis will not. */
2915 hgrid?: boolean;
2916 /** This parameter works together with `animate` when it's set to "always" as here you can define fixed initial value that should be used for animation beginning.
2917 If set to 0, then animation would be with "dropping" effect. If set to larger value than your maximum series value, then effect would be "growing".
2918 If you want animation value to be calculated automatically depending on your data, keep default value and adjust `initialAnimationValueMultiplier`. */
2919 initialAnimationValue?: number;
2920 /** This parameter works together with `animate` when it's set to "always". It's used for multiplying maxium series value to get "growing" or "dropping" animation effect.
2921 By default (if initial animation is turned on) there would be "growing" effect. You can increase this value if you need "further growing".
2922 To make "dropping" effect you should use values less than 1, (for example: 0.45).
2923 Also adjust `scaleAdjustmentAnimationDelay` to make animation longer. */
2924 initialAnimationValueMultiplier?: number;
2925 /** Whether to use logarithmic scale. */
2926 logScale?: boolean;
2927 /** Fixed maximum value for value axis. If not set it will be computed automatically from visible data and zeroLine settings. */
2928 maxValue?: number;
2929 /** Fixed minimum value for value axis. If not set it will be computed automatically from visible data and zeroLine settings. */
2930 minValue?: number;
2931 /** Location of the value axis. */
2932 position?: "inside" | "outside";
2933 /** The animation easing function. */
2934 scaleAdjustmentAnimation?: "=" | "<>";
2935 /** Scale adjustment animation duration. */
2936 scaleAdjustmentAnimationDelay?: number;
2937 /** This tolerance specifies how big that part is as fraction of total chart height. When part of the vertical space
2938 is not used chart scale is automatically adjusted. */
2939 scaleAdjustmentTolerance?: number;
2940 /** Smallest difference between two labels. For example, use 1 to disallow the labels to go into fractions. */
2941 scaleMinStep?: number;
2942 /** Difference between two values on the axis. If not set (default), will be automatically calculated from chart height, min,
2943 max value and style.labelSpacing. */
2944 scaleStep?: number;
2945 /** Value axis side in chart. Possible values: "left" or "right". */
2946 side?: "right" | "left";
2947 /** Fixed width of the value axis. If not set it will be computed automatically from font size. */
2948 size?: number;
2949 /** Style for parts of value axis. */
2950 style?: {
2951 /** Rendering style for the vertical line along value axis. */
2952 axisLine?: BaseSettingsLineStyle;
2953 /** Base line settings. It is the horizontal line showing zero value. */
2954 baseLine?: LinearChartSettingsValueAxisBaseLineStyle;
2955 /** Horizontal grid lines. */
2956 hgrid?: BaseSettingsLineStyle;
2957 /** Distance between value axis labels. */
2958 labelSpacing?: number;
2959 /** Value axis tick lines style. */
2960 tick?: BaseSettingsLineStyle;
2961 /** Title text for the value axis. */
2962 title?: LinearChartSettingsValueAxisTitleStyle;
2963 /** Value axis label rendering settings. */
2964 valueLabel?: BaseSettingsLabelStyle;
2965 };
2966 /** Provides the ability to draw threshold guidelines and fill background areas for certain values. For example, this can be used
2967 to highlight an area that exceeds certain limit. */
2968 thresholds?: Array<LinearChartSettingsValueAxisThreshold>;
2969 /** Title text for the value axis. */
2970 title?: string;
2971 /** Following formats are supported:
2972
2973 ^0([.,]0+)?( ?%) - percentage
2974 ^([^0-9]+)?0?([.,]0+)?([^0-9]+)? - currency */
2975 valueFormat?: string;
2976 /** Prepare custom format values to display in value axis. If using this, consider also setting the `size` parameter to
2977 accommodate your label size. */
2978 valueFormatterFunction?: (
2979 /** numerical value to display */
2980 value: number,
2981 /** name of multiplier - 'K' for thousands, 'M' for millions */
2982 unitName: string,
2983 /** multiplier value - 1000 for thousands, 1 000 000 for millions */
2984 unitValue: number,
2985 /** value string that is displayed by default */
2986 name: string) => string;
2987 /** Zero line. */
2988 zeroLine?: "visible" | "center" | "floating";
2989 }
2990 export interface LinearChartSettingsValueAxisBaseLineStyle extends BaseSettingsLineStyle {
2991 depthColor?: string;
2992 lineDepth?: number;
2993 /** Specifies when the label for the zero line is rendered. */
2994 showLabel?: BaseSettingsValueAxisBaseLineLabelMode;
2995 }
2996 export interface LinearChartSettingsValueAxisThreshold {
2997 /** Specifies the bottom bound of the threshold area. */
2998 from?: number;
2999 /** How the from value should be determined */
3000 fromType?: "constant" | "first" | "last" | "minimum" | "maximum" | "median" | "average" | "percentile";
3001 label?: string;
3002 labelDecimals?: number;
3003 labelDisplayUnits?: string;
3004 labelHorizontalPadding?: number;
3005 labelHorizontalPosition?: "center" | "right" | "left";
3006 labelStyle?: BaseSettingsLabelStyle;
3007 /** Whether to use the line value as the label text */
3008 labelType?: "text" | "fromValue" | "toValue" | "textFromValue" | "textToValue";
3009 labelVerticalPadding?: number;
3010 labelVerticalPosition?: "center" | "above" | "under";
3011 /** Specifies a percentile to use when percentile is selected. Range 0
3012 to 100, must be integer. */
3013 percentileFrom?: number;
3014 /** Specifies a percentile to use when percentile is selected. Range 0
3015 to 100, must be integer. */
3016 percentileTo?: number;
3017 /** Threshold placement in relation to series data. */
3018 position?: "above" | "under";
3019 /** Which series to use for non-constant values */
3020 seriesID?: string;
3021 /** Describes the visual style for the threshold guidelines and area. */
3022 style?: {
3023 /** Specifies the fill color for the threshold area. If multiple areas overlap, this should specify an `rgba()` color with transparency.
3024 If 'null' fill color will not be applied. */
3025 fillColor?: string;
3026 /** Specifies the line color for the upper and lower bounds. If `null`, the lines will not be drawn. */
3027 lineColor?: string;
3028 /** Array of line dash pattern to have a dashed line. The array contains length of dash followed by length of space in pixels.
3029 A sequence of multiple dash-space values is supported. In case you want to set a solid line, pass empty array: [] */
3030 lineDash?: Array<number>;
3031 /** Specifies the width of the boundary lines. */
3032 lineWidth?: number;
3033 };
3034 /** Specifies the upper bound of the threshold area. */
3035 to?: number;
3036 /** How the from value should be determined */
3037 toType?: "constant" | "first" | "last" | "minimum" | "maximum" | "median" | "average" | "percentile";
3038 }
3039 export interface LinearChartSettingsValueAxisTitleStyle extends BaseSettingsLabelStyle {
3040 reverseDirection?: boolean;
3041 }
3042 export interface LinearChartSettingsValueLabels {
3043 /** Whether to draw overlapping value labels or not */
3044 allowOverlap?: boolean;
3045 /** Prepare custom content to display in value label along with numeric value.
3046 If this callback is not defined, then floating value is formatted with two digits after the decimal point and integer values are formatted without decimal digits.
3047 If this callback returns `null` or `undefined` for the given value, it won't be created. Note that `null` values are never passed to the callback. Usage example:
3048 ```javascript
3049 contentsFunction: function(value) { return value.toFixed(2) + "$"; }
3050 ``` */
3051 contentsFunction?: (
3052 /** The value which has to be formatted. */
3053 value: number,
3054 /** The horizontal position (timestamp for TimeChart and item index for FacetChart) where the label is located. */
3055 position: number) => string;
3056 /** Whether to show series data labels. */
3057 enabled?: boolean;
3058 /** The font size will be used as defined in `series.valueLabel.style`.
3059 However, if the available space is too narrow, font size will be gradually reduced to the minimum font size.
3060 If the minimum font size still does not fit, the values won't be displayed.
3061
3062 Note that this value must match the units that is being used in the `style.textStyle.font` setting. For example,
3063 if the font is specified as `2em Arial` then this should be adjusted to, for example, 0.5, since the default value
3064 is tailored for font sizes in pixels. */
3065 minFontSize?: number;
3066 /** Value label position in perspective to the series data point. Note that in all of the inside options
3067 automatically reduce the font size (based on `minFontSize` setting) in situations when the height of the
3068 column or line area does not provide enough room for full-size labels.
3069
3070  */
3071 position?: "outside" | "outsideTop" | "outsideBottom" | "aboveValue" | "value" | "belowValue" | "insideTopAuto" | "insideTop" | "insideCenter" | "insideBase";
3072 /** Whether to skip drawing labels for null values */
3073 showNullData?: boolean;
3074 /** Whether to skip drawing labels for zero values */
3075 showZeroData?: boolean;
3076 /** Data label text style. */
3077 style?: BaseSettingsLabelStyle;
3078 /** Specifies if the value label render the stacked value (the sum of all values below it) or just the individual value
3079 of the particular series.
3080
3081 Default value `null` means that the stacked value is used unless the stack type is set to `based`. */
3082 useStackedValue?: boolean;
3083 /** Value label horizontal position in perspective to the series data point. */
3084 xPosition?: "center" | "insideRight" | "right" | "centerRight" | "outsideRight" | "insideLeft" | "left" | "centerLeft" | "outsideLeft";
3085 }
3086 export interface NetChartBarSettingsLocalizationToolbar extends BaseSettingsLocalizationToolbar {
3087 fitButton?: string;
3088 fitTitle?: string;
3089 freezeButton?: string;
3090 freezeTitle?: string;
3091 rearrangeButton?: string;
3092 rearrangeTitle?: string;
3093 unfreezeTitle?: string;
3094 }
3095 export interface NetChartBarSettingsToolbar extends BaseSettingsToolbar {
3096 /** Whether to show the zoom slider control. */
3097 zoomControl?: boolean;
3098 }
3099 /** Settings for gravity in the dynamic layout */
3100 export interface NetChartGravitySettings {
3101 /** The object affected by the gravity effect in the dynamic layout. */
3102 from?: "auto" | "node" | "cluster";
3103 /** How to find the center of the object which is affected by gravity. Only used if `from="cluster"`. Only non-locked nodes will be used to calculate the
3104 center. */
3105 fromCenter?: "weighted" | "geometric";
3106 /** Strength of the gravity effect. This does not have any tangible units but is rather a factor that is used in the calculations. If you
3107 want to tweak it, experiment until you find a suitable value. Larger values will mean a stronger gravity, smaller will mean weaker. Negative values are
3108 allowed and will reverse the effect, but are unlikely to be useful - unlike "traditional" Newtonian gravity, this one actually gets stronger as the nodes get
3109 further away from the center, so the result of a negative value will be uncontrolled, exponential expansion. Setting to 0 disables gravity entirely. */
3110 strength?: number;
3111 /** The object to which the gravity attracts the affected object. */
3112 to?: "cluster" | "nearestLockedNode" | "clusterLockedNodes" | "graph" | "graphLockedNodes";
3113 /** How to find the center of the object to which the gravity attacts. Not used if `to="nearestLockedNode"`. */
3114 toCenter?: "weighted" | "geometric";
3115 }
3116 /** Describes the base properties shared between all events raised by the different charts. */
3117 export interface NetChartChartClickEventArguments extends NetChartChartEventArguments {
3118 clickItem: BaseLabel;
3119 clickLink: ItemsChartLink;
3120 clickNode: ItemsChartNode;
3121 }
3122 /** Describes the base properties shared between all events raised by the different charts. */
3123 export interface NetChartChartEventArguments extends ItemsChartChartEventArguments {
3124 links: Array<ItemsChartLink>;
3125 nodes: Array<ItemsChartNode>;
3126 }
3127 export interface NetChartDataObject extends BaseDataErrorResponse {
3128 links: Array<NetChartDataObjectLink>;
3129 nodes: Array<NetChartDataObjectNode>;
3130 }
3131 export interface NetChartDataObjectLink extends ItemsChartDataObjectLink {
3132 }
3133 export interface NetChartDataObjectNode extends ItemsChartDataObjectNode {
3134 /** Whether the node is initially locked in place at the (x;y) coordinates. Used for all except static layouts. */
3135 locked?: boolean;
3136 /** Initial X coordinate, used for static layout. */
3137 x?: number;
3138 /** Initial Y coordinate, used for static layout. */
3139 y?: number;
3140 }
3141 export interface NetChartSettings extends ItemsChartSettings {
3142 /** Chart area related settings. */
3143 area?: NetChartSettingsArea;
3144 /** Contains settings for the auras drawn beneath the nodes. */
3145 auras?: ItemsChartSettingsNodesLayerAuras;
3146 /** Settings used to load data into chart. Customise preferred data source feeding methods.
3147 You can use one of these options: url, data function, preloaded data. */
3148 data?: Array<NetChartSettingsData>;
3149 /** The events used to handle user interaction with UI elements. */
3150 events?: NetChartSettingsEvents;
3151 /** Configurable conditions to filter the raw data values for subset of drawing nodes and links. */
3152 filters?: {
3153 /** Determine if link can be displayed. Invoked whenever a link is about to be shown or its data has changed.
3154 Only links that have been allowed by nodeFilter for both end nodes will be passed here. */
3155 linkFilter?: (
3156 /** link data object */
3157 linkData: NetChartDataObjectLink,
3158 /** data object representing node where the link begins */
3159 fromNodeData: NetChartDataObjectNode,
3160 /** data object representing node where the link ends */
3161 toNodeData: NetChartDataObjectNode) => boolean;
3162 /** Function called whenever there is more than one link between two nodes. Only links that were allowed by nodeFilter, linkFilter and nodeLinksProcessor
3163 will be passed here. The function can return either some of the original links, or create completely new links.
3164 In the latter case, link IDs MUST be unique (links passed in are guaranteed to have unique IDs). */
3165 multilinkProcessor?: (
3166 /** array of link data objects */
3167 arrayOfLinkData: Array<NetChartDataObjectLink>,
3168 /** data object representing node where the links begins */
3169 fromData: NetChartDataObjectNode,
3170 /** data object representing node where the links ends */
3171 toData: NetChartDataObjectNode) => NetChartDataObjectLink | Array<NetChartDataObjectLink>;
3172 /** Determine if node can be displayed. Invoked whenever a node or one of its links is about to be shown, or if data for the node (or its links) has changed. */
3173 nodeFilter?: (
3174 /** Node data object */
3175 nodeData: NetChartDataObjectNode,
3176 /** Unfiltered array of link data objects (linkFilter/nodeLinksProcessor/multilinkProcessor have not been applied) */
3177 arrayOfLinkData: Array<NetChartDataObjectLink>) => boolean;
3178 /** From links that were allowed by nodeFilter and linkFilter, select the ones that will be displayed. This is basically a bulk version of linkFilter.
3179 It is also allowed to return a completely new set of links, however link IDs MUST be unique in this case
3180 (links passed in are guaranteed to have unique IDs). */
3181 nodeLinksProcessor?: (
3182 /** Node data object */
3183 nodeData: NetChartDataObjectNode,
3184 /** Array of link data objects. All links are connected to the node. Only links that were allowed by nodeFilter/linkFilter will be passed here.
3185 MultilinkProcessor has not been applied yet. */
3186 links: Array<NetChartDataObjectLink>) => Array<NetChartDataObjectLink>;
3187 };
3188 /** Customise chart resize handles or animation duration settings. */
3189 interaction?: NetChartSettingsInteraction;
3190 /** Adjustable settings to get desired net chart layout style and animation while and before interacting. */
3191 layout?: NetChartSettingsLayout;
3192 /** The chart legend representing classes attached to nodes or links.
3193 The legend will display the visual styles specified in `style.nodeClasses` and `style.linkClasses` - by default these are not defined
3194 so the legend will be empty. */
3195 legend?: NetChartSettingsLegend;
3196 /** Localizeable strings including export type options and useful default buttons used for chart interaction.
3197 Buttons like to navigate back, set the chart on full screen and others. */
3198 localization?: NetChartSettingsLocalization;
3199 /** Settings for NetChart navigation (expanding/collapsing/focusing/unfocusing/showing/hiding). The main setting is "mode" which determines the overall
3200 algorithm for navigation. Other parameters can tweak this algorithm, but not all parameters apply to all algorithms. */
3201 navigation?: NetChartSettingsNavigation;
3202 /** Chart style settings. */
3203 style?: NetChartSettingsStyle;
3204 /** Theme to apply. You can either use this to share configuration objects between multiple charts or use one of the predefined
3205 themes. */
3206 theme?: NetChartSettings;
3207 /** Adjustable settings to manage default and custom toolbar items, as well as toolbar overall appearance. */
3208 toolbar?: NetChartBarSettingsToolbar;
3209 }
3210 export interface NetChartSettingsArea extends BaseSettingsArea {
3211 /** The center of the chart. Fraction of chart width. 0 = left side, 1 = right side.
3212 @deprecated this property is no longer used */
3213 centerX?: number;
3214 /** The center of the chart. Fraction of chart height, 0 = top, 1 = botom.
3215 @deprecated this property is no longer used */
3216 centerY?: number;
3217 /** Inner bottom padding, nodes will avoid this area.
3218 If the value is <= 1 then the value represents the fraction from the chart width.
3219 Otherwise it represents the padding value in pixels.
3220 @deprecated this property is no longer used */
3221 paddingBottom?: number;
3222 /** Inner left padding, nodes will avoid this area.
3223 If the value is <= 1 then the value represents the fraction from the chart width.
3224 Otherwise it represents the padding value in pixels.
3225 @deprecated this property is no longer used */
3226 paddingLeft?: number;
3227 /** Inner right padding, nodes will avoid this area.
3228 If the value is <= 1 then the value represents the fraction from the chart width.
3229 Otherwise it represents the padding value in pixels.
3230 @deprecated this property is no longer used */
3231 paddingRight?: number;
3232 /** Inner top padding, nodes will avoid this area.
3233 If the value is <= 1 then the value represents the fraction from the chart width.
3234 Otherwise it represents the padding value in pixels.
3235 @deprecated this property is no longer used */
3236 paddingTop?: number;
3237 }
3238 export interface NetChartSettingsData extends ItemsChartSettingsData {
3239 /** Load more chart data. */
3240 dataFunction?: (
3241 /** node IDs */
3242 nodes: Array<string>,
3243 /** callback function to execute when data arrived correctly */
3244 success: (data: NetChartDataObject) => void,
3245 /** callback function to execute when error occure while loading data */
3246 fail: (result: BaseDataErrorResponse) => void) => void;
3247 /** Provides the ability to embed chart data directly into the chart configuration.
3248
3249 This data can be complete or act as the initial data where the rest will be requested dynamically using
3250 `url` or `dataFunction`. */
3251 preloaded?: NetChartDataObject;
3252 }
3253 export interface NetChartSettingsEvents extends BaseSettingsEvents<NetChartChartEventArguments, NetChartChartClickEventArguments> {
3254 /** Function called when data is loaded/added/replaced/removed. */
3255 onDataUpdated?: (
3256 /** An empty mouse event. */
3257 event: MouseEvent, args: NetChartChartEventArguments) => void;
3258 onPointerDown?: (
3259 /** The mouse event. */
3260 event: MouseEvent, args: NetChartChartClickEventArguments) => void;
3261 /** Function called when pointer drag has happened. */
3262 onPointerDrag?: (
3263 /** The mouse event. */
3264 event: MouseEvent, args: NetChartChartClickEventArguments) => void;
3265 /** Function called when mouse pointer is moved. */
3266 onPointerMove?: (
3267 /** The mouse event. */
3268 event: MouseEvent, args: NetChartChartEventArguments) => void;
3269 /** Function called on pointer up. */
3270 onPointerUp?: (
3271 /** The mouse event. */
3272 event: MouseEvent, args: NetChartChartClickEventArguments) => void;
3273 }
3274 export interface NetChartSettingsInteraction extends ItemsChartSettingsInteraction {
3275 /** The ability to rotate the chart with the pinch gesture, using 2 fingers */
3276 rotation?: {
3277 /** Enables/disables chart rotation via the multitouch gesture events */
3278 fingers?: boolean;
3279 };
3280 /** Select node to expand it or getting path. */
3281 selection?: NetChartSettingsInteractionSelection;
3282 /** Zoom in or out by swiping up or down with mouse scroll pad or by using the Zoom-out feature at the top left. */
3283 zooming?: NetChartSettingsInteractionZooming;
3284 }
3285 export interface NetChartSettingsInteractionSelection extends ItemsChartSettingsInteractionSelection {
3286 /** Enable/disable rectangular dragging selection. This has no effect if `enabled=false`. */
3287 dragSelect?: boolean;
3288 }
3289 export interface NetChartSettingsInteractionZooming extends ItemsChartSettingsInteractionZooming {
3290 /** Zoom value limits for automatic zooming (for example, "Fit to screen"). Contains array of [min, max] values.
3291
3292 If the minimum (the first value) is specified as `null`, the chart will not enforce it, instead it will be adjusted as needed
3293 if the network grows very large. Note that specifying `null` as the minimum also overrides the minimum for the `zoomExtent`
3294 value. */
3295 autoZoomExtent?: [number, number];
3296 /** The acceleration of scene movement, when trying to contain all nodes within the view,
3297 when autozoom is enabled. Increasing the value decreases latency, and makes the animation
3298 more responsive. Decreasing the value makes the animation more fluid */
3299 autoZoomPositionElasticity?: number;
3300 /** Controls the percentage of how much of the chart width/height the nodes can move around without
3301 triggering automatic zoom adjustment. A value of 0.9 means that the target is to leave 10% padding
3302 on all sides of the chart. However once the target is reached, if the nodes move within these 10%
3303 on either side, the zoom adjustment is not performed. */
3304 autoZoomSize?: number;
3305 /** Auto zoom mode on chart initialization.
3306
3307 Valid values:
3308 - `overview` - show whole network
3309 - `true` - use basic auto zoom
3310 - `false` - no auto zoom. */
3311 initialAutoZoom?: "overview" | boolean;
3312 /** Zoom value limits while for manual zooming. Contains array of [min, max] values.
3313
3314 Note that if the minimum for `autoZoomExtent` is `null` (the default) then it can override the minimum in this value if the auto zoom level is smaller. */
3315 zoomExtent?: [number, number];
3316 }
3317 export interface NetChartSettingsLayout {
3318 /** Advanced chart settings. Be advised that they are subject to change, backwards compatibility is not guaranteed. */
3319 advanced?: {
3320 adaptiveFreezeTreshold?: number;
3321 };
3322 /** Whether to fit network in aspect ratio of chart viewport. Useful for small networks that always fit in chart and are not intended to be zoomed in / out. */
3323 aspectRatio?: boolean;
3324 /** Whether to perform global layout on network changes. Use it for better node placement at the cost of chart slowdown on network changes. */
3325 globalLayoutOnChanges?: boolean;
3326 /** For dynamic layout, settings for gravity that pulls all nodes together. */
3327 gravity?: NetChartGravitySettings;
3328 /** Desired horizontal distance between neighboring nodes with different parents in the hierarchy layout. By default `2*nodeSpacing` */
3329 groupSpacing?: number;
3330 /** Maximum time to wait for incremental layout to be completed. Note that bigger value will get nicer placement on network updates at the cost of longer delay. */
3331 incrementalLayoutMaxTime?: number;
3332 /** Maximum time to wait for initial layout to be completed. Note that bigger value will get nicer placement of big networks at the cost of long initial delay. */
3333 initialLayoutMaxTime?: number;
3334 /** Dynamic layout can be stopped faster if no more movement is detected. */
3335 layoutFreezeMinTimeout?: number;
3336 /** Dynamic layout is stopped after user is inactive for this time. */
3337 layoutFreezeTimeout?: number;
3338 /** Layout mode. */
3339 mode?: "dynamic" | "radial" | "hierarchy" | "static";
3340 /** Desired distance between nodes. */
3341 nodeSpacing?: number;
3342 /** For hierarhy layout, clockwise rotation of the tree(s), measured in degrees.
3343 0 = top-down tree; 90 = right-left tree; 180 = bottom-up tree, etc. Also affects placement of multiple trees the same way. */
3344 rotation?: number;
3345 /** Desired vertical distance between node rows in the hierarchy layout. */
3346 rowSpacing?: number;
3347 /** For hierarchy layout, whether to sort the nodes during layout */
3348 sortNodes?: boolean;
3349 /** For radial layout, whether to lay out the first level in two rings, if necessary. */
3350 twoRingRadialLayout?: boolean;
3351 }
3352 export interface NetChartSettingsLegend extends BaseSettingsLegend {
3353 /** Advanced settings which may change in the future. */
3354 advanced?: NetChartSettingsLegendAdvanced;
3355 mode?: "hide" | "highlight";
3356 /** Legend enclosing panel settings. */
3357 panel?: BaseSettingsLegendPanel;
3358 }
3359 export interface NetChartSettingsLegendAdvanced extends BaseSettingsLegendAdvanced {
3360 /** When an item (node or link) has several classes applied, and the legend
3361 has some of them enabled, and some of the disabled, this governs whether
3362 that element is visible. If an element has no classes applied, it is
3363 always visible. If a class is applied to an element but is not shown in the
3364 legend (showInLegend=false), then this class is ignored for the calculation. */
3365 showItemsWithClasses?: "any" | "all";
3366 /** Style for legend entry text when a disabled item is displayed. */
3367 textColorDisabled?: string;
3368 }
3369 export interface NetChartSettingsLocalization extends BaseSettingsLocalization {
3370 /** Node/link menu by using localizeable strings. */
3371 menu?: {
3372 close?: string;
3373 collapse?: string;
3374 /** The text for the button that unlock the node position. */
3375 dynamic?: string;
3376 expand?: string;
3377 fixed?: string;
3378 focus?: string;
3379 hide?: string;
3380 unfocus?: string;
3381 };
3382 /** Strings used in toolbars. */
3383 toolbar?: NetChartBarSettingsLocalizationToolbar;
3384 }
3385 /** Settings for NetChart navigation (expanding/collapsing/focusing/unfocusing/showing/hiding). The main setting is `mode` which determines the overall
3386 algorithm for navigation. Other parameters can tweak this algorithm, but not all parameters apply to all algorithms. */
3387 export interface NetChartSettingsNavigation {
3388 /** Determines what happens if the user has reached maximum number of focus nodes (`numberOfFocusNodes`) and focuses another node.
3389 In focusnode mode, if this setting is `true`, then the least recently focused node will be unfocused; if this setting is `false`,
3390 then the userwill not be able to focus the node.
3391 In manual and showall modes, numberOfFocusNodes is not taken into account. If `true` then by focusing a different node,
3392 the previous becomes unfocused. If 'false' then previous nodes remain focused.
3393 _Used by modes: all modes_ */
3394 autoUnfocus?: boolean;
3395 /** Whether to auto-zoom to a node when it is focused. _Used by modes: all modes_ */
3396 autoZoomOnFocus?: boolean;
3397 /** If focusing a node would display several levels of nodes (due to `focusNodeExpansionRadius` or `focusNodeTailExpansionRadius`), each level is shown after
3398 the specified delay (milliseconds). Set to 0 to disable. _Used by modes: `focusnodes`_ */
3399 expandDelay?: number;
3400 /** Whether to expand node on click. _Used by modes: all modes_ */
3401 expandOnClick?: boolean;
3402 /** If set to true, nodes and links with [relevance](full-reference/ItemsChartNode.html#doc_relevance) < 1 will be drawn with a smaller radius and a faded out
3403 color (both multiplied by [relevance](full-reference/ItemsChartNode.html#doc_relevance)). _Used by modes: `focusnodes`_ */
3404 focusAutoFadeout?: boolean;
3405 /** Number of "levels" to automatically expand around the most recently focused node. If set to 1, all nodes directly linked to the focused node will be shown.
3406 If set to 2, all nodes directly connected to these nodes will be shown as well. Etc. Also used for calculating
3407 [node relevance](full-reference/ItemsChartNode.html#doc_relevance). _Used by modes: `focusnodes`_ */
3408 focusNodeExpansionRadius?: number;
3409 /** Similar to `focusNodeExpansionRadius`, but for the least recently focused node. This allows to create an effect, where the most recently focused node has
3410 many expanded nodes around it, while the least recently node has only a few (or vice versa). Intermediate focused nodes will have their expansion radius
3411 linearly interpolated between `focusNodeExpansionRadius` and `focusNodeTailExpansionRadius`. Also used to calculate
3412 [node relevance](full-reference/ItemsChartNode.html#doc_relevance). _Used by modes: `focusnodes`_ */
3413 focusNodeTailExpansionRadius?: number;
3414 /** The focus node expansion radius used on chart load and reset. */
3415 initialFocusNodeExpansionRadius?: number;
3416 /** Initially visible/focused nodes. Array of node identifiers. The precise effect depends on the navigation mode.
3417 * For `manual` this specifies the initially visible nodes and must contain at least 1 node.
3418 * For `showall` this specifies which nodes to show first, and other nodes are then requested recursively from these until all nodes are visible.
3419 * If this setting is left empty or `null`, the chart will directly request ALL nodes (this is more efficient if your data source supports it).
3420 * For `focusnodes` this specifies the initially focused nodes. The count of node IDs in this array must be between `minNumberOfFocusNodes` and
3421 `numberOfFocusNodes`
3422
3423 _Used by modes: all modes_ */
3424 initialNodes?: Array<string>;
3425 /** Minimum number of focused nodes. Prevents user from unfocusing nodes if there are `minNumberOfFocusNodes` or less nodes focused.
3426 If the `focusnodes` navigation is used, this setting has a minimum value of 1. _Used by modes: all modes_ */
3427 minNumberOfFocusNodes?: number;
3428 /** Navigation mode - the algorithm that determines the expanding/collapsing logic. */
3429 mode?: "manual" | "showall" | "focusnodes";
3430 /** Maximum number of focused nodes. The `autoUnfocus` setting determines what happens when more nodes are focused. _Used by modes: focusnodes_ */
3431 numberOfFocusNodes?: number;
3432 }
3433 export interface NetChartSettingsStyle extends ItemsChartSettingsNodesLayerStyle {
3434 /** The style for the resizable selection box. */
3435 dragSelection?: BaseSettingsBackgroundStyle;
3436 }
3437 /** Describes the base properties shared between all events raised by the different charts. */
3438 export interface PieChartChartClickEventArguments extends PieChartChartEventArguments {
3439 /** Contains the label object that was clicked or `null` if none was. */
3440 clickLabel: BaseLabel;
3441 /** Specifies the source of the click event. */
3442 clickOrigin: "back" | "slice" | "label" | "insideLabel" | "legend";
3443 /** Contains the pie that was clicked. It is possible that this is set while `clickSlice` is not if the small
3444 pie in the center of the chart (under the `Back` button) is hovered. */
3445 clickPie: PieChartPie;
3446 /** Contains the slice that was clicked. Note that this will also be populated when the label
3447 of the slice is clicked. */
3448 clickSlice: PieChartSlice;
3449 }
3450 /** Describes the base properties shared between all events raised by the different charts. */
3451 export interface PieChartChartEventArguments extends BaseChartEventArguments {
3452 /** The total number of slices currently visible (without counting `Previous` and `Others`). */
3453 count: number;
3454 /** Contains the label object if one is currently hovered, `null` otherwise. */
3455 hoverLabel: BaseLabel;
3456 /** Contains the currently hovered pie. This can be set while `hoverSlice` is not if the small
3457 pie in the center of the chart (under the `Back` button) is hovered. */
3458 hoverPie: PieChartPie;
3459 /** Contains the currently hovered slice. Note that this will also be populated when the label
3460 of the slice is hovered. */
3461 hoverSlice: PieChartSlice;
3462 /**
3463 @deprecated use `hoverLabel` instead. */
3464 label: BaseLabel;
3465 /** The number of slices that are hidden in the `Previous` slice.
3466
3467 This will be `null` if the chart has not been rendered. */
3468 offset: number;
3469 /** The currently open pie object of the chart. */
3470 pie: PieChartPie;
3471 /** A list of currently selected slices. Note that changes to this array does not result in
3472 changes to the selection, use [`selection()`](pie-chart/api-reference/api.html#selection) API
3473 method for that. */
3474 selection: Array<PieChartSlice>;
3475 /**
3476 @deprecated use `hoverSlice` instead. */
3477 slice: PieChartSlice;
3478 }
3479 /** Describes a single slice in the data. Can include the nested items for that slice as well. */
3480 export interface PieChartDataObject extends PieChartDataObjectCommon {
3481 /** The ID of the slice. Note that if the ID is set then by default the chart assumes that the
3482 slice is expandable. To avoid this, set `style.expandable` to `false`.
3483 The slice ID is used to load the nested items and is the same value as the ID of the inner pie
3484 object. */
3485 id?: string;
3486 /** The name of the slice that will be used as the default label text. */
3487 name?: string;
3488 /** The name of the slice that will be displayed in the legend. If this is not set, the slice label
3489 is used and if that is not set, then the `name` property is used instead. */
3490 nameLegend?: string;
3491 /** Styles specific to the particular slice. */
3492 style?: PieChartSettingsSliceStyle;
3493 /** Optional subvalues for drilldown. If subvalues are available, then you can either specify them directly, or provide
3494 `id` and let the chart request them separately. */
3495 subvalues?: Array<PieChartDataObject>;
3496 /** The numeric value of the slice. This is used to calculated the size of the slice. */
3497 value: number;
3498 }
3499 export interface PieChartDataObjectCommon extends BaseDataObjectBase {
3500 id?: string;
3501 name?: string;
3502 subvalues?: Array<PieChartDataObject>;
3503 }
3504 export interface PieChartDataObjectRoot extends PieChartDataObjectCommon, BaseDataErrorResponse {
3505 /** In the case of a partial load, this specifies the sum of all values in the data source which come **after** the values
3506 in the `subvalues` array. If you're doing a partial load, you must specify at least 2 of the following: `afterSum`,
3507 `beforeSum`, `sum`. */
3508 afterSum?: number;
3509 /** In the case of a partial load, this specifies the sum of all values in the data source which come **before** the values
3510 in the `subvalues` array. If you're doing a partial load, you must specify at least 2 of the following: `afterSum`,
3511 `beforeSum`, `sum`. */
3512 beforeSum?: number;
3513 /** The ID of the pie for which the data is being loaded. Note that for the initial data request
3514 this value has to be empty, otherwise the chart assumes that the data is for a nested object and
3515 not for the initial view. */
3516 id?: string;
3517 /** In the case of a partial load, this specifies the maximum number of entries that was fetched from the data source.
3518 This is used to figure out if more data is available. If this field isn't set, or is set and is larger than the count
3519 of values in the `subvalues` array, then it is assumed that no more data is available. */
3520 limit?: number;
3521 /** The name of the root data object. */
3522 name?: string;
3523 /** In the case of a partial load, this specifies the offset in the data source where the `subvalues` array starts. This
3524 parameter is mandatory if you're doing a partial load. */
3525 offset?: number;
3526 /** Values for this drilldown level. In the case of a partial load, this will contain only a part of all values available
3527 in the data source. */
3528 subvalues: Array<PieChartDataObject>;
3529 /** In the case of a partial load, this specifies the sum of all values in the data source. If you're doing a partial
3530 load, you must specify at least 2 of the following: `afterSum`, `beforeSum`, `sum`. */
3531 sum?: number;
3532 }
3533 export interface PieChartPie {
3534 active: boolean;
3535 activeSliceId: string;
3536 /** Includes all slices that are shown on the screen (including Others/Previous and slices pending removal). */
3537 allSlices: Array<PieChartSlice>;
3538 background: boolean;
3539 brightness: number;
3540 colorDistribution: string;
3541 count: number;
3542 data: PieChartPieData;
3543 endAngle: number;
3544 fillColor: string;
3545 getActiveSlice(): PieChartSlice;
3546 id: string;
3547 innerRadius: number;
3548 loading: boolean;
3549 /** Number of slices in the "previous" slice */
3550 offset: number;
3551 othersSlice: PieChartSlice;
3552 parentSlice: PieChartSlice;
3553 previousSlice: PieChartSlice;
3554 radius: number;
3555 removed: boolean;
3556 /** The speed of the rotation for the pie. Set to `0` to disable rotation and return the pie
3557 to its specified `startAngle`. */
3558 rotationSpeed: number;
3559 /** Fraction of the total, describing how far the pie has been scrolled with rotational scrolling. */
3560 scrollOffset: number;
3561 sliceColors: Array<string>;
3562 /** Contains the list of slices that excludes the Others/Previous and any slices that are being animated for removal. */
3563 slices: Array<PieChartSlice>;
3564 startAngle: number;
3565 total: number;
3566 visibleFraction: number;
3567 x: number;
3568 y: number;
3569 }
3570 /** A cache of raw data. This might contain only a subset of all potentially available values, with more values loaded on demand.
3571 The already loaded values will be a contiguous subset of all potentially available values. */
3572 export interface PieChartPieData {
3573 /** Sum of not yet loaded values which come after the already loaded values. Not used for FacetChart. */
3574 afterSum: number;
3575 /** Sum of not yet loaded values which come before the already loaded values. Not used for FacetChart. */
3576 beforeSum: number;
3577 /** Whether the already loaded data includes the final slice. Note that it might still not include the first slice. */
3578 done: boolean;
3579 /** Additional data that was specified in the data object. */
3580 extra: any;
3581 name: string;
3582 /** Index in the list of all potentially available values, where the already loaded values start. */
3583 offset: number;
3584 /** Sum of all potentially available values. Not used for FacetChart */
3585 total: number;
3586 /** Count of all potentially available values. Only set after the end has been reached. */
3587 totalCount: number;
3588 /** Array of already loaded values */
3589 values: Array<PieChartDataObject>;
3590 /** Sum of already loaded values. Not used for FacetChart. */
3591 valuesSum: number;
3592 }
3593 export interface PieChartSettings extends BaseSettings {
3594 /** Advanced chart settings. Be advised that they are subject to change, backwards compatibility is not guaranteed. */
3595 advanced?: PieChartSettingsAdvanced;
3596 /** Settings used to load data into chart. Customise preferred data source feeding methods.
3597 You can use one of these options: url, data function, preloaded data. */
3598 data?: Array<PieChartSettingsData>;
3599 /** The events used to handle user interaction with UI elements. */
3600 events?: PieChartSettingsEvents;
3601 /** Configurable conditions to filter the raw data values for subset of drawing slices. */
3602 filters?: {
3603 /** Determines if zero values are automatically filtered from the data or if they will be displayed.
3604
3605 Note that if you want to show the empty values in the piechart, it might be useful to set
3606 [`interaction.others.minSliceFraction`][1] to `0` or [`slice.minFraction`][2] to a value larger than `0`.
3607
3608 [1]: pie-chart/api-reference/settings/interaction/others/minSliceFraction.html
3609 [2]: pie-chart/api-reference/settings/slice/minFraction.html */
3610 allowZeroValues?: boolean;
3611 /** Function to filter visible slices. */
3612 sliceFilter?: (
3613 /** slice filtering data */
3614 sliceData: PieChartDataObject) => boolean;
3615 };
3616 /** Slice icons as an additional element of style to highlight each individual slice or groups. */
3617 icons?: {
3618 /** Whether to render icons if smaller than min value of sizeExtent. */
3619 autohideWhenTooSmall?: boolean;
3620 /** Icon placement method */
3621 placement?: "auto" | "center";
3622 /** Min and max value of icon size. The icon size is automatically computed from available space. */
3623 sizeExtent?: [number, number];
3624 };
3625 /** Rising content field while hovering over slice. Content returned in a form of html and is relevant to context of slice hovered. */
3626 info?: {
3627 /** Prepare custom info popup contents. May return null and call callback(contents) later. */
3628 contentsFunction?: (
3629 /** slice data including subvalues */
3630 sliceData: PieChartDataObject,
3631 /** slice object to apply predefined content */
3632 slice: PieChartSlice,
3633 /** function called to return predefined content */
3634 callback: (result: string) => void) => string;
3635 /** Show/hide info popup. */
3636 enabled?: boolean;
3637 };
3638 /** Configurable interactivity options to navigate among the slices and pie levels to facilitate analysis of the grouped data in different ways. */
3639 interaction?: PieChartSettingsInteraction;
3640 /** Label settings related to internal and external slice text and their connectors. */
3641 labels?: PieChartSettingsLabels;
3642 /** The chart legend by additional interactivity to navigate between the slices or hilight each of them. Note that click on entries
3643 acts the same way as click on slice and is dependant of chart interaction mode. */
3644 legend?: PieChartSettingsLegend;
3645 /** Localizeable strings including export type options and useful default buttons used for chart interaction.
3646 Buttons like to navigate back, set the chart on full screen and others. */
3647 localization?: PieChartSettingsLocalization;
3648 /** Settings to specify initial pie and visible slice offset once the page loaded. */
3649 navigation?: {
3650 /** Initial pie drilldown to show. For example ['', 'Firefox', 'Firefox 2.5'] denotes to various browsers grouped by versions. */
3651 initialDrilldown?: Array<string>;
3652 /** Initial offset, number of items from start. */
3653 initialOffset?: number;
3654 };
3655 /** Data values arranged in a circular manner. */
3656 pie?: {
3657 /** Whether to adapt pie outer radius dynamically to allow enough space for labels. */
3658 adaptiveRadius?: boolean;
3659 /** Hovered pie background style. */
3660 backgroundHoveredStyle?: PieChartSettingsPieStyle;
3661 /** Pie background style. */
3662 backgroundStyle?: PieChartSettingsPieStyle;
3663 /** Pie center margin. */
3664 centerMargin?: number;
3665 /** Pie depth - used for raised theme. */
3666 depth?: number;
3667 /** End angle of the pie. */
3668 endAngle?: number;
3669 /** Pie inner radius. Inner pies are drawn inside this radius. If the value is less than 1, it is multiplied
3670 by current pie radius to get inner radius. Otherwise it represents the inner radius in pixels. */
3671 innerRadius?: number;
3672 /** Inner radius is extended to radius * innerRadiusWhenDrilldown when drilled down. */
3673 innerRadiusWhenDrilldown?: number;
3674 /** Pie margin. */
3675 margin?: number;
3676 /** Pie style when no data is present. */
3677 noDataStyle?: PieChartSettingsPieStyle;
3678 /** Pie outer margin. */
3679 outerMargin?: number;
3680 /** Pie outer radius. If not specified, the radius is determined automatically. */
3681 radius?: number;
3682 /** The speed of the rotation for the pie. Set to `0` to disable rotation and return the pie
3683 to its specified `startAngle`. */
3684 rotationSpeed?: number;
3685 /** Whether to show inner pies on chart. */
3686 showInnerPies?: boolean;
3687 /** Whether to show inner pies on exported image. */
3688 showInnerPiesExport?: boolean;
3689 /** Start angle of the pie. */
3690 startAngle?: number;
3691 /** Default pie rendering style. */
3692 style?: PieChartSettingsPieStyle;
3693 /** Dynamically determine pie style from data. */
3694 styleFunction?: (
3695 /** pie to apply predefined style */
3696 pie: PieChartPie) => void;
3697 /** Default pie rendering theme. */
3698 theme?: "flat" | "bevel" | "can" | "rounded" | "smoothy";
3699 /** Center X coordinate of the pie chart.
3700 If the value is 'null' - coordinate is calculated automatically.
3701 If the value is >1 - it specifies the exact x value in pixels.
3702 If the value is <=1 - it specifies a fraction of chart width. */
3703 x?: number;
3704 /** Center Y coordinate of the pie chart.
3705 If the value is 'null' - coordinate is calculated automatically.
3706 If the value is >1 - it specifies the exact x value in pixels.
3707 If the value is <=1 - it specifies a fraction of chart height. */
3708 y?: number;
3709 };
3710 /** Represents settings for individual slices within each pie. */
3711 slice?: {
3712 /** Style to active slices in background (back navigation) pies */
3713 backgroundActiveStyle?: {
3714 brightness?: number;
3715 };
3716 /** Slice style on background (back navigation) pies. */
3717 backgroundStyle?: {
3718 fillColor?: string;
3719 /** Extra property to alternate fill colors on backgrond slices. */
3720 fillColor2?: string;
3721 fillGradient?: GradientDefinition;
3722 };
3723 /** Label connector line style. */
3724 connectorStyle?: BaseSettingsLineStyle;
3725 /** Expandable slice mark line style */
3726 expandableMarkStyle?: {
3727 distance?: number;
3728 lineColor?: string;
3729 lineDash?: Array<number>;
3730 lineWidth?: number;
3731 };
3732 /** Hovered slices style. */
3733 hoverStyle?: PieChartSettingsSliceStyle;
3734 /** Slice margin. */
3735 margin?: number;
3736 /** Controls minimal visual size of slice. Use this to make very small sizes visually bigger. The value represents
3737 smallest fraction of a full pie a slice will take. The range is between 0 and 1. For example using 0.05, all slices
3738 smaller than 5% will be grown up to 5%. Other slices will be made proportionally smaller to accommodate for extra
3739 size of small slices. */
3740 minFraction?: number;
3741 /** Style for "Others" slice. */
3742 othersStyle?: {
3743 fillColor?: string;
3744 /** Circumference decoration of 'others' slice. */
3745 lineDecoration?: "zigzag";
3746 };
3747 /** Style for the "Previous" slice. */
3748 previousStyle?: {
3749 fillColor?: string;
3750 /** Circumference decoration of 'previous' slice. */
3751 lineDecoration?: "zigzag";
3752 };
3753 /** Selected slices style. */
3754 selectedStyle?: PieChartSettingsSliceStyle;
3755 /** Slice style settings */
3756 style?: PieChartSettingsSliceStyle;
3757 /** Dynamically determine slice style from data. */
3758 styleFunction?: (
3759 /** slice to apply predefined style */
3760 slice: PieChartSlice,
3761 /** slice data including subvalues */
3762 sliceData: PieChartDataObject) => void;
3763 };
3764 /** Theme to apply. You can either use this to share configuration objects between multiple charts or use one of the predefined
3765 themes. */
3766 theme?: PieChartSettings;
3767 /** Adjustable settings to manage default and custom toolbar items, as well as toolbar overall appearance. */
3768 toolbar?: BaseSettingsToolbar;
3769 }
3770 export interface PieChartSettingsAdvanced extends BaseSettingsAdvanced {
3771 /** Controls visibility of the back icon at the center of pie chart. If true, the back button is always visible, otherwise only on hover. */
3772 backAlwaysVisible?: boolean;
3773 /** Image to display for back navigation. */
3774 backImage?: string;
3775 /** Background color of the back navigation button. */
3776 backImageBackground?: string;
3777 /**
3778 @deprecated use the first value of `icons.sizeExtent` setting instead. */
3779 iconMinSize?: number;
3780 /** Enables/disables initial zoom-in animation. */
3781 initialAnimation?: boolean;
3782 /** Inside labels are not rendered if there is not enough space. So if available space is less than label size * treshold. */
3783 labelInsideTreshold?: number;
3784 /** Chart rendering quality. Note that it affects render performance for raised and gradient themes. Range 0 .. 1. */
3785 renderQuality?: number;
3786 }
3787 export interface PieChartSettingsData extends BaseSettingsData {
3788 /** An array of fields for auto-categorization. For each field a new drilldown sub-level will be created, separated by the values of that field. */
3789 autoCategories?: Array<string | ((obj: PieChartDataObject) => string)>;
3790 /** Load more chart data. */
3791 dataFunction?: (
3792 /** The ID of the parent slice. `null` when loading the top level data. */
3793 id: string,
3794 /** max number of slices to load on pie */
3795 limit: number,
3796 /** number of slices to skip from start */
3797 offset: number,
3798 /** callback function to execute when data arrived correctly */
3799 success: (data: PieChartDataObjectRoot) => void,
3800 /** callback function to execute when error occure while loading data */
3801 fail: (result: BaseDataErrorResponse) => void) => void;
3802 /** Number of slices to request from server. */
3803 itemsToLoad?: number;
3804 /** Enables/Disables partial load. Items will be loaded on demand but is not compatible with sortField or autoCategories. */
3805 partialLoad?: boolean;
3806 /** Provides the ability to embed chart data directly into the chart configuration.
3807
3808 This data can be complete or act as the initial data where the rest will be requested dynamically using
3809 `url` or `dataFunction`. */
3810 preloaded?: PieChartDataObjectRoot;
3811 /** If set, items will be sorted in descending order using values from this field. You can either specify a single field or an array
3812 of fields.
3813
3814 To sort the values ascending, prefix the field name with `-`, for example, `-value` (without any spaces).
3815
3816 The default value `null` means that the chart does not reorder the data and it is displayed in the order it is given in the
3817 data source.
3818
3819 The callback receives two data objects every iteration, return `0` for equal values, `1` if the first value should be before the other
3820 and `-1` otherwise.
3821
3822 ```javascript
3823 sortField: function (a, b) {
3824 // handle null and undefined values as zeroes
3825 var v1 = a.val || 0;
3826 var v2 = b.val || 0;
3827 if (v1 === v2) return 0;
3828 if (v1 < v2) return 1;
3829 return -1;
3830 }
3831 ``` */
3832 sortField?: string | Array<string> | ((a: PieChartDataObject, b: PieChartDataObject) => number);
3833 }
3834 export interface PieChartSettingsEvents extends BaseSettingsEvents<PieChartChartEventArguments, PieChartChartClickEventArguments> {
3835 /**
3836 @deprecated Use onChartUpdate instead */
3837 onPieChange?: (
3838 /** The mouse event. */
3839 event: MouseEvent, args: PieChartChartEventArguments) => void;
3840 /**
3841 @deprecated Use onChartUpdate instead */
3842 onPieReadyStateChanged?: (
3843 /** The mouse event. */
3844 event: MouseEvent, args: PieChartChartEventArguments) => void;
3845 }
3846 export interface PieChartSettingsInteraction extends BaseSettingsInteraction {
3847 /** Chart animation settings. */
3848 animation?: {
3849 /** Duration of hover animation. */
3850 hoverDuration?: number;
3851 /** Duration of scroll animation. */
3852 scrollDuration?: number;
3853 };
3854 /** If true, empty donut center area reacts to clicks. */
3855 coverCenter?: boolean;
3856 /** Interaction mode. Note that `selection.enabled` can be used to disable the selection completely. */
3857 mode?: "drilldown" | "select" | "toggle";
3858 /** Slice including all the values that can not be displayed as a separate slice. Use them to configure 'others' slice rendering space. */
3859 others?: {
3860 /** If true, when offset > 0 click on center acts as click on previous slice. */
3861 centerGoesToPrevious?: boolean;
3862 /** Enable/Disable Others/Previous slices. */
3863 enabled?: boolean;
3864 /** Max size of others slice, as a fraction of 1. If others slice is bigger than this, it will be made smaller and other slices proportionally expanded. */
3865 maxOthersFraction?: number;
3866 /** Max number of slices to show. All remaining slices will be replaced by 'Others' slice. */
3867 maxSlicesVisible?: number;
3868 /** Minimum slice size as fraction of full pie. All slices smaller than that are replaced with 'Others' slice. */
3869 minSliceFraction?: number;
3870 /** Minimum number of slices the pie needs to have for it to show the `Others` slice. Note that
3871 once this limit is reached the `Others` slice may also contain all but one of the slices - this
3872 setting does not limit the minimum number of slices that are shown at once in such case.
3873
3874 If you set this property to a value greater than 1, it might be useful to set [`slice.minFraction`][doc]
3875 to a value of `0.01` or greater.
3876
3877 [doc]: pie-chart/api-reference/settings.html#slice.minFraction */
3878 minSlices?: number;
3879 /** Others and Previous slice size as fraction of full pie.
3880 Previous will always be this big.
3881 Other will be at least this big but no bigger than maxOthersFraction. */
3882 navigationFraction?: number;
3883 };
3884 /** One of interactivity option to scroll among data. */
3885 scrolling?: {
3886 /** Enable/disable scrolling the Other/Previous slices by rotating the chart. */
3887 enabled?: boolean;
3888 };
3889 /** One of interactivity option to use the data selection. */
3890 selection?: {
3891 /** Enable/disable selection. */
3892 enabled?: boolean;
3893 /** Max cutout distance on swipe. */
3894 maxSwipeDistance?: number;
3895 /** Allows partial selecting of slices by gradually dragging them outwards. If this is set to `true`, the slices will not snap to true/false positions
3896 instead the API will provide information on how far they were pulled out. */
3897 partialSwipe?: boolean;
3898 /** Wether to select slice by swipe. Note that it works independently of selection mode. */
3899 swipe?: boolean;
3900 /** Pixels the pointer has to be moved before the motion is recognized as a swipe. */
3901 swipeSensitivity?: number;
3902 /** Selection distance tolerance. */
3903 tolerance?: number;
3904 };
3905 }
3906 export interface PieChartSettingsLabels {
3907 /** Label rotation angle. */
3908 angle?: number;
3909 /** Minimal connector length from slice to label. */
3910 connectorLength?: number;
3911 /** Whether to show connector lines for labels. */
3912 connectors?: boolean;
3913 /** Show/hide labels. */
3914 enabled?: boolean;
3915 /** Inside label placement method. */
3916 insideLabel?: "always" | "auto" | "append";
3917 /** Inside label is not shown if the fraction of label that fits inside slice is smaller than this. */
3918 insideLabelVisibilityFraction?: number;
3919 /** Min distance between labels, as a fraction of line height. */
3920 interLabelSpacing?: number;
3921 /** Outside labels placement method. */
3922 placement?: "aligned" | "wrap";
3923 }
3924 export interface PieChartSettingsLegend extends BaseSettingsLegend {
3925 /** Visual element of legend entry with appropriate style to a slice color it corresponds.
3926 The content of each legend marker is the same as info popup appearing while hovering on slice. */
3927 marker?: PieChartSettingsLegendMarker;
3928 /** Specifies if the Others and Previous slices should be shown in the legend. */
3929 showOthers?: boolean;
3930 }
3931 export interface PieChartSettingsLegendMarker extends BaseSettingsLegendMarker {
3932 /** Specifies the shape for color markers in the legend. */
3933 shape?: "triangle" | "square" | "rhombus" | "triangle2" | "circle";
3934 }
3935 export interface PieChartSettingsLocalization extends BaseSettingsLocalization {
3936 othersLabel?: string;
3937 previousLabel?: string;
3938 }
3939 export interface PieChartSettingsPieStyle {
3940 background?: boolean;
3941 /** Pie background brightness. */
3942 brightness?: number;
3943 /** Color distribution among slices. */
3944 colorDistribution?: "list" | "gradientProportional" | "gradient";
3945 /** Pie background fill color. Useful while pie slices are loading. */
3946 fillColor?: string;
3947 /** Color set for pie slices. */
3948 sliceColors?: Array<string>;
3949 }
3950 export interface PieChartSettingsSliceStyle {
3951 /** Brightness applied to slice line and fill color
3952 value 0 - black
3953 value 1 - unchanged
3954 value 2 - transparent */
3955 brightness?: number;
3956 /** Distance how far the slice is moved away from pie. */
3957 cutoutDistance?: number;
3958 /** Specifies if the slice is expandable. */
3959 expandable?: boolean;
3960 /** Slice fill color. */
3961 fillColor?: string;
3962 /** Icon to display on slice. */
3963 icon?: string;
3964 /** Gets or sets the style of the label shown inside the slice. Use `insideLabel.text` to specify the text that will be displayed. */
3965 insideLabel?: BaseSettingsLabelStyle;
3966 /** Gets or sets the style of the external label. Use `label.text` to specify the text that will be displayed. */
3967 label?: BaseSettingsLabelStyle;
3968 /** Brightness applied to slice line color */
3969 lineBrightness?: number;
3970 /** Outline color. */
3971 lineColor?: string;
3972 /** Line dash array that is a pattern to get a dashed line. The array contains length of dash followed by length of space.
3973 Note that a sequence of multiple dash-space values is supported. */
3974 lineDash?: Array<number>;
3975 /** Width of the slice outline. */
3976 lineWidth?: number;
3977 /** Url to open on click. */
3978 url?: string;
3979 }
3980 export interface PieChartSlice {
3981 active: boolean;
3982 brightness: number;
3983 cutoutDistance: number;
3984 data: PieChartDataObject;
3985 /** Whether to expand the slice as a default click behavior. */
3986 expandable: boolean;
3987 fillColor: string;
3988 fillColor2: string;
3989 /** The fraction of the pie the slice covers. Note that this is represents the visual size,
3990 not the value - for that you need to use `percent` field. */
3991 fraction: number;
3992 icon: string;
3993 iconOffset: [number, number, number, number];
3994 id: string;
3995 index: number;
3996 inside: boolean;
3997 /** Gets or sets the style of the label shown inside the slice. Use `insideLabel.text` to specify the text that will be displayed.
3998 Note that for backwards compatibility it is possible to set this property to a string directly - in this case the value will be
3999 written the `insideLabel.text` but also `label.text` will be cleared. */
4000 insideLabel: BaseSettingsLabelStyle;
4001 /**
4002 @deprecated use `insideLabel` instead. */
4003 insideLabelStyle: BaseSettingsLabelStyle;
4004 /** Gets or sets the style of the external label. Use `label.text` to specify the text that will be displayed. */
4005 label: BaseSettingsLabelStyle;
4006 /**
4007 @deprecated use `label` instead. */
4008 labelStyle: BaseSettingsLabelStyle;
4009 lineBrightness: number;
4010 lineColor: string;
4011 lineDash: Array<number>;
4012 lineDecoration: string;
4013 lineWidth: number;
4014 /** Contains the original ID that is populated when the slice is being removed. This property
4015 is important since once the removal animation starts, the `id` property contains an auto-generated
4016 ID. */
4017 originalId: string;
4018 /** The percentage of the value of this slice against the total value of the pie.
4019
4020 Note that value is already multiplied by 100, so if there are two equal slices, both would have the value of `50`, instead of `0.5`. */
4021 percent: number;
4022 pie: PieChartPie;
4023 removed: boolean;
4024 /** Swipe distance towards the center of the pie */
4025 selectDistance: number;
4026 selected: boolean;
4027 /** Slice partial swipe distance */
4028 selection: number;
4029 url: string;
4030 urlTarget: string;
4031 userPlaced: boolean;
4032 value: number;
4033 x: number;
4034 y: number;
4035 }
4036 export interface TimeChartHeaderItem {
4037 date: string;
4038 unitCount: number;
4039 unitName: string;
4040 }
4041 /** Describes the base properties shared between all events raised by the different charts. */
4042 export interface TimeChartChartEventArguments extends BaseChartEventArguments {
4043 /**
4044 @deprecated use hoverEnd instead */
4045 clickEnd: number;
4046 /**
4047 @deprecated use hoverMarker instead */
4048 clickMarker: boolean;
4049 /**
4050 @deprecated use hoverSeries instead */
4051 clickSeries: TimeChartSettingsSeries;
4052 /**
4053 @deprecated use hoverStart instead */
4054 clickStart: number;
4055 /** The currently used display unit. */
4056 displayUnit: string;
4057 /** The UTC timestamp of the end of the hovered time period. `null` if the cursor is not hovering over data. */
4058 hoverEnd: number;
4059 hoverItem: TimeChartItem;
4060 /** `True` if the cursor is directly hovering a marker on a line series. `False` otherwise. Note that this currently does not work with
4061 the markers that are configured using `markerStyleFunction` delegate. */
4062 hoverMarker: boolean;
4063 /** The series that is currently directly under the cursor. `null` if the cursor is not hovering over data or is hovering over empty area. */
4064 hoverSeries: TimeChartSettingsSeries;
4065 /** The UTC timestamp of the beginning of the hovered time period. `null` if the cursor is not hovering over data. */
4066 hoverStart: number;
4067 /** The UTC timestamp of the end of the selection. `null` if there is no active selection. */
4068 selectionEnd: number;
4069 /** The UTC timestamp of the beginning of the selection. `null` if there is no active selection. */
4070 selectionStart: number;
4071 /** The UTC timestamp for the right-most displayed value. */
4072 timeEnd: number;
4073 /** The UTC timestamp for the left-most displayed value. */
4074 timeStart: number;
4075 }
4076 export interface TimeChartDataObject extends BaseDataErrorResponse {
4077 /**
4078 @deprecated Use `values` instead. */
4079 data?: Array<Array<string | number>>;
4080 /** Specifies the start of the time range for which the data is available. The main purpose of
4081 this property is to disallow the user to scroll to far back and also to instruct the chart that
4082 there will never be any data returned before this point. */
4083 dataLimitFrom?: string | number;
4084 /** Specifies the end of the time range for which the data is available. See also `dataLimitFrom`.
4085 This value has to be larger than the largest timestamp in the data. */
4086 dataLimitTo?: string | number;
4087 /** The time range the data in this response covers. This usually will match the `from` parameter
4088 in the request although it can be less than it as well. */
4089 from: string | number;
4090 /** Time zone identifier, for example, `UTC` or `America/Los_Angeles`. See
4091 [time zone support](time-chart/introductory-topics/time-zone-support.html) for details.
4092
4093 It is recommended that the data source always return data in UTC.
4094
4095 The default is `UTC`. */
4096 timeZone?: string;
4097 /** The time range the data in this response covers. Note that if this value is less than the `to`
4098 parameter in the request, the chart will automatically issue another request for the time range
4099 after this. */
4100 to: string | number;
4101 /** Specifies the units in which the data in this response is aggregated by. Note that even if the
4102 chart requests a larger unit (for example, days), the data response might include a smaller unit
4103 like hours and this property is used by the chart to detect this.
4104
4105 The unit must match one of the units defined in `data.units` settings array. */
4106 unit: string;
4107 /** The list of values for the chart. Each array represents values for a single point in time. The first (index 0) value must
4108 contain the timestamp value, the rest are values for individual series.
4109 For example: [[time1, series1_Val1, series2_Val1], [time2, series1_Val2, series2_Val2]] */
4110 values: Array<Array<string | number> | Float64Array | Float32Array | Int32Array | Uint32Array>;
4111 }
4112 export interface TimeChartItem {
4113 header: TimeChartHeaderItem;
4114 values: Array<LinearChartSeriesStackDataItem>;
4115 }
4116 export interface TimeChartSettings extends LinearChartSettings {
4117 advanced?: TimeChartSettingsAdvanced;
4118 /** Chart area related settings. */
4119 area?: TimeChartSettingsArea;
4120 /** Default series settings for each series rendering type. Use this to configure all series of specific type to get line
4121 or column chart or combination of them. */
4122 chartTypes?: {
4123 /** Series type to show an opening and closing value on top of a total variance. */
4124 candlestick?: TimeChartSettingsSeriesCandleStick;
4125 /** Series type to render values as vertical bars. */
4126 columns?: TimeChartSettingsSeriesColumns;
4127 /** Series type to connect value points by lines. */
4128 line?: TimeChartSettingsSeriesLines;
4129 };
4130 /** Moving time line that represents the current time, mainly to analyze real-time data changes. To achieve it,
4131 use server time of page load and adjust time zone offset. */
4132 currentTime?: TimeChartSettingsCurrentTime;
4133 /** Settings used to load data into chart. Customise preferred data source feeding methods.
4134 You can use one of these options: url, data function, preloaded data. */
4135 data?: Array<TimeChartSettingsData>;
4136 /** The events used to handle user interaction with UI elements. */
4137 events?: TimeChartSettingsEvents;
4138 /** A variety of interaction options that includes scrolling, zooming and swipe. */
4139 interaction?: TimeChartSettingsInteraction;
4140 /** Localizeable strings including export type options and useful default buttons used for chart interaction.
4141 Buttons like to navigate back, set the chart on full screen and others. */
4142 localization?: TimeChartSettingsLocalization;
4143 /** Time line markers that represents event on time. */
4144 milestones?: Array<TimeChartSettingsMarker>;
4145 /** Settings to specify initial view once the page loaded.
4146
4147 Note that API methods such as [`setDisplayPeriod`][1] or [`displayUnit`][2] should be used to set these values
4148 after the chart has been loaded.
4149 [1]: time-chart/api-reference/api.html#setDisplayPeriod
4150 [2]: time-chart/api-reference/api.html#displayUnit */
4151 navigation?: {
4152 /** Whether to allow the chart view to follow display anchor. Use it for real-time updates. */
4153 followAnchor?: boolean;
4154 /** Specifies anchor position for initial time period. Use it together with `initialDisplayPeriod` from which beginning is calculated.
4155
4156 Use [`setDisplayPeriod()`][1] to change the value after the chart has been loaded.
4157 [1]: time-chart/api-reference/api.html#setDisplayPeriod
4158
4159 Valid values:
4160 - `now` - set end of the period to current time
4161 - `newestData` - set end of the period to newest data
4162 - `oldestData` - set beginning of the period to oldest data
4163 - time stamp - set period end time in UTC milliseconds */
4164 initialDisplayAnchor?: number | "newestData" | "now" | "oldestData";
4165 /** Time period to show initially. Use in combination with intitialDisplayAnchor.
4166
4167 Possible values:
4168 - `max` - shows all data
4169 - `timestamp > timestamp` - shows the time range specified by two UTC timestamps, in milliseconds.
4170 - custom time period like `10 seconds`, `5 m`.
4171
4172 Use [`setDisplayPeriod()`][1] to change the value after the chart has been loaded.
4173 [1]: time-chart/api-reference/api.html#setDisplayPeriod */
4174 initialDisplayPeriod?: string;
4175 /** Data display unit to use for initial view.
4176
4177 Possible values:
4178 - `auto` - determine automatically based on time range
4179 - custom time unit like `1 m`, `3 weeks`.
4180
4181 Use [`displayUnit()`][1] to change the value after the chart has been loaded.
4182 [1]: time-chart/api-reference/api.html#displayUnit */
4183 initialDisplayUnit?: string;
4184 };
4185 /** Array of series in the chart. Each of the series can be different type, can use different data source and
4186 aggregation. Additionally, series can be clustered and stacked. */
4187 series?: Array<TimeChartSettingsSeries>;
4188 /** The default series used as the chart dominant data. Use settings.series array to specify actual series. */
4189 seriesDefault?: TimeChartSettingsSeries;
4190 /** Theme to apply. You can either use this to share configuration objects between multiple charts or use one of the predefined
4191 themes. */
4192 theme?: TimeChartSettings;
4193 /** X-axis line representing time at the bottom of chart.
4194
4195 Time line made of two different time graduations. Next image shows time line graduation by days and 3 hours.
4196 
4197
4198 As you change the zoom level time axis graduation changes accordingly. */
4199 timeAxis?: TimeChartSettingsTimeAxis;
4200 /** Adjustable settings to manage default and custom toolbar items, as well as toolbar overall appearance. */
4201 toolbar?: TimeChartSettingsToolbar;
4202 }
4203 export interface TimeChartSettingsAdvanced extends BaseSettingsAdvanced {
4204 /** Determines how frequently (in ms) to poll for new data. If set to null data polling is disabled.
4205 The data is automatically requested for the period since the last available timestamp until the current time.
4206 Note that if there is no data available yet for the time period the chart requests, an empty data response should be
4207 returned, for example `success({ from: 0, to: 1, unit: "ms", values: [] })`. */
4208 dataUpdateInterval?: number;
4209 /** Maximum data points to render in one view. Note that TimeChart will not allow to select such time unit that will result in more points being rendered.
4210 @deprecated */
4211 maxUnitsToDisplay?: number;
4212 /** The minimum time interval in which current time marker is updated, in ms. Normally the value is calculated based on the time scale
4213 so that the time only updates when the time marker would be moved and this value is only used as a baseline. */
4214 timeUpdateInterval?: number;
4215 }
4216 export interface TimeChartSettingsArea extends LinearChartSettingsArea {
4217 /** List of time periods that are used when formatting time axis.
4218
4219 Note that this does not impact what periods are available to choose from in the toolbar. For that
4220 use [`toolbar.periods`](time-chart/api-reference/settings/toolbar/periods.html) setting. */
4221 displayPeriods?: Array<{
4222 unit?: string;
4223 }>;
4224 /** List of time units to use for data aggregation on the time axis.
4225
4226 For example: `{ area: { displayUnits: [ { unit: "5 m", "5 minutes" }, { unit: "15 m", name: "15 minutes" } ] } }` */
4227 displayUnits?: Array<{
4228 /** Used units */
4229 unit?: string;
4230 /** Name of used units */
4231 name?: string;
4232 }>;
4233 /** Area style settings. */
4234 style?: TimeChartSettingsAreaStyle;
4235 }
4236 export interface TimeChartSettingsAreaDisplayPeriod {
4237 /** Reference time for passed data. For example, if the `displayPeriod` is set to `1 d`, this could contain the timestamp of the start of that day. */
4238 displayAnchor?: number | "newestData" | "now" | "oldestData";
4239 /** Display period, either "auto" or a time unit such as `1 d`. */
4240 displayPeriod?: string;
4241 /** Units in which to show data. */
4242 displayUnit?: string;
4243 /** Named time interval. */
4244 name?: string;
4245 }
4246 export interface TimeChartSettingsAreaStyle extends LinearChartSettingsAreaStyle {
4247 /** Default text style for all markers. */
4248 markerText?: BaseSettingsTextStyle;
4249 /** Time period selection style. Note that the [`interaction.selection`](time-chart/api-reference/settings/interaction/selection.html) section specifies if the
4250 selection can be created by the user or only through the API. */
4251 selection?: TimeChartSettingsAreaStyleSelection;
4252 /** Time period selection text style. */
4253 selectionLabel?: BaseSettingsTextStyle;
4254 }
4255 export interface TimeChartSettingsAreaStyleSelection {
4256 /** Specifies if the selection is drawn behind or above the series themselves. */
4257 behindSeries?: boolean;
4258 fillColor?: string;
4259 lineColor?: string;
4260 lineWidth?: number;
4261 /** If enabled, the displayed times will be rounded to the nearest unit
4262 instead of containing the nearest unit. */
4263 roundToNearestTime?: boolean;
4264 }
4265 export interface TimeChartSettingsCurrentTime extends TimeChartSettingsMarker {
4266 /** Align label relative to the line */
4267 align?: "center" | "right" | "left";
4268 /** Style settings for the drawing the time line text on the chart. You can also use `label.text` property
4269 to specify additional text that will be shown next to the time or by setting `showTime` to `false` (the default)
4270 display only the specified text. */
4271 label?: BaseSettingsLabelStyle;
4272 /** Show the milestone time along with the label text */
4273 showTime?: boolean;
4274 /** Align label relative to chart top or bottom side */
4275 side?: "top" | "bottom";
4276 /** The style for the vertical time marker line. */
4277 style?: BaseSettingsLineStyle;
4278 }
4279 export interface TimeChartSettingsData extends BaseSettingsData {
4280 /** Maximum number of data entries to store per data unit. */
4281 cacheSize?: number;
4282 /** A delegate that will be Load more chart data. */
4283 dataFunction?: (
4284 /** UTC timestamp for the start of the time range for which data is required */
4285 from: number,
4286 /** UTC timestamp for the end of the time range for which data is required */
4287 to: number,
4288 /** The unit by which the data has to be aggregated. The data source can also return smaller units. */
4289 unit: string,
4290 /** Callback function to execute when data arrived correctly. */
4291 success: (data: TimeChartDataObject) => void,
4292 /** Callback function to execute when error occure while loading data. */
4293 fail: (result: BaseDataErrorResponse) => void,
4294 /** The current display timezone for the chart. Only specified if the unit is days or larger, `null` otherwise. */
4295 timeZone: string) => void;
4296 /** Whether to request only when scrolling/scaling has stopped. */
4297 minimizeRequests?: boolean;
4298 /** How much data to load in advance. For example, if `prefetchRatio=1`, the chart will automatically load data
4299 so that the user can scroll a whole width of the chart to both sides without waiting for the data. */
4300 prefetchRatio?: number;
4301 /** This property allows the data to be specified inline with the settings. Note that even if this is specified
4302 the chart might want to invoke `url` or `dataFunction` if the user selects a time range outside of what has
4303 been preloaded. */
4304 preloaded?: TimeChartDataObject;
4305 /** Maximum number of data points to request in one go. Multiple requests will be issued if more data is needed.
4306
4307 Note that the server can opt to return less data in the response as well - more requests will be issued in this
4308 case as well. */
4309 requestMaxUnits?: number;
4310 /** The format string (or strings) that is used to parse timestamps that are given as strings. Note that
4311 for optimal performance a single format string should be used (or even better, the numeric timestamps
4312 should be used instead).
4313
4314 When `stringTimestampFormat` is not specified the parser supports ISO 8601 formats (for details see
4315 [moment documentation](http://momentjs.com/docs/#/parsing/string/)).
4316
4317 See [moment documentation](http://momentjs.com/docs/#/parsing/string-format/) for details on the format
4318 strings. */
4319 stringTimestampFormat?: string | Array<string>;
4320 /** If set to `true`, the validation of the loaded data is not performed and warnings will not be displayed.
4321 Note that errors are not suppressed.
4322
4323 This setting should only be used when it is determined that the potential issues described by these warnings
4324 does not prevent the chart from working correctly. It should also be noted that a future version of the library
4325 might change the behavior of the situations the warnings are intended to prevent. */
4326 suppressWarnings?: boolean;
4327 /** Data time zone offset in minutes.
4328 @deprecated */
4329 timeZoneOffset?: string | number;
4330 /** Specifies whether the numeric timestamps used with this data source are in seconds instead of milliseconds.
4331
4332 This applies to the `from` and `to` request parameters and all timestamps within the data response. */
4333 timestampInSeconds?: boolean;
4334 /** Time steps at what data can be fetched. */
4335 units?: Array<string>;
4336 /** URL that is used to load data. Additional query string parameters are added to the given url:
4337 `from`, `to`, `unit` and `timeZone`. See the documentation of `dataFunction` for the description of these
4338 parameters. */
4339 url?: string;
4340 /** Allows specifying specific URL for each time unit. This can be useful if the data is pregenerated in
4341 static files, for example, to specify different data file where time aggregated by months or years -
4342 `urlByUnit: { 'y': '/data/yearData.json', 'm': '/data/monthData.json' }`.
4343 If this is specified, it overrides `url` property. */
4344 urlByUnit?: Dictionary<string>;
4345 /** Specifies if the cached values from a smaller unit may be used when retrieving the data for a larger unit.
4346
4347 This should be set to `false` when the data source uses a custom aggregation specific to each individual unit.
4348
4349 Note that currently the smaller units are only used when they overlap the required range completely. For partial
4350 overlap the values are only used as a placeholder while the larger unit is requested from the data source. */
4351 useSmallerUnitCache?: boolean;
4352 }
4353 export interface TimeChartSettingsEvents extends LinearChartSettingsEvents<TimeChartChartEventArguments, TimeChartChartEventArguments> {
4354 /**
4355 @deprecated same as onChartUpdate */
4356 onTimeChange?: (
4357 /** An empty mouse event. */
4358 event: BaseMouseEvent, args: TimeChartChartEventArguments) => void;
4359 /** Specifies if the `onSelectionChange` event should be raised while the user drags the selection or only
4360 once the pointer is released and the selection is finalized. */
4361 selectionChangeDuringInteraction?: boolean;
4362 }
4363 export interface TimeChartSettingsInteraction extends LinearChartSettingsInteraction {
4364 /** Scrolling settings. */
4365 scrolling?: TimeChartSettingsInteractionScrolling;
4366 /** Configurable settings to select specific time period by dragging on the time axis. */
4367 selection?: TimeChartSettingsInteractionSelection;
4368 /** Snap mode determines how the chart locks on to data periods after dragging, scrolling and other actions. */
4369 snapMode?: "displayUnit" | "period" | "multiPeriod";
4370 /** Configurable settings to enhance and alleviate zoom interaction. */
4371 zooming?: TimeChartSettingsInteractionZooming;
4372 }
4373 export interface TimeChartSettingsInteractionScrolling extends LinearChartSettingsInteractionScrolling {
4374 /** Limits scrolling in the left side. This should be either the timestamp value in milliseconds or the string constants 'oldestData' or 'oldestDataRounded'.
4375
4376 'oldestDataRounded' means that the scrolling limit will be the oldest data point rounded down for the currently visible major time unit (the bottom line
4377 in the time axis). For example, if the data starts on June, when viewing the whole year, the first half of the year will be shown empty.
4378
4379 Specify `null` to disable the limit. */
4380 limitFrom?: number | "oldestData" | "oldestDataRounded";
4381 /** Defines the chart behavior when the chart is scrolled passed the data limits. The actual limits are stored in `limitFrom` and `limitTo`. */
4382 limitMode?: "snapBack" | "block";
4383 /** Limits scrolling in the right side. This should be either the timestamp value in milliseconds or the string constants 'newestData', 'newestDataRounded'
4384 or 'now'.
4385
4386 'newestDataRounded' means that the scrolling limit will be the newest data point rounded up for the currently visible major time unit (the bottom line
4387 in the time axis). For example, if the data ends on June, when viewing the whole year, the second half of the year will be shown empty.
4388
4389 Specify `null` to disable the limit. */
4390 limitTo?: number | "newestData" | "now" | "newestDataRounded";
4391 /** Allows the user to scroll past the limit to a certain degree. This coefficient is multiplied to the overscroll area - so if `overscrollProportion`
4392 is set to 0.1 and the user scrolls 10 units past the limit, the chart will scroll back 9 units. */
4393 overscrollProportion?: number;
4394 }
4395 export interface TimeChartSettingsInteractionSelection {
4396 /** Specifies if the selection area should be cleared/removed on right click. By default right click will clear selection. */
4397 clearOnRightClick?: boolean;
4398 /** Enable/disable selection */
4399 enabled?: boolean;
4400 /** Specifies if the selection area can be moved by dragging it. By default the whole chart is moved instead. */
4401 moveByDragging?: boolean;
4402 /** Specifies the speed by which the selection is resized by dragging it up and down. Requires `moveByDragging` to be enabled.
4403
4404 Note - set to `0` to disable the resize gesture. */
4405 resizeSensitivity?: number;
4406 /** Specifies how much the pointer must move vertically for the resize to start. Requires `moveByDragging` to be enabled. */
4407 resizeTolerance?: number;
4408 /** Distance in pixels to both sides of the selection left/right edges that can be used to drag the selection area to expand/collapse it. */
4409 tolerance?: number;
4410 }
4411 export interface TimeChartSettingsInteractionZooming extends LinearChartSettingsInteractionZooming {
4412 /** Whether to zoom-in when the chart area is clicked/tapped.
4413
4414 Note that to maintain backwards compatibility, if the zooming is completely disabled by setting `enabled: false`,
4415 the click interaction will still be available and must be disabled separately. */
4416 click?: boolean;
4417 /** If set to `false`, all zoom gestures will be disabled, irrespective of how the other properties are configured.
4418 Note that the user will still be able to zoom by drill-down (clicking on values; to disable that, specify `click: false`)
4419 and by using toolbar. */
4420 enabled?: boolean;
4421 }
4422 export interface TimeChartSettingsLocalization extends LinearChartSettingsLocalization {
4423 /** Calendar specific localization settings. This section is used to initialize moment.js locale.
4424 See moment.js documentation for detailed description: http://momentjs.com/docs/#/customization/. */
4425 calendar?: TimeChartSettingsLocalizationCalendar;
4426 /** Message being displayed while loading initial data. */
4427 determiningDataBounds?: string;
4428 /** Weekdays that are considered holidays. Uses ISO numbering, with 1 being Monday and 7 being Sunday. */
4429 holidayWeekdays?: Array<number>;
4430 /** Date and time formats used to display the selected time range in the header of the info popup. */
4431 infoDates?: {
4432 /** The formats used when only a single time unit has been selected or when the selection spans
4433 multiple major units (for example, selecting days from multiple months). */
4434 fullTimeFormats?: TimeChartSettingsLocalizationTimeUnits;
4435 /** The formats used for the major unit when displaying a time range where the major unit is the same,
4436 for example, the selection contains multiple days from the same week.
4437
4438 If the display unit is days, the resulting header text is shown as
4439 `minorTimeFormats.d(from) - minorTimeFormats.d(to) majorTimeFormats.d(from)`, e.g.
4440 `Feb 24 - Feb 26 2016`. */
4441 majorTimeFormats?: TimeChartSettingsLocalizationTimeUnits;
4442 /** See the description of `majorTimeFormats`. */
4443 minorTimeFormats?: TimeChartSettingsLocalizationTimeUnits;
4444 };
4445 /** Message to show when data loading is in progress. */
4446 loadingLabel?: string;
4447 /** Localizable strings for markers. */
4448 markerDates?: {
4449 /** Time formatting strings for time marker date. */
4450 timeFormats?: TimeChartSettingsLocalizationTimeUnits;
4451 };
4452 /** Localizable strings displayed in time axis. */
4453 timeAxisDates?: {
4454 /** Time formatting strings for major time units in bottom line of time axis. */
4455 majorLabelFullTimeFormats?: TimeChartSettingsLocalizationTimeUnits;
4456 /** Time formatting strings for major time units in bottom line of time axis. */
4457 majorLabelTimeFormats?: TimeChartSettingsLocalizationTimeUnits;
4458 /** Time formatting strings for minor time units in top line of time axis. */
4459 minorLabelTimeFormats?: TimeChartSettingsLocalizationTimeUnits;
4460 };
4461 /** Named time units. */
4462 timeUnitsNames?: TimeChartSettingsLocalizationTimeUnits;
4463 /** Plural forms of time units. */
4464 timeUnitsNamesPlural?: TimeChartSettingsLocalizationTimeUnits;
4465 /** Strings used in toolbars. */
4466 toolbar?: TimeChartSettingsLocalizationToolbar;
4467 }
4468 export interface TimeChartSettingsLocalizationCalendar {
4469 /**
4470 @deprecated specify `parentLocale` instead and use the localization file provided by moment.js */
4471 months?: Array<string>;
4472 /**
4473 @deprecated specify `parentLocale` instead and use the localization file provided by moment.js */
4474 monthsShort?: Array<string>;
4475 /** Specify the moment.js locale that should be used in the chart. While it is possible to set
4476 `months`, `weekdays` etc. in the TimeChart settings, the `parentLocale` should be used instead as
4477 the TimeChart settings do not expose all available options and it recommended to use the locales
4478 that are [provided by moment.js](https://github.com/moment/moment/tree/develop/locale).
4479
4480 Note that using this setting requires `moment.js` 2.12.0 or newer and the locale file must be included
4481 in the page - the chart will not download it automatically. */
4482 parentLocale?: string;
4483 /**
4484 @deprecated specify `parentLocale` instead and use the localization file provided by moment.js */
4485 week?: {
4486 /** Specifies the first day of the week. The default is `1` - Monday. Use either `0` or `7` for Sunday.
4487 @deprecated specify `parentLocale` instead and use the localization file provided by moment.js */
4488 dow?: number;
4489 /** Specifies how the first week of the year is calculated. The default is `4` - the week that contains Jan 4th is counted as the first.
4490
4491 Note that this setting is not used by default because the default formatting specifies ISO week numbering. If you want to change that,
4492 use `w` and `gggg` when specifying the week format strings.
4493 @deprecated specify `parentLocale` instead and use the localization file provided by moment.js */
4494 doy?: number;
4495 };
4496 /**
4497 @deprecated specify `parentLocale` instead and use the localization file provided by moment.js */
4498 weekdays?: Array<string>;
4499 /**
4500 @deprecated specify `parentLocale` instead and use the localization file provided by moment.js */
4501 weekdaysMin?: Array<string>;
4502 /**
4503 @deprecated specify `parentLocale` instead and use the localization file provided by moment.js */
4504 weekdaysShort?: Array<string>;
4505 }
4506 export interface TimeChartSettingsLocalizationTimeUnits {
4507 /** Months */
4508 M?: string;
4509 d?: string;
4510 h?: string;
4511 /** Minutes */
4512 m?: string;
4513 /** Milliseconds */
4514 ms?: string;
4515 s?: string;
4516 w?: string;
4517 y?: string;
4518 }
4519 export interface TimeChartSettingsLocalizationToolbar extends LinearChartSettingsLocalizationToolbar {
4520 /** Text to show in display periods drop-down when current period does not match any of the presets. */
4521 customPeriod?: string;
4522 /** Display period dropdown title. */
4523 periodDropdownTitle?: string;
4524 /** Text to show if there are unavailable units in the unit dropdown. This can only happen for small units if the chart is zoomed out too much. */
4525 unavailableUnitTitle?: string;
4526 /** Display unit dropdown title. */
4527 unitDropdownTitle?: string;
4528 /** Zoom out button text. */
4529 zoomoutButton?: string;
4530 /** Zoom out button title. */
4531 zoomoutTitle?: string;
4532 }
4533 export interface TimeChartSettingsMarker {
4534 /** Align label relative to the line */
4535 align?: "center" | "right" | "left";
4536 /** Show/hide the marker. */
4537 enabled?: boolean;
4538 /** Style settings for the drawing the time line text on the chart. You can also use `label.text` property
4539 to specify additional text that will be shown next to the time or by setting `showTime` to `false` (the default)
4540 display only the specified text. */
4541 label?: BaseSettingsLabelStyle;
4542 /** Specifies if the time marker is always included when limiting scrolling. If this is `true`, then the user will always
4543 be able to scroll to the current time even if the data is not available. */
4544 overrideLimits?: boolean;
4545 /** Show the milestone time along with the label text */
4546 showTime?: boolean;
4547 /** Align label relative to chart top or bottom side */
4548 side?: "top" | "bottom";
4549 /** The style for the vertical time marker line. */
4550 style?: BaseSettingsLineStyle;
4551 /** Timestamp in UTC milliseconds to locate time marker on chart. If this is specified, the
4552 marker does not automatically move. */
4553 time?: number;
4554 }
4555 export interface TimeChartSettingsSeries extends LinearChartSettingsSeries {
4556 /** Data manipulation settings used for default series. */
4557 data?: TimeChartSettingsSeriesData;
4558 }
4559 export interface TimeChartSettingsSeriesCandleStick extends LinearChartSettingsSeriesCandleStick {
4560 /** Data manipulation settings used for default series. */
4561 data?: TimeChartSettingsSeriesCandleStickData;
4562 }
4563 export interface TimeChartSettingsSeriesCandleStickData extends TimeChartSettingsSeriesData {
4564 /** The index in the value arrays where the closing values in that particular time period is located. */
4565 close?: number;
4566 /** The index in the value arrays where the highest values in that particular time period is located. */
4567 high?: number;
4568 /** The index in the value arrays where the lowest values in that particular time period is located. */
4569 low?: number;
4570 /** The index in the value arrays where the opening values in that particular time period is located. */
4571 open?: number;
4572 }
4573 export interface TimeChartSettingsSeriesColumns extends LinearChartSettingsSeriesColumns {
4574 /** Data manipulation settings used for default series. */
4575 data?: TimeChartSettingsSeriesData;
4576 }
4577 export interface TimeChartSettingsSeriesData extends LinearChartSettingsSeriesData {
4578 /** Index in the value array where the count of aggregated values are located. This is optional but should be provided if the aggregation
4579 method is `avg` (average) and URL or `dataFunction` is used to aggregate the values external to the chart because otherwise the chart will
4580 aggregate values by simply counting them. So if `countIndex` is not provided and there are values:
4581 `[[May 1 2014, 5], [May 2 2014, 15], [June 1 2014, 20]]` the aggregation to year 2014 will yield `(5+15+20)/3 = 13.3` when the display unit is
4582 days but `((5+15)/2 + 20)/2 = 15` when the display unit is months. */
4583 countIndex?: number;
4584 /** Index in value the array where the values that will be aggregated are located. An alternative is to use `valueFunction`. */
4585 index?: number;
4586 }
4587 export interface TimeChartSettingsSeriesLines extends LinearChartSettingsSeriesLines {
4588 /** Data manipulation settings used for default series. */
4589 data?: TimeChartSettingsSeriesData;
4590 /** Default style for line type series. */
4591 style?: TimeChartSettingsSeriesLinesStyle;
4592 }
4593 export interface TimeChartSettingsSeriesLinesStyle extends LinearChartSettingsSeriesLinesStyle {
4594 /** Enables customizing the marker for each particular data point. The function receives an array of all horizontal indices that are being painted and
4595 an array of vertical positions for each marker. Both arrays have the same length.
4596
4597 The output has to be an array of the same length where each entry represents a marker that will be drawn for that value. If the array contains a `null` value
4598 that specific marker is not drawn.
4599
4600 Note that this method is not used when the marker is drawn for the legend entry.
4601
4602 This method will be invoked on each frame so it is important that it is optimized for performance. */
4603 markerStyleFunction?: (
4604 /** The UTC timestamps of each unit that can display a marker. */
4605 timestamps: Array<number>, verticalPositions: Array<number>) => Array<LinearChartSettingsSeriesStyleMarker>;
4606 }
4607 export interface TimeChartSettingsTimeAxis {
4608 /** Shows/hides time axis. */
4609 enabled?: boolean;
4610 /** Maximum width of a single time axis display unit, in px. If the width is bigger than this, the chart will use a smaller time unit
4611 (e.g. switch from minutes to seconds).
4612
4613 Note that this value applies to the whole cluster and not a single series. That is, if you have two columns for each timestamp side by side, both of them
4614 have to fit within this limit. */
4615 maxUnitWidth?: number;
4616 /** Minimum width of a single time axis display unit, in px. If the width is smaller than this, the cgart will switch to bigger time units
4617 (e.g. from minutes to hours).
4618
4619 Note that this value applies to the whole cluster and not a single series. That is, if you have two columns for each timestamp side by side, each of them
4620 will only have half of this limit available in the worst case. */
4621 minUnitWidth?: number;
4622 /** Whether to show smallest bars on time axis. It matches with display unit dropdown entry used in time chart toolbar. */
4623 miniTimeRuler?: boolean;
4624 /** Relative amount of padding to add around the text. Remains
4625 proportional to text size. 0 results in no padding.
4626
4627 Default results in 44px total padding with text defaults */
4628 padding?: number;
4629 /** Whether to highlight weekends in day view. The highlight only appears if the display unit is hours, days or weeks. */
4630 showHolidays?: boolean;
4631 /** Time axis style */
4632 style?: {
4633 /** Style used to highlight weekends.
4634
4635 Note that this is drawn on top of the series so semi-transparent fill styles should be used. */
4636 dateHolidays?: BaseSettingsBackgroundStyle;
4637 /** Tint for lighter blocks of altering shades for time axis. Every second major unit will have this overlay painted on them. */
4638 dateLighten?: {
4639 fillColor?: string;
4640 };
4641 /** Style for major time labels balloons. */
4642 majorTimeBalloonStyle?: BaseSettingsBackgroundStyle;
4643 /** Style for major time labels. */
4644 majorTimeLabel?: BaseSettingsTextStyle;
4645 /** Style for minor time labels balloons. */
4646 minorTimeBalloonStyle?: BaseSettingsBackgroundStyle;
4647 /** Style for minor time labels. */
4648 minorTimeLabel?: BaseSettingsTextStyle;
4649 /** Minor time ruler style. */
4650 minorTimeRuler?: BaseSettingsLineStyle;
4651 /** Whether to show balloons around major time labels. */
4652 showMajorTimeBalloons?: boolean;
4653 /** Whether to display minor time labels as balloons instead of ruler style. */
4654 showMinorTimeBalloons?: boolean;
4655 /** Chart vertical grid settings */
4656 vgrid?: BaseSettingsLineStyle;
4657 };
4658 /** Time zone identifier, for example, `UTC` or `America/Los_Angeles`. See
4659 [time zone support](time-chart/introductory-topics/time-zone-support.html) for details. */
4660 timeZone?: string;
4661 /** Time axis time zone offset in minutes.
4662 @deprecated */
4663 timeZoneOffset?: string | number;
4664 /** Specifies when the chart switches the display unit during up/down scroll and other situations when the most appropriate display unit has to be selected. */
4665 unitSizePolicy?: "auto" | "min" | "max";
4666 /** Whether to show vertical grid. */
4667 vgrid?: boolean;
4668 }
4669 export interface TimeChartSettingsToolbar extends BaseSettingsToolbar {
4670 /** Whether to show display period dropdown. */
4671 displayPeriod?: boolean;
4672 /** Whether to show the display unit dropdown. */
4673 displayUnit?: boolean;
4674 /** Show/hide toolbar. */
4675 enabled?: boolean;
4676 /** A list of toolbar items. If this is specified, it overrides all the default buttons.
4677
4678 Use `extraItems` to specify items that should be displayed in addition to the defaults. */
4679 items?: Array<string | BaseSettingsToolbarItem>;
4680 /** Whether to show the Lin/Log button in the toolbar. */
4681 logScale?: boolean;
4682 /** Time periods */
4683 periods?: Array<TimeChartSettingsAreaDisplayPeriod>;
4684 /** Whether to show the Zoom-out button in the toolbar. */
4685 zoomOut?: boolean;
4686 /** Create custom zoomout function to specify target unit for each display unit once `Zoom-out` toolbar item clicked. Also possible to specify
4687 new from and to timestamps to manage zoomout range in perspective to current range. If only unit specified, internal logic
4688 will be applied that is 30 times wider time range than compared to range before `Zoom-out` toolbar item clicked. If only from and to timestamps
4689 specified than unit will be used as a next unit to current display item that's available of display units. If according to min, max unit width
4690 is not possible to show specified range, the middle of both timestamps will be the center of zoomout range and some portion of both sides may be
4691 cut down. */
4692 zoomOutFunction?: (
4693 /** Current display unit. */
4694 unit: "ms" | "s" | "m" | "h" | "d" | "w" | "M" | "y",
4695 /** The count of specified units. */
4696 count: number,
4697 /** Timestamp of time range before `Zoom-out`. */
4698 from: number,
4699 /** Timestamp of time range before `Zoom-out`. */
4700 to: number) => {
4701 unit: "ms" | "s" | "m" | "h" | "d" | "w" | "M" | "y" | "milliseconds" | "millisecond" | "sec" | "second" | "seconds" | "min" | "minute" | "minutes" | "hour" | "hours" | "day" | "days" | "D" | "week" | "weeks" | "W" | "mon" | "month" | "months" | "year" | "years" | "Y";
4702 count: number;
4703 from: number;
4704 to: number;
4705 };
4706 }
4707 /* tslint:enable */
4708}
4709
4710declare module ZoomCharts {
4711 /* tslint:disable */
4712
4713 export class FacetChart extends Configuration.BaseApi {
4714 public constructor(settings: Configuration.FacetChartSettings);
4715 /** Adds the given data to whatever data the chart has currently loaded. The chart will automatically be updated
4716 to display this new data if it falls within the currently visible bounds. */
4717 public addData(data: Configuration.FacetChartDataObjectRoot,
4718 /** the ID of the data source that will be updated. The default value is `default`. */
4719 sourceId?: string): void;
4720 public expandSlice(slice: Configuration.FacetChartItem): boolean;
4721 public getActiveFacet(): Configuration.FacetChartFacet;
4722 public getActiveFacets(): Array<Configuration.FacetChartFacet>;
4723 public getActiveItems(): Array<Configuration.FacetChartItem>;
4724 /** Gets the currently enabled series */
4725 public getEnabledSeries(): Array<Configuration.FacetChartSettingsSeries>;
4726 public getPie(): Array<string>;
4727 public getPieOffset(): number;
4728 /** Gets all series even those that are not enabled */
4729 public getSeries(): Array<Configuration.TimeChartSettingsSeries>;
4730 /** Adds event listener. */
4731 public on(
4732 /** The type of the event for which the listener will be added. See method overloads for valid values. */
4733 name: string,
4734 /** The callback function. It receives two arguments - the mouse event data and a separate object containing chart specific information. */
4735 listener: (event: Configuration.BaseMouseEvent, args: Configuration.BaseChartEventArguments) => void): void;
4736 /** Adds an event listener for when the scroll animation completes. */
4737 public on(name: "animationDone", listener: (event: Configuration.BaseMouseEvent, args: Configuration.FacetChartChartEventArguments) => void): void;
4738 public on(name: "chartUpdate", listener: (event: Configuration.BaseMouseEvent, args: Configuration.FacetChartChartEventArguments) => void): void;
4739 public on(name: "click", listener: (event: Configuration.BaseMouseEvent, args: Configuration.FacetChartChartClickEventArguments) => void): void;
4740 public on(name: "doubleClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.FacetChartChartClickEventArguments) => void): void;
4741 public on(name: "error", listener: (
4742 /** An empty mouse event. */
4743 event: Configuration.BaseMouseEvent, args: Configuration.BaseChartErrorEventArguments) => void): void;
4744 public on(name: "hoverChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.FacetChartChartEventArguments) => void): void;
4745 public on(name: "positionChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.FacetChartChartEventArguments) => void): void;
4746 public on(name: "rightClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.FacetChartChartClickEventArguments) => void): void;
4747 public on(name: "selectionChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.FacetChartChartEventArguments) => void): void;
4748 public on(name: "settingsChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.BaseChartSettingsChangeEventArguments) => void): void;
4749 public on(name: "tripleClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.FacetChartChartClickEventArguments) => void): void;
4750 /** Replaces the data already in the data cache with the given values. */
4751 public replaceData(data: Configuration.FacetChartDataObjectRoot,
4752 /** the ID of the data source that will be updated. The default value is `default`. */
4753 sourceId?: string): void;
4754 /** Replaces the existing series configuration with new one instead of merging it like `updateSettings`.
4755 @deprecated Use `replaceSettings({series: seriesData})` instead. */
4756 public replaceSeries(series: Array<Configuration.FacetChartSettingsSeries>): this;
4757 /** Updates the chart settings but instead of merging some settings that are arrays or dictionaries (such as `data`)
4758 these collections are replaced completely. For example, this allows removal of series or value axis within TimeChart. */
4759 public replaceSettings(changes: Configuration.FacetChartSettings): this;
4760 public selection(selected?: Array<string | Configuration.FacetChartItem>): Array<Configuration.FacetChartItem>;
4761 public setPie(pieId: string | Array<string>, offset?: number, count?: number): this;
4762 /** Lists the predefined themes for the chart. These can be used within the settings objects or via the `customize()` method:
4763
4764 ```javascript
4765 var chart = new ZoomCharts.$this({ theme: ZoomCharts.$this.themes.dark });
4766 chart.updateSettings({ theme: ZoomChart.$this.themes.dark });
4767 chart.customize("dark");
4768 ``` */
4769 public static themes: {
4770 dark?: Configuration.FacetChartSettings;
4771 horizontal?: Configuration.FacetChartSettings;
4772 };
4773 public updateFilter(): this;
4774 /** Updates the chart settings. Only the settings that have to be changed should be passed. Note that some arrays
4775 and dictionaries (such as `data`) are merged by the ID values - if instead they should be replaced, use
4776 [`replaceSettings()`](#doc_replaceSettings) method. */
4777 public updateSettings(changes: Configuration.FacetChartSettings): this;
4778 }
4779 export class GeoChart extends Configuration.BaseApi {
4780 public constructor(settings: Configuration.GeoChartSettings);
4781 /** Adds the given data to whatever data the chart has currently loaded. The chart will automatically be updated
4782 to display this new data if it falls within the currently visible bounds. */
4783 public addData(data: Configuration.GeoChartDataObject,
4784 /** the ID of the data source that will be updated. The default value is `default`. */
4785 sourceId?: string): void;
4786 public back(): this;
4787 public bounds(bounds?: IGeoRectangle): IGeoRectangle;
4788 public getNode(id: string): Configuration.ItemsChartNode;
4789 public getNodeDimensions(node: string | Configuration.ItemsChartNode): {
4790 x: number;
4791 y: number;
4792 radius: number;
4793 hwidth: number;
4794 };
4795 public hideMenu(): this;
4796 /** Returns the Leaflet.Map object to enable any advanced customizations.
4797
4798 Please note that this method might return `null` if `leaflet.js` has not been loaded yet.
4799 If `leaflet.js` is not loaded synchronously in the page, it will be loaded on demand by GeoChart.
4800 In this case the map object will not be available until the load is finished.
4801
4802 To handle this scenario, subscribe to `onChartUpdate` event and verify if this method returns non-null value. */
4803 public leaflet(): any;
4804 /** Adds event listener. */
4805 public on(
4806 /** The type of the event for which the listener will be added. See method overloads for valid values. */
4807 name: string,
4808 /** The callback function. It receives two arguments - the mouse event data and a separate object containing chart specific information. */
4809 listener: (event: Configuration.BaseMouseEvent, args: Configuration.BaseChartEventArguments) => void): void;
4810 public on(name: "chartUpdate", listener: (event: Configuration.BaseMouseEvent, args: Configuration.ItemsChartChartEventArguments) => void): void;
4811 public on(name: "click", listener: (event: Configuration.BaseMouseEvent, args: Configuration.ItemsChartChartClickEventArguments) => void): void;
4812 public on(name: "doubleClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.ItemsChartChartClickEventArguments) => void): void;
4813 public on(name: "error", listener: (
4814 /** An empty mouse event. */
4815 event: Configuration.BaseMouseEvent, args: Configuration.BaseChartErrorEventArguments) => void): void;
4816 public on(name: "hoverChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.ItemsChartChartEventArguments) => void): void;
4817 public on(name: "positionChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.ItemsChartChartEventArguments) => void): void;
4818 public on(name: "rightClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.ItemsChartChartClickEventArguments) => void): void;
4819 public on(name: "selectionChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.ItemsChartChartEventArguments) => void): void;
4820 public on(name: "settingsChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.BaseChartSettingsChangeEventArguments) => void): void;
4821 public on(name: "tripleClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.ItemsChartChartClickEventArguments) => void): void;
4822 /** Replaces the data already in the data cache with the given values. */
4823 public replaceData(data: Configuration.GeoChartDataObject,
4824 /** the ID of the data source that will be updated. The default value is `default`. */
4825 sourceId?: string): void;
4826 /** Updates the chart settings but instead of merging some settings that are arrays or dictionaries (such as `data`)
4827 these collections are replaced completely. For example, this allows removal of series or value axis within TimeChart. */
4828 public replaceSettings(changes: Configuration.GeoChartSettings): this;
4829 /** Set/Get selected objects. */
4830 public selection(
4831 /** array of objects identifiers to select. Do not pass this parameter if you don't want to change current selection. */
4832 selected?: Array<string | Configuration.ItemsChartNode | Configuration.ItemsChartLink>): Array<Configuration.ItemsChartNode | Configuration.ItemsChartLink>;
4833 /** Lists the predefined themes for the chart. These can be used within the settings objects or via the `customize()` method:
4834
4835 ```javascript
4836 var chart = new ZoomCharts.$this({ theme: ZoomCharts.$this.themes.dark });
4837 chart.updateSettings({ theme: ZoomChart.$this.themes.dark });
4838 chart.customize("dark");
4839 ``` */
4840 public static themes: {
4841 flat?: Configuration.GeoChartSettings;
4842 };
4843 /** Updates the chart settings. Only the settings that have to be changed should be passed. Note that some arrays
4844 and dictionaries (such as `data`) are merged by the ID values - if instead they should be replaced, use
4845 [`replaceSettings()`](#doc_replaceSettings) method. */
4846 public updateSettings(changes: Configuration.GeoChartSettings): this;
4847 /** Updates (recalculates) the style for the whole chart or specific objects matching the given IDs. */
4848 public updateStyle(
4849 /** A list of IDs for the objects which need their style recalculated */
4850 objects?: Array<string>): void;
4851 public zoomLevel(newZoom?: number): number;
4852 }
4853 export class NetChart extends Configuration.BaseApi {
4854 public constructor(settings: Configuration.NetChartSettings);
4855 /** Adds the given data to whatever data the chart has currently loaded. The chart will automatically be updated
4856 to display this new data if it falls within the currently visible bounds. */
4857 public addData(data: Configuration.NetChartDataObject,
4858 /** the ID of the data source that will be updated. The default value is `default`. */
4859 sourceId?: string): void;
4860 /** Focuses a node. Whether or not the node will get actually focused depends no the navigation mode. */
4861 public addFocusNode(
4862 /** Node ID or object */
4863 id: string | Configuration.ItemsChartNode,
4864 /** Explicitly assigned relevance (used only by Focusnodes navigation mode).
4865 For more information, see the [Focusnodes algorithm](net-chart/advanced-topics/focusnodes-algorithm-details.html) */
4866 relevance?: number): void;
4867 /** Removes focus from all nodes. The exact effect depends on the navigation mode. */
4868 public clearFocus(): void;
4869 /** Closes a node. The exact effect depends on the navigation mode. */
4870 public closeNode(
4871 /** Node ID or object */
4872 id: string | Configuration.ItemsChartNode): void;
4873 /** Collapses a node. The exact effect depends on the navigation mode. */
4874 public collapseNode(
4875 /** Node ID or object */
4876 id: string | Configuration.ItemsChartNode): void;
4877 /** Expands a visible node. */
4878 public expandNode(
4879 /** Node ID or object */
4880 id: string | Configuration.ItemsChartNode): void;
4881 public exportData(visibleOnly?: boolean, exportCoordinates?: boolean): Configuration.NetChartDataObject;
4882 /** Gets a visible link by its ID */
4883 public getLink(
4884 /** Link ID */
4885 id: string): Configuration.ItemsChartLink;
4886 /** Gets a visible node by its ID */
4887 public getNode(
4888 /** Node ID */
4889 id: string): Configuration.ItemsChartNode;
4890 public getNodeDimensions(node: Configuration.ItemsChartNode): {
4891 x: number;
4892 y: number;
4893 radius: number;
4894 hwidth: number;
4895 };
4896 public hideMenu(): this;
4897 /** Hides a visible node. Whether or not the node will get actually hidden depends on the navigation mode. */
4898 public hideNode(
4899 /** Node ID or object */
4900 id: string | Configuration.ItemsChartNode): void;
4901 public links(): Array<Configuration.ItemsChartLink>;
4902 /** Fixates a node in place. */
4903 public lockNode(
4904 /** Node ID or object */
4905 id: string | Configuration.ItemsChartNode, x: number,
4906 /** Y position, in scene coordinates */
4907 y: number): void;
4908 public nodes(): Array<Configuration.ItemsChartNode>;
4909 /** Adds event listener. */
4910 public on(
4911 /** The type of the event for which the listener will be added. See method overloads for valid values. */
4912 name: string,
4913 /** The callback function. It receives two arguments - the mouse event data and a separate object containing chart specific information. */
4914 listener: (event: Configuration.BaseMouseEvent, args: Configuration.BaseChartEventArguments) => void): void;
4915 public on(name: "chartUpdate", listener: (event: Configuration.BaseMouseEvent, args: Configuration.NetChartChartEventArguments) => void): void;
4916 public on(name: "click", listener: (event: Configuration.BaseMouseEvent, args: Configuration.NetChartChartClickEventArguments) => void): void;
4917 public on(name: "doubleClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.NetChartChartClickEventArguments) => void): void;
4918 public on(name: "error", listener: (
4919 /** An empty mouse event. */
4920 event: Configuration.BaseMouseEvent, args: Configuration.BaseChartErrorEventArguments) => void): void;
4921 public on(name: "hoverChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.NetChartChartEventArguments) => void): void;
4922 /** Adds an event listener for pointer down event. */
4923 public on(name: "pointerDown", listener: (event: Configuration.BaseMouseEvent, args: Configuration.NetChartChartEventArguments) => void): void;
4924 /** Adds an event listener for pointer down event. */
4925 public on(name: "dataUpdated", listener: (event: Configuration.BaseMouseEvent, args: Configuration.NetChartChartEventArguments) => void): void;
4926 public on(name: "positionChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.NetChartChartEventArguments) => void): void;
4927 public on(name: "rightClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.NetChartChartClickEventArguments) => void): void;
4928 public on(name: "selectionChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.NetChartChartEventArguments) => void): void;
4929 public on(name: "settingsChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.BaseChartSettingsChangeEventArguments) => void): void;
4930 public on(name: "tripleClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.NetChartChartClickEventArguments) => void): void;
4931 /** Removes the given nodes and links from the chart. Note that only the ID values have to be given, all other properties are ignored. */
4932 public removeData(data: Configuration.NetChartDataObject, sourceId?: string): void;
4933 /** Removes focus from a node. Whether or not the node will get actually unfocused depends on the navigation mode. */
4934 public removeFocusNode(
4935 /** Node ID or object */
4936 id: string | Configuration.ItemsChartNode): void;
4937 /** Replaces the data already in the data cache with the given values. */
4938 public replaceData(data: Configuration.NetChartDataObject,
4939 /** the ID of the data source that will be updated. The default value is `default`. */
4940 sourceId?: string): void;
4941 /** Updates the chart settings but instead of merging some settings that are arrays or dictionaries (such as `data`)
4942 these collections are replaced completely. For example, this allows removal of series or value axis within TimeChart. */
4943 public replaceSettings(changes: Configuration.NetChartSettings): this;
4944 /** Rearranges all nodes to their default locations (note that for dynamic layout these positions are not deterministic)
4945 and enables automatic "overview" zoom.
4946
4947 Note that these actions are done without animations. */
4948 public resetLayout(): void;
4949 /** Animates the viewport to zoom into and contain the nodes specified in the given array */
4950 public scrollIntoView(
4951 /** Nodes to zoom to */
4952 nodes: Array<string> | Array<Configuration.ItemsChartNode>,
4953 /** Optionally, additional margins (in scene coordinates) to leave free on the sides. Order: top, right, bottom, left */
4954 margins?: [number, number, number, number]): void;
4955 /** Set/Get selected objects. */
4956 public selection(
4957 /** array of objects identifiers to select. Do not pass this parameter if you don't want to change current selection. */
4958 selected?: Array<string | Configuration.ItemsChartNode | Configuration.ItemsChartLink>): Array<Configuration.ItemsChartNode | Configuration.ItemsChartLink>;
4959 /** Shows a node by its ID. The data for the node gets requested in the standard manner.
4960 Whether or not the node will get actually shown depends on the navigation mode. */
4961 public showNode(
4962 /** Node ID */
4963 id: string): void;
4964 /** Shows context menu, when either node id or INode interface object is passed as a parameter. */
4965 public showNodeMenu(node: string | Configuration.ItemsChartNode): void;
4966 /** Lists the predefined themes for the chart. These can be used within the settings objects or via the `customize()` method:
4967
4968 ```javascript
4969 var chart = new ZoomCharts.$this({ theme: ZoomCharts.$this.themes.dark });
4970 chart.updateSettings({ theme: ZoomChart.$this.themes.dark });
4971 chart.customize("dark");
4972 ``` */
4973 public static themes: {
4974 dark?: Configuration.NetChartSettings;
4975 flat?: Configuration.NetChartSettings;
4976 };
4977 /** Unfixates a node and allows it to be repositioned by the layout algorithms. */
4978 public unlockNode(
4979 /** Node ID or object */
4980 id: string | Configuration.ItemsChartNode): void;
4981 /** Updates the chart settings. Only the settings that have to be changed should be passed. Note that some arrays
4982 and dictionaries (such as `data`) are merged by the ID values - if instead they should be replaced, use
4983 [`replaceSettings()`](#doc_replaceSettings) method. */
4984 public updateSettings(changes: Configuration.NetChartSettings): this;
4985 /** Updates (recalculates) the style for the whole chart or specific objects matching the given IDs. */
4986 public updateStyle(
4987 /** A list of IDs for the nodes and links which need their style recalculated */
4988 objects?: Array<string>): void;
4989 /** Gets or sets the current zoom level of the chart. A zoom level of `1` means that all nodes are rendered
4990 with the radius that is set in their configuration. A zoom level of `2` means that all nodes are twice
4991 the size and `0.5` means that all nodes are two times smaller than their specified radiuses.
4992
4993 The zoom level is limited by [`interaction.zooming.zoomExtent` setting][zoomextent].
4994
4995 Passing `auto` will enable the simple auto-zoom mode, passing `overview` will enable the auto-zoom that shows
4996 the whole network.
4997
4998 [zoomextent]: https://zoomcharts.com/developers/en/net-chart/api-reference/settings/interaction/zooming/zoomExtent.html */
4999 public zoom(
5000 /** if specified and greater than zero, the zoom level will be updated to this value. */
5001 zoomValue?: number | "auto" | "overview" | "in" | "out",
5002 /** specifies if the zoom change should be animated. The default is `true`. */
5003 animate?: boolean): number;
5004 /**
5005 @deprecated Use `scrollIntoView()` instead. */
5006 public zoomIn(objects: Array<string>, animate?: boolean): void;
5007 }
5008 export class PieChart extends Configuration.BaseApi {
5009 public constructor(settings: Configuration.PieChartSettings);
5010 /** Adds the given data to whatever data the chart has currently loaded. The chart will automatically be updated
5011 to display this new data if it falls within the currently visible bounds. */
5012 public addData(data: Configuration.PieChartDataObjectRoot,
5013 /** the ID of the data source that will be updated. The default value is `default`. */
5014 sourceId?: string): void;
5015 public expandSlice(slice: Configuration.PieChartSlice): boolean;
5016 public getActivePie(): Configuration.PieChartPie;
5017 public getActivePies(): Array<Configuration.PieChartPie>;
5018 public getActiveSlices(): Array<Configuration.PieChartSlice>;
5019 public getPie(): Array<string>;
5020 public getPieOffset(): number;
5021 public getSliceDimensions(sliceId: Array<string>, showPartial?: boolean): {
5022 centerX: number;
5023 centerY: number;
5024 r0: number;
5025 r1: number;
5026 a0: number;
5027 a1: number;
5028 };
5029 /** Adds event listener. */
5030 public on(
5031 /** The type of the event for which the listener will be added. See method overloads for valid values. */
5032 name: string,
5033 /** The callback function. It receives two arguments - the mouse event data and a separate object containing chart specific information. */
5034 listener: (event: Configuration.BaseMouseEvent, args: Configuration.BaseChartEventArguments) => void): void;
5035 public on(name: "chartUpdate", listener: (event: Configuration.BaseMouseEvent, args: Configuration.PieChartChartEventArguments) => void): void;
5036 public on(name: "click", listener: (event: Configuration.BaseMouseEvent, args: Configuration.PieChartChartClickEventArguments) => void): void;
5037 public on(name: "doubleClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.PieChartChartClickEventArguments) => void): void;
5038 public on(name: "error", listener: (
5039 /** An empty mouse event. */
5040 event: Configuration.BaseMouseEvent, args: Configuration.BaseChartErrorEventArguments) => void): void;
5041 public on(name: "hoverChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.PieChartChartEventArguments) => void): void;
5042 public on(name: "positionChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.PieChartChartEventArguments) => void): void;
5043 public on(name: "rightClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.PieChartChartClickEventArguments) => void): void;
5044 public on(name: "selectionChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.PieChartChartEventArguments) => void): void;
5045 public on(name: "settingsChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.BaseChartSettingsChangeEventArguments) => void): void;
5046 public on(name: "tripleClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.PieChartChartClickEventArguments) => void): void;
5047 /** Replaces the data already in the data cache with the given values. */
5048 public replaceData(data: Configuration.PieChartDataObjectRoot,
5049 /** the ID of the data source that will be updated. The default value is `default`. */
5050 sourceId?: string): void;
5051 /** Updates the chart settings but instead of merging some settings that are arrays or dictionaries (such as `data`)
5052 these collections are replaced completely. For example, this allows removal of series or value axis within TimeChart. */
5053 public replaceSettings(changes: Configuration.PieChartSettings): this;
5054 /** Retrieves or updates the selected slices on the chart. */
5055 public selection(
5056 /** The slices or their IDs that should be selected. Any currently selected slices that are not present will be unselected. */
5057 selected?: Array<string | Configuration.PieChartSlice>): Array<Configuration.PieChartSlice>;
5058 public setPie(pieId: Array<string>, offset?: number): this;
5059 public setPieOffset(offset: number): this;
5060 /** Lists the predefined themes for the chart. These can be used within the settings objects or via the `customize()` method:
5061
5062 ```javascript
5063 var chart = new ZoomCharts.$this({ theme: ZoomCharts.$this.themes.dark });
5064 chart.updateSettings({ theme: ZoomChart.$this.themes.dark });
5065 chart.customize("dark");
5066 ``` */
5067 public static themes: {
5068 bevel?: Configuration.PieChartSettings;
5069 dark?: Configuration.PieChartSettings;
5070 flat?: Configuration.PieChartSettings;
5071 gradient?: Configuration.PieChartSettings;
5072 raised?: Configuration.PieChartSettings;
5073 rounded?: Configuration.PieChartSettings;
5074 };
5075 public updateFilter(): PieChart;
5076 /** Updates the chart settings. Only the settings that have to be changed should be passed. Note that some arrays
5077 and dictionaries (such as `data`) are merged by the ID values - if instead they should be replaced, use
5078 [`replaceSettings()`](#doc_replaceSettings) method. */
5079 public updateSettings(changes: Configuration.PieChartSettings): this;
5080 }
5081 export class TimeChart extends Configuration.BaseApi {
5082 public constructor(settings: Configuration.TimeChartSettings);
5083 /** Adds the given data to whatever data the chart has currently loaded. The chart will automatically be updated
5084 to display this new data if it falls within the currently visible bounds. */
5085 public addData(data: Configuration.TimeChartDataObject,
5086 /** the ID of the data source that will be updated. The default value is `default`. */
5087 sourceId?: string): void;
5088 /** Gets or sets the current display unit. Note that setting the display unit might also result in changes
5089 of the current time range to ensure that the unit follows the min/max widths.
5090
5091 If `unit: "auto"` is used to select the best-fit display unit, the chart determines the correct display unit
5092 based on [`timeAxis.unitSizePolicy`](time-chart/api-reference/settings/timeAxis/unitSizePolicy.html) setting.
5093
5094 Note that this method can be used to set a display unit that the chart is not configured to use but in this
5095 case a warning will be displayed in the browser console because user interactions will not preserve this setting.
5096 To avoid this, specify the needed display units in [`area.displayUnits`](time-chart/api-reference/settings/area/displayUnits.html). */
5097 public displayUnit(
5098 /** If specified, updates the current display unit. Example values: `m`, `s`, `h`, `2 h`, `10 m`, `auto`. */
5099 unit?: string,
5100 /** When setting the display unit, specifies if the chart animates the transition. */
5101 animate?: boolean,
5102 /** Deprecated as of 1.14.0. */
5103 rescale?: boolean): string;
5104 public exportVisibleData(): Array<Array<string | number>>;
5105 /** Gets the currently enabled series */
5106 public getEnabledSeries(): Array<Configuration.TimeChartSettingsSeries>;
5107 /** Gets all series even those that are not enabled */
5108 public getSeries(): Array<Configuration.TimeChartSettingsSeries>;
5109 /** Adds event listener. */
5110 public on(
5111 /** The type of the event for which the listener will be added. See method overloads for valid values. */
5112 name: string,
5113 /** The callback function. It receives two arguments - the mouse event data and a separate object containing chart specific information. */
5114 listener: (event: Configuration.BaseMouseEvent, args: Configuration.BaseChartEventArguments) => void): void;
5115 /** Adds an event listener for when the scroll animation completes. */
5116 public on(name: "animationDone", listener: (event: Configuration.BaseMouseEvent, args: Configuration.TimeChartChartEventArguments) => void): void;
5117 public on(name: "chartUpdate", listener: (event: Configuration.BaseMouseEvent, args: Configuration.TimeChartChartEventArguments) => void): void;
5118 public on(name: "click", listener: (event: Configuration.BaseMouseEvent, args: Configuration.TimeChartChartEventArguments) => void): void;
5119 public on(name: "doubleClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.TimeChartChartEventArguments) => void): void;
5120 public on(name: "error", listener: (
5121 /** An empty mouse event. */
5122 event: Configuration.BaseMouseEvent, args: Configuration.BaseChartErrorEventArguments) => void): void;
5123 public on(name: "hoverChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.TimeChartChartEventArguments) => void): void;
5124 public on(name: "positionChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.TimeChartChartEventArguments) => void): void;
5125 public on(name: "rightClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.TimeChartChartEventArguments) => void): void;
5126 public on(name: "selectionChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.TimeChartChartEventArguments) => void): void;
5127 public on(name: "settingsChange", listener: (event: Configuration.BaseMouseEvent, args: Configuration.BaseChartSettingsChangeEventArguments) => void): void;
5128 public on(name: "tripleClick", listener: (event: Configuration.BaseMouseEvent, args: Configuration.TimeChartChartEventArguments) => void): void;
5129 /** Replaces the data already in the data cache with the given values. */
5130 public replaceData(data: Configuration.TimeChartDataObject,
5131 /** the ID of the data source that will be updated. The default value is `default`. */
5132 sourceId?: string): void;
5133 /** Replaces the existing series configuration with new one instead of merging it like `updateSettings`.
5134 @deprecated Use `replaceSettings({series: seriesData})` instead. */
5135 public replaceSeries(series: Array<Configuration.LinearChartSettingsSeries>): this;
5136 /** Updates the chart settings but instead of merging some settings that are arrays or dictionaries (such as `data`)
5137 these collections are replaced completely. For example, this allows removal of series or value axis within TimeChart. */
5138 public replaceSettings(changes: Configuration.TimeChartSettings): this;
5139 /** Scrolls the visible chart area left or right. */
5140 public scroll(
5141 /** how much to scroll */
5142 amount: string,
5143 /** scroll with animation or without */
5144 animate?: boolean,
5145 /** adjust the scroll to snap according to the current displayUnit
5146
5147 The `amount` property format: `< amount unit` or `> amount unit`.
5148 - `<` scrolls to the left, `>` scrolls to the right
5149 - `amount`: integer amount of units to scroll
5150 - `unit`: one of the following: `page`, `bar`, `y`, `M`, `d`, `w`, `h`, `m`, `s`, `ms`.
5151
5152 Examples:
5153
5154 - `scroll("< 1 s")` - scrolls left 1 second, no animation
5155 - `scroll("> 10 y", true)` - scrolls right, 10 years with animation */
5156 snap?: boolean): void;
5157 /** Gets or sets the selection in javascript timestamp (milliseconds). All timestamps are in UTC.
5158
5159 Use `from: null, to: null` to remove selection. If the chart does not have a selection, the method
5160 returns `[null, null]`.
5161
5162 Note that this method will return `[null, null]` if `moment-timezone` library is still being downloaded. */
5163 public selection(from?: number | Date | moment.Moment, to?: number | Date | moment.Moment): [number, number];
5164 /** Set displayed time range using period and anchor.
5165
5166 See [`initialDisplayAnchor` and `initialDisplayPeriod` documentation][doc] for possible period / anchor values.
5167
5168 [doc]: https://zoomcharts.com/developers/en/time-chart/api-reference/settings.html#doc_navigation.initialDisplayAnchor */
5169 public setDisplayPeriod(period: string, anchor: number | "newestData" | "now" | "oldestData", animate?: boolean, unit?: string): void;
5170 /** Displays the info popup for a specified time interval. The interval must be visible on screen.
5171
5172 Note that if [`info.enabled`](time-chart/api-reference/settings/info/enabled.html) is set to `false` this method
5173 still works. In this case the info popup shown by this method will not be hidden as the user hovers the mouse over
5174 the chart. */
5175 public showInfoPopup(
5176 /** UTC timestamp of the start of the interval (inclusive). The value will be automatically rounded down based on the current display unit.
5177 Passing `null` will hide the info popup. */
5178 from: number | Date | moment.Moment,
5179 /** UTC timestamp of the end of the interval (non-inclusive). The value will be automatically rounded up based on the current display unit.
5180 If not specified, selects a single unit starting with the `from` timestamp. */
5181 to?: number | Date | moment.Moment,
5182 /** Optional HTML code that will be used as the contents of the info popup. If this is not specified, the default contents will be generated. */
5183 contents?: string): void;
5184 /** When the chart is animating, gets the target display unit (otherwise returns the current display unit). */
5185 public targetDisplayUnit(): string;
5186 /** When the chart is animating, gets the target time range (otherwise returns the current time range).
5187
5188 This method is useful when there are related data objects (such as data tables or other charts) that have
5189 to be filtered based on the visible time range in the chart. By using `onChartUpdate` event and this
5190 method it is possible to start updating the page as soon as the animation change but do it for the values
5191 the chart is animating towards.
5192
5193 If the data has not yet been loaded, this method returns `[null, null]`. */
5194 public targetTime(): [number, number];
5195 /** Lists the predefined themes for the chart. These can be used within the settings objects or via the `customize()` method:
5196
5197 ```javascript
5198 var chart = new ZoomCharts.$this({ theme: ZoomCharts.$this.themes.dark });
5199 chart.updateSettings({ theme: ZoomChart.$this.themes.dark });
5200 chart.customize("dark");
5201 ``` */
5202 public static themes: {
5203 dark?: Configuration.TimeChartSettings;
5204 flat?: Configuration.TimeChartSettings;
5205 gradient?: Configuration.TimeChartSettings;
5206 round?: Configuration.TimeChartSettings;
5207 /** Disables all user interactions so that the initial view is always persisted. */
5208 static?: Configuration.TimeChartSettings;
5209 };
5210 /** Gets or sets the displayed time range in JavaScript timestamp (milliseconds). Note that both
5211 `from` and `to` must be specified for the time range to be updated.
5212
5213 All timestamps are specified in UTC.
5214
5215 Note that this method will return `[null, null]` if `moment-timezone` library is still being downloaded. */
5216 public time(from?: number | Date | moment.Moment, to?: number | Date | moment.Moment, animate?: boolean): [number, number];
5217 /** Updates the chart settings. Only the settings that have to be changed should be passed. Note that some arrays
5218 and dictionaries (such as `data`) are merged by the ID values - if instead they should be replaced, use
5219 [`replaceSettings()`](#doc_replaceSettings) method. */
5220 public updateSettings(changes: Configuration.TimeChartSettings): this;
5221 /** Decreases the visible time range on the chart.
5222
5223 Has no effect if the chart data has not been yet loaded. */
5224 public zoomIn(
5225 /** the target unit in form `1 d`; if not specified, the unit is determined automatically. */
5226 unit?: string,
5227 /** the UTC timestamp that should be the new center of the visible area. */
5228 center?: number | Date | moment.Moment,
5229 /** determines if the zoom animation is executed. */
5230 animate?: boolean): void;
5231 /** Increases the visible time range on the chart.
5232
5233 Has no effect if the chart data has not been yet loaded. */
5234 public zoomOut(
5235 /** the target unit in form `1 d`; if not specified, the unit is determined automatically. */
5236 unit?: string,
5237 /** determines if the zoom animation is executed. */
5238 animate?: boolean): void;
5239 }
5240 /* tslint:enable */
5241}
5242
5243declare class FacetChart extends ZoomCharts.FacetChart { }
5244declare class GeoChart extends ZoomCharts.GeoChart { }
5245declare class NetChart extends ZoomCharts.NetChart { }
5246declare class PieChart extends ZoomCharts.PieChart { }
5247declare class TimeChart extends ZoomCharts.TimeChart { }
5248
5249declare module ZoomCharts {
5250 export interface Dictionary<TValue> {
5251 [key: string]: TValue;
5252 }
5253
5254 export interface NumberDictionary<TValue> {
5255 [key: number]: TValue;
5256 }
5257
5258 export interface GradientDefinition extends Array<[number, string]> {
5259 }
5260
5261 export type GradientMode = null | "vertical" | "horizontal"
5262
5263 export type GradientType = null | "cylinder"
5264
5265
5266 export interface IRectangle {
5267 x0: number;
5268 y0: number;
5269 x1: number;
5270 y1: number;
5271 }
5272
5273 export interface IGeoRectangle {
5274 east: number;
5275 west: number;
5276 north: number;
5277 south: number;
5278 }
5279
5280 export interface IColor {
5281 R: number;
5282 G: number;
5283 B: number;
5284 A: number;
5285
5286 /** The cached result of this color converted to LAB */
5287 _lab?: { L: number; A: number; B: number; };
5288 }
5289}
5290
5291interface Window {
5292 /** The name of the license to be used by all charts on the page. This value is usually in form `ZCX-foobar: production license for *.example.org` */
5293 ZoomChartsLicense: string;
5294 /** The license key to match the license name. This is a 512 character hexadecimal string. */
5295 ZoomChartsLicenseKey: string;
5296}
5297
5298// empty placeholder so that zoomcharts.d.ts can be used with or without moment.js definition file.
5299declare namespace moment {
5300 export interface Moment {
5301 }
5302}
5303
5304
5305export default ZoomCharts