@mescius/wijmo.chart 5.20232.939

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts ADDED
@@ -0,0 +1,3580 @@
1
+ /*!
2
+ *
3
+ * Wijmo Library 5.20232.939
4
+ * https://developer.mescius.com/wijmo
5
+ *
6
+ * Copyright(c) MESCIUS inc. All rights reserved.
7
+ *
8
+ * Licensed under the End-User License Agreement For MESCIUS Wijmo Software.
9
+ * us.sales@mescius.com
10
+ * https://developer.mescius.com/wijmo/licensing
11
+ *
12
+ */
13
+ /**
14
+ * {@module wijmo.chart}
15
+ * Defines the {@link FlexChart} control and its associated classes.
16
+ *
17
+ * The example below creates a {@link FlexChart} control and binds it to a data array.
18
+ * The chart has three series, each corresponding to a property in the objects
19
+ * contained in the source array.
20
+ *
21
+ * The last series in the example uses the {@link Series.chartType} property to
22
+ * override the default chart type used
23
+ * by the other series.
24
+ *
25
+ * {@sample Chart/Overview/purejs Example}
26
+ */
27
+ /**
28
+ *
29
+ */
30
+ export declare var ___keepComment: any;
31
+ import { Point, Size, Rect, DataType, Event, EventArgs, ICollectionView, ObservableArray, Control, Tooltip, CancelEventArgs } from '@grapecity/wijmo';
32
+ import * as selfModule from '@grapecity/wijmo.chart';
33
+ export declare class _VolumeHelper {
34
+ private _volumes;
35
+ private _xVals;
36
+ private _xDataMin;
37
+ private _xDataMax;
38
+ private _xDataType;
39
+ private _hasXs;
40
+ private _calcData;
41
+ constructor(volumes: number[], xVals: number[], xDataMin: number, xDataMax: number, xDataType?: DataType);
42
+ convert(x: number, min: number, max: number): number;
43
+ convertBack(x: number, min: number, max: number): number;
44
+ private _init;
45
+ private _getXVolume;
46
+ static convertToRange(value: number, newMin: number, newMax: number, oldMin: number, oldMax: number): number;
47
+ private _fillGaps;
48
+ }
49
+ /**
50
+ * Calculates Spline curves.
51
+ */
52
+ export declare class _Spline {
53
+ private k;
54
+ private _x;
55
+ private _y;
56
+ private _a;
57
+ private _b;
58
+ private _c;
59
+ private _d;
60
+ private _len;
61
+ private m;
62
+ constructor(x: number[], y: number[], num?: number);
63
+ private calculatePoint;
64
+ calculate(): {
65
+ xs: any;
66
+ ys: any;
67
+ };
68
+ }
69
+ /**
70
+ * These are predefined color palettes for chart {@link Series} objects.
71
+ *
72
+ * To create custom color palettes, supply an array of strings or rgba values.
73
+ *
74
+ * You can specify palettes for {@link FlexChart} and {@link FlexPie} controls.
75
+ * For example:
76
+ *
77
+ * <pre>chart.palette = Palettes.light;</pre>
78
+ *
79
+ * The following palettes are pre-defined:
80
+ * <ul>
81
+ * <li>standard (default)</li>
82
+ * <li>cocoa</li>
83
+ * <li>coral</li>
84
+ * <li>dark</li>
85
+ * <li>highcontrast</li>
86
+ * <li>light</li>
87
+ * <li>midnight</li>
88
+ * <li>modern</li>
89
+ * <li>organic</li>
90
+ * <li>slate</li>
91
+ * <li>zen</li>
92
+ * <li>cyborg</li>
93
+ * <li>superhero</li>
94
+ * <li>flatly</li>
95
+ * <li>darkly</li>
96
+ * <li>cerulan</li>
97
+ * </ul>
98
+ */
99
+ export declare class Palettes {
100
+ static standard: string[];
101
+ static cocoa: string[];
102
+ static coral: string[];
103
+ static dark: string[];
104
+ static highcontrast: string[];
105
+ static light: string[];
106
+ static midnight: string[];
107
+ static modern: string[];
108
+ static organic: string[];
109
+ static slate: string[];
110
+ static zen: string[];
111
+ static cyborg: string[];
112
+ static superhero: string[];
113
+ static flatly: string[];
114
+ static darkly: string[];
115
+ static cerulan: string[];
116
+ /**
117
+ * This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
118
+ * Please see license at https://github.com/axismaps/colorbrewer/blob/master/LICENCE.txt
119
+ *
120
+ * Qualitative palettes from ColorBrewer https://colorbrewer2.org .
121
+ *
122
+ * Qualitative (or categorical) palettes are usually used for plotting independent data categories
123
+ * which don't have any specific order. For example, the series that represents shipping methods or
124
+ * product types. The colors in these palettes are selected to be distinctive and clearly indicate
125
+ * difference between data series.
126
+ *
127
+ * You can specify palettes for charting controls, like {@link FlexChart} and {@link FlexPie}.
128
+ * For example:
129
+ *
130
+ * <pre>chart.palette = Palettes.Qualitative.Accent;</pre>
131
+ *
132
+ * The Qualitative palettes include the following color schemes:
133
+ * <ul>
134
+ * <li>Accent</li>
135
+ * <li>Dark2</li>
136
+ * <li>Paired</li>
137
+ * <li>Pastel1</li>
138
+ * <li>Pastel2</li>
139
+ * <li>Set1</li>
140
+ * <li>Set2</li>
141
+ * <li>Set2</li>
142
+ * </ul>
143
+ */
144
+ static Qualitative: {
145
+ Accent: string[];
146
+ Dark2: string[];
147
+ Paired: string[];
148
+ Pastel1: string[];
149
+ Pastel2: string[];
150
+ Set1: string[];
151
+ Set2: string[];
152
+ Set3: string[];
153
+ };
154
+ /** Diverging palettes from ColorBrewer https://colorbrewer2.org.
155
+ *
156
+ * Diverging palettes are used to indicate distance from a critical point. These color schemes work
157
+ * well when your data has some mid-point. For example, temperature data could be a shade of blue below zero,
158
+ * a red color is for the values above zero and temperature around zero would have a neutral color.
159
+ *
160
+ * You can specify palettes for charting controls, like {@link FlexChart} and {@link FlexPie}, or
161
+ * use palette for {@link ColorScale.colors} property.
162
+ * For example:
163
+ *
164
+ * <pre>chart.palette = Palettes.Diverging.BrBG;</pre>
165
+ *
166
+ * The Diverging palettes include the following color schemes:
167
+ * <ul>
168
+ * <li>BrBG</li>
169
+ * <li>PiYG</li>
170
+ * <li>PRGn</li>
171
+ * <li>PuOr</li>
172
+ * <li>RdBu</li>
173
+ * <li>RdGy</li>
174
+ * <li>RdYlBu</li>
175
+ * <li>RdYlGn</li>
176
+ * <li>Spectral</li>
177
+ * </ul>
178
+ */
179
+ static Diverging: {
180
+ BrBG: string[];
181
+ PiYG: string[];
182
+ PRGn: string[];
183
+ PuOr: string[];
184
+ RdBu: string[];
185
+ RdGy: string[];
186
+ RdYlBu: string[];
187
+ RdYlGn: string[];
188
+ Spectral: string[];
189
+ };
190
+ /** Sequential single-hue palettes from ColorBrewer https://colorbrewer2.org.
191
+ *
192
+ * Sequential palettes are used for data that have ordered, quantitative nature, for example precipitation amount
193
+ * or number of road incidents for some region. These color schemes are shade variations of a single base color,
194
+ * usually from light to dark.
195
+ *
196
+ * You can specify palettes for charting controls, like {@link FlexChart} and {@link FlexPie}, or
197
+ * use palette for {@link ColorScale.colors} property.
198
+ * For example:
199
+ *
200
+ * <pre>chart.palette = Palettes.SequentialSingle.Blues;</pre>
201
+ *
202
+ * The Sequential single-hue palettes include the following color schemes:
203
+ * <ul>
204
+ * <li>Blues</li>
205
+ * <li>Greens</li>
206
+ * <li>Greys</li>
207
+ * <li>Oranges</li>
208
+ * <li>Purples</li>
209
+ * <li>Reds</li>
210
+ * </ul>
211
+ */
212
+ static SequentialSingle: {
213
+ Blues: string[];
214
+ Greens: string[];
215
+ Greys: string[];
216
+ Oranges: string[];
217
+ Purples: string[];
218
+ Reds: string[];
219
+ };
220
+ /** Sequential multi-hue palettes from ColorBrewer https://colorbrewer2.org.
221
+ *
222
+ * Sequential palettes are used for data that have ordered, quantitative nature, for example precipitation amount
223
+ * or number of road incidents for some region. In addition to lightness variation, these color schemes also
224
+ * use several hues to improve perception.
225
+ *
226
+ * You can specify palettes for charting controls, like {@link FlexChart} and {@link FlexPie}, or
227
+ * use palette for {@link ColorScale.colors} property.
228
+ * For example:
229
+ *
230
+ * <pre>chart.palette = Palettes.SequentialMulti.BuGn;</pre>
231
+ *
232
+ * The Sequential multi-hue palettes include the following color schemes:
233
+ * <ul>
234
+ * <li>BuGn</li>
235
+ * <li>BuPu</li>
236
+ * <li>GnBu</li>
237
+ * <li>OrRd</li>
238
+ * <li>PuBu</li>
239
+ * <li>PuBuGn</li>
240
+ * <li>PuRd</li>
241
+ * <li>RdPu</li>
242
+ * <li>YlGn</li>
243
+ * <li>YlGnBu</li>
244
+ * <li>YlOrBr</li>
245
+ * <li>YlOrRd</li>
246
+ * </ul>
247
+ */
248
+ static SequentialMulti: {
249
+ BuGn: string[];
250
+ BuPu: string[];
251
+ GnBu: string[];
252
+ OrRd: string[];
253
+ PuBu: string[];
254
+ PuBuGn: string[];
255
+ PuRd: string[];
256
+ RdPu: string[];
257
+ YlGn: string[];
258
+ YlGnBu: string[];
259
+ YlOrBr: string[];
260
+ YlOrRd: string[];
261
+ };
262
+ static _isExtended(clrs: string[]): boolean;
263
+ private static _values;
264
+ }
265
+ /**
266
+ * Represents a rendering engine that performs the basic drawing routines.
267
+ */
268
+ export interface IRenderEngine {
269
+ /**
270
+ * Clears the viewport and starts the rendering cycle.
271
+ */
272
+ beginRender(): any;
273
+ /**
274
+ * Finishes the rendering cycle.
275
+ */
276
+ endRender(): any;
277
+ /**
278
+ * Sets the size of the viewport.
279
+ *
280
+ * @param w Viewport width.
281
+ * @param h Viewport height.
282
+ */
283
+ setViewportSize(w: number, h: number): any;
284
+ /**
285
+ * Gets the rendered element.
286
+ */
287
+ element: Element;
288
+ /**
289
+ * Gets or sets the color used to fill the element.
290
+ */
291
+ fill: string;
292
+ /**
293
+ * Gets or sets the color used to outline the element.
294
+ */
295
+ stroke: string;
296
+ /**
297
+ * Gets or sets the thickness of the outline.
298
+ */
299
+ strokeWidth: number;
300
+ /**
301
+ * Gets or sets the text color.
302
+ */
303
+ textFill: string;
304
+ /**
305
+ * Gets or sets the font size for the text output.
306
+ */
307
+ fontSize: string;
308
+ /**
309
+ * Gets or sets the font family for the text output.
310
+ */
311
+ fontFamily: string;
312
+ /**
313
+ * Gets or sets the value that indicates css priority.
314
+ * By default, it's true and the specified css class has a priority
315
+ * over current engine's properties like fill or stroke.
316
+ */
317
+ cssPriority: boolean;
318
+ readOnly: boolean;
319
+ /**
320
+ * Draws an ellipse.
321
+ *
322
+ * @param cx X coordinate of the ellipse's center.
323
+ * @param cy Y coordinate of the ellipse's center.
324
+ * @param rx X radius (half of the ellipse's width).
325
+ * @param ry Y radius (half of the ellipse's height).
326
+ * @param className Class name to be applied to the element.
327
+ * @param style Style object to be applied to the element.
328
+ */
329
+ drawEllipse(cx: number, cy: number, rx: number, ry: number, className?: string, style?: any): any;
330
+ /**
331
+ * Draws a rectangle.
332
+ *
333
+ * @param x Left of the rectangle.
334
+ * @param y Bottom of the rectangle.
335
+ * @param w Width of the rectangle.
336
+ * @param h Height of the rectangle.
337
+ * @param className Class name to be applied to the element.
338
+ * @param style Style object to be applied to the element.
339
+ * @param clipPath Id of the path to use as a clipping path.
340
+ */
341
+ drawRect(x: number, y: number, w: number, h: number, className?: string, style?: any, clipPath?: string): any;
342
+ /**
343
+ * Draws a line.
344
+ *
345
+ * @param x1 X coordinate of the first point.
346
+ * @param y1 Y coordinate of the first point.
347
+ * @param x2 X coordinate of the second point.
348
+ * @param y2 Y coordinate of the second point.
349
+ * @param className Class name to be applied to the element.
350
+ * @param style Style object to be applied to the element.
351
+ */
352
+ drawLine(x1: number, y1: number, x2: number, y2: number, className?: string, style?: any): any;
353
+ /**
354
+ * Draws a series of lines.
355
+ *
356
+ * @param xs Array of X coordinates.
357
+ * @param ys Array of Y coordinates.
358
+ * @param className Class name to be applied to the element.
359
+ * @param style Style object to be applied to the element.
360
+ * @param clipPath Id of the path to use as a clipping path.
361
+ */
362
+ drawLines(xs: number[], ys: number[], className?: string, style?: any, clipPath?: string, num?: number): any;
363
+ /**
364
+ * Draws a series of splines (smooth path).
365
+ *
366
+ * @param xs Array of X coordinates.
367
+ * @param ys Array of Y coordinates.
368
+ * @param className Class name to be applied to the element.
369
+ * @param style Style object to be applied to the element.
370
+ * @param clipPath Id of the path to use as a clipping path.
371
+ */
372
+ drawSplines(xs: number[], ys: number[], className?: string, style?: any, clipPath?: string, num?: number): any;
373
+ /**
374
+ * Draws a polygon.
375
+ *
376
+ * @param xs Array of X coordinates.
377
+ * @param ys Array of Y coordinates.
378
+ * @param className Class name to be applied to the element.
379
+ * @param style Style object to be applied to the element.
380
+ * @param clipPath Id of the path to use as a clipping path.
381
+ */
382
+ drawPolygon(xs: number[], ys: number[], className?: string, style?: any, clipPath?: string): any;
383
+ /**
384
+ * Draws a pie segment.
385
+ *
386
+ * @param cx X coordinate of the segment center.
387
+ * @param cy Y coordinate of the segment center.
388
+ * @param radius Radius of the segment.
389
+ * @param startAngle Start angle of the segment, in degrees.
390
+ * @param sweepAngle Sweep angle of the segment, in degrees clockwise.
391
+ * @param className Class name to be applied to the element.
392
+ * @param style Style object to be applied to the element.
393
+ * @param clipPath Id of the path to use as a clipping path.
394
+ */
395
+ drawPieSegment(cx: number, cy: number, radius: number, startAngle: number, sweepAngle: number, className?: string, style?: any, clipPath?: string): any;
396
+ /**
397
+ * Draws a doughnut segment.
398
+ *
399
+ * @param cx X coordinate of the segment center.
400
+ * @param cy Y coordinate of the segment center.
401
+ * @param radius Outer radius of the segment.
402
+ * @param innerRadius Inner radius of the segment.
403
+ * @param startAngle Start angle of the segment, in degrees.
404
+ * @param sweepAngle Sweep angle of the segment, in degrees clockwise.
405
+ * @param className Class name to be applied to the element.
406
+ * @param style Style object to be applied to the element.
407
+ * @param clipPath Id of the path to use as a clipping path.
408
+ */
409
+ drawDonutSegment(cx: number, cy: number, radius: number, innerRadius: number, startAngle: number, sweepAngle: number, className?: string, style?: any, clipPath?: string): any;
410
+ /**
411
+ * Draws a string.
412
+ *
413
+ * @param s String to be drawn.
414
+ * @param pt Reference point for the string.
415
+ * @param className Class name to be applied to the element.
416
+ * @param style Style object to be applied to the element.
417
+ */
418
+ drawString(s: string, pt: Point, className?: string, style?: any): any;
419
+ /**
420
+ * Draws a rotated string.
421
+ *
422
+ * @param s String to be drawn.
423
+ * @param pt Reference point for rendering the string.
424
+ * @param center Reference point for rotating the string.
425
+ * @param angle Rotation angle, in degrees, clockwise.
426
+ * @param className Class name to be applied to the element.
427
+ * @param style Style object to be applied to the element.
428
+ */
429
+ drawStringRotated(s: string, pt: Point, center: Point, angle: number, className?: string, style?: any): any;
430
+ /**
431
+ * Draws an image.
432
+ *
433
+ * @param href Url of the image to draw.
434
+ * @param x Left coordinate of the image's bounding rectangle.
435
+ * @param y Bottom coordinate of the image's bounding rectangle.
436
+ * @param w Image width.
437
+ * @param h Image height.
438
+ */
439
+ drawImage(href: string, x: number, y: number, w: number, h: number): any;
440
+ /**
441
+ * Measures a string.
442
+ *
443
+ * @param s String to be measured.
444
+ * @param className Class name to use when measuring the string.
445
+ * @param groupName Name of the group to use when measuring the string.
446
+ * @param style Style object to use when measuring the string.
447
+ */
448
+ measureString(s: string, className?: string, groupName?: string, style?: any): Size;
449
+ /**
450
+ * Starts a group.
451
+ *
452
+ * @param className Class name to apply to the new group.
453
+ * @param clipPath Id of the path to use as a clipping path.
454
+ * @param createTransform Whether to create a new transform for the group.
455
+ */
456
+ startGroup(className?: string, clipPath?: string, createTransform?: boolean): any;
457
+ /**
458
+ * Ends a group.
459
+ */
460
+ endGroup(): any;
461
+ /**
462
+ * Adds a clipping rectangle to the context.
463
+ *
464
+ * @param clipRect The clipping rectangle.
465
+ * @param id The ID of the clipping rectangle.
466
+ */
467
+ addClipRect(clipRect: Rect, id: string): any;
468
+ }
469
+ export declare const empty: {};
470
+ /**
471
+ * Represents a plot area on the chart.
472
+ *
473
+ * The chart can have multiple plot areas with multiple axes.
474
+ * To assign axis to plot area use <b>Axis.plotArea</b> property. For example:
475
+ * <pre>
476
+ * // create a plot area
477
+ * var pa = new PlotArea();
478
+ * pa.row = 1;
479
+ * chart.plotAreas.push(pa);
480
+ * // create auxiliary y-axis
481
+ * var ay2 = new Axis(Position.Left);
482
+ * ay2.plotArea = pa; // attach axis to the plot area
483
+ * chart.axes.push(ay2);
484
+ * // plot first series along y-axis
485
+ * chart.series[0].axisY = ay2;
486
+ * </pre>
487
+ */
488
+ export declare class PlotArea {
489
+ private _row;
490
+ private _col;
491
+ private _width;
492
+ private _height;
493
+ private _name;
494
+ private _style;
495
+ private _rect;
496
+ _chart: FlexChartCore;
497
+ /**
498
+ * Initializes a new instance of the {@link PlotArea} class.
499
+ *
500
+ * @param options Initialization options for the plot area.
501
+ */
502
+ constructor(options?: any);
503
+ /**
504
+ * Gets or sets the row index of plot area.
505
+ * This determines the vertical position of the plot area
506
+ * on the chart.
507
+ */
508
+ row: number;
509
+ /**
510
+ * Gets or sets the column index of plot area.
511
+ * This determines the horizontal position of the plot
512
+ * area on the chart.
513
+ */
514
+ column: number;
515
+ /**
516
+ * Gets or sets the plot area name.
517
+ */
518
+ name: string;
519
+ /**
520
+ * Gets or sets width of the plot area.
521
+ *
522
+ * The width can be specified as a number (in pixels) or
523
+ * as a string in the format '{number}*' (star sizing).
524
+ */
525
+ width: any;
526
+ /**
527
+ * Gets or sets the height of the plot area.
528
+ *
529
+ * The height can be specified as a number (in pixels) or
530
+ * as a string in the format '{number}*' (star sizing).
531
+ */
532
+ height: any;
533
+ /**
534
+ * Gets or sets the style of the plot area.
535
+ *
536
+ * Using <b>style</b> property, you can set appearance of the plot area.
537
+ * For example:
538
+ * <pre>
539
+ * pa.style = { fill: 'rgba(0,255,0,0.1)' };
540
+ * </pre>
541
+ */
542
+ style: any;
543
+ private _invalidate;
544
+ _render(engine: IRenderEngine): void;
545
+ _setPlotX(x: number, w: number): void;
546
+ _setPlotY(y: number, h: number): void;
547
+ }
548
+ /**
549
+ * Represents a collection of {@link PlotArea} objects in a {@link FlexChartCore} control.
550
+ */
551
+ export declare class PlotAreaCollection extends ObservableArray {
552
+ /**
553
+ * Gets a plot area by name.
554
+ *
555
+ * @param name The name of the plot area to look for.
556
+ * @return The axis object with the specified name, or null if not found.
557
+ */
558
+ getPlotArea(name: string): PlotArea;
559
+ /**
560
+ * Gets the index of a plot area by name.
561
+ *
562
+ * @param name The name of the plot area to look for.
563
+ * @return The index of the plot area with the specified name, or -1 if not found.
564
+ */
565
+ indexOf(name: string): number;
566
+ _getWidth(column: number): any;
567
+ _getHeight(row: number): any;
568
+ _calculateWidths(width: number, ncols: number): number[];
569
+ _calculateHeights(height: number, nrows: number): number[];
570
+ private _calculateLengths;
571
+ }
572
+ /**
573
+ * Render to svg.
574
+ */
575
+ export declare class _SvgRenderEngine implements IRenderEngine {
576
+ private static svgNS;
577
+ private static xlinkNS;
578
+ private _element;
579
+ private _svg;
580
+ private _text;
581
+ private _textGroup;
582
+ private _defs;
583
+ private _fill;
584
+ private _stroke;
585
+ private _textFill;
586
+ private _strokeWidth;
587
+ private _fontSize;
588
+ private _fontFamily;
589
+ private _group;
590
+ private _groupCls;
591
+ private _clipRect;
592
+ private static _isff;
593
+ private static _isSafari;
594
+ private _savedGradient;
595
+ private _bbCache;
596
+ private _baseUrl;
597
+ private _cssPriority;
598
+ private _readOnly;
599
+ private _isRtl;
600
+ private _precision;
601
+ constructor(element?: HTMLElement);
602
+ attach(el: HTMLElement): void;
603
+ detach(): void;
604
+ beginRender(): void;
605
+ endRender(): void;
606
+ setViewportSize(w: number, h: number): void;
607
+ readonly element: Element;
608
+ fill: string;
609
+ fontSize: string;
610
+ fontFamily: string;
611
+ stroke: string;
612
+ strokeWidth: number;
613
+ textFill: string;
614
+ cssPriority: boolean;
615
+ readOnly: boolean;
616
+ precision: number;
617
+ readonly group: Element;
618
+ addClipRect(clipRect: Rect, id: string): void;
619
+ drawEllipse(cx: number, cy: number, rx: number, ry: number, className?: string, style?: any): SVGElement;
620
+ drawRect(x: number, y: number, w: number, h: number, className?: string, style?: any, clipPath?: string): SVGElement;
621
+ drawLine(x1: number, y1: number, x2: number, y2: number, className?: string, style?: any): SVGElement;
622
+ drawLines(xs: number[], ys: number[], className?: string, style?: any, clipPath?: string, num?: number): SVGElement;
623
+ drawSplines(xs: number[], ys: number[], className?: string, style?: any, clipPath?: string, num?: number): SVGElement;
624
+ drawPolygon(xs: number[], ys: number[], className?: string, style?: any, clipPath?: string): SVGElement;
625
+ drawPieSegment(cx: number, cy: number, r: number, startAngle: number, sweepAngle: number, className?: string, style?: any, clipPath?: string): SVGElement;
626
+ drawDonutSegment(cx: number, cy: number, radius: number, innerRadius: number, startAngle: number, sweepAngle: number, className?: string, style?: any, clipPath?: string): SVGElement;
627
+ drawString(s: string, pt: Point, className?: string, style?: any): SVGElement;
628
+ drawStringRotated(s: string, pt: Point, center: Point, angle: number, className?: string, style?: any): SVGElement;
629
+ measureString(s: string, className?: string, groupName?: string, style?: any): Size;
630
+ startGroup(className?: string, clipPath?: string, createTransform?: boolean): SVGElement;
631
+ endGroup(): void;
632
+ drawImage(imageHref: string, x: number, y: number, w: number, h: number): SVGElement;
633
+ private _setClipPath;
634
+ private _appendChild;
635
+ private _create;
636
+ private _setText;
637
+ private _getKey;
638
+ private _createText;
639
+ private _applyStyle;
640
+ private _deCase;
641
+ private _getClass;
642
+ private _getBBox;
643
+ private _applyColor;
644
+ private _addInlineStyle;
645
+ private _setAttribute;
646
+ private _checkRtl;
647
+ }
648
+ /**
649
+ * SVG render engine for FlexChart.
650
+ */
651
+ export declare class SvgRenderEngine extends _SvgRenderEngine {
652
+ }
653
+ /**
654
+ * Represents the chart legend.
655
+ */
656
+ export declare class Legend {
657
+ _chart: FlexChartBase;
658
+ _position: Position;
659
+ private _title;
660
+ private _titleAlign;
661
+ private _titlePadding;
662
+ private _areas;
663
+ private _sz;
664
+ private _colRowLens;
665
+ private _orient;
666
+ private _maxSz;
667
+ private _scrollbar;
668
+ /**
669
+ * Initializes a new instance of the {@link Legend} class.
670
+ *
671
+ * @param chart {@link FlexChartBase} that owns this {@link Legend}.
672
+ */
673
+ constructor(chart: FlexChartBase);
674
+ /**
675
+ * Gets or sets a value that determines whether and where the legend
676
+ * appears in relation to the plot area.
677
+ */
678
+ position: Position;
679
+ /**
680
+ * Gets or sets a value that determines the title of the legend.
681
+ */
682
+ title: string;
683
+ /**
684
+ * Gets or sets a value that determines the align value of the legend.
685
+ * The value should be 'left', 'center' or 'right'.
686
+ */
687
+ titleAlign: string;
688
+ /**
689
+ * Gets or sets a value that determines the orientation of the legend.
690
+ */
691
+ orientation: Orientation;
692
+ /**
693
+ * Gets or sets the maximum legend size (width for left or right position and height for top or bottom position).
694
+ * The size can be specified in pixels: maxSize = '100px' or percents: maxSize = '50%'.
695
+ */
696
+ maxSize: number | string;
697
+ /**
698
+ * Gets or sets a value that determines whether the scrollbar should be used for a long legend.
699
+ *
700
+ * The default value for this property is **false**.
701
+ */
702
+ scrollbar: boolean;
703
+ _getDesiredSize(engine: IRenderEngine, pos: Position, w: number, h: number): Size;
704
+ _getPosition(w: number, h: number): Position;
705
+ _render(engine: IRenderEngine, pt: Point, pos: Position, w: number, h: number): void;
706
+ _hitTest(pt: Point): number;
707
+ private _addScrollbar;
708
+ private _invalidate;
709
+ _getMaxSize(sz: number): number;
710
+ }
711
+ /**
712
+ * Represents the chart palette.
713
+ */
714
+ export interface _IPalette {
715
+ _getColor(i: number): string;
716
+ _getColorLight(i: number): string;
717
+ }
718
+ /**
719
+ * Class that represents a data point (with x and y coordinates).
720
+ *
721
+ * X and Y coordinates can be specified as a number or a Date object(time-based data).
722
+ */
723
+ export declare class DataPoint {
724
+ /**
725
+ * Gets or sets X coordinate value of this {@link DataPoint}.
726
+ */
727
+ x: any;
728
+ /**
729
+ * Gets or sets Y coordinate value of this {@link DataPoint}.
730
+ */
731
+ y: any;
732
+ /**
733
+ * Initializes a new instance of the {@link DataPoint} class.
734
+ *
735
+ * @param x X coordinate of the new DataPoint.
736
+ * @param y Y coordinate of the new DataPoint.
737
+ */
738
+ constructor(x?: any, y?: any);
739
+ }
740
+ /**
741
+ * Provides arguments for {@link Series} events.
742
+ */
743
+ export declare class RenderEventArgs extends CancelEventArgs {
744
+ _engine: IRenderEngine;
745
+ /**
746
+ * Initializes a new instance of the {@link RenderEventArgs} class.
747
+ *
748
+ * @param engine ({@link IRenderEngine}) The rendering engine to use.
749
+ */
750
+ constructor(engine: IRenderEngine);
751
+ /**
752
+ * Gets the {@link IRenderEngine} object to use for rendering the chart elements.
753
+ */
754
+ readonly engine: IRenderEngine;
755
+ }
756
+ /**
757
+ * Provides arguments for {@link Series} rendering event.
758
+ */
759
+ export declare class SeriesRenderingEventArgs extends RenderEventArgs {
760
+ _index: number;
761
+ _count: number;
762
+ /**
763
+ * Initializes a new instance of the {@link SeriesRenderingEventArgs} class.
764
+ *
765
+ * @param engine ({@link IRenderEngine}) The rendering engine to use.
766
+ * @param index The index of the series to render.
767
+ * @param count Total number of the series to render.
768
+ */
769
+ constructor(engine: IRenderEngine, index: number, count: number);
770
+ /**
771
+ * Gets the index of the series to render.
772
+ */
773
+ readonly index: number;
774
+ /**
775
+ * Gets the total number of series to render.
776
+ */
777
+ readonly count: number;
778
+ }
779
+ /**
780
+ * Specifies the format of the image with embed base64-encoded binary data.
781
+ */
782
+ export declare enum ImageFormat {
783
+ /** Gets the W3C Portable Network Graphics (PNG) image format. */
784
+ Png = 0,
785
+ /** Gets the Joint Photographic Experts Group (JPEG) image format. */
786
+ Jpeg = 1,
787
+ /** Gets the Scalable Vector Graphics(SVG) image format. */
788
+ Svg = 2
789
+ }
790
+ /**
791
+ * Specifies what is selected when the user clicks the chart.
792
+ */
793
+ export declare enum SelectionMode {
794
+ /** Select neither series nor data points when the user clicks the chart. */
795
+ None = 0,
796
+ /** Select the whole {@link Series} when the user clicks it on the chart. */
797
+ Series = 1,
798
+ /** Select the data point when the user clicks it on the chart. Since Line, Area, Spline,
799
+ * and SplineArea charts do not render individual data points, nothing is selected with this
800
+ * setting on those chart types. */
801
+ Point = 2
802
+ }
803
+ /**
804
+ * Specifies the position of an axis or legend on the chart.
805
+ */
806
+ export declare enum Position {
807
+ /** The item is not visible. */
808
+ None = 0,
809
+ /** The item appears to the left of the chart. */
810
+ Left = 1,
811
+ /** The item appears above the chart. */
812
+ Top = 2,
813
+ /** The item appears to the right of the chart. */
814
+ Right = 3,
815
+ /** The item appears below the chart. */
816
+ Bottom = 4,
817
+ /** The item is positioned automatically. */
818
+ Auto = 5
819
+ }
820
+ /**
821
+ * Specifies the element orientation.
822
+ */
823
+ export declare enum Orientation {
824
+ /** Orientation is selected automatically based on element position. */
825
+ Auto = 0,
826
+ /** Vertical orientation. */
827
+ Vertical = 1,
828
+ /** Horizontal orientation. */
829
+ Horizontal = 2
830
+ }
831
+ /**
832
+ * The {@link FlexChartBase} control from which the FlexChart and FlexPie derive.
833
+ */
834
+ export declare class FlexChartBase extends Control implements _IPalette {
835
+ static _WIDTH: number;
836
+ static _HEIGHT: number;
837
+ static _SELECTION_THRESHOLD: number;
838
+ static _CSS_LEGEND: string;
839
+ static _CSS_HEADER: string;
840
+ static _CSS_FOOTER: string;
841
+ static _CSS_TITLE: string;
842
+ static _CSS_LABEL: string;
843
+ static _CSS_SELECTION: string;
844
+ static _CSS_PLOT_AREA: string;
845
+ static _FG: string;
846
+ _items: any;
847
+ _cv: ICollectionView;
848
+ protected _palette: string[];
849
+ private _selectionMode;
850
+ private _itemFormatter;
851
+ _selectionIndex: number;
852
+ _options: any;
853
+ private _plotMargin;
854
+ _header: string;
855
+ _headerStyle: any;
856
+ _footer: string;
857
+ _footerStyle: any;
858
+ _legend: Legend;
859
+ _defPalette: string[];
860
+ _notifyCurrentChanged: boolean;
861
+ _rectFooter: Rect;
862
+ _rectHeader: Rect;
863
+ _rectChart: Rect;
864
+ _rectLegend: Rect;
865
+ _currentRenderEngine: IRenderEngine;
866
+ _legendHost: SVGGElement;
867
+ private _needBind;
868
+ private _toShow;
869
+ private _toHide;
870
+ _tooltip: ChartTooltip;
871
+ _chartRectId: string;
872
+ private _skipLightClr;
873
+ /**
874
+ * Gets or sets the array or {@link ICollectionView} object that contains the data used to create the chart.
875
+ */
876
+ itemsSource: any;
877
+ /**
878
+ * Gets the {@link ICollectionView} object that contains the chart data.
879
+ */
880
+ readonly collectionView: ICollectionView;
881
+ /**
882
+ * Gets or sets an array of default colors to use for displaying each series.
883
+ *
884
+ * The array contains strings that represents CSS colors. For example:
885
+ * <pre>
886
+ * // use colors specified by name
887
+ * chart.palette = ['red', 'green', 'blue'];
888
+ * // or use colors specified as rgba-values
889
+ * chart.palette = [
890
+ * 'rgba(255,0,0,1)',
891
+ * 'rgba(255,0,0,0.8)',
892
+ * 'rgba(255,0,0,0.6)',
893
+ * 'rgba(255,0,0,0.4)'];
894
+ * </pre>
895
+ *
896
+ * There is a set of predefined palettes in the {@link Palettes} class that you can use, for example:
897
+ * <pre>
898
+ * chart.palette = Palettes.coral;
899
+ * </pre>
900
+ */
901
+ palette: string[];
902
+ /**
903
+ * Gets or sets the plot margin in pixels.
904
+ *
905
+ * The plot margin represents the area between the edges of the control
906
+ * and the plot area.
907
+ *
908
+ * By default, this value is calculated automatically based on the space
909
+ * required by the axis labels, but you can override it if you want
910
+ * to control the precise position of the plot area within the control
911
+ * (for example, when aligning multiple chart controls on a page).
912
+ *
913
+ * You may set this property to a numeric value or to a CSS-style
914
+ * margin specification. For example:
915
+ *
916
+ * <pre>
917
+ * // set the plot margin to 20 pixels on all sides
918
+ * chart.plotMargin = 20;
919
+ * // set the plot margin for top, right, bottom, left sides
920
+ * chart.plotMargin = '10 15 20 25';
921
+ * // set the plot margin for top/bottom (10px) and left/right (20px)
922
+ * chart.plotMargin = '10 20';
923
+ * </pre>
924
+ */
925
+ plotMargin: any;
926
+ /**
927
+ * Gets or sets the chart legend.
928
+ */
929
+ legend: Legend;
930
+ /**
931
+ * Gets or sets the text displayed in the chart header.
932
+ */
933
+ header: string;
934
+ /**
935
+ * Gets or sets the text displayed in the chart footer.
936
+ */
937
+ footer: string;
938
+ /**
939
+ * Gets or sets the style of the chart header.
940
+ */
941
+ headerStyle: any;
942
+ /**
943
+ * Gets or sets the style of the chart footer.
944
+ */
945
+ footerStyle: any;
946
+ /**
947
+ * Gets or sets an enumerated value indicating whether or what is
948
+ * selected when the user clicks the chart.
949
+ *
950
+ * The default value for this property is <b>SelectionMode.None</b>.
951
+ */
952
+ selectionMode: SelectionMode;
953
+ /**
954
+ * Gets or sets the item formatter function that allows you to customize
955
+ * the appearance of the chart elements.
956
+ *
957
+ * If specified, the function should take three parameters: the chart's
958
+ * {@link IRenderEngine} responsible for rendering elements on the chart,
959
+ * a {@link HitTestInfo} parameter that describes the element being rendered,
960
+ * and a function that provides the default rendering for the item.
961
+ *
962
+ * For example:
963
+ * <pre>
964
+ * itemFormatter: function (engine, hitTestInfo, defaultRenderer) {
965
+ * var ht = hitTestInfo,
966
+ * binding = 'downloads';
967
+ *
968
+ * // check that this is the right series/element
969
+ * if (ht.series.binding == binding && ht.pointIndex &gt; 0 &&
970
+ * ht.chartElement == ChartElement.SeriesSymbol) {
971
+ *
972
+ * // get current and previous values
973
+ * var chart = ht.series.chart,
974
+ * items = chart.collectionView.items,
975
+ * valNow = items[ht.pointIndex][binding],
976
+ * valPrev = items[ht.pointIndex - 1][binding];
977
+ *
978
+ * // add line if value is increasing
979
+ * if (valNow &gt; valPrev) {
980
+ * var pt1 = chart.dataToPoint(ht.pointIndex, valNow),
981
+ * pt2 = chart.dataToPoint(ht.pointIndex - 1, valPrev);
982
+ * engine.drawLine(pt1.x, pt1.y, pt2.x, pt2.y, null, {
983
+ * stroke: 'gold',
984
+ * strokeWidth: 6
985
+ * });
986
+ * }
987
+ * }
988
+ *
989
+ * // render element as usual
990
+ * defaultRenderer();
991
+ * }
992
+ * </pre>
993
+ *
994
+ * {@sample: Chart/LineArea/CustomLineSegments/purejs Example}
995
+ */
996
+ itemFormatter: Function;
997
+ /**
998
+ * Occurs before the chart starts rendering data.
999
+ */
1000
+ readonly rendering: Event<FlexChartBase, RenderEventArgs>;
1001
+ /**
1002
+ * Raises the {@link rendering} event.
1003
+ *
1004
+ * @param e The {@link RenderEventArgs} object used to render the chart.
1005
+ */
1006
+ onRendering(e: RenderEventArgs): void;
1007
+ /**
1008
+ * Occurs after the chart finishes rendering.
1009
+ */
1010
+ readonly rendered: Event<FlexChartBase, RenderEventArgs>;
1011
+ /**
1012
+ * Raises the {@link rendered} event.
1013
+ *
1014
+ * @param e The {@link RenderEventArgs} object used to render the chart.
1015
+ */
1016
+ onRendered(e: RenderEventArgs): void;
1017
+ /**
1018
+ * Occurs before the chart is bound to a new items source.
1019
+ */
1020
+ readonly itemsSourceChanging: Event<FlexChartBase, CancelEventArgs>;
1021
+ /**
1022
+ * Raises the {@link itemsSourceChanging} event.
1023
+ *
1024
+ * @param e {@link CancelEventArgs} that contains the event data.
1025
+ * @return True if the event was not canceled.
1026
+ */
1027
+ onItemsSourceChanging(e: CancelEventArgs): boolean;
1028
+ /**
1029
+ * Occurs after the chart has been bound to a new items source.
1030
+ */
1031
+ readonly itemsSourceChanged: Event<FlexChartBase, EventArgs>;
1032
+ /**
1033
+ * Raises the {@link itemsSourceChanged} event.
1034
+ */
1035
+ onItemsSourceChanged(e: EventArgs): void;
1036
+ /**
1037
+ * Saves the chart to an image file.
1038
+ *
1039
+ * NOTE: This method does not work in IE browsers. If you require IE support,
1040
+ * add the *wijmo.chart.render* module to the page.
1041
+ *
1042
+ * @param filename The filename for the exported image file including extension.
1043
+ * Supported types are PNG, JPEG and SVG.
1044
+ */
1045
+ saveImageToFile(filename: string): void;
1046
+ /**
1047
+ * Saves the chart to an image data url.
1048
+ *
1049
+ * NOTE: This method does not work in IE browsers. If you require IE support,
1050
+ * add the <code>flex-chart.render</code> module to the page.
1051
+ *
1052
+ * @param format The {@link ImageFormat} for the exported image.
1053
+ * @param done A function to be called after data url is generated. The function gets passed the data url as its argument.
1054
+ */
1055
+ saveImageToDataUrl(format: ImageFormat, done: Function): void;
1056
+ /**
1057
+ * Saves the chart to a data url as SVG image.
1058
+ *
1059
+ * @param done A function to be called after data url is generated. The function gets passed the data url as its argument.
1060
+ * @param embedCss Whether to include CSS styles to SVG image.
1061
+ */
1062
+ saveSvgToDataUrl(done: Function, embedCss?: boolean): void;
1063
+ /**
1064
+ * Saves the chart to an SVG image file.
1065
+ *
1066
+ * @param filename The filename for the exported image file including extension.
1067
+ * @param embedCss Whether to include CSS styles to SVG image.
1068
+ */
1069
+ saveSvgToFile(filename: string, embedCss?: boolean): void;
1070
+ _exportToImage(extension: any, processDataURI: any, options?: any): void;
1071
+ prepareDataUri(ele: Element, extension: string, dataUrl: string, processDataURI: Function): void;
1072
+ /**
1073
+ * Refreshes the chart.
1074
+ *
1075
+ * @param fullUpdate A value indicating whether to update the control layout as well as the content.
1076
+ */
1077
+ refresh(fullUpdate?: boolean): void;
1078
+ /**
1079
+ * Occurs after the selection changes, whether programmatically
1080
+ * or when the user clicks the chart. This is useful, for example,
1081
+ * when you want to update details in a textbox showing the current
1082
+ * selection.
1083
+ */
1084
+ readonly selectionChanged: Event<FlexChartBase, EventArgs>;
1085
+ /**
1086
+ * Raises the {@link selectionChanged} event.
1087
+ */
1088
+ onSelectionChanged(e?: EventArgs): void;
1089
+ onLostFocus(e?: EventArgs): void;
1090
+ private _cvCollectionChanged;
1091
+ private _cvCurrentChanged;
1092
+ _bgColor(el: Element): string;
1093
+ _isTransparent(c: string): boolean;
1094
+ /**
1095
+ * Gets a color from the palette by index.
1096
+ *
1097
+ * @param index The index of the color in the palette.
1098
+ */
1099
+ _getColor(index: number): string;
1100
+ /**
1101
+ * Gets a lighter color from the palette by index.
1102
+ *
1103
+ * @param index The index of the color in the palette.
1104
+ */
1105
+ _getColorLight(index: number): string;
1106
+ /**
1107
+ * Gets a lighter color from the palette by color string.
1108
+ *
1109
+ * @param color The color in the palette.
1110
+ */
1111
+ _getLightColor(color: string): string;
1112
+ _bindChart(): void;
1113
+ _clearCachedValues(): void;
1114
+ _renderEls(engine: IRenderEngine, sz: Size, applyElement?: boolean, bg?: string, hidden?: boolean): void;
1115
+ private _h;
1116
+ _render(engine: IRenderEngine, applyElement?: boolean, bg?: string): void;
1117
+ _isPCUnit(prop: string): boolean;
1118
+ _renderHidden(sz?: Size, bg?: string): any;
1119
+ _renderHeader(engine: IRenderEngine, rect: Rect): void;
1120
+ _renderFooter(engine: IRenderEngine, rect: Rect): void;
1121
+ _renderLegends(engine: IRenderEngine, rect: Rect): void;
1122
+ _prepareRender(): void;
1123
+ _renderChart(engine: IRenderEngine, rect: Rect, applyElement: boolean): void;
1124
+ _performBind(): void;
1125
+ _getDesiredLegendSize(engine: IRenderEngine, isVertical: boolean, width: number, height: number): Size;
1126
+ _renderLegend(engine: IRenderEngine, pt: Point, areas: any[], isVertical: boolean, width: number, height: number): void;
1127
+ _getHitTestItem(index: number): any;
1128
+ _getHitTestValue(index: number, gi?: number): any;
1129
+ _getHitTestLabel(index: number): any;
1130
+ _refreshChart(): void;
1131
+ _drawTitle(engine: IRenderEngine, rect: Rect, title: string, style: any, isFooter: boolean): Rect;
1132
+ /**
1133
+ * Converts page coordinates to control coordinates.
1134
+ *
1135
+ * @param pt The point of page coordinates or x value
1136
+ of page coordinates.
1137
+ * @param y The y value of page coordinates. Its value
1138
+ should be a number, if pt is a number type. However,
1139
+ the y parameter is optional when pt is Point type.
1140
+ */
1141
+ pageToControl(pt: any, y?: number): Point;
1142
+ _toControl(pt: any, y?: number): Point;
1143
+ _highlightItems(items: any, cls: any, selected: boolean): void;
1144
+ _parseMargin(value: any): any;
1145
+ _showToolTip(content: any, rect: any): void;
1146
+ _hideToolTip(): void;
1147
+ private _clearTimeouts;
1148
+ _getHostOffset(): Point;
1149
+ _getHostSize(): Size;
1150
+ _parsePx(s: string): number;
1151
+ _getHostComputedStyle(): CSSStyleDeclaration;
1152
+ _find(elem: SVGElement, names: string[]): any[];
1153
+ _getLegendSize(sz: number, lsz: number): number;
1154
+ static _contains(rect: Rect, pt: Point): boolean;
1155
+ static _intersects(rect1: Rect, rect2: Rect): boolean;
1156
+ static _epoch: number;
1157
+ static _msPerDay: number;
1158
+ static _toOADate(date: Date): number;
1159
+ static _fromOADate(val: number): Date;
1160
+ static _renderText(engine: IRenderEngine, text: string, pos: Point, halign: any, valign: any, className?: string, groupName?: string, style?: any, test?: any): Rect;
1161
+ static _renderRotatedText(engine: IRenderEngine, text: string, pos: Point, halign: any, valign: any, center: Point, angle: number, className: string, groupClassName?: string, style?: any): any;
1162
+ static _endsWith(str: string, suffix: string): boolean;
1163
+ }
1164
+ export interface _IHitArea {
1165
+ contains(pt: Point): boolean;
1166
+ distance(pt: Point): number;
1167
+ tag: any;
1168
+ ignoreLabel: boolean;
1169
+ }
1170
+ export declare class _KeyWords {
1171
+ private _keys;
1172
+ constructor();
1173
+ replace(s: string, ht: HitTestInfo): string;
1174
+ getValue(key: string, ht: HitTestInfo, fmt?: string): string;
1175
+ }
1176
+ /**
1177
+ * Extends the {@link Tooltip} class to provide chart tooltips.
1178
+ */
1179
+ export declare class ChartTooltip extends Tooltip {
1180
+ private _content;
1181
+ private _threshold;
1182
+ /**
1183
+ * Initializes a new instance of the {@link ChartTooltip} class.
1184
+ */
1185
+ constructor();
1186
+ /**
1187
+ * Gets or sets the tooltip content.
1188
+ *
1189
+ * The tooltip content can be specified as a string or as a function that
1190
+ * takes a {@link HitTestInfo} object as a parameter.
1191
+ *
1192
+ * When the tooltip content is a string, it may contain any of the following
1193
+ * parameters:
1194
+ *
1195
+ * <ul>
1196
+ * <li><b>propertyName</b>: Any property of the data object represented by the point.</li>
1197
+ * <li><b>seriesName</b>: Name of the series that contains the data point (FlexChart only).</li>
1198
+ * <li><b>pointIndex</b>: Index of the data point.</li>
1199
+ * <li><b>value</b>: <b>Value</b> of the data point (y-value for {@link FlexChart}, item value for {@link FlexPie}).</li>
1200
+ * <li><b>x</b>: <b>x</b>-value of the data point (FlexChart only).</li>
1201
+ * <li><b>y</b>: <b>y</b>-value of the data point (FlexChart only).</li>
1202
+ * <li><b>name</b>: <b>Name</b> of the data point (x-value for {@link FlexChart} or legend entry for {@link FlexPie}).</li>
1203
+ * </ul>
1204
+ *
1205
+ * Parameters must be enclosed in single curly brackets. For example:
1206
+ *
1207
+ * <pre>
1208
+ * // 'country' and 'sales' are properties of the data object.
1209
+ * chart.tooltip.content = '{country}, sales:{sales}';
1210
+ * </pre>
1211
+ *
1212
+ * The next example shows how to set the tooltip content using a function.
1213
+ *
1214
+ * <pre>
1215
+ * // Set the tooltip content
1216
+ * chart.tooltip.content = function (ht) {
1217
+ * return ht.name + ":" + ht.value.toFixed();
1218
+ * }
1219
+ * </pre>
1220
+ */
1221
+ content: any;
1222
+ /**
1223
+ * Gets or sets the maximum distance from the element to display the tooltip.
1224
+ */
1225
+ threshold: number;
1226
+ /**
1227
+ * Shows the tooltip with the specified content, next to the specified element.
1228
+ *
1229
+ * @param element Element, element ID, or control that the tooltip explains.
1230
+ * @param content Tooltip content or ID of the element that contains the tooltip content.
1231
+ * @param bounds Optional element that defines the bounds of the area that the tooltip
1232
+ * targets. If not provided, the bounds of the element are used (as reported by the
1233
+ * <b>getBoundingClientRect</b> method).
1234
+ */
1235
+ show(element: any, content: string, bounds?: Rect): void;
1236
+ }
1237
+ /**
1238
+ * Specifies the chart type.
1239
+ */
1240
+ export declare enum ChartType {
1241
+ /** Shows vertical bars and allows you to compare values of items across categories. */
1242
+ Column = 0,
1243
+ /** Shows horizontal bars. */
1244
+ Bar = 1,
1245
+ /** Shows patterns within the data using X and Y coordinates. */
1246
+ Scatter = 2,
1247
+ /** Shows trends over a period of time or across categories. */
1248
+ Line = 3,
1249
+ /** Shows a line chart with a symbol on each data point. */
1250
+ LineSymbols = 4,
1251
+ /** Shows a line chart with the area below the line filled with color. */
1252
+ Area = 5,
1253
+ /** Shows a Scatter chart with a third data value that determines the
1254
+ * size of the symbol. The data for this chart type can be defined using the
1255
+ * {@link FlexChart} or {@link Series} <b>binding</b> property as a comma separated value in the
1256
+ * following format: "yProperty, bubbleSizeProperty".*/
1257
+ Bubble = 6,
1258
+ /** Presents items with high, low, open, and close values.
1259
+ * The size of the wick line is determined by the High and Low values,
1260
+ * while the size of the bar is determined by the Open and Close values.
1261
+ * The bar is displayed using different colors, depending on
1262
+ * whether the close value is higher or lower than the open value.
1263
+ * The data for this chart type can be defined using the
1264
+ * {@link FlexChart} or {@link Series} <b>binding</b> property as a comma separated value in the
1265
+ * following format: "highProperty, lowProperty, openProperty, closeProperty". */
1266
+ Candlestick = 7,
1267
+ /** Displays the same information as a candlestick chart, except that opening
1268
+ * values are displayed using lines to the left, while lines to the right
1269
+ * indicate closing values. The data for this chart type can be defined using the
1270
+ * {@link FlexChart} or {@link Series} <b>binding</b> property as a comma separated value in the
1271
+ * following format: "highProperty, lowProperty, openProperty, closeProperty". */
1272
+ HighLowOpenClose = 8,
1273
+ /** Displays a line chart that plots curves rather than angled lines through the
1274
+ * data points. */
1275
+ Spline = 9,
1276
+ /** Displays a spline chart with symbols on each data point. */
1277
+ SplineSymbols = 10,
1278
+ /** Displays a spline chart with the area below the line filled with color. */
1279
+ SplineArea = 11,
1280
+ /** Displays a funnel chart, usually representing stages in a process such as a sales pipeline. */
1281
+ Funnel = 12,
1282
+ /** Displays a step chart */
1283
+ Step = 13,
1284
+ /** Displays a step chart with symbols on each data point. */
1285
+ StepSymbols = 14,
1286
+ /** Displays a step area chart */
1287
+ StepArea = 15
1288
+ }
1289
+ /**
1290
+ * Specifies whether and how to stack the chart's data values.
1291
+ */
1292
+ export declare enum Stacking {
1293
+ /** No stacking. Each series object is plotted independently. */
1294
+ None = 0,
1295
+ /** Stacked charts show how each value contributes to the total. */
1296
+ Stacked = 1,
1297
+ /** 100% stacked charts show how each value contributes to the total with the relative size of
1298
+ * each series representing its contribution to the total. */
1299
+ Stacked100pc = 2
1300
+ }
1301
+ /**
1302
+ * The core charting control for {@link FlexChart}.
1303
+ */
1304
+ export declare class FlexChartCore extends FlexChartBase {
1305
+ static _CSS_AXIS_X: string;
1306
+ static _CSS_AXIS_Y: string;
1307
+ static _CSS_LINE: string;
1308
+ static _CSS_GRIDLINE: string;
1309
+ static _CSS_TICK: string;
1310
+ static _CSS_GRIDLINE_MINOR: string;
1311
+ static _CSS_TICK_MINOR: string;
1312
+ static _CSS_DATA_LABELS: string;
1313
+ private _series;
1314
+ private _axes;
1315
+ private _pareas;
1316
+ private _axisX;
1317
+ private _axisY;
1318
+ private _selection;
1319
+ private _interpolateNulls;
1320
+ private _legendToggle;
1321
+ private _symbolSize;
1322
+ _dataInfo: _DataInfo;
1323
+ _plotRect: Rect;
1324
+ private __barPlotter;
1325
+ private __linePlotter;
1326
+ private __areaPlotter;
1327
+ private __bubblePlotter;
1328
+ private __financePlotter;
1329
+ private __funnelPlotter;
1330
+ private _plotters;
1331
+ private _binding;
1332
+ private _bindingX;
1333
+ _rotated: boolean;
1334
+ _stacking: Stacking;
1335
+ private _lbl;
1336
+ _xlabels: string[];
1337
+ _xvals: number[];
1338
+ _xDataType: DataType;
1339
+ private _hitTester;
1340
+ private _lblAreas;
1341
+ private _keywords;
1342
+ private _curPlotter;
1343
+ private _colRowLens;
1344
+ private _selectedEls;
1345
+ _markers: LineMarker[];
1346
+ _bindingSeparator: string;
1347
+ /**
1348
+ * Initializes a new instance of the {@link FlexChart} class.
1349
+ *
1350
+ * @param element The DOM element that hosts the control, or a CSS selector for the host element (e.g. '#theCtrl').
1351
+ * @param options A JavaScript object containing initialization data for the control.
1352
+ */
1353
+ constructor(element: any, options?: any);
1354
+ initialize(options: any): void;
1355
+ _initAxes(): void;
1356
+ /**
1357
+ * Gets the collection of {@link Series} objects.
1358
+ */
1359
+ readonly series: ObservableArray;
1360
+ /**
1361
+ * Gets the collection of {@link Axis} objects.
1362
+ */
1363
+ readonly axes: ObservableArray;
1364
+ /**
1365
+ * Gets or sets the main X axis.
1366
+ */
1367
+ axisX: Axis;
1368
+ /**
1369
+ * Gets or sets the main Y axis.
1370
+ */
1371
+ axisY: Axis;
1372
+ /**
1373
+ * Gets the collection of {@link PlotArea} objects.
1374
+ */
1375
+ readonly plotAreas: PlotAreaCollection;
1376
+ /**
1377
+ * Gets or sets the name of the property that contains the Y values.
1378
+ */
1379
+ binding: string;
1380
+ /**
1381
+ * Gets or sets the name of the property that contains the X data values.
1382
+ */
1383
+ bindingX: string;
1384
+ /**
1385
+ * Gets or sets the size of the symbols used for all Series objects
1386
+ * in this {@link FlexChart}.
1387
+ *
1388
+ * This property may be overridden by the symbolSize property on
1389
+ * each {@link Series} object.
1390
+ *
1391
+ * The default value for this property is <b>10</b> pixels.
1392
+ */
1393
+ symbolSize: number;
1394
+ /**
1395
+ * Gets or sets a value that determines whether to interpolate
1396
+ * null values in the data.
1397
+ *
1398
+ * If true, the chart interpolates the value of any missing data
1399
+ * based on neighboring points. If false, it leaves a break in
1400
+ * lines and areas at the points with null values.
1401
+ *
1402
+ * The default value for this property is <b>false</b>.
1403
+ */
1404
+ interpolateNulls: boolean;
1405
+ /**
1406
+ * Gets or sets a value indicating whether clicking legend items toggles the
1407
+ * series visibility in the chart.
1408
+ *
1409
+ * The default value for this property is <b>false</b>.
1410
+ */
1411
+ legendToggle: boolean;
1412
+ /**
1413
+ * Gets the chart {@link Tooltip} object.
1414
+ *
1415
+ * The tooltip content is generated using a template that may contain any of the following
1416
+ * parameters:
1417
+ *
1418
+ * <ul>
1419
+ * <li><b>propertyName</b>: Any property of the data object represented by the point.</li>
1420
+ * <li><b>seriesName</b>: Name of the series that contains the data point (FlexChart only).</li>
1421
+ * <li><b>pointIndex</b>: Index of the data point.</li>
1422
+ * <li><b>value</b>: <b>Value</b> of the data point (y-value for {@link FlexChart}, item value for {@link FlexPie}).</li>
1423
+ * <li><b>x</b>: <b>x</b>-value of the data point (FlexChart only).</li>
1424
+ * <li><b>y</b>: <b>y</b>-value of the data point (FlexChart only).</li>
1425
+ * <li><b>name</b>: <b>Name</b> of the data point (x-value for {@link FlexChart} or legend entry for {@link FlexPie}).</li>
1426
+ * </ul>
1427
+ *
1428
+ * To modify the template, assign a new value to the tooltip's content property.
1429
+ * For example:
1430
+ *
1431
+ * <pre>
1432
+ * chart.tooltip.content = '&lt;b&gt;{seriesName}&lt;/b&gt; ' +
1433
+ * '&lt;img src="resources/{x}.png"/&gt;&lt;br/&gt;{y}';
1434
+ * </pre>
1435
+ *
1436
+ * You can disable chart tooltips by setting the template to an empty string.
1437
+ *
1438
+ * You can also use the {@link tooltip} property to customize tooltip parameters
1439
+ * such as {@link Tooltip.showDelay} and {@link Tooltip.hideDelay}:
1440
+ *
1441
+ * <pre>
1442
+ * chart.tooltip.showDelay = 1000;
1443
+ * </pre>
1444
+ *
1445
+ * See {@link ChartTooltip} properties for more details and options.
1446
+ */
1447
+ readonly tooltip: ChartTooltip;
1448
+ /**
1449
+ * Gets or sets the point data label.
1450
+ */
1451
+ dataLabel: DataLabel;
1452
+ /**
1453
+ * Gets or sets the selected chart series.
1454
+ */
1455
+ selection: SeriesBase;
1456
+ /**
1457
+ * Gets or sets the chart render engine.
1458
+ */
1459
+ renderEngine: IRenderEngine;
1460
+ /**
1461
+ * Occurs when the series visibility changes, for example when the legendToggle
1462
+ * property is set to true and the user clicks the legend.
1463
+ */
1464
+ readonly seriesVisibilityChanged: Event<FlexChartCore, SeriesEventArgs>;
1465
+ /**
1466
+ * Raises the {@link seriesVisibilityChanged} event.
1467
+ *
1468
+ * @param e The {@link SeriesEventArgs} object that contains the event data.
1469
+ */
1470
+ onSeriesVisibilityChanged(e: SeriesEventArgs): void;
1471
+ /**
1472
+ * Gets a {@link HitTestInfo} object with information about the specified point.
1473
+ *
1474
+ * @param pt The point to investigate, in window coordinates.
1475
+ * @param y The Y coordinate of the point (if the first parameter is a number).
1476
+ * @return A {@link HitTestInfo} object with information about the point.
1477
+ */
1478
+ hitTest(pt: any, y?: number): HitTestInfo;
1479
+ /**
1480
+ * Converts a {@link Point} from control coordinates to chart data coordinates.
1481
+ *
1482
+ * @param pt The point to convert, in control coordinates.
1483
+ * @param y The Y coordinate of the point (if the first parameter is a number).
1484
+ * @return The point in chart data coordinates.
1485
+ */
1486
+ pointToData(pt: any, y?: number): Point;
1487
+ /**
1488
+ * Converts a {@link Point} from data coordinates to control coordinates.
1489
+ *
1490
+ * @param pt {@link Point} in data coordinates, or X coordinate of a point in data coordinates.
1491
+ * @param y Y coordinate of the point (if the first parameter is a number).
1492
+ * @return The {@link Point} in control coordinates.
1493
+ */
1494
+ dataToPoint(pt: any, y?: number): Point;
1495
+ /**
1496
+ * Disposes of the control by removing its association with the host element.
1497
+ */
1498
+ dispose(): void;
1499
+ _copy(key: string, value: any): boolean;
1500
+ _createSeries(): SeriesBase;
1501
+ _clearCachedValues(): void;
1502
+ _performBind(): void;
1503
+ _hitTestSeries(pt: Point, seriesIndex: number): HitTestInfo;
1504
+ _hitTestData(pt: any): HitTestInfo;
1505
+ _hitTestLabels(pt: Point): _IHitArea;
1506
+ private static _dist2;
1507
+ static _dist(p0: Point, p1: Point, p2: Point): number;
1508
+ static _distToSegmentSquared(p: Point, v: Point, w: Point): number;
1509
+ _isRotated(): boolean;
1510
+ _plotrectId: string;
1511
+ _getChartType(): ChartType;
1512
+ _prepareRender(): void;
1513
+ _renderChart(engine: IRenderEngine, rect: Rect, applyElement: boolean): void;
1514
+ _getDesiredLegendSize(engine: IRenderEngine, isVertical: boolean, width: number, height: number): Size;
1515
+ _renderLegend(engine: IRenderEngine, pos: Point, areas: any[], isVertical: boolean, width: number, height: number): void;
1516
+ private _legendReversed;
1517
+ private _renderLegendElements;
1518
+ private _renderLabels;
1519
+ private _getAxes;
1520
+ private _clearPlotters;
1521
+ _initPlotter(plotter: _IPlotter): void;
1522
+ private readonly _barPlotter;
1523
+ private readonly _linePlotter;
1524
+ private readonly _areaPlotter;
1525
+ private readonly _bubblePlotter;
1526
+ private readonly _financePlotter;
1527
+ private readonly _funnelPlotter;
1528
+ _getPlotter(series: SeriesBase): _IPlotter;
1529
+ _layout(rect: Rect, size: Size, engine: IRenderEngine): void;
1530
+ private _layoutSingle;
1531
+ private _layoutMultiple;
1532
+ private _convertX;
1533
+ private _convertY;
1534
+ _getLabelContent(ht: HitTestInfo, content: any): string;
1535
+ private _select;
1536
+ private _highlightCurrent;
1537
+ private _highlight;
1538
+ private _updateTooltip;
1539
+ _updateAuxAxes(axes: Axis[], isRotated: boolean): void;
1540
+ }
1541
+ /**
1542
+ * Analyzes chart data.
1543
+ */
1544
+ export declare class _DataInfo {
1545
+ private minY;
1546
+ private maxY;
1547
+ private minX;
1548
+ private maxX;
1549
+ private minXp;
1550
+ private minYp;
1551
+ private dataTypeX;
1552
+ private dataTypeY;
1553
+ private stackAbs;
1554
+ private _xvals;
1555
+ private dx;
1556
+ constructor();
1557
+ analyse(seriesList: any, isRotated: boolean, stacking: Stacking, xvals: Array<number>, logx: boolean, logy: boolean): void;
1558
+ _parseYVal(val: any, xval: any, custom: any, stackAbs: any, stackPos: any, stackNeg: any): void;
1559
+ getMinY(): number;
1560
+ getMaxY(): number;
1561
+ getMinX(): number;
1562
+ getMaxX(): number;
1563
+ getMinXp(): number;
1564
+ getMinYp(): number;
1565
+ getDeltaX(): number;
1566
+ getDataTypeX(): DataType;
1567
+ getDataTypeY(): DataType;
1568
+ getStackedAbsSum(key: number): number;
1569
+ getXVals(): Array<number>;
1570
+ static isValid(...vals: number[]): boolean;
1571
+ }
1572
+ /**
1573
+ * The {@link FlexChart} control provides a powerful and flexible way to visualize
1574
+ * data.
1575
+ *
1576
+ * You can use the {@link FlexChart} control to create charts that display data in
1577
+ * several formats, including bar, line, symbol, bubble, and others.
1578
+ *
1579
+ * To use the {@link FlexChart} control, set the {@link FlexChart.itemsSource} property
1580
+ * to an array containing the data objects, then add one or more {@link Series} objects
1581
+ * to the {@link FlexChart.series} property.
1582
+ *
1583
+ * Use the {@link FlexChart.chartType} property to define the {@link ChartType} used as
1584
+ * a default for all series. You may override the chart type for each series by
1585
+ * setting the {@link Series.chartType} property on the members of the
1586
+ * {@link FlexChart.series} array.
1587
+ *
1588
+ * {@sample Chart/Overview/purejs Example}
1589
+ */
1590
+ export declare class FlexChart extends FlexChartCore {
1591
+ private _chartType;
1592
+ /**
1593
+ * Initializes a new instance of the {@link FlexChart} class.
1594
+ *
1595
+ * @param element The DOM element that hosts the control, or a CSS selector for the host element (e.g. '#theCtrl').
1596
+ * @param options A JavaScript object containing initialization data
1597
+ * for the control.
1598
+ */
1599
+ constructor(element: any, options?: any);
1600
+ _getChartType(): ChartType;
1601
+ /**
1602
+ * Gets or sets the type of chart to create.
1603
+ *
1604
+ * The default value for this property is <b>ChartType.Column</b>.
1605
+ */
1606
+ chartType: ChartType;
1607
+ /**
1608
+ * Gets or sets a value indicating whether to flip the axes so that
1609
+ * X becomes vertical and Y becomes horizontal.
1610
+ *
1611
+ * The default value for this property is <b>false</b>.
1612
+ */
1613
+ rotated: boolean;
1614
+ /**
1615
+ * Gets or sets a value that determines whether and how the series objects are stacked.
1616
+ *
1617
+ * The default value for this property is <b>Stacking.None</b>.
1618
+ */
1619
+ stacking: Stacking;
1620
+ /**
1621
+ * Gets or sets various chart options.
1622
+ *
1623
+ * The following options are supported:
1624
+ *
1625
+ * <b>bubble.maxSize</b>: Specifies the maximum size
1626
+ * of symbols in the Bubble chart. The default value is 30 pixels.
1627
+ *
1628
+ * <b>bubble.minSize</b>: Specifies the minimum size
1629
+ * of symbols in the Bubble chart. The default value is 5 pixels.
1630
+ *
1631
+ * <pre>chart.options = {
1632
+ * bubble: { minSize: 5, maxSize: 30 }
1633
+ * }</pre>
1634
+ *
1635
+ *
1636
+ * <b>funnel.neckWidth</b>: Specifies the neck width as a percentage for the Funnel chart.
1637
+ * The default value is 0.2.
1638
+ *
1639
+ * <b>funnel.neckHeight</b>: Specifies the neck height as a percentage for the Funnel chart.
1640
+ * The default value is 0.
1641
+ *
1642
+ * <b>funnel.type</b>: Specifies the type of Funnel chart. It should be 'rectangle' or 'default'.
1643
+ * neckWidth and neckHeight don't work if type is set to rectangle.
1644
+ *
1645
+ * <pre>chart.options = {
1646
+ * funnel: { neckWidth: 0.3, neckHeight: 0.3, type: 'rectangle' }
1647
+ * }</pre>
1648
+
1649
+ * <b>groupWidth</b>: Specifies the group width for the Column charts,
1650
+ * or the group height for the Bar charts. The group width can be specified
1651
+ * in pixels or as percentage of the available space. The default value is '70%'.
1652
+ *
1653
+ * <pre>chart.options = {
1654
+ * groupWidth : 50; // 50 pixels
1655
+ * }
1656
+ * chart.options = {
1657
+ * groupWidth : '100%'; // 100% pixels
1658
+ * }</pre>
1659
+ */
1660
+ options: any;
1661
+ }
1662
+ /**
1663
+ * Specifies the position of data labels on the chart.
1664
+ */
1665
+ export declare enum LabelPosition {
1666
+ /** No data labels appear. */
1667
+ None = 0,
1668
+ /** The labels appear to the left of the data points. */
1669
+ Left = 1,
1670
+ /** The labels appear above the data points. */
1671
+ Top = 2,
1672
+ /** The labels appear to the right of the data points. */
1673
+ Right = 3,
1674
+ /** The labels appear below the data points. */
1675
+ Bottom = 4,
1676
+ /** The labels appear centered on the data points. */
1677
+ Center = 5
1678
+ }
1679
+ /**
1680
+ * Specifies the position of data labels on the pie chart.
1681
+ */
1682
+ export declare enum PieLabelPosition {
1683
+ /** No data labels. */
1684
+ None = 0,
1685
+ /** The label appears inside the pie slice. */
1686
+ Inside = 1,
1687
+ /** The item appears at the center of the pie slice. */
1688
+ Center = 2,
1689
+ /** The item appears outside the pie slice. */
1690
+ Outside = 3,
1691
+ /** The item appears inside the pie slice and depends of its angle. */
1692
+ Radial = 4,
1693
+ /** The item appears inside the pie slice and has circular direction. */
1694
+ Circular = 5
1695
+ }
1696
+ /**
1697
+ * Provides arguments for {@link DataLabel} rendering event.
1698
+ */
1699
+ export declare class DataLabelRenderEventArgs extends RenderEventArgs {
1700
+ private _ht;
1701
+ private _pt;
1702
+ private _text;
1703
+ /**
1704
+ * Initializes a new instance of the {@link DataLabelRenderEventArgs} class.
1705
+ *
1706
+ * @param engine ({@link IRenderEngine}) The rendering engine to use.
1707
+ * @param ht The hit test information.
1708
+ * @param pt The reference point.
1709
+ * @param text The label text.
1710
+ */
1711
+ constructor(engine: IRenderEngine, ht: HitTestInfo, pt: Point, text: string);
1712
+ /**
1713
+ * Gets or sets a value that indicates whether the event should be cancelled.
1714
+ */
1715
+ cancel: boolean;
1716
+ /**
1717
+ * Gets the point associated with the label in control coordinates.
1718
+ */
1719
+ readonly point: Point;
1720
+ /**
1721
+ * Gets or sets the label text.
1722
+ */
1723
+ text: string;
1724
+ /**
1725
+ * Gets the hit test information.
1726
+ */
1727
+ readonly hitTestInfo: HitTestInfo;
1728
+ }
1729
+ /**
1730
+ * Represents the base abstract class for the {@link DataLabel} and the {@link PieDataLabel} classes.
1731
+ */
1732
+ export declare class DataLabelBase {
1733
+ private _content;
1734
+ _chart: FlexChartBase;
1735
+ private _bdr;
1736
+ private _line;
1737
+ private _off;
1738
+ /**
1739
+ * Gets or sets the content of data labels.
1740
+ *
1741
+ * The content can be specified as a string or as a function that
1742
+ * takes {@link HitTestInfo} object as a parameter.
1743
+ *
1744
+ * When the label content is a string, it can contain any of the following
1745
+ * parameters:
1746
+ *
1747
+ * <ul>
1748
+ * <li><b>seriesName</b>: Name of the series that contains the data point (FlexChart only).</li>
1749
+ * <li><b>pointIndex</b>: Index of the data point.</li>
1750
+ * <li><b>value</b>: <b>Value</b> of the data point.</li>
1751
+ * <li><b>x</b>: <b>x</b>-value of the data point (FlexChart only).</li>
1752
+ * <li><b>y</b>: <b>y</b>-value of the data point (FlexChart only).</li>
1753
+ * <li><b>name</b>: <b>Name</b> of the data point.</li>
1754
+ * <li><b>propertyName</b>: any property of data object.</li>
1755
+ * </ul>
1756
+ *
1757
+ * The parameter must be enclosed in curly brackets, for example 'x={x}, y={y}'.
1758
+ *
1759
+ * In the following example, we show the y value of the data point in the labels.
1760
+ *
1761
+ * <pre>
1762
+ * // Create a chart and show y data in labels positioned above the data point.
1763
+ * var chart = new FlexChart('#theChart');
1764
+ * chart.initialize({
1765
+ * itemsSource: data,
1766
+ * bindingX: 'country',
1767
+ * series: [
1768
+ * { name: 'Sales', binding: 'sales' },
1769
+ * { name: 'Expenses', binding: 'expenses' },
1770
+ * { name: 'Downloads', binding: 'downloads' }],
1771
+ * });
1772
+ * chart.dataLabel.position = "Top";
1773
+ * chart.dataLabel.content = "{country} {seriesName}:{y}";
1774
+ * </pre>
1775
+ *
1776
+ * The next example shows how to set data label content using a function.
1777
+ *
1778
+ * <pre>
1779
+ * // Set the data label content
1780
+ * chart.dataLabel.content = function (ht) {
1781
+ * return ht.name + ":" + ht.value.toFixed();
1782
+ * }
1783
+ * </pre>
1784
+ *
1785
+ */
1786
+ content: any;
1787
+ /**
1788
+ * Gets or sets a value indicating whether the data labels have borders.
1789
+ */
1790
+ border: boolean;
1791
+ /**
1792
+ * Gets or sets the offset from label to the data point.
1793
+ */
1794
+ offset: number;
1795
+ /**
1796
+ * Gets or sets a value indicating whether to draw lines that connect
1797
+ * labels to the data points.
1798
+ */
1799
+ connectingLine: boolean;
1800
+ /**
1801
+ * Occurs before the data label is rendered.
1802
+ */
1803
+ readonly rendering: Event<DataLabel, DataLabelRenderEventArgs>;
1804
+ /**
1805
+ * Raises the {@link rendering} event.
1806
+ *
1807
+ * @param e The {@link DataLabelRenderEventArgs} object used to render the label.
1808
+ * @return True if the event was not canceled.
1809
+ */
1810
+ onRendering(e: DataLabelRenderEventArgs): boolean;
1811
+ _invalidate(): void;
1812
+ }
1813
+ /**
1814
+ * The point data label for FlexChart.
1815
+ */
1816
+ export declare class DataLabel extends DataLabelBase {
1817
+ private _pos;
1818
+ /**
1819
+ * Gets or sets the position of the data labels.
1820
+ */
1821
+ position: LabelPosition;
1822
+ }
1823
+ /**
1824
+ * The point data label for FlexPie.
1825
+ */
1826
+ export declare class PieDataLabel extends DataLabelBase {
1827
+ private _pos;
1828
+ /**
1829
+ * Gets or sets the position of the data labels.
1830
+ */
1831
+ position: PieLabelPosition;
1832
+ }
1833
+ /**
1834
+ * Specifies the axis type.
1835
+ */
1836
+ export declare enum AxisType {
1837
+ /** Category axis (normally horizontal). */
1838
+ X = 0,
1839
+ /** Value axis (normally vertical). */
1840
+ Y = 1
1841
+ }
1842
+ /**
1843
+ * Specifies how to handle overlapping labels.
1844
+ */
1845
+ export declare enum OverlappingLabels {
1846
+ /**
1847
+ * Hide overlapping labels.
1848
+ */
1849
+ Auto = 0,
1850
+ /**
1851
+ * Show all labels, including overlapping ones.
1852
+ */
1853
+ Show = 1
1854
+ }
1855
+ /**
1856
+ * Axis interface.
1857
+ */
1858
+ export interface _IAxis {
1859
+ actualMin: number;
1860
+ actualMax: number;
1861
+ convert(val: number): number;
1862
+ }
1863
+ /**
1864
+ * Specifies whether and where the axis tick marks appear.
1865
+ */
1866
+ export declare enum TickMark {
1867
+ /** No tick marks appear. */
1868
+ None = 0,
1869
+ /** Tick marks appear outside the plot area. */
1870
+ Outside = 1,
1871
+ /** Tick marks appear inside the plot area. */
1872
+ Inside = 2,
1873
+ /** Tick marks cross the axis. */
1874
+ Cross = 3
1875
+ }
1876
+ /**
1877
+ * Axis groups display options.
1878
+ */
1879
+ export declare enum AxisGroupsDisplay {
1880
+ /** Hide groups */
1881
+ None = 0,
1882
+ /** Default group appearance */
1883
+ Show = 1,
1884
+ /** Show groups as grid */
1885
+ ShowGrid = 2
1886
+ }
1887
+ /**
1888
+ * Provides options for axis groups display.
1889
+ */
1890
+ export interface IAxisGroupsOptions {
1891
+ display: AxisGroupsDisplay;
1892
+ }
1893
+ /**
1894
+ * Represents an axis in the chart.
1895
+ */
1896
+ export declare class Axis implements _IAxis {
1897
+ _GRIDLINE_WIDTH: number;
1898
+ _LINE_WIDTH: number;
1899
+ _TICK_WIDTH: number;
1900
+ _TICK_HEIGHT: number;
1901
+ _TICK_OVERLAP: number;
1902
+ _TICK_LABEL_DISTANCE: number;
1903
+ private static MAX_MAJOR;
1904
+ private static MAX_MINOR;
1905
+ _chart: FlexChartCore;
1906
+ private _type;
1907
+ private _min;
1908
+ private _max;
1909
+ private _position;
1910
+ private _majorUnit;
1911
+ private _minorUnit;
1912
+ private _majorGrid;
1913
+ private _minorGrid;
1914
+ private _title;
1915
+ private _labelStyle;
1916
+ private _reversed;
1917
+ private _format;
1918
+ _actualMin: number;
1919
+ _actualMax: number;
1920
+ _axisType: AxisType;
1921
+ private _majorTickMarks;
1922
+ private _minorTickMarks;
1923
+ private _logBase;
1924
+ private _labels;
1925
+ private _labelAngle;
1926
+ private _labelAlign;
1927
+ private _axisLine;
1928
+ _plotrect: Rect;
1929
+ private _szTitle;
1930
+ _isTimeAxis: boolean;
1931
+ _lbls: string[];
1932
+ _values: number[];
1933
+ private _rects;
1934
+ private _name;
1935
+ private _origin;
1936
+ private _overlap;
1937
+ private _items;
1938
+ private _cv;
1939
+ private _binding;
1940
+ private _ifmt;
1941
+ private _tfmt;
1942
+ private static _id;
1943
+ private __uniqueId;
1944
+ private _parea;
1945
+ private _labelPadding;
1946
+ private _actualLabels;
1947
+ private _labelMin;
1948
+ private _labelMax;
1949
+ private _groupsPanel;
1950
+ private _groupsOptions;
1951
+ _axrect: Rect;
1952
+ _desiredSize: Size;
1953
+ _annoSize: Size;
1954
+ _annoSizeBase: Size;
1955
+ _hasOrigin: boolean;
1956
+ _hostElement: SVGGElement;
1957
+ _vals: any;
1958
+ /**
1959
+ * Initializes a new instance of the {@link Axis} class.
1960
+ *
1961
+ * @param position The position of the axis on the chart.
1962
+ */
1963
+ constructor(position?: Position);
1964
+ /**
1965
+ * Gets the axis host element.
1966
+ */
1967
+ readonly hostElement: SVGGElement;
1968
+ /**
1969
+ * Gets the actual axis minimum.
1970
+ *
1971
+ * It returns a number or a Date object (for time-based data).
1972
+ */
1973
+ readonly actualMin: any;
1974
+ /**
1975
+ * Gets the actual axis maximum.
1976
+ *
1977
+ * It returns a number or a Date object (for time-based data).
1978
+ */
1979
+ readonly actualMax: any;
1980
+ /**
1981
+ * Gets or sets the minimum value shown on the axis.
1982
+ *
1983
+ * The value can be a number or a Date object (for time-based data).
1984
+ *
1985
+ * The default value for this property is <b>null</b>, which causes
1986
+ * the chart to calculate the minimum value based on the data.
1987
+ */
1988
+ min: any;
1989
+ /**
1990
+ * Gets or sets the maximum value shown on the axis.
1991
+ *
1992
+ * The value can be a number or a Date object (for time-based data).
1993
+ *
1994
+ * The default value for this property is <b>null</b>, which causes
1995
+ * the chart to calculate the maximum value based on the data.
1996
+ */
1997
+ max: any;
1998
+ /**
1999
+ * Gets or sets a value indicating whether the axis is
2000
+ * reversed (top to bottom or right to left).
2001
+ *
2002
+ * The default value for this property is <b>false</b>.
2003
+ */
2004
+ reversed: boolean;
2005
+ /**
2006
+ * Gets or sets the position of the axis with respect to the plot area.
2007
+ */
2008
+ position: Position;
2009
+ /**
2010
+ * Gets or sets the number of units between axis labels.
2011
+ *
2012
+ * If the axis contains date values, then the units are
2013
+ * expressed in days.
2014
+ */
2015
+ majorUnit: number;
2016
+ /**
2017
+ * Gets or sets the number of units between minor axis ticks.
2018
+ *
2019
+ * If the axis contains date values, then the units are
2020
+ * expressed in days.
2021
+ */
2022
+ minorUnit: number;
2023
+ /**
2024
+ * Gets or sets the axis name.
2025
+ */
2026
+ name: string;
2027
+ /**
2028
+ * Gets or sets the title text shown next to the axis.
2029
+ */
2030
+ title: string;
2031
+ /**
2032
+ * Gets or sets the format string used for the axis labels
2033
+ * (see {@link Globalize}).
2034
+ */
2035
+ format: string;
2036
+ /**
2037
+ * Gets or sets a value indicating whether the axis includes grid lines.
2038
+ */
2039
+ majorGrid: boolean;
2040
+ /**
2041
+ * Gets or sets the location of the axis tick marks.
2042
+ */
2043
+ majorTickMarks: TickMark;
2044
+ /**
2045
+ * Gets or sets a value indicating whether the axis includes minor grid lines.
2046
+ */
2047
+ minorGrid: boolean;
2048
+ /**
2049
+ * Gets or sets the location of the minor axis tick marks.
2050
+ */
2051
+ minorTickMarks: TickMark;
2052
+ /**
2053
+ * Gets or sets a value indicating whether the axis line is visible.
2054
+ *
2055
+ * The default value for this property is <b>true</b>.
2056
+ */
2057
+ axisLine: boolean;
2058
+ /**
2059
+ * Gets or sets a value indicating whether the axis labels are visible.
2060
+ *
2061
+ * The default value for this property is <b>true</b>.
2062
+ */
2063
+ labels: boolean;
2064
+ /**
2065
+ * Gets or sets the label alignment.
2066
+ *
2067
+ * By default the labels are centered. The supported values are
2068
+ * 'left' and 'right for the X-axis, 'top' and 'bottom' for the Y-axis.
2069
+ */
2070
+ labelAlign: string;
2071
+ /**
2072
+ * Gets or sets the rotation angle of the axis labels.
2073
+ *
2074
+ * The angle is measured in degrees with valid values
2075
+ * ranging from -90 to 90.
2076
+ */
2077
+ labelAngle: number;
2078
+ /**
2079
+ * Gets or sets a value that determines whether the minimum axis value should be always labeled.
2080
+ *
2081
+ * The default value for this property is **false**.
2082
+ */
2083
+ labelMin: boolean;
2084
+ /**
2085
+ * Gets or sets a value that determines whether the maximum axis value should be always labeled.
2086
+ *
2087
+ * The default value for this property is **false**.
2088
+ */
2089
+ labelMax: boolean;
2090
+ /**
2091
+ * Gets or sets the value at which an axis crosses the perpendicular axis.
2092
+ **/
2093
+ origin: number;
2094
+ /**
2095
+ * Gets or sets a value indicating how to handle overlapping axis labels.
2096
+ *
2097
+ * The default value for this property is <b>OverlappingLabels.Auto</b>.
2098
+ */
2099
+ overlappingLabels: OverlappingLabels;
2100
+ /**
2101
+ * Gets or sets the items source for the axis labels.
2102
+ *
2103
+ * Names of the properties are specified by the {@link Axis.binding} property.
2104
+ *
2105
+ * For example:
2106
+ *
2107
+ * <pre>
2108
+ * // default value for Axis.binding is 'value,text'
2109
+ * chart.axisX.itemsSource = [ { value:1, text:'one' }, { value:2, text:'two' } ];
2110
+ * </pre>
2111
+ */
2112
+ itemsSource: any;
2113
+ /**
2114
+ * Gets or sets the comma-separated property names for the
2115
+ * {@link Axis.itemsSource} property to use in axis labels.
2116
+ *
2117
+ * The first name specifies the value on the axis, the second represents the corresponding
2118
+ * axis label. The default value is 'value,text'.
2119
+ */
2120
+ binding: string;
2121
+ /**
2122
+ * Gets or sets the itemFormatter function for the axis labels.
2123
+ *
2124
+ * If specified, the function takes two parameters:
2125
+ * <ul>
2126
+ * <li><b>render engine</b>: The {@link IRenderEngine} object to be used
2127
+ * in formatting the labels.</li>
2128
+ * <li><b>current label</b>: An object with the following properties:
2129
+ * <ul>
2130
+ * <li><b>value</b>: The value of the axis label to format.</li>
2131
+ * <li><b>text</b>: The text to use in the label.</li>
2132
+ * <li><b>pos</b>: The position in control coordinates at which
2133
+ * the label is to be rendered.</li>
2134
+ * <li><b>cls</b>: The CSS class to be applied to the label.</li>
2135
+ * </ul></li>
2136
+ * </ul>
2137
+ *
2138
+ * The function returns the label parameters of labels for which
2139
+ * properties are modified.
2140
+ *
2141
+ * For example:
2142
+ * <pre>
2143
+ * chart.axisY.itemFormatter = function(engine, label) {
2144
+ * if (label.val &gt; 5){
2145
+ * engine.textFill = 'red'; // red text
2146
+ * label.cls = null; // no default CSS
2147
+ * }
2148
+ * return label;
2149
+ * }
2150
+ * </pre>
2151
+ */
2152
+ itemFormatter: Function;
2153
+ /**
2154
+ * Gets or sets the logarithmic base of the axis.
2155
+ *
2156
+ * If the base is not specified the axis uses a linear scale.
2157
+ *
2158
+ * Use the {@link logBase} property to spread data that is clustered
2159
+ * around the origin. This is common in several financial and economic
2160
+ * data sets.
2161
+ */
2162
+ logBase: number;
2163
+ /**
2164
+ * Gets or sets label groups settings for the axis.
2165
+ *
2166
+ * Label groups are created by modifying the {@link ICollectionView.groupDescriptions}
2167
+ * property of the {@link ICollectionView} object used as an {@link FlexChart.itemsSource}.
2168
+ *
2169
+ * The default value is **null** and the axis label groups are not displayed.
2170
+ *
2171
+ * To display groups you should create groups in collection view and specify the groupsOptions for the axis.
2172
+ *
2173
+ * For example,
2174
+ *
2175
+ * ```typescript
2176
+ * let view = new CollectionView( getData(), {
2177
+ * groupDescriptions: [
2178
+ * new PropertyGroupDescription('category'),
2179
+ * new PropertyGroupDescription('subCategory')]
2180
+ * });
2181
+ * const chart = new FlexChart('#theChart', {
2182
+ * itemsSource: view,
2183
+ * bindingX: 'product',
2184
+ * series: [ { binding:'sales' } ],
2185
+ * axisX: { groupsOptions: { display : AxisGroupsDisplay.Show } },
2186
+ * });
2187
+ * ```
2188
+ */
2189
+ groupsOptions: IAxisGroupsOptions;
2190
+ /**
2191
+ * Gets the array with actual axis labels.
2192
+ */
2193
+ readonly axisLabels: string[];
2194
+ _getLogBase(): number;
2195
+ _isLogAxis(): boolean;
2196
+ /**
2197
+ * Gets or sets the plot area for the axis.
2198
+ */
2199
+ plotArea: PlotArea;
2200
+ /**
2201
+ * Gets or sets the label padding, in pixels.
2202
+ *
2203
+ * The default value for this property is <b>5</b> pixels.
2204
+ */
2205
+ labelPadding: number;
2206
+ readonly _groupClass: string;
2207
+ /**
2208
+ * Occurs when the axis range changes.
2209
+ */
2210
+ readonly rangeChanged: Event<Axis, EventArgs>;
2211
+ /**
2212
+ * Raises the {@link rangeChanged} event.
2213
+ */
2214
+ onRangeChanged(e?: EventArgs): void;
2215
+ _getPosition(): Position;
2216
+ _isOverlapped(engine: IRenderEngine, w: number, lblClass: string, axisType: AxisType): boolean;
2217
+ _actualAngle: number;
2218
+ /**
2219
+ * Calculates the axis height.
2220
+ *
2221
+ * @param engine Rendering engine.
2222
+ * @param maxw Max width.
2223
+ */
2224
+ _getHeight(engine: IRenderEngine, maxw: number): number;
2225
+ _updateAutoFormat(delta: number): number;
2226
+ _getActualRange(): number;
2227
+ _updateActualLimitsByChartType(labels: any, min: any, max: any): {
2228
+ min: any;
2229
+ max: any;
2230
+ };
2231
+ /**
2232
+ * Update the actual axis limits based on a specified data range.
2233
+ *
2234
+ * @param dataType Data type.
2235
+ * @param dataMin Data minimum.
2236
+ * @param dataMax Data maximum.
2237
+ * @param labels Category labels(category axis).
2238
+ * @param values Values(value axis).
2239
+ */
2240
+ _updateActualLimits(dataType: DataType, dataMin: number, dataMax: number, labels?: string[], values?: number[]): void;
2241
+ /**
2242
+ * Set the axis position.
2243
+ *
2244
+ * @param axisRect Axis rectangle.
2245
+ * @param plotRect Plot area rectangle.
2246
+ */
2247
+ _layout(axisRect: Rect, plotRect: Rect): void;
2248
+ _hasVisibileSeries(): boolean;
2249
+ /**
2250
+ * Render the axis.
2251
+ *
2252
+ * @param engine Rendering engine.
2253
+ */
2254
+ _render(engine: IRenderEngine): void;
2255
+ _renderLineAndTitle(engine: any): void;
2256
+ _renderMinor(engine: any, vals: any, isCategory: any): void;
2257
+ _renderRotatedText(engine: IRenderEngine, val: any, text: string, pos: Point, halign: any, valign: any, center: Point, angle: number, className: string, groupClassName?: string, style?: any): void;
2258
+ _getFormattedItem(engine: IRenderEngine, val: any, text: string, pos: Point, className: string, readOnly?: boolean): {
2259
+ val: any;
2260
+ text: string;
2261
+ pos: Point;
2262
+ cls: string;
2263
+ };
2264
+ _renderLabelsAndTicks(engine: any, index: any, val: any, sval: any, labelAngle: any, tickMarks: any, showLabel: any, t1: any, t2: any): boolean;
2265
+ _xCross(x: number): boolean;
2266
+ _createMinors(engine: IRenderEngine, vals: number[], isVert: boolean, isNear: boolean, isCategory: boolean): void;
2267
+ _renderMinors(engine: IRenderEngine, ticks: number[], isVert: boolean, isNear: boolean): void;
2268
+ _renderLabel(engine: IRenderEngine, val: number, text: string, pos: Point, ha: any, va: any, className?: string): boolean;
2269
+ private _renderRotatedLabel;
2270
+ private _getLabelAlign;
2271
+ _addMinMaxLabels(vals: number[], lbls: string[]): void;
2272
+ _customConvert: Function;
2273
+ _customConvertBack: Function;
2274
+ /**
2275
+ * Converts the specified value from data to pixel coordinates.
2276
+ *
2277
+ * @param val The data value to convert.
2278
+ * @param maxValue The max value of the data, it's optional.
2279
+ * @param minValue The min value of the data, it's optional.
2280
+ */
2281
+ convert(val: number, maxValue?: number, minValue?: number): number;
2282
+ /**
2283
+ * Converts the specified value from pixel to data coordinates.
2284
+ *
2285
+ * @param val The pixel coordinates to convert back.
2286
+ */
2287
+ convertBack(val: number): number;
2288
+ /**
2289
+ * Gets the axis type.
2290
+ */
2291
+ readonly axisType: AxisType;
2292
+ _getMinNum(): number;
2293
+ _getMaxNum(): number;
2294
+ _getTitleSize(): Size;
2295
+ private _invalidate;
2296
+ private _cvCollectionChanged;
2297
+ private _createLabels;
2298
+ private _createLogarithmicLabels;
2299
+ _createTimeLabels(start: number, len: number, vals: number[], lbls: string[]): void;
2300
+ _formatValue(val: number): string;
2301
+ _hitTest(point: Point): any;
2302
+ private _formatAxisValue;
2303
+ private _findFormat;
2304
+ private _calcMajorUnit;
2305
+ private _getAnnoNumber;
2306
+ private _nicePrecision;
2307
+ private _niceTickNumber;
2308
+ _niceNumber(x: number, exp: number, round: boolean): number;
2309
+ readonly _uniqueId: number;
2310
+ }
2311
+ /**
2312
+ * Represents a collection of {@link Axis} objects in a {@link FlexChart} control.
2313
+ */
2314
+ export declare class AxisCollection extends ObservableArray {
2315
+ /**
2316
+ * Gets an axis by name.
2317
+ *
2318
+ * @param name The name of the axis to look for.
2319
+ * @return The axis object with the specified name, or null if not found.
2320
+ */
2321
+ getAxis(name: string): Axis;
2322
+ /**
2323
+ * Gets the index of an axis by name.
2324
+ *
2325
+ * @param name The name of the axis to look for.
2326
+ * @return The index of the axis with the specified name, or -1 if not found.
2327
+ */
2328
+ indexOf(name: string): number;
2329
+ }
2330
+ export declare class _AxisLabel {
2331
+ private _value;
2332
+ private _label;
2333
+ private _start;
2334
+ private _end;
2335
+ private _rect;
2336
+ constructor(label: string, start: number, length: number);
2337
+ readonly value: number;
2338
+ readonly label: string;
2339
+ readonly start: number;
2340
+ readonly end: number;
2341
+ rect: Rect;
2342
+ }
2343
+ declare class _AxisGroup {
2344
+ private _labels;
2345
+ private _index;
2346
+ private _size;
2347
+ private _level;
2348
+ private _last;
2349
+ constructor(level: number, last?: boolean);
2350
+ readonly labels: _AxisLabel[];
2351
+ index: number;
2352
+ height: number;
2353
+ width: number;
2354
+ readonly level: number;
2355
+ getSize(engine: IRenderEngine, className?: string, groupClass?: string): Size;
2356
+ render(engine: IRenderEngine, axis: Axis, value: number, className?: string, groupClass?: string): void;
2357
+ hitTest(point: Point): _AxisLabel;
2358
+ private renderLinesX;
2359
+ private renderLinesY;
2360
+ private drawLine;
2361
+ private _trimText;
2362
+ }
2363
+ export declare class _AxisGroups {
2364
+ private _groups;
2365
+ private _axis;
2366
+ private _height;
2367
+ private _margin;
2368
+ constructor(axis: Axis);
2369
+ readonly groups: _AxisGroup[];
2370
+ readonly axis: Axis;
2371
+ createGroups(): void;
2372
+ private createGroup;
2373
+ private layoutGroups;
2374
+ getHeight(engine: IRenderEngine): number;
2375
+ layout(): void;
2376
+ render(engine: IRenderEngine): void;
2377
+ hitTest(point: Point): _AxisLabel;
2378
+ }
2379
+ export declare class _DataPoint {
2380
+ private _seriesIndex;
2381
+ private _pointIndex;
2382
+ private _dataX;
2383
+ private _dataY;
2384
+ constructor(seriesIndex: number, pointIndex: number, dataX: number, dataY: number);
2385
+ readonly seriesIndex: number;
2386
+ readonly pointIndex: number;
2387
+ dataX: number;
2388
+ dataY: number;
2389
+ }
2390
+ export declare enum _MeasureOption {
2391
+ X = 0,
2392
+ Y = 1,
2393
+ XY = 2
2394
+ }
2395
+ export declare class _RectArea implements _IHitArea {
2396
+ private _rect;
2397
+ constructor(rect: Rect);
2398
+ readonly rect: Rect;
2399
+ tag: any;
2400
+ ignoreLabel: boolean;
2401
+ contains(pt: Point): boolean;
2402
+ pointDistance(pt1: Point, pt2: Point, option: _MeasureOption): number;
2403
+ distance(pt: Point): number;
2404
+ }
2405
+ export declare class _CircleArea implements _IHitArea {
2406
+ private _center;
2407
+ private _rad;
2408
+ private _rad2;
2409
+ tag: any;
2410
+ ignoreLabel: boolean;
2411
+ constructor(center: Point, radius: number);
2412
+ setRadius(radius: number): void;
2413
+ readonly center: Point;
2414
+ contains(pt: Point): boolean;
2415
+ distance(pt: Point): number;
2416
+ }
2417
+ export declare class _LinesArea implements _IHitArea {
2418
+ private _x;
2419
+ private _y;
2420
+ tag: any;
2421
+ ignoreLabel: boolean;
2422
+ constructor(x: any, y: any);
2423
+ contains(pt: Point): boolean;
2424
+ distance(pt: Point): number;
2425
+ }
2426
+ export declare class _HitResult {
2427
+ area: _IHitArea;
2428
+ distance: number;
2429
+ }
2430
+ export declare class _HitTester {
2431
+ _chart: FlexChartCore;
2432
+ _map: {
2433
+ [key: number]: Array<_IHitArea>;
2434
+ };
2435
+ constructor(chart: FlexChartCore);
2436
+ add(area: _IHitArea, seriesIndex: number): void;
2437
+ clear(): void;
2438
+ hitTest(pt: Point, testLines?: boolean): _HitResult;
2439
+ hitTestSeries(pt: Point, seriesIndex: any): _HitResult;
2440
+ }
2441
+ /**
2442
+ * Specifies the type of chart element found by the hitTest method.
2443
+ */
2444
+ export declare enum ChartElement {
2445
+ /** The area within the axes. */
2446
+ PlotArea = 0,
2447
+ /** X-axis. */
2448
+ AxisX = 1,
2449
+ /** Y-axis. */
2450
+ AxisY = 2,
2451
+ /** The area within the control but outside the axes. */
2452
+ ChartArea = 3,
2453
+ /** The chart legend. */
2454
+ Legend = 4,
2455
+ /** The chart header. */
2456
+ Header = 5,
2457
+ /** The chart footer. */
2458
+ Footer = 6,
2459
+ /** A chart series. */
2460
+ Series = 7,
2461
+ /** A chart series symbol. */
2462
+ SeriesSymbol = 8,
2463
+ /** A data label. */
2464
+ DataLabel = 9,
2465
+ /** No chart element. */
2466
+ None = 10
2467
+ }
2468
+ /**
2469
+ * Contains information about a part of a {@link FlexChart} control at
2470
+ * a specified page coordinate.
2471
+ */
2472
+ export declare class HitTestInfo {
2473
+ private _chart;
2474
+ private _pt;
2475
+ private _series;
2476
+ private _pointIndex;
2477
+ _chartElement: ChartElement;
2478
+ _dist: number;
2479
+ private _item;
2480
+ private _x;
2481
+ private __xfmt;
2482
+ private _y;
2483
+ private __yfmt;
2484
+ private _name;
2485
+ private _groupIndex;
2486
+ /**
2487
+ * Initializes a new instance of the {@link HitTestInfo} class.
2488
+ *
2489
+ * @param chart The chart control.
2490
+ * @param point The original point in window coordinates.
2491
+ * @param element The chart element.
2492
+ */
2493
+ constructor(chart: FlexChartBase, point: Point, element?: ChartElement);
2494
+ /**
2495
+ * Gets the {@link FlexChartBase} that owns this {@link HitTestInfo}.
2496
+ */
2497
+ readonly chart: FlexChartBase;
2498
+ /**
2499
+ * Gets the point, in control coordinates,
2500
+ * that this {@link HitTestInfo} refers to.
2501
+ */
2502
+ readonly point: Point;
2503
+ /**
2504
+ * Gets the chart series at the specified coordinates.
2505
+ */
2506
+ readonly series: SeriesBase;
2507
+ /**
2508
+ * Gets the data point index at the specified coordinates.
2509
+ */
2510
+ readonly pointIndex: number;
2511
+ /**
2512
+ * Gets the chart element at the specified coordinates.
2513
+ */
2514
+ readonly chartElement: ChartElement;
2515
+ /**
2516
+ * Gets the distance to the closest data point.
2517
+ */
2518
+ readonly distance: number;
2519
+ /**
2520
+ * Gets the data object that corresponds to the closest data point.
2521
+ */
2522
+ readonly item: any;
2523
+ /**
2524
+ * Gets the x-value of the closest data point.
2525
+ */
2526
+ readonly x: any;
2527
+ /**
2528
+ * Gets the y-value of the closest data point.
2529
+ */
2530
+ readonly y: any;
2531
+ readonly value: any;
2532
+ readonly name: any;
2533
+ /**
2534
+ * Gets the group index for the closest data point.
2535
+ */
2536
+ readonly groupIndex: number;
2537
+ readonly _xfmt: any;
2538
+ readonly _yfmt: any;
2539
+ _setData(series: SeriesBase, pi?: number): void;
2540
+ _setDataGroup(gi: number, pi: number): void;
2541
+ _setName(name: string): void;
2542
+ _setDataPoint(dataPoint: _DataPoint): void;
2543
+ _getValueFmt(): any;
2544
+ private _getValue;
2545
+ private readonly ax;
2546
+ private readonly ay;
2547
+ }
2548
+ /**
2549
+ * Specifies whether and where the Series is visible.
2550
+ */
2551
+ export declare enum SeriesVisibility {
2552
+ /** The series is visible on the plot and in the legend. */
2553
+ Visible = 0,
2554
+ /** The series is visible only on the plot. */
2555
+ Plot = 1,
2556
+ /** The series is visible only in the legend. */
2557
+ Legend = 2,
2558
+ /** The series is hidden. */
2559
+ Hidden = 3
2560
+ }
2561
+ /**
2562
+ * Specifies the type of marker to use for the {@link Series.symbolMarker}
2563
+ * property.
2564
+ *
2565
+ * Applies to Scatter, LineSymbols, and SplineSymbols chart types.
2566
+ */
2567
+ export declare enum Marker {
2568
+ /**
2569
+ * Uses a circle to mark each data point.
2570
+ */
2571
+ Dot = 0,
2572
+ /**
2573
+ * Uses a square to mark each data point.
2574
+ */
2575
+ Box = 1
2576
+ }
2577
+ /**
2578
+ * Data series interface
2579
+ */
2580
+ export interface _ISeries {
2581
+ style: any;
2582
+ symbolStyle: any;
2583
+ getValues: (dim: number) => number[];
2584
+ getDataType: (dim: number) => DataType;
2585
+ drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): any;
2586
+ measureLegendItem(engine: IRenderEngine, index: number): Size;
2587
+ _setPointIndex(pointIndex: number, elementIndex: number): any;
2588
+ }
2589
+ export declare class DataArray {
2590
+ dataType: DataType;
2591
+ values: Array<number>;
2592
+ }
2593
+ /**
2594
+ * Provides arguments for {@link Series} events.
2595
+ */
2596
+ export declare class SeriesEventArgs extends EventArgs {
2597
+ _series: SeriesBase;
2598
+ /**
2599
+ * Initializes a new instance of the {@link SeriesEventArgs} class.
2600
+ *
2601
+ * @param series Specifies the {@link Series} object affected by this event.
2602
+ */
2603
+ constructor(series: SeriesBase);
2604
+ /**
2605
+ * Gets the {@link Series} object affected by this event.
2606
+ */
2607
+ readonly series: SeriesBase;
2608
+ }
2609
+ /**
2610
+ * Represents a series of data points to display in the chart.
2611
+ */
2612
+ export declare class SeriesBase implements _ISeries {
2613
+ static _LEGEND_ITEM_WIDTH: number;
2614
+ static _LEGEND_ITEM_HEIGHT: number;
2615
+ static _LEGEND_ITEM_MARGIN: number;
2616
+ private static _DEFAULT_SYM_SIZE;
2617
+ __chart: FlexChartCore;
2618
+ private _name;
2619
+ private _binding;
2620
+ private _showValues;
2621
+ private _symbolStyle;
2622
+ private _symbolSize;
2623
+ private _style;
2624
+ private _altStyle;
2625
+ _cv: ICollectionView;
2626
+ private _itemsSource;
2627
+ private _values;
2628
+ private _valueDataType;
2629
+ _chartType: ChartType;
2630
+ private _symbolMarker;
2631
+ private _bindingX;
2632
+ private _xvalues;
2633
+ private _xvalueDataType;
2634
+ private _cssClass;
2635
+ private _visibility;
2636
+ private _axisX;
2637
+ private _axisY;
2638
+ private __plotter;
2639
+ private _interpolateNulls;
2640
+ private _tooltipContent;
2641
+ private _itemFormatter;
2642
+ private _cache;
2643
+ _legendElement: SVGAElement;
2644
+ _hostElement: SVGGElement;
2645
+ _pointIndexes: number[];
2646
+ /**
2647
+ * Initializes a new instance of the {@link SeriesBase} class.
2648
+ *
2649
+ * @param options JavaScript object containing initialization data for the object.
2650
+ */
2651
+ constructor(options?: any);
2652
+ /**
2653
+ * Gets or sets a value that determines whether to interpolate
2654
+ * null values in the data.
2655
+ *
2656
+ * If true, the series interpolates the value of any missing data
2657
+ * based on neighboring points. If false, it leaves a break in
2658
+ * lines and areas at the points with null values.
2659
+ *
2660
+ * The default value for this property is <b>false</b>.
2661
+ */
2662
+ interpolateNulls: boolean;
2663
+ /**
2664
+ * Gets or sets the series style.
2665
+ */
2666
+ style: any;
2667
+ /**
2668
+ * Gets or sets the alternate style for the series.
2669
+ *
2670
+ * The alternate style is used for negative values in Bar, Column,
2671
+ * and Scatter charts; and for rising values in financial chart types
2672
+ * like Candlestick, LineBreak, EquiVolume etc.
2673
+ *
2674
+ * The default value for this property is <b>null</b>, which causes the
2675
+ * series to use the default style.
2676
+ */
2677
+ altStyle: any;
2678
+ /**
2679
+ * Gets or sets the series symbol style.
2680
+ *
2681
+ * Applies to Bar, Column, Scatter, LineSymbols, and SplineSymbols chart types.
2682
+ */
2683
+ symbolStyle: any;
2684
+ /**
2685
+ * Gets or sets the size (in pixels) of the symbols used to render this {@link Series}.
2686
+ * Applies to Scatter, LineSymbols, and SplineSymbols chart types.
2687
+ *
2688
+ * The default value for this property is <b>10</b> pixels.
2689
+ */
2690
+ symbolSize: number;
2691
+ /**
2692
+ * Gets or sets the shape of marker to use for each data point in the series.
2693
+ * Applies to Scatter, LineSymbols, and SplineSymbols chart types.
2694
+ *
2695
+ * The default value for this property is <b>Marker.Dot</b>.
2696
+ */
2697
+ symbolMarker: Marker;
2698
+ /**
2699
+ * Gets or sets the name of the property that contains Y values for the series.
2700
+ */
2701
+ binding: string;
2702
+ /**
2703
+ * Gets or sets the name of the property that contains X values for the series.
2704
+ */
2705
+ bindingX: string;
2706
+ /**
2707
+ * Gets or sets the series name.
2708
+ *
2709
+ * The series name is displayed in the chart legend. Any series without a name
2710
+ * does not appear in the legend.
2711
+ */
2712
+ name: string;
2713
+ /**
2714
+ * Gets or sets the array or {@link ICollectionView} object that contains the series data.
2715
+ */
2716
+ itemsSource: any;
2717
+ /**
2718
+ * Gets the {@link ICollectionView} object that contains the data for this series.
2719
+ */
2720
+ readonly collectionView: ICollectionView;
2721
+ /**
2722
+ * Gets the {@link FlexChart} object that owns this series.
2723
+ */
2724
+ readonly chart: FlexChartCore;
2725
+ /**
2726
+ * Gets the series host element.
2727
+ */
2728
+ readonly hostElement: SVGGElement;
2729
+ /**
2730
+ * Gets the series element in the legend.
2731
+ */
2732
+ readonly legendElement: SVGGElement;
2733
+ /**
2734
+ * Gets or sets the series CSS class.
2735
+ */
2736
+ cssClass: string;
2737
+ /**
2738
+ * Gets or sets an enumerated value indicating whether and where the series appears.
2739
+ *
2740
+ * The default value for this property is <b>SeriesVisibility.Visible</b>.
2741
+ */
2742
+ visibility: SeriesVisibility;
2743
+ /**
2744
+ * Gets or sets the series specific tooltip content.
2745
+ *
2746
+ * The property overrides the content of chart tooltip content.
2747
+ */
2748
+ tooltipContent: any;
2749
+ /**
2750
+ * Gets or sets the item formatter function that allows you to customize
2751
+ * the appearance of the series.
2752
+ *
2753
+ * The property overrides the chart's itemFormatter {@link wijmo.chart.FlexChart.itemFormatter}.
2754
+ */
2755
+ itemFormatter: Function;
2756
+ /**
2757
+ * Gets a {@link HitTestInfo} object with information about the specified point.
2758
+ *
2759
+ * @param pt The point to investigate, in window coordinates.
2760
+ * @param y The Y coordinate of the point (if the first parameter is a number).
2761
+ */
2762
+ hitTest(pt: any, y?: number): HitTestInfo;
2763
+ /**
2764
+ * Gets the plot element that corresponds to the specified point index.
2765
+ *
2766
+ * @param pointIndex The index of the data point.
2767
+ */
2768
+ getPlotElement(pointIndex: number): any;
2769
+ /**
2770
+ * Gets or sets the X-axis for the series.
2771
+ */
2772
+ axisX: Axis;
2773
+ /**
2774
+ * Gets or sets the Y-axis for the series.
2775
+ */
2776
+ axisY: Axis;
2777
+ /**
2778
+ * Initializes the series by copying the properties from a given object.
2779
+ *
2780
+ * @param options JavaScript object containing initialization data for the series.
2781
+ */
2782
+ initialize(options: any): void;
2783
+ /**
2784
+ * Converts a {@link Point} from control coordinates to series data coordinates.
2785
+ *
2786
+ * @param pt The point to convert, in control coordinates.
2787
+ * @return The point in series data coordinates.
2788
+ */
2789
+ pointToData(pt: Point): Point;
2790
+ /**
2791
+ * Converts a {@link Point} from series data coordinates to control coordinates.
2792
+ *
2793
+ * @param pt {@link Point} in series data coordinates.
2794
+ * @return The {@link Point} in control coordinates.
2795
+ */
2796
+ dataToPoint(pt: Point): Point;
2797
+ /**
2798
+ * Occurs when series is rendering.
2799
+ */
2800
+ readonly rendering: Event<SeriesBase, SeriesRenderingEventArgs>;
2801
+ /**
2802
+ * Raises the {@link rendering} event.
2803
+ *
2804
+ * @param engine The {@link IRenderEngine} object used to render the series.
2805
+ * @param index The index of the series to render.
2806
+ * @param count Total number of the series to render.
2807
+ */
2808
+ onRendering(engine: IRenderEngine, index: number, count: number): boolean;
2809
+ /**
2810
+ * Occurs when series is rendered.
2811
+ */
2812
+ readonly rendered: Event<SeriesBase, RenderEventArgs>;
2813
+ /**
2814
+ * Raises the {@link rendered} event.
2815
+ *
2816
+ * @param engine The {@link IRenderEngine} object used to render the series.
2817
+ */
2818
+ onRendered(engine: IRenderEngine): void;
2819
+ _chart: FlexChartCore;
2820
+ _getSymbolSize(): number;
2821
+ _plotter: _IPlotter;
2822
+ getDataType(dim: number): DataType;
2823
+ getValues(dim: number): number[];
2824
+ /**
2825
+ * Draw a legend item at the specified position.
2826
+ *
2827
+ * @param engine The rendering engine to use.
2828
+ * @param rect The position of the legend item.
2829
+ * @param index Index of legend item(for series with multiple legend items).
2830
+ */
2831
+ drawLegendItem(engine: IRenderEngine, rect: Rect, index: number): void;
2832
+ private _getLegendStyle;
2833
+ /**
2834
+ * Measures height and width of the legend item.
2835
+ *
2836
+ * @param engine The rendering engine to use.
2837
+ * @param index Index of legend item(for series with multiple legend items).
2838
+ */
2839
+ measureLegendItem(engine: IRenderEngine, index: number): Size;
2840
+ /**
2841
+ * Returns number of series items in the legend.
2842
+ */
2843
+ legendItemLength(): number;
2844
+ /**
2845
+ * Returns the series bounding rectangle in data coordinates.
2846
+ *
2847
+ * If getDataRect() returns null, the limits are calculated automatically based on the data values.
2848
+ *
2849
+ * @param currentRect The current rectangle of chart. This parameter is optional.
2850
+ * @param calculatedRect The calculated rectangle of chart. This parameter is optional.
2851
+ */
2852
+ getDataRect(currentRect?: Rect, calculatedRect?: Rect): Rect;
2853
+ _getChartType(): ChartType;
2854
+ /**
2855
+ * Clears any cached data values.
2856
+ */
2857
+ _clearValues(): void;
2858
+ _getBinding(index: number): string;
2859
+ _getBindingValues(index: number): number[];
2860
+ _getItem(pointIndex: number): any;
2861
+ _getLength(): number;
2862
+ _setPointIndex(pointIndex: number, elementIndex: number): void;
2863
+ private _getDataRect;
2864
+ _isCustomAxisX(): boolean;
2865
+ _isCustomAxisY(): boolean;
2866
+ _getAxisX(): Axis;
2867
+ _getAxisY(): Axis;
2868
+ _measureLegendItem(engine: IRenderEngine, text: string): Size;
2869
+ _drawFunnelLegendItem(engine: IRenderEngine, rect: Rect, index: number, style: any, symbolStyle: any): void;
2870
+ private _getFunnelLegendName;
2871
+ _drawLegendItem(engine: IRenderEngine, rect: Rect, chartType: ChartType, text: string, style: any, symbolStyle: any): void;
2872
+ private _cvCollectionChanged;
2873
+ private _cvCurrentChanged;
2874
+ _bindValues(items: Array<any>, binding: string, isX?: boolean): DataArray;
2875
+ _invalidate(): void;
2876
+ _indexToPoint(pointIndex: number): Point;
2877
+ _getSymbolFill(seriesIndex?: number): string;
2878
+ _getSymbolStroke(seriesIndex?: number): string;
2879
+ _getAltSymbolStroke(seriesIndex?: number): string;
2880
+ _getAltSymbolFill(seriesIndex?: number): string;
2881
+ _renderLabels(engine: IRenderEngine, smap: _IHitArea[], chart: FlexChartCore, lblAreas: _RectArea[]): void;
2882
+ }
2883
+ /**
2884
+ * Represents a series of data points to display in the chart.
2885
+ *
2886
+ * The {@link Series} class supports all basic chart types. You may define
2887
+ * a different chart type on each {@link Series} object that you add to the
2888
+ * {@link FlexChart} series collection. This overrides the {@link chartType}
2889
+ * property set on the chart that is the default for all {@link Series} objects
2890
+ * in its collection.
2891
+ */
2892
+ export declare class Series extends SeriesBase {
2893
+ /**
2894
+ * Gets or sets the chart type for a specific series, overriding the chart type
2895
+ * set on the overall chart.
2896
+ *
2897
+ * The default value for this property is <b>null</b>, which causes the
2898
+ * series to use chart type defined by the parent chart.
2899
+ */
2900
+ chartType: ChartType;
2901
+ }
2902
+ /**
2903
+ * The {@link FlexPie} control provides pie and doughnut charts with selectable
2904
+ * slices.
2905
+ *
2906
+ * To use the {@link FlexPie} control, set the {@link FlexPie.itemsSource} property
2907
+ * to an array containing the data and use the {@link FlexPie.binding} and
2908
+ * {@link FlexPie.bindingName} properties to set the properties that contain
2909
+ * the item values and names.
2910
+ */
2911
+ export declare class FlexPie extends FlexChartBase {
2912
+ private static _MARGIN;
2913
+ private static _CSS_GROUP_TITLE;
2914
+ private _binding;
2915
+ private _bindingName;
2916
+ _areas: any[];
2917
+ private _keywords;
2918
+ private _startAngle;
2919
+ private _innerRadius;
2920
+ private _offset;
2921
+ private _reversed;
2922
+ private _isAnimated;
2923
+ private _selectedItemPosition;
2924
+ private _selectedItemOffset;
2925
+ private _pieGroups;
2926
+ _rotationAngles: number[];
2927
+ private _centers;
2928
+ _radius: number;
2929
+ private _selectedOffset;
2930
+ private _selectedIndex;
2931
+ private _angles;
2932
+ private _selectionAnimationID;
2933
+ private _colRowLens;
2934
+ private _lbl;
2935
+ private _titles;
2936
+ private _innerText;
2937
+ private _innerTextStyle;
2938
+ private _chartsPerLine;
2939
+ _values: number[][];
2940
+ _labels: string[];
2941
+ _pels: any[];
2942
+ _sum: number;
2943
+ _sums: number[];
2944
+ _bindingSeparator: string;
2945
+ /**
2946
+ * Initializes a new instance of the {@link FlexPie} class.
2947
+ *
2948
+ * @param element The DOM element that hosts the control, or a selector for the host element (e.g. '#theCtrl').
2949
+ * @param options A Javascript object containing initialization data for the control.
2950
+ */
2951
+ constructor(element: any, options?: any);
2952
+ /**
2953
+ * Gets or sets the name of the property that contains the chart values.
2954
+ */
2955
+ binding: string;
2956
+ /**
2957
+ * Gets or sets the name of the property that contains the name of the data items.
2958
+ */
2959
+ bindingName: string;
2960
+ /**
2961
+ * Gets or sets the starting angle for the pie slices, in degrees.
2962
+ *
2963
+ * Angles are measured clockwise, starting at the 9 o'clock position.
2964
+ *
2965
+ * The default value for this property is <b>0</b>.
2966
+ */
2967
+ startAngle: number;
2968
+ /**
2969
+ * Gets or sets the offset of the slices from the pie center.
2970
+ *
2971
+ * The offset is measured as a fraction of the pie radius.
2972
+ *
2973
+ * The default value for this property is <b>0</b>.
2974
+ */
2975
+ offset: number;
2976
+ /**
2977
+ * Gets or sets the size of the pie's inner radius.
2978
+ *
2979
+ * The inner radius is measured as a fraction of the pie radius.
2980
+ *
2981
+ * The default value for this property is zero, which creates
2982
+ * a pie. Setting this property to values greater than zero
2983
+ * creates pies with a hole in the middle, also known as
2984
+ * doughnut charts. The valid range for inner radius is from 0 to 1.
2985
+ *
2986
+ * The default value for this property is <b>0</b>.
2987
+ */
2988
+ innerRadius: number;
2989
+ /**
2990
+ * Gets or sets the style of text inside the pie.
2991
+ */
2992
+ innerTextStyle: any;
2993
+ /**
2994
+ * Gets or sets the text inside the pie (at the pie center).
2995
+ */
2996
+ innerText: any;
2997
+ /**
2998
+ * Gets or sets a value that determines whether angles are reversed
2999
+ * (counter-clockwise).
3000
+ *
3001
+ * The default value is false, which causes angles to be measured in
3002
+ * the clockwise direction.
3003
+ *
3004
+ * The default value for this property is <b>false</b>.
3005
+ */
3006
+ reversed: boolean;
3007
+ /**
3008
+ * Gets or sets the position of the selected slice.
3009
+ *
3010
+ * Setting this property to a value other than 'None' causes
3011
+ * the pie to rotate when an item is selected.
3012
+ *
3013
+ * Note that in order to select slices by clicking the chart,
3014
+ * you must set the {@link selectionMode} property to 'Point'.
3015
+ *
3016
+ * The default value for this property is <b>Position.None</b>.
3017
+ */
3018
+ selectedItemPosition: Position;
3019
+ /**
3020
+ * Gets or sets the offset of the selected slice from the pie center.
3021
+ *
3022
+ * Offsets are measured as a fraction of the pie radius.
3023
+ *
3024
+ * The default value for this property is <b>0</b>.
3025
+ */
3026
+ selectedItemOffset: number;
3027
+ /**
3028
+ * Gets or sets a value indicating whether to use animation when items are selected.
3029
+ *
3030
+ * See also the {@link selectedItemPosition} and {@link selectionMode}
3031
+ * properties.
3032
+ *
3033
+ * The default value for this property is <b>false</b>.
3034
+ */
3035
+ isAnimated: boolean;
3036
+ /**
3037
+ * Gets the chart's {@link Tooltip}.
3038
+ */
3039
+ readonly tooltip: ChartTooltip;
3040
+ /**
3041
+ * Gets or sets the point data label.
3042
+ */
3043
+ dataLabel: PieDataLabel;
3044
+ /**
3045
+ * Gets or sets the index of the selected slice.
3046
+ */
3047
+ selectedIndex: number;
3048
+ /**
3049
+ * Gets or sets the pie titles.
3050
+ *
3051
+ * The titles are shown above each pie chart when multiple properties are specified in {@link binding}.
3052
+ * If the property is not set (undefined) the property names are used as pie titles.
3053
+ */
3054
+ titles: string[];
3055
+ /**
3056
+ * Gets or sets the maximal number of charts per line.
3057
+ *
3058
+ * The property is used when there are multiple pies. By default,
3059
+ * it's undefined and the control perform layout automatically.
3060
+ */
3061
+ chartsPerLine: number;
3062
+ _getLabelsForLegend(): string[];
3063
+ /**
3064
+ * Gets a {@link HitTestInfo} object with information about the specified point.
3065
+ *
3066
+ * @param pt The point to investigate, in window coordinates.
3067
+ * @param y The Y coordinate of the point (if the first parameter is a number).
3068
+ * @return A {@link HitTestInfo} object containing information about the point.
3069
+ */
3070
+ hitTest(pt: any, y?: number): HitTestInfo;
3071
+ _performBind(): void;
3072
+ _getBindings(): string[];
3073
+ _initData(): void;
3074
+ _getBindData(item: any, values: number[], labels: any, binding: string, bindingName: string): number;
3075
+ _render(engine: IRenderEngine, applyElement?: boolean, bg?: string): void;
3076
+ _prepareRender(): void;
3077
+ _renderChart(engine: IRenderEngine, rect: Rect, applyElement: boolean): void;
3078
+ _layout(eng: IRenderEngine, r: Rect, titles: string[], n: number): Rect[];
3079
+ _getDesiredLegendSize(engine: IRenderEngine, isVertical: boolean, width: number, height: number): Size;
3080
+ _renderLegend(engine: IRenderEngine, pos: Point, areas: any[], isVertical: boolean, width: number, height: number): void;
3081
+ _renderData(engine: IRenderEngine, rect: Rect, i: number, g: any): void;
3082
+ _renderPie(engine: IRenderEngine, gi: number, radius: number, innerRadius: number, startAngle: number, offset: number): void;
3083
+ _getCenter(): Point;
3084
+ _renderSlices(engine: any, values: any, sum: any, gi: number, radius: any, innerRadius: any, startAngle: any, totalSweep: any, offset: any): void;
3085
+ _renderSlice(engine: IRenderEngine, cx: number, cy: number, currentAngle: number, gi: number, idx: number, radius: number, innerRadius: number, startAngle: number, sweep: number, totalSweep: number): void;
3086
+ _getSelectedItemOffset(index: any, angle: any): {
3087
+ x: number;
3088
+ y: number;
3089
+ };
3090
+ _renderInnerText(engine: IRenderEngine): void;
3091
+ _renderLabels(engine: IRenderEngine): void;
3092
+ _drawSlice(engine: IRenderEngine, gi: number, i: number, reversed: boolean, cx: number, cy: number, r: number, irad: number, angle: number, sweep: number): void;
3093
+ _measureLegendItem(engine: IRenderEngine, name: string): Size;
3094
+ _drawLegendItem(engine: IRenderEngine, rect: Rect, i: number, name: string): void;
3095
+ private _getLabelContent;
3096
+ private _select;
3097
+ _highlightCurrent(): void;
3098
+ _highlight(selected: boolean, pointIndex: number, animate?: boolean): void;
3099
+ _animateSelectionAngle(targetAngles: number[], duration: number): void;
3100
+ _getHitTestItem(index: number): any;
3101
+ _getHitTestValue(index: number, gi: number): number;
3102
+ _getHitTestLabel(index: number): string;
3103
+ }
3104
+ export interface _ISegment {
3105
+ center: Point;
3106
+ radius: number;
3107
+ langle: number;
3108
+ angle: number;
3109
+ sweep: number;
3110
+ gi: number;
3111
+ }
3112
+ export declare class _PieSegment implements _IHitArea, _ISegment {
3113
+ private _center;
3114
+ private _angle;
3115
+ private _sweep;
3116
+ private _radius;
3117
+ private _radius2;
3118
+ private _isFull;
3119
+ private _originAngle;
3120
+ private _originSweep;
3121
+ private _startAngle;
3122
+ constructor(center: Point, radius: number, angle: number, sweep: number, startAngle?: number);
3123
+ contains(pt: Point): boolean;
3124
+ distance(pt: Point): number;
3125
+ readonly center: Point;
3126
+ readonly radius: number;
3127
+ readonly langle: number;
3128
+ readonly angle: number;
3129
+ readonly sweep: number;
3130
+ tag: any;
3131
+ ignoreLabel: boolean;
3132
+ gi: number;
3133
+ }
3134
+ export declare class _DonutSegment implements _IHitArea, _ISegment {
3135
+ private _center;
3136
+ private _angle;
3137
+ private _sweep;
3138
+ private _originAngle;
3139
+ private _originSweep;
3140
+ private _radius;
3141
+ private _radius2;
3142
+ private _iradius;
3143
+ private _iradius2;
3144
+ private _isFull;
3145
+ private _startAngle;
3146
+ constructor(center: Point, radius: number, innerRadius: number, angle: number, sweep: number, startAngle?: number);
3147
+ contains(pt: Point): boolean;
3148
+ distance(pt: Point): number;
3149
+ readonly center: Point;
3150
+ readonly radius: number;
3151
+ readonly langle: number;
3152
+ readonly angle: number;
3153
+ readonly sweep: number;
3154
+ readonly innerRadius: number;
3155
+ tag: any;
3156
+ ignoreLabel: boolean;
3157
+ gi: number;
3158
+ }
3159
+ /**
3160
+ * Specifies the direction of the lines shown by the {@link LineMarker}.
3161
+ */
3162
+ export declare enum LineMarkerLines {
3163
+ /** No lines. */
3164
+ None = 0,
3165
+ /** Vertical line. */
3166
+ Vertical = 1,
3167
+ /** Horizontal line. */
3168
+ Horizontal = 2,
3169
+ /** Vertical and horizontal lines. */
3170
+ Both = 3
3171
+ }
3172
+ /**
3173
+ * Specifies how the {@link LineMarker} interacts with the user.
3174
+ */
3175
+ export declare enum LineMarkerInteraction {
3176
+ /** No interaction, the user specifies the position by clicking. */
3177
+ None = 0,
3178
+ /** The {@link LineMarker} moves with the pointer. */
3179
+ Move = 1,
3180
+ /** The {@link LineMarker} moves when the user drags the lines. */
3181
+ Drag = 2
3182
+ }
3183
+ /**
3184
+ * Specifies the alignment of the {@link LineMarker}.
3185
+ */
3186
+ export declare enum LineMarkerAlignment {
3187
+ /**
3188
+ * The LineMarker alignment adjusts automatically so that it stays
3189
+ * within the boundaries of the plot area. */
3190
+ Auto = 2,
3191
+ /** The LineMarker aligns to the right of the pointer. */
3192
+ Right = 0,
3193
+ /** The LineMarker aligns to the left of the pointer. */
3194
+ Left = 1,
3195
+ /** The LineMarker aligns to the bottom of the pointer. */
3196
+ Bottom = 4,
3197
+ /** The LineMarker aligns to the top of the pointer. */
3198
+ Top = 6
3199
+ }
3200
+ /**
3201
+ * Represents an extension of the LineMarker for the FlexChart.
3202
+ *
3203
+ * The {@link LineMarker} consists of a text area with content reflecting
3204
+ * data point values, and optional vertical or horizontal lines
3205
+ * (or both for a cross-hair effect) positioned over the plot area.
3206
+ *
3207
+ * It can be static (interaction = None), follow the mouse or touch
3208
+ * position (interaction = Move), or move when the user drags the
3209
+ * line (interaction = Drag).
3210
+ *
3211
+ * For example:
3212
+ * <pre>
3213
+ * // create an interactive marker with a horizontal line and y-value
3214
+ * var lm = new LineMarker($scope.ctx.chart, {
3215
+ * lines: LineMarkerLines.Horizontal,
3216
+ * interaction: LineMarkerInteraction.Move,
3217
+ * alignment : LineMarkerAlignment.Top
3218
+ * });
3219
+ * lm.content = function (ht) {
3220
+ * // show y-value
3221
+ * return lm.y.toFixed(2);
3222
+ * }
3223
+ * </pre>
3224
+ */
3225
+ export declare class LineMarker {
3226
+ static _CSS_MARKER: string;
3227
+ static _CSS_MARKER_HLINE: string;
3228
+ static _CSS_MARKER_VLINE: string;
3229
+ static _CSS_MARKER_CONTENT: string;
3230
+ static _CSS_MARKER_CONTAINER: string;
3231
+ static _CSS_LINE_DRAGGABLE: string;
3232
+ static _CSS_TOUCH_DISABLED: string;
3233
+ private _chart;
3234
+ private _plot;
3235
+ private _marker;
3236
+ private _markerContainer;
3237
+ private _markerContent;
3238
+ private _dragEle;
3239
+ private _hLine;
3240
+ private _vLine;
3241
+ private _plotRect;
3242
+ private _targetPoint;
3243
+ private _wrapperMoveMarker;
3244
+ private _capturedEle;
3245
+ private _wrapperMousedown;
3246
+ private _wrapperMouseup;
3247
+ private _contentDragStartPoint;
3248
+ private _mouseDownCrossPoint;
3249
+ private _savedPosition;
3250
+ private _isVisible;
3251
+ private _horizontalPosition;
3252
+ private _verticalPosition;
3253
+ private _alignment;
3254
+ private _content;
3255
+ private _seriesIndex;
3256
+ private _lines;
3257
+ private _interaction;
3258
+ private _dragThreshold;
3259
+ private _dragContent;
3260
+ private _dragLines;
3261
+ /**
3262
+ * Initializes a new instance of the {@link LineMarker} class.
3263
+ *
3264
+ * @param chart The chart on which the LineMarker appears.
3265
+ * @param options A JavaScript object containing initialization data for the control.
3266
+ */
3267
+ constructor(chart: FlexChartCore, options?: any);
3268
+ /**
3269
+ * Gets the {@link FlexChart} object that owns the LineMarker.
3270
+ */
3271
+ readonly chart: FlexChartCore;
3272
+ /**
3273
+ * Gets or sets the visibility of the LineMarker.
3274
+ */
3275
+ isVisible: boolean;
3276
+ /**
3277
+ * Gets or sets the index of the series in the chart in which the LineMarker appears.
3278
+ * This takes effect when the {@link interaction} property is set to
3279
+ * LineMarkerInteraction.Move or LineMarkerInteraction.Drag.
3280
+ */
3281
+ seriesIndex: number;
3282
+ /**
3283
+ * Gets or sets the horizontal position of the LineMarker relative to the plot area.
3284
+ *
3285
+ * Its value range is (0, 1).
3286
+ * If the value is null or undefined and {@link interaction} is set to
3287
+ * LineMarkerInteraction.Move or LineMarkerInteraction.Drag,
3288
+ * the horizontal position of the marker is calculated automatically based on the
3289
+ * pointer's position.
3290
+ */
3291
+ horizontalPosition: number;
3292
+ /**
3293
+ * Gets the current x-value as chart data coordinates.
3294
+ */
3295
+ readonly x: number;
3296
+ /**
3297
+ * Gets the current y-value as chart data coordinates.
3298
+ */
3299
+ readonly y: number;
3300
+ /**
3301
+ * Gets or sets the content function that allows you to customize the text content of the LineMarker.
3302
+ */
3303
+ content: Function;
3304
+ /**
3305
+ * Gets or sets the vertical position of the LineMarker relative to the plot area.
3306
+ *
3307
+ * Its value range is (0, 1).
3308
+ * If the value is null or undefined and {@link interaction} is set to LineMarkerInteraction.Move
3309
+ * or LineMarkerInteraction.Drag, the vertical position of the LineMarker is calculated automatically based on the pointer's position.
3310
+ */
3311
+ verticalPosition: number;
3312
+ /**
3313
+ * Gets or sets the alignment of the LineMarker content.
3314
+ *
3315
+ * By default, the LineMarker shows to the right, at the bottom of the target point.
3316
+ * Use '|' to combine alignment values.
3317
+ *
3318
+ * <pre>
3319
+ * // set the alignment to the left.
3320
+ * marker.alignment = LineMarkerAlignment.Left;
3321
+ * // set the alignment to the left top.
3322
+ * marker.alignment = LineMarkerAlignment.Left | LineMarkerAlignment.Top;
3323
+ * </pre>
3324
+ */
3325
+ alignment: LineMarkerAlignment;
3326
+ /**
3327
+ * Gets or sets the visibility of the LineMarker lines.
3328
+ */
3329
+ lines: LineMarkerLines;
3330
+ /**
3331
+ * Gets or sets the interaction mode of the LineMarker.
3332
+ */
3333
+ interaction: LineMarkerInteraction;
3334
+ /**
3335
+ * Gets or sets the maximum distance from the horizontal or vertical
3336
+ * line that the marker can be dragged.
3337
+ */
3338
+ dragThreshold: number;
3339
+ /**
3340
+ * Gets or sets a value indicating whether the content of the marker
3341
+ * is draggable when the interaction mode is "Drag."
3342
+ */
3343
+ dragContent: boolean;
3344
+ /**
3345
+ * Gets or sets a value indicating whether the lines are linked
3346
+ * when the horizontal or vertical line is dragged when the
3347
+ * interaction mode is "Drag."
3348
+ */
3349
+ dragLines: boolean;
3350
+ /**
3351
+ * Occurs after the {@link LineMarker}'s position changes.
3352
+ */
3353
+ readonly positionChanged: Event<LineMarker, Point>;
3354
+ /**
3355
+ * Raises the {@link positionChanged} event.
3356
+ *
3357
+ * @param point The target point at which to show the LineMarker.
3358
+ */
3359
+ onPositionChanged(point: Point): void;
3360
+ /**
3361
+ * Removes the LineMarker from the chart.
3362
+ */
3363
+ remove(): void;
3364
+ private _attach;
3365
+ private _attachDrag;
3366
+ private _detach;
3367
+ private _detachDrag;
3368
+ private _toggleDragEventAttach;
3369
+ private _onMousedown;
3370
+ private _onMouseup;
3371
+ _moveMarker(e: any): void;
3372
+ private _calcStackedValue;
3373
+ private _sign;
3374
+ private _getElementPaddingValuee;
3375
+ private _show;
3376
+ private _hide;
3377
+ private _toggleVisibility;
3378
+ private _resetDefaultValue;
3379
+ private _initialize;
3380
+ private _createMarker;
3381
+ private _removeMarker;
3382
+ private _getContainer;
3383
+ private _createContainer;
3384
+ private _createChildren;
3385
+ private _toggleElesDraggableClass;
3386
+ private _updateMarkerSize;
3387
+ private _updateLinesSize;
3388
+ private _resetLinesVisibility;
3389
+ private _updateMarkerPosition;
3390
+ private _updateContent;
3391
+ private _raisePositionChanged;
3392
+ private _updatePositionByAlignment;
3393
+ private _getEventPoint;
3394
+ private _pointInRect;
3395
+ private _getTop;
3396
+ }
3397
+ /**
3398
+ * Plots data series.
3399
+ */
3400
+ export interface _IPlotter {
3401
+ chart: FlexChartCore;
3402
+ dataInfo: _DataInfo;
3403
+ hitTester: _HitTester;
3404
+ seriesIndex: number;
3405
+ seriesCount: number;
3406
+ clipping: boolean;
3407
+ stacking: Stacking;
3408
+ rotated: boolean;
3409
+ adjustLimits(dataInfo: _DataInfo, plotRect: Rect): Rect;
3410
+ plotSeries(engine: IRenderEngine, ax: _IAxis, ay: _IAxis, series: _ISeries, palette: _IPalette, iser: number, nser: number, customRender?: Function): any;
3411
+ _renderLabels(engine: IRenderEngine, series: SeriesBase, smap: _IHitArea[], chart: FlexChartCore, lblAreas: _RectArea[]): any;
3412
+ _renderLabel(engine: IRenderEngine, map: _IHitArea, dp: _DataPoint, chart: FlexChartCore, lbl: DataLabel, series: SeriesBase, offset: number, lblAreas: _RectArea[]): any;
3413
+ load(): any;
3414
+ unload(): any;
3415
+ }
3416
+ /**
3417
+ * Base class for chart plotters of all types (bar, line, area).
3418
+ */
3419
+ export declare class _BasePlotter {
3420
+ _DEFAULT_WIDTH: number;
3421
+ _DEFAULT_SYM_SIZE: number;
3422
+ clipping: boolean;
3423
+ chart: FlexChartCore;
3424
+ hitTester: _HitTester;
3425
+ dataInfo: _DataInfo;
3426
+ seriesIndex: number;
3427
+ seriesCount: number;
3428
+ clear(): void;
3429
+ _renderLabels(engine: IRenderEngine, series: SeriesBase, smap: _IHitArea[], chart: FlexChartCore, lblAreas: _RectArea[]): void;
3430
+ _renderLabel(engine: IRenderEngine, map: _IHitArea, dp: _DataPoint, chart: FlexChartCore, lbl: DataLabel, series: SeriesBase, offset: number, lblAreas: _RectArea[]): void;
3431
+ _getPointAndPosition(pt: Point, pos: LabelPosition, map: _IHitArea, chart: FlexChartCore): void;
3432
+ _getLabelPoint(series: SeriesBase, dataPoint: _DataPoint): Point;
3433
+ _renderLabelAndBorder(engine: IRenderEngine, s: string, pos: LabelPosition, offset: number, pt: Point, line: boolean, marg: any, border: boolean): Rect;
3434
+ getOption(name: string, parent?: string): any;
3435
+ getNumOption(name: string, parent?: string): number;
3436
+ getItemFormatter(series: _ISeries): Function;
3437
+ static cloneStyle(style: any, ignore: string[]): any;
3438
+ isValid(datax: number, datay: number, ax: _IAxis, ay: _IAxis): boolean;
3439
+ load(): void;
3440
+ unload(): void;
3441
+ _createSteps(x: number[], y: number[], num?: number): {
3442
+ x: number[];
3443
+ y: number[];
3444
+ };
3445
+ }
3446
+ /**
3447
+ * Area chart plotter.
3448
+ */
3449
+ export declare class _AreaPlotter extends _BasePlotter implements _IPlotter {
3450
+ stacking: Stacking;
3451
+ isSpline: boolean;
3452
+ isStep: boolean;
3453
+ rotated: boolean;
3454
+ private stackPos;
3455
+ private stackNeg;
3456
+ constructor();
3457
+ adjustLimits(dataInfo: _DataInfo, plotRect: Rect): Rect;
3458
+ clear(): void;
3459
+ plotSeries(engine: IRenderEngine, ax: _IAxis, ay: _IAxis, series: _ISeries, palette: _IPalette, iser: number, nser: number, customRender?: Function): void;
3460
+ private _isRange;
3461
+ private _modifyPoints;
3462
+ plotSeriesRanged(engine: IRenderEngine, ax: _IAxis, ay: _IAxis, series: _ISeries, palette: _IPalette, iser: number, nser: number, customRender?: Function): void;
3463
+ _drawRangedArea(engine: IRenderEngine, xvals1: number[], yvals1: number[], xvals2: number[], yvals2: number[], fill: string, stroke: string, swidth: number, pstyle: any, lstyle: any): void;
3464
+ _convertToSpline(x: number[], y: number[]): {
3465
+ xs: any;
3466
+ ys: any;
3467
+ };
3468
+ _drawSymbols(engine: IRenderEngine, series: _ISeries, seriesIndex: number): void;
3469
+ }
3470
+ /**
3471
+ * Bar/column chart plotter.
3472
+ */
3473
+ export declare class _BarPlotter extends _BasePlotter implements _IPlotter {
3474
+ origin: number;
3475
+ width: number;
3476
+ isVolume: boolean;
3477
+ private _volHelper;
3478
+ private _itemsSource;
3479
+ stackPosMap: {};
3480
+ stackNegMap: {};
3481
+ stacking: Stacking;
3482
+ rotated: boolean;
3483
+ _getSymbolOrigin: Function;
3484
+ _getSymbolStyles: Function;
3485
+ clear(): void;
3486
+ load(): void;
3487
+ unload(): void;
3488
+ adjustLimits(dataInfo: _DataInfo, plotRect: Rect): Rect;
3489
+ private _isRange;
3490
+ plotSeries(engine: IRenderEngine, ax: _IAxis, ay: _IAxis, series: _ISeries, palette: _IPalette, iser: number, nser: number, customRender?: Function): void;
3491
+ private drawSymbol;
3492
+ private drawDefaultSymbol;
3493
+ }
3494
+ /**
3495
+ * Funnel chart plotter.
3496
+ */
3497
+ export declare class _FunnelPlotter extends _BasePlotter implements _IPlotter {
3498
+ _getSymbolOrigin: Function;
3499
+ _getSymbolStyles: Function;
3500
+ stacking: Stacking;
3501
+ rotated: boolean;
3502
+ adjustLimits(dataInfo: _DataInfo, plotRect: Rect): Rect;
3503
+ plotSeries(engine: IRenderEngine, ax: _IAxis, ay: _IAxis, series: _ISeries, palette: _IPalette, iser: number, nser: number, customRender?: Function): void;
3504
+ private _getTrapezoidArea;
3505
+ private _getTrapezoidOffsetY;
3506
+ private drawDefaultSymbol;
3507
+ _getPointAndPosition(pt: Point, pos: LabelPosition, map: _IHitArea, chart: FlexChartCore): void;
3508
+ }
3509
+ export declare class _FunnelSegment implements _IHitArea {
3510
+ private _center;
3511
+ private _startPoint;
3512
+ private _width;
3513
+ private _height;
3514
+ private _neckWidth;
3515
+ private _neckHeight;
3516
+ private _offsetX;
3517
+ private _offsetY;
3518
+ private _rotated;
3519
+ constructor(startPoint: Point, width: number, height: number, neckWidth: number, neckHeight: number, rotated?: boolean);
3520
+ contains(pt: Point): boolean;
3521
+ distance(pt: Point): number;
3522
+ readonly center: Point;
3523
+ tag: any;
3524
+ ignoreLabel: boolean;
3525
+ }
3526
+ export declare class _FinancePlotter extends _BasePlotter {
3527
+ isCandle: boolean;
3528
+ isArms: boolean;
3529
+ isEqui: boolean;
3530
+ isVolume: boolean;
3531
+ symbolWidth: any;
3532
+ private _volHelper;
3533
+ private _itemsSource;
3534
+ private _symWidth;
3535
+ private _isPixel;
3536
+ clear(): void;
3537
+ load(): void;
3538
+ unload(): void;
3539
+ parseSymbolWidth(val: any): void;
3540
+ adjustLimits(dataInfo: _DataInfo, plotRect: Rect): Rect;
3541
+ plotSeries(engine: IRenderEngine, ax: _IAxis, ay: _IAxis, series: _ISeries, palette: _IPalette, iser: number, nser: number, customRender?: Function): void;
3542
+ _drawSymbol(engine: IRenderEngine, ax: _IAxis, ay: _IAxis, si: number, pi: number, fill: any, w: number, x: number, hi: number, lo: number, open: number, close: number): void;
3543
+ }
3544
+ /**
3545
+ * Line/scatter chart plotter.
3546
+ */
3547
+ export declare class _LinePlotter extends _BasePlotter implements _IPlotter {
3548
+ hasSymbols: boolean;
3549
+ hasLines: boolean;
3550
+ isSpline: boolean;
3551
+ isStep: boolean;
3552
+ hitTestSymbols: boolean;
3553
+ rotated: boolean;
3554
+ stacking: Stacking;
3555
+ stackPos: {
3556
+ [key: number]: number;
3557
+ };
3558
+ stackNeg: {
3559
+ [key: number]: number;
3560
+ };
3561
+ constructor();
3562
+ clear(): void;
3563
+ adjustLimits(dataInfo: _DataInfo, plotRect: Rect): Rect;
3564
+ plotSeries(engine: IRenderEngine, ax: _IAxis, ay: _IAxis, series: _ISeries, palette: _IPalette, iser: number, nser: number, customRender?: Function): void;
3565
+ _drawLines(engine: IRenderEngine, xs: number[], ys: number[], className?: string, style?: any, clipPath?: string, num?: number): void;
3566
+ _drawSymbol(engine: IRenderEngine, x: number, y: number, sz: number, series: SeriesBase, pointIndex: number, ifmt: Function): void;
3567
+ _drawDefaultSymbol(engine: IRenderEngine, x: number, y: number, sz: number, marker: Marker, style?: any): void;
3568
+ }
3569
+ export declare class _BubblePlotter extends _LinePlotter {
3570
+ private _MIN_SIZE;
3571
+ private _MAX_SIZE;
3572
+ private _minSize;
3573
+ private _maxSize;
3574
+ private _minValue;
3575
+ private _maxValue;
3576
+ constructor();
3577
+ adjustLimits(dataInfo: _DataInfo, pr: Rect): Rect;
3578
+ _drawSymbol(engine: IRenderEngine, x: number, y: number, sz: number, series: Series, pointIndex: number, ifmt: Function): void;
3579
+ }
3580
+ export {};