@dhtmlx/chart 9.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/README.md +216 -0
  2. package/codebase/chart.d.ts +3 -0
  3. package/codebase/chart.min.css +1 -0
  4. package/codebase/chart.min.js +21 -0
  5. package/codebase/chart.min.js.map +1 -0
  6. package/codebase/fonts/roboto-bold-webfont.woff +0 -0
  7. package/codebase/fonts/roboto-bold-webfont.woff2 +0 -0
  8. package/codebase/fonts/roboto-medium-webfont.woff +0 -0
  9. package/codebase/fonts/roboto-medium-webfont.woff2 +0 -0
  10. package/codebase/fonts/roboto-regular-webfont.woff +0 -0
  11. package/codebase/fonts/roboto-regular-webfont.woff2 +0 -0
  12. package/codebase/types/ts-calendar/index.d.ts +2 -0
  13. package/codebase/types/ts-calendar/sources/Calendar.d.ts +37 -0
  14. package/codebase/types/ts-calendar/sources/helper.d.ts +1 -0
  15. package/codebase/types/ts-calendar/sources/types.d.ts +64 -0
  16. package/codebase/types/ts-chart/sources/AxisCreator.d.ts +11 -0
  17. package/codebase/types/ts-chart/sources/Chart.d.ts +28 -0
  18. package/codebase/types/ts-chart/sources/ComposeLayer.d.ts +10 -0
  19. package/codebase/types/ts-chart/sources/Export.d.ts +12 -0
  20. package/codebase/types/ts-chart/sources/Filters.d.ts +2 -0
  21. package/codebase/types/ts-chart/sources/Legend.d.ts +15 -0
  22. package/codebase/types/ts-chart/sources/Tooltip.d.ts +13 -0
  23. package/codebase/types/ts-chart/sources/entry.d.ts +8 -0
  24. package/codebase/types/ts-chart/sources/helpers/circle.d.ts +9 -0
  25. package/codebase/types/ts-chart/sources/helpers/common.d.ts +45 -0
  26. package/codebase/types/ts-chart/sources/helpers/spline.d.ts +2 -0
  27. package/codebase/types/ts-chart/sources/scales/RadialScale.d.ts +8 -0
  28. package/codebase/types/ts-chart/sources/scales/Scale.d.ts +22 -0
  29. package/codebase/types/ts-chart/sources/scales/SvgScales.d.ts +12 -0
  30. package/codebase/types/ts-chart/sources/scales/TextScale.d.ts +11 -0
  31. package/codebase/types/ts-chart/sources/scales/index.d.ts +9 -0
  32. package/codebase/types/ts-chart/sources/series/Area.d.ts +9 -0
  33. package/codebase/types/ts-chart/sources/series/Bar.d.ts +22 -0
  34. package/codebase/types/ts-chart/sources/series/BarX.d.ts +18 -0
  35. package/codebase/types/ts-chart/sources/series/BaseSeria.d.ts +31 -0
  36. package/codebase/types/ts-chart/sources/series/CalendarHeatMap.d.ts +20 -0
  37. package/codebase/types/ts-chart/sources/series/Donut.d.ts +5 -0
  38. package/codebase/types/ts-chart/sources/series/Line.d.ts +7 -0
  39. package/codebase/types/ts-chart/sources/series/NoScaleSeria.d.ts +22 -0
  40. package/codebase/types/ts-chart/sources/series/Pie.d.ts +5 -0
  41. package/codebase/types/ts-chart/sources/series/Pie3D.d.ts +5 -0
  42. package/codebase/types/ts-chart/sources/series/Radar.d.ts +16 -0
  43. package/codebase/types/ts-chart/sources/series/ScaleSeria.d.ts +15 -0
  44. package/codebase/types/ts-chart/sources/series/Scatter.d.ts +6 -0
  45. package/codebase/types/ts-chart/sources/series/Spline.d.ts +5 -0
  46. package/codebase/types/ts-chart/sources/series/SplineArea.d.ts +5 -0
  47. package/codebase/types/ts-chart/sources/series/Stacker.d.ts +9 -0
  48. package/codebase/types/ts-chart/sources/series/TreeMap.d.ts +30 -0
  49. package/codebase/types/ts-chart/sources/series/index.d.ts +29 -0
  50. package/codebase/types/ts-chart/sources/shapes/legend.d.ts +2 -0
  51. package/codebase/types/ts-chart/sources/shapes/line.d.ts +7 -0
  52. package/codebase/types/ts-chart/sources/types.d.ts +301 -0
  53. package/codebase/types/ts-combobox/index.d.ts +3 -0
  54. package/codebase/types/ts-combobox/sources/Combobox.d.ts +53 -0
  55. package/codebase/types/ts-combobox/sources/ProCombobox.d.ts +6 -0
  56. package/codebase/types/ts-combobox/sources/helper.d.ts +4 -0
  57. package/codebase/types/ts-combobox/sources/keyListener.d.ts +14 -0
  58. package/codebase/types/ts-combobox/sources/locales/en.d.ts +8 -0
  59. package/codebase/types/ts-combobox/sources/types.d.ts +95 -0
  60. package/codebase/types/ts-common/FocusManager.d.ts +15 -0
  61. package/codebase/types/ts-common/KeyManager.d.ts +19 -0
  62. package/codebase/types/ts-common/ScrollView.d.ts +40 -0
  63. package/codebase/types/ts-common/core.d.ts +40 -0
  64. package/codebase/types/ts-common/date.d.ts +34 -0
  65. package/codebase/types/ts-common/dom.d.ts +24 -0
  66. package/codebase/types/ts-common/events.d.ts +35 -0
  67. package/codebase/types/ts-common/html.d.ts +74 -0
  68. package/codebase/types/ts-common/input.d.ts +24 -0
  69. package/codebase/types/ts-common/keycodes.d.ts +9 -0
  70. package/codebase/types/ts-common/polyfills/array.d.ts +0 -0
  71. package/codebase/types/ts-common/polyfills/element.d.ts +0 -0
  72. package/codebase/types/ts-common/polyfills/fetch.d.ts +0 -0
  73. package/codebase/types/ts-common/polyfills/math.d.ts +0 -0
  74. package/codebase/types/ts-common/polyfills/object.d.ts +0 -0
  75. package/codebase/types/ts-common/polyfills/string.d.ts +0 -0
  76. package/codebase/types/ts-common/types.d.ts +76 -0
  77. package/codebase/types/ts-common/view.d.ts +27 -0
  78. package/codebase/types/ts-data/index.d.ts +13 -0
  79. package/codebase/types/ts-data/sources/CollectionStore.d.ts +7 -0
  80. package/codebase/types/ts-data/sources/DragManager.d.ts +19 -0
  81. package/codebase/types/ts-data/sources/ajax.d.ts +2 -0
  82. package/codebase/types/ts-data/sources/datacollection/group.d.ts +43 -0
  83. package/codebase/types/ts-data/sources/datacollection/loader.d.ts +16 -0
  84. package/codebase/types/ts-data/sources/datacollection/sort.d.ts +7 -0
  85. package/codebase/types/ts-data/sources/datacollection.d.ts +101 -0
  86. package/codebase/types/ts-data/sources/dataproxy.d.ts +10 -0
  87. package/codebase/types/ts-data/sources/drivers/CsvDriver.d.ts +16 -0
  88. package/codebase/types/ts-data/sources/drivers/JsonDriver.d.ts +10 -0
  89. package/codebase/types/ts-data/sources/drivers/XMLDriver.d.ts +18 -0
  90. package/codebase/types/ts-data/sources/drivers/drivers.d.ts +12 -0
  91. package/codebase/types/ts-data/sources/helpers.d.ts +17 -0
  92. package/codebase/types/ts-data/sources/lazydataproxy.d.ts +9 -0
  93. package/codebase/types/ts-data/sources/methods.d.ts +11 -0
  94. package/codebase/types/ts-data/sources/selection.d.ts +17 -0
  95. package/codebase/types/ts-data/sources/serializers/xml.d.ts +2 -0
  96. package/codebase/types/ts-data/sources/treecollection.d.ts +72 -0
  97. package/codebase/types/ts-data/sources/types.d.ts +340 -0
  98. package/codebase/types/ts-grid/index.d.ts +7 -0
  99. package/codebase/types/ts-grid/sources/ExtendedGrid.d.ts +47 -0
  100. package/codebase/types/ts-grid/sources/Grid.d.ts +114 -0
  101. package/codebase/types/ts-grid/sources/ProGrid.d.ts +67 -0
  102. package/codebase/types/ts-grid/sources/helpers/cells.d.ts +9 -0
  103. package/codebase/types/ts-grid/sources/helpers/data.d.ts +36 -0
  104. package/codebase/types/ts-grid/sources/helpers/default.d.ts +6 -0
  105. package/codebase/types/ts-grid/sources/helpers/dom.d.ts +3 -0
  106. package/codebase/types/ts-grid/sources/helpers/keys.d.ts +27 -0
  107. package/codebase/types/ts-grid/sources/helpers/main.d.ts +23 -0
  108. package/codebase/types/ts-grid/sources/locales/en.d.ts +7 -0
  109. package/codebase/types/ts-grid/sources/modules/BlockSelection.d.ts +122 -0
  110. package/codebase/types/ts-grid/sources/modules/Clipboard.d.ts +55 -0
  111. package/codebase/types/ts-grid/sources/modules/DropManager.d.ts +21 -0
  112. package/codebase/types/ts-grid/sources/modules/Exporter.d.ts +80 -0
  113. package/codebase/types/ts-grid/sources/modules/History.d.ts +72 -0
  114. package/codebase/types/ts-grid/sources/modules/Range.d.ts +71 -0
  115. package/codebase/types/ts-grid/sources/modules/Resizer.d.ts +2 -0
  116. package/codebase/types/ts-grid/sources/modules/Selection.d.ts +58 -0
  117. package/codebase/types/ts-grid/sources/types.d.ts +660 -0
  118. package/codebase/types/ts-grid/sources/ui/FixedCols.d.ts +3 -0
  119. package/codebase/types/ts-grid/sources/ui/FixedRows.d.ts +5 -0
  120. package/codebase/types/ts-grid/sources/ui/cells.d.ts +34 -0
  121. package/codebase/types/ts-grid/sources/ui/common.d.ts +8 -0
  122. package/codebase/types/ts-grid/sources/ui/components/dragPanel.d.ts +7 -0
  123. package/codebase/types/ts-grid/sources/ui/components/groupPanel.d.ts +13 -0
  124. package/codebase/types/ts-grid/sources/ui/components/subRow.d.ts +4 -0
  125. package/codebase/types/ts-grid/sources/ui/content/ComboFilter.d.ts +35 -0
  126. package/codebase/types/ts-grid/sources/ui/content/DateFilter.d.ts +42 -0
  127. package/codebase/types/ts-grid/sources/ui/content/InputFilter.d.ts +32 -0
  128. package/codebase/types/ts-grid/sources/ui/content/SelectFilter.d.ts +28 -0
  129. package/codebase/types/ts-grid/sources/ui/content.d.ts +55 -0
  130. package/codebase/types/ts-grid/sources/ui/editors/CheckboxEditor.d.ts +18 -0
  131. package/codebase/types/ts-grid/sources/ui/editors/ComboboxEditor.d.ts +18 -0
  132. package/codebase/types/ts-grid/sources/ui/editors/DateEditor.d.ts +37 -0
  133. package/codebase/types/ts-grid/sources/ui/editors/InputEditor.d.ts +22 -0
  134. package/codebase/types/ts-grid/sources/ui/editors/SelectEditor.d.ts +16 -0
  135. package/codebase/types/ts-grid/sources/ui/editors/TextAreaEditor.d.ts +27 -0
  136. package/codebase/types/ts-grid/sources/ui/editors/editors.d.ts +2 -0
  137. package/codebase/types/ts-grid/sources/ui/proContent.d.ts +37 -0
  138. package/codebase/types/ts-grid/sources/ui/render.d.ts +9 -0
  139. package/codebase/types/ts-layout/index.d.ts +3 -0
  140. package/codebase/types/ts-layout/sources/Cell.d.ts +60 -0
  141. package/codebase/types/ts-layout/sources/Layout.d.ts +29 -0
  142. package/codebase/types/ts-layout/sources/ProCell.d.ts +9 -0
  143. package/codebase/types/ts-layout/sources/ProLayout.d.ts +6 -0
  144. package/codebase/types/ts-layout/sources/helpers.d.ts +6 -0
  145. package/codebase/types/ts-layout/sources/types.d.ts +129 -0
  146. package/codebase/types/ts-list/index.d.ts +4 -0
  147. package/codebase/types/ts-list/sources/List.d.ts +56 -0
  148. package/codebase/types/ts-list/sources/ProList.d.ts +11 -0
  149. package/codebase/types/ts-list/sources/Selection.d.ts +24 -0
  150. package/codebase/types/ts-list/sources/editors/InputEditor.d.ts +16 -0
  151. package/codebase/types/ts-list/sources/editors/editors.d.ts +4 -0
  152. package/codebase/types/ts-list/sources/types.d.ts +98 -0
  153. package/codebase/types/ts-message/index.d.ts +5 -0
  154. package/codebase/types/ts-message/sources/alert.d.ts +2 -0
  155. package/codebase/types/ts-message/sources/common.d.ts +1 -0
  156. package/codebase/types/ts-message/sources/confirm.d.ts +2 -0
  157. package/codebase/types/ts-message/sources/locales/en.d.ts +5 -0
  158. package/codebase/types/ts-message/sources/message.d.ts +4 -0
  159. package/codebase/types/ts-message/sources/tooltip.d.ts +6 -0
  160. package/codebase/types/ts-message/sources/types.d.ts +79 -0
  161. package/codebase/types/ts-popup/index.d.ts +2 -0
  162. package/codebase/types/ts-popup/sources/Popup.d.ts +29 -0
  163. package/codebase/types/ts-popup/sources/types.d.ts +42 -0
  164. package/codebase/types/ts-slider/index.d.ts +2 -0
  165. package/codebase/types/ts-slider/sources/Slider.d.ts +55 -0
  166. package/codebase/types/ts-slider/sources/types.d.ts +60 -0
  167. package/codebase/types/ts-timepicker/index.d.ts +2 -0
  168. package/codebase/types/ts-timepicker/sources/Timepicker.d.ts +28 -0
  169. package/codebase/types/ts-timepicker/sources/helper.d.ts +4 -0
  170. package/codebase/types/ts-timepicker/sources/locales/en.d.ts +6 -0
  171. package/codebase/types/ts-timepicker/sources/types.d.ts +52 -0
  172. package/codebase/types/ts-treegrid/index.d.ts +3 -0
  173. package/codebase/types/ts-treegrid/sources/TreeGrid.d.ts +26 -0
  174. package/codebase/types/ts-treegrid/sources/TreeGridCollection.d.ts +21 -0
  175. package/codebase/types/ts-treegrid/sources/types.d.ts +17 -0
  176. package/dhtmlx_chart.png +0 -0
  177. package/dhtmlx_logo.svg +4 -0
  178. package/license.md +360 -0
  179. package/package.json +13 -0
  180. package/whatsnew.txt +582 -0
@@ -0,0 +1,2 @@
1
+ export * from "./sources/Calendar";
2
+ export * from "./sources/types";
@@ -0,0 +1,37 @@
1
+ import { IEventSystem } from "../../ts-common/events";
2
+ import { View } from "../../ts-common/view";
3
+ import { CalendarEvents, ICalendar, ICalendarConfig, ViewMode, ICalendarHandlersMap } from "./types";
4
+ export declare class Calendar extends View implements ICalendar {
5
+ events: IEventSystem<CalendarEvents, ICalendarHandlersMap>;
6
+ config: ICalendarConfig;
7
+ private _selected;
8
+ private _currentDate;
9
+ private _currentViewMode;
10
+ private _isSelectedInCurrentRange;
11
+ private _handlers;
12
+ private _timepicker;
13
+ private _time;
14
+ private _linkedCalendar;
15
+ constructor(container: HTMLElement | string, config?: ICalendarConfig);
16
+ setValue(value: Date | Date[] | string | string[]): boolean;
17
+ getValue<T extends boolean = false>(asDateObject?: T): Date | string;
18
+ getValue<T extends boolean = true>(asDateObject?: T): Date[] | string[];
19
+ getCurrentMode(): ViewMode;
20
+ showDate(date?: Date, mode?: ViewMode): void;
21
+ destructor(): void;
22
+ clear(): void;
23
+ link(targetCalendar: Calendar): void;
24
+ private _unlink;
25
+ private _setSelected;
26
+ private _getSelected;
27
+ private _draw;
28
+ private _initHandlers;
29
+ private _getData;
30
+ private _drawCalendar;
31
+ private _drawMonthSelector;
32
+ private _drawYearSelector;
33
+ private _drawHeader;
34
+ private _drawTimepicker;
35
+ private _selectDate;
36
+ private _moveBrowseFocus;
37
+ }
@@ -0,0 +1 @@
1
+ export declare const linkButtonClasses = ".dhx_button.dhx_button--view_link.dhx_button--icon.dhx_button--size_medium.dhx_button--color_secondary";
@@ -0,0 +1,64 @@
1
+ export interface ICalendarConfig {
2
+ value?: Date | Date[] | string | string[];
3
+ date?: Date | string;
4
+ css?: string;
5
+ mark?: (a: Date) => string;
6
+ disabledDates?: (a: Date) => boolean;
7
+ weekStart?: "saturday" | "sunday" | "monday";
8
+ weekNumbers?: boolean;
9
+ mode?: ViewMode;
10
+ timePicker?: boolean;
11
+ dateFormat?: string;
12
+ timeFormat?: 24 | 12;
13
+ thisMonthOnly?: boolean;
14
+ width?: string | number;
15
+ range?: boolean;
16
+ $rangeMark?: (a: Date) => string;
17
+ /** @deprecated See a documentation: https://docs.dhtmlx.com/ */
18
+ block?: (a: Date) => boolean;
19
+ /** @deprecated See a documentation: https://docs.dhtmlx.com/ */
20
+ view?: ViewMode;
21
+ }
22
+ export interface ICalendar {
23
+ paint(): void;
24
+ destructor(): void;
25
+ clear(): void;
26
+ showDate(date?: Date, mode?: ViewMode): void;
27
+ setValue(value: Date | Date[] | string | string[]): boolean;
28
+ getValue(asDatObj?: boolean): Date | Date[] | string | string[];
29
+ getCurrentMode(): ViewMode;
30
+ link(calendar: ICalendar): void;
31
+ }
32
+ export type ViewMode = "calendar" | "year" | "month" | "timepicker";
33
+ export interface ICalendarDay {
34
+ css: string;
35
+ date: Date;
36
+ day: number;
37
+ }
38
+ export interface ICalendarWeek {
39
+ weekNumber: number;
40
+ days: ICalendarDay[];
41
+ disabledWeekNumber?: boolean;
42
+ }
43
+ export declare enum CalendarEvents {
44
+ change = "change",
45
+ beforeChange = "beforechange",
46
+ modeChange = "modeChange",
47
+ monthSelected = "monthSelected",
48
+ yearSelected = "yearSelected",
49
+ cancelClick = "cancelClick",
50
+ dateMouseOver = "dateMouseOver",
51
+ /** @deprecated See a documentation: https://docs.dhtmlx.com/ */
52
+ dateHover = "dateHover"
53
+ }
54
+ export interface ICalendarHandlersMap {
55
+ [key: string]: (...args: any[]) => any;
56
+ [CalendarEvents.change]: (date: Date, oldDate: Date, byClick: boolean, mode?: "clear") => void;
57
+ [CalendarEvents.beforeChange]: (date: Date, oldDate: Date, byClick: boolean) => boolean | void;
58
+ [CalendarEvents.dateMouseOver]: (date: Date, e: MouseEvent) => void;
59
+ [CalendarEvents.modeChange]: (mode: string) => void;
60
+ [CalendarEvents.monthSelected]: (month: number) => void;
61
+ [CalendarEvents.yearSelected]: (year: number) => void;
62
+ [CalendarEvents.cancelClick]: () => void;
63
+ [CalendarEvents.dateHover]: (date: Date, e: MouseEvent) => any;
64
+ }
@@ -0,0 +1,11 @@
1
+ import { IAxisCreator, IAxisCreatorConfig, IAxisScale } from "./types";
2
+ export declare class AxisCreator implements IAxisCreator {
3
+ private _data;
4
+ config: IAxisCreatorConfig;
5
+ constructor(_data: any, conf?: IAxisCreatorConfig);
6
+ getScale(): IAxisScale;
7
+ private _getStep;
8
+ private _calculateSteps;
9
+ private _logSteps;
10
+ private _addPadding;
11
+ }
@@ -0,0 +1,28 @@
1
+ import { IEventSystem } from "../../ts-common/events";
2
+ import { View } from "../../ts-common/view";
3
+ import { DataCollection, DataEvents, TreeCollection } from "../../ts-data";
4
+ import { ChartEvents, IChart, IChartConfig, IChartSeries, IComposeLayer, IScaleConfig, IScales, ISeria } from "./types";
5
+ import { Exporter } from "./Export";
6
+ export declare class Chart extends View implements IChart {
7
+ data: DataCollection | TreeCollection;
8
+ events: IEventSystem<DataEvents | ChartEvents>;
9
+ config: IChartConfig;
10
+ export: Exporter;
11
+ protected _layers: IComposeLayer;
12
+ protected _series: IChartSeries;
13
+ protected _scales: IScales;
14
+ private _tooltip;
15
+ private _globalHTMLHandlers;
16
+ private _width;
17
+ private _height;
18
+ private _left;
19
+ private _top;
20
+ constructor(node: HTMLElement | string, config?: IChartConfig);
21
+ getSeries(key: string): ISeria;
22
+ eachSeries(handler: (serie: ISeria) => any): any[];
23
+ destructor(): void;
24
+ setConfig(config: IChartConfig): void;
25
+ protected _setScale(config: IScaleConfig, position: string): void;
26
+ protected _detectScaleType(config: any, key: any): any;
27
+ private _initEvents;
28
+ }
@@ -0,0 +1,10 @@
1
+ import { IComposeLayer } from "./types";
2
+ import { IFitPosition } from "../../ts-common/html";
3
+ export declare class ComposeLayer implements IComposeLayer {
4
+ private _data;
5
+ private _sizes;
6
+ add(obj: any): void;
7
+ clear(): void;
8
+ getSizes(): IFitPosition;
9
+ toVDOM(width: number, height: number): any;
10
+ }
@@ -0,0 +1,12 @@
1
+ import { View } from "../../ts-common/view";
2
+ import { IPDFConfig, IPNGConfig, TExportType } from "../../ts-common/types";
3
+ export declare class Exporter {
4
+ private _name;
5
+ private _view;
6
+ private _version;
7
+ constructor(_name: string, _view: View);
8
+ pdf(config?: IPDFConfig): Promise<void>;
9
+ png(config?: IPNGConfig): Promise<void>;
10
+ protected _rawExport(config: IPDFConfig | IPNGConfig, mode: TExportType, view: View): Promise<void>;
11
+ private _normalizeLink;
12
+ }
@@ -0,0 +1,2 @@
1
+ export declare const shadow: () => any;
2
+ export declare const dropShadow: () => any;
@@ -0,0 +1,15 @@
1
+ import { IEventSystem } from "../../ts-common/events";
2
+ import { DataCollection, DataEvents } from "../../ts-data";
3
+ import { ChartEvents, ILegendConfig, ILegendDrawData, SvgElement } from "./types";
4
+ import { IFitPosition } from "../../ts-common/html";
5
+ export declare class Legend {
6
+ private _data;
7
+ private _events;
8
+ private config;
9
+ private _handlers;
10
+ constructor(_data: DataCollection<any>, config: ILegendConfig, _events: IEventSystem<DataEvents | ChartEvents>);
11
+ scaleReady(sizes: IFitPosition): void;
12
+ paint(width: number, height: number): SvgElement;
13
+ protected _getData(): ILegendDrawData[];
14
+ private setCriticals;
15
+ }
@@ -0,0 +1,13 @@
1
+ export declare class Tooltip {
2
+ private _chart;
3
+ private _prevLine;
4
+ private _mouseOverBar;
5
+ private _tooltip;
6
+ constructor(chart: any);
7
+ destructor(): void;
8
+ _showLineTooltip(lineTooltipItems: any): void;
9
+ _showTooltip(text: any, e: MouseEvent): void;
10
+ _showTooltipOnClosest(closest: any): void;
11
+ _createTooltip(): void;
12
+ private _initEvents;
13
+ }
@@ -0,0 +1,8 @@
1
+ import "../../styles/chart.scss";
2
+ import "../../styles/themes.scss";
3
+ export declare const vmdom: {
4
+ sv: any;
5
+ };
6
+ export { resizeHandler, awaitRedraw, setTheme } from "../../ts-common/dom";
7
+ export { methods } from "../../ts-data";
8
+ export { Chart } from "./Chart";
@@ -0,0 +1,9 @@
1
+ import { VNode } from "../../../ts-common/dom";
2
+ import { IRadarScaleDrawData } from "../types";
3
+ export declare function getCoordinates(percent: number, radiusX: number, radiusY: number, stroke?: number): [number, number];
4
+ export declare function shiftCoordinates(item: [number, number], dx: number, dy: number): [number, number];
5
+ export declare const pieLikeHandlers: {
6
+ onmouseover(shiftX: number, shiftY: number, _: any, node: VNode): void;
7
+ onmouseout(_: any, node: VNode): void;
8
+ };
9
+ export declare function radarScale(data: IRadarScaleDrawData, width: number, height: number): VNode;
@@ -0,0 +1,45 @@
1
+ import { IContainerConfig } from "../../../ts-common/core";
2
+ export declare function getDefaultColor(index?: number, isTreeMapRange?: boolean): string;
3
+ type Locator = (data: any) => number | string;
4
+ export declare function locator(value: string | Locator): Locator;
5
+ export declare function log10(x: number): number;
6
+ export declare const getTextWidth: (...args: string[]) => number;
7
+ export declare function getColorShade(color: string, light: number): string;
8
+ export declare const getFontStyle: (arg: string) => string;
9
+ interface IStop {
10
+ offset: number;
11
+ color: string;
12
+ opacity?: number;
13
+ }
14
+ interface IGradient {
15
+ stops: IStop[];
16
+ }
17
+ interface IText {
18
+ x: number;
19
+ y: number;
20
+ width: number;
21
+ height: number;
22
+ class: string;
23
+ }
24
+ interface ITextObj {
25
+ text1: IText;
26
+ text2: IText;
27
+ changeSector: boolean;
28
+ line: number;
29
+ right: boolean;
30
+ dy: number;
31
+ }
32
+ export declare function linearGradient(grad: IGradient, id: string): any;
33
+ export declare function getRadialGradient(opts: any, stops: IStop[], id: string): any;
34
+ export declare function euclideanDistance(x1: number, y1: number, x2: number, y2: number): number;
35
+ export declare function roundToTwoNumAfterPoint(p: number): number;
36
+ export declare function verticalCenteredText(text: string): any;
37
+ export declare function verticalTopText(text: string): any;
38
+ export declare function verticalBottomText(text: string): any;
39
+ export declare function calcPointRef(pointId: string, serieId: string): string;
40
+ export declare function getClassesForRotateScale(position: any, angle: any): string;
41
+ export declare function getScales(config: any): any[];
42
+ export declare function getSizesSVGText(text: string, config?: IContainerConfig): any[];
43
+ export declare function superposition(objA: IText, objB: IText): boolean;
44
+ export declare function checkPositions(current: IText, previos: IText, radiusX: number, radiusY: number, obj: ITextObj): void;
45
+ export {};
@@ -0,0 +1,2 @@
1
+ import { PointData } from "../types";
2
+ export default function spline(initPoints: PointData[], link?: boolean): string;
@@ -0,0 +1,8 @@
1
+ import { IRadialScaleConfig, SvgElement } from "../types";
2
+ import { Scale } from "./Scale";
3
+ export declare class RadialScale extends Scale {
4
+ config: IRadialScaleConfig;
5
+ constructor(_data: any, config: IRadialScaleConfig);
6
+ paint(width: number, height: number): SvgElement;
7
+ point(val: number): number;
8
+ }
@@ -0,0 +1,22 @@
1
+ import { DataCollection } from "../../../ts-data";
2
+ import { IAxisLike, ILikeSeria, IScale, IScaleConfig, Locator, ScaleType, SvgElement } from "../types";
3
+ export declare class Scale implements IScale {
4
+ protected _data: DataCollection;
5
+ locator: Locator;
6
+ protected _isXDirection: boolean;
7
+ protected config: IScaleConfig;
8
+ protected _axis: IAxisLike<any>;
9
+ protected _position: ScaleType;
10
+ protected _padding: boolean;
11
+ protected _charts: ILikeSeria[];
12
+ constructor(_data: DataCollection, config: IScaleConfig, position: ScaleType);
13
+ addPadding(): void;
14
+ getSize(): number;
15
+ scaleReady(sizes: any): void;
16
+ point(pos: number): number;
17
+ add(val: ILikeSeria): void;
18
+ paint(width: number, height: number): SvgElement;
19
+ scaleGrid(): object;
20
+ protected _setDefaults(config: IScaleConfig): void;
21
+ private _logPoint;
22
+ }
@@ -0,0 +1,12 @@
1
+ import { VNode } from "../../../ts-common/dom";
2
+ import { IGridRenderConfig, IScaleConfig } from "../types";
3
+ type PointInfo = [number, string];
4
+ export declare function bottom(points: PointInfo[], config: IScaleConfig, width: number, height: number): VNode;
5
+ export declare function bottomGrid(points: PointInfo[], width: number, height: number, config: IGridRenderConfig): VNode;
6
+ export declare function top(points: PointInfo[], config: IScaleConfig, width: number, _height: number): VNode;
7
+ export declare function topGrid(points: PointInfo[], _width: number, height: number, config: IGridRenderConfig): VNode;
8
+ export declare function left(points: PointInfo[], config: IScaleConfig, _width: number, height: number): VNode;
9
+ export declare function leftGrid(points: PointInfo[], width: number, height: number, config: IGridRenderConfig): VNode;
10
+ export declare function right(points: PointInfo[], config: IScaleConfig, width: number, height: number): VNode;
11
+ export declare function rightGrid(points: PointInfo[], width: number, height: number, config: IGridRenderConfig): VNode;
12
+ export {};
@@ -0,0 +1,11 @@
1
+ import { IScaleConfig, ITextScale, SvgElement } from "../types";
2
+ import { Scale } from "./Scale";
3
+ import { IFitPosition } from "../../../ts-common/html";
4
+ export declare class TextScale extends Scale implements ITextScale {
5
+ scaleReady(sizes: IFitPosition): void;
6
+ point(value: any): number;
7
+ paint(width: number, height: number): SvgElement;
8
+ scaleGrid(): object;
9
+ protected _setDefaults(config: IScaleConfig): void;
10
+ private _getAxisPoint;
11
+ }
@@ -0,0 +1,9 @@
1
+ import { RadialScale } from "./RadialScale";
2
+ import { Scale } from "./Scale";
3
+ import { TextScale } from "./TextScale";
4
+ declare const scaleTypes: {
5
+ radial: typeof RadialScale;
6
+ text: typeof TextScale;
7
+ numeric: typeof Scale;
8
+ };
9
+ export default scaleTypes;
@@ -0,0 +1,9 @@
1
+ import { ISeriaConfig, PointData, SvgElement } from "../types";
2
+ import ScaleSeria from "./ScaleSeria";
3
+ export default class Area extends ScaleSeria {
4
+ paint(width: number, height: number, prev?: PointData[]): SvgElement;
5
+ paintformAndMarkers(width: number, height: number, prev?: PointData[]): [SvgElement, SvgElement];
6
+ protected _markers(svg: any[]): void;
7
+ protected _form(width: number, height: number, svg: any[], prev: PointData[]): object;
8
+ protected _setDefaults(config: ISeriaConfig): void;
9
+ }
@@ -0,0 +1,22 @@
1
+ import { IScale, ISeriaConfig, PointData, ScaleType, SvgElement, TooltipType } from "../types";
2
+ import ScaleSeria from "./ScaleSeria";
3
+ export default class Bar extends ScaleSeria {
4
+ protected _shift: number;
5
+ protected _baseLinePosition: number;
6
+ addScale(type: ScaleType, scale: IScale): void;
7
+ seriesShift(shift: number): number;
8
+ paint(width: number, height: number, prev?: PointData[]): SvgElement;
9
+ getTooltipType(_id: string, _x?: number, y?: number): TooltipType;
10
+ protected _getClosestDist(x: any, y: any, px: any, py: any): number;
11
+ protected _path(item: any, prev: any): string;
12
+ protected _base(height: any): number;
13
+ protected _text(item: any, prev: any, rotate: any): {
14
+ x: any;
15
+ y: number;
16
+ class: string;
17
+ transform: string;
18
+ };
19
+ protected _getForm(points: PointData[], _width: number, height: number, prev: PointData[]): object;
20
+ protected _getText(item: any): any;
21
+ protected _setDefaults(config: ISeriaConfig): void;
22
+ }
@@ -0,0 +1,18 @@
1
+ import { IScale, PointData, ScaleType, SvgElement, TooltipType } from "../types";
2
+ import Bar from "./Bar";
3
+ export default class BarX extends Bar {
4
+ addScale(type: ScaleType, scale: IScale): void;
5
+ paint(width: number, height: number, prev?: PointData[]): SvgElement;
6
+ getTooltipType(id: string, x?: number, y?: number): TooltipType;
7
+ getClosest(x: number, y: number): [number, number, number, string];
8
+ protected _getText(item: any): any;
9
+ protected _getClosestDist(x: any, y: any, px: any, py: any): number;
10
+ protected _path(item: any, prev: any): string;
11
+ protected _base(height: any): number;
12
+ protected _text(item: any, prev: any, rotate: any): {
13
+ x: number;
14
+ y: any;
15
+ class: string;
16
+ transform: string;
17
+ };
18
+ }
@@ -0,0 +1,31 @@
1
+ import { IEventSystem } from "../../../ts-common/events";
2
+ import { ChartEvents, DrawPoint, IScale, ISeria, ISeriaConfig, PointData, PointType, ScaleType, SvgElement, TooltipType } from "../types";
3
+ import { DataCollection } from "../../../ts-data";
4
+ export default abstract class BaseSeria implements ISeria {
5
+ protected _data: DataCollection<any>;
6
+ id: string;
7
+ config: ISeriaConfig;
8
+ protected _events: IEventSystem<ChartEvents>;
9
+ protected _handlers: {
10
+ onclick: (id: string, value: string) => boolean;
11
+ onmousemove: (id: string, value: string, e: any) => boolean;
12
+ onmouseleave: (id: string, value: string) => boolean;
13
+ };
14
+ protected _points: PointData[];
15
+ protected _drawPointType: DrawPoint;
16
+ constructor(_data: DataCollection<any>, config: ISeriaConfig, other: IEventSystem<ChartEvents>);
17
+ toggle(): void;
18
+ getClosest(x: number, y: number): [number, number, number, string];
19
+ getClosestVertical(x: number): [number, number, number, string, number];
20
+ getTooltipType(_id: string): TooltipType;
21
+ getTooltipText(id: string): any;
22
+ dataReady(prev?: PointData[]): PointData[];
23
+ paint(width: number, height: number): SvgElement;
24
+ getPoints(): PointData[];
25
+ addScale(type: ScaleType, scale: IScale): void;
26
+ protected _getClosestDist(x: number, y: number, px: number, py: number): number;
27
+ protected _calckFinalPoints(_width: number, _height: number): void;
28
+ protected _setDefaults(config: any): void;
29
+ protected _defaultLocator(_: any): any[];
30
+ protected _getPointType(form: PointType, color: string): DrawPoint;
31
+ }
@@ -0,0 +1,20 @@
1
+ import { IFitPosition } from "../../../ts-common/html";
2
+ import { DataCollection } from "../../../ts-data";
3
+ import { ICalendarHeatMapConfig, PointData, SvgElement } from "../types";
4
+ import BaseSeria from "./BaseSeria";
5
+ export default class CalendarHeatMap extends BaseSeria {
6
+ config: ICalendarHeatMapConfig;
7
+ protected _data: DataCollection;
8
+ private _headerHeight;
9
+ private _dateLocator;
10
+ private _valueLocator;
11
+ private _cellSize;
12
+ private _years;
13
+ private _maxValue;
14
+ private _minValue;
15
+ scaleReady(sizes: IFitPosition): IFitPosition;
16
+ dataReady(): PointData[];
17
+ paint(width: number, height: number): SvgElement;
18
+ protected _setDefaults(config: ICalendarHeatMapConfig): void;
19
+ protected _defaultLocator(v: any): any[];
20
+ }
@@ -0,0 +1,5 @@
1
+ import { SvgElement } from "../types";
2
+ import NoScaleSeria from "./NoScaleSeria";
3
+ export default class Donut extends NoScaleSeria {
4
+ paint(width: number, height: number): SvgElement;
5
+ }
@@ -0,0 +1,7 @@
1
+ import { ISeriaConfig, PointData, SvgElement } from "../types";
2
+ import ScaleSeria from "./ScaleSeria";
3
+ export default class Line extends ScaleSeria {
4
+ paint(width: number, height: number): SvgElement;
5
+ protected _getForm(points: PointData[], config: any, width: number, height: number): object;
6
+ protected _setDefaults(config: ISeriaConfig): void;
7
+ }
@@ -0,0 +1,22 @@
1
+ import { INoScaleConfig, Locator, PointData, TooltipType } from "../types";
2
+ import { IFitPosition } from "../../../ts-common/html";
3
+ import BaseSeria from "./BaseSeria";
4
+ export default class NoScaleSeria extends BaseSeria {
5
+ config: INoScaleConfig;
6
+ protected _textLocator: Locator;
7
+ protected _colorLocator: Locator;
8
+ protected _valueLocator: Locator;
9
+ protected _gradient: any;
10
+ protected _center: [number, number];
11
+ protected _tooltipData: Array<[number, number]>;
12
+ private _sum;
13
+ scaleReady(sizes: IFitPosition): IFitPosition;
14
+ dataReady(): PointData[];
15
+ toggle(id?: string): void;
16
+ getClosest(x: number, y: number): [number, number, number, string];
17
+ getTooltipText(id: string): any;
18
+ getTooltipType(_id: string): TooltipType;
19
+ protected _setDefaults(config: INoScaleConfig): void;
20
+ protected _defaultLocator(v: any): any[];
21
+ private _getPercent;
22
+ }
@@ -0,0 +1,5 @@
1
+ import { SvgElement } from "../types";
2
+ import NoScaleSeria from "./NoScaleSeria";
3
+ export default class Pie extends NoScaleSeria {
4
+ paint(width: number, height: number): SvgElement;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { SvgElement } from "../types";
2
+ import NoScaleSeria from "./NoScaleSeria";
3
+ export default class Pie extends NoScaleSeria {
4
+ paint(width: number, height: number): SvgElement;
5
+ }
@@ -0,0 +1,16 @@
1
+ import { IRadarConfig, IScale, PointData, ScaleType, SvgElement } from "../types";
2
+ import { IFitPosition } from "../../../ts-common/html";
3
+ import BaseSeria from "./BaseSeria";
4
+ export default class Radar extends BaseSeria {
5
+ config: IRadarConfig;
6
+ private _scale;
7
+ private _locator;
8
+ addScale(type: ScaleType, scale: IScale): void;
9
+ scaleReady(sizes: IFitPosition): IFitPosition;
10
+ dataReady(prev?: PointData[]): PointData[];
11
+ getTooltipText(id: string): any;
12
+ paint(width: number, height: number): SvgElement;
13
+ protected _calckFinalPoints(width: number, height: number): void;
14
+ protected _defaultLocator(v: any): any;
15
+ protected _setDefaults(config: IRadarConfig): void;
16
+ }
@@ -0,0 +1,15 @@
1
+ import { IScale, Locator, PointData, ScaleType } from "../types";
2
+ import BaseSeria from "./BaseSeria";
3
+ export default class ScaleSeria extends BaseSeria {
4
+ protected _yLocator: Locator;
5
+ protected _xLocator: Locator;
6
+ protected xScale: IScale;
7
+ protected yScale: IScale;
8
+ protected _gradient: any;
9
+ addScale(type: ScaleType, scale: IScale): void;
10
+ paint(width: number, height: number): void;
11
+ dataReady(prev?: PointData[]): PointData[];
12
+ protected _calckFinalPoints(width: number, height: number): void;
13
+ protected _defaultLocator(v: any): any[];
14
+ protected _getCss(): string;
15
+ }
@@ -0,0 +1,6 @@
1
+ import { IScale, ISeriaConfig, ScaleType } from "../types";
2
+ import Line from "./Line";
3
+ export default class Scatter extends Line {
4
+ addScale(type: ScaleType, scale: IScale): void;
5
+ protected _setDefaults(config: ISeriaConfig): void;
6
+ }
@@ -0,0 +1,5 @@
1
+ import { PointData } from "../types";
2
+ import Line from "./Line";
3
+ export default class Spline extends Line {
4
+ protected _getForm(points: PointData[], config: any, width: number, height: number): object;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { PointData } from "../types";
2
+ import Area from "./Area";
3
+ export default class SplineArea extends Area {
4
+ protected _form(width: number, height: number, svg: any[], prev: PointData[]): object;
5
+ }
@@ -0,0 +1,9 @@
1
+ import { IStacker, PointData } from "../types";
2
+ export default class Stacker implements IStacker {
3
+ private _series;
4
+ private _toPaint;
5
+ add(seria: any): void;
6
+ dataReady(prev?: PointData[]): PointData[];
7
+ getPoints(): PointData[];
8
+ paint(width: number, height: number, prev?: PointData[]): any;
9
+ }
@@ -0,0 +1,30 @@
1
+ import { IFitPosition } from "../../../ts-common/html";
2
+ import { TreeCollection } from "../../../ts-data";
3
+ import { ITreeMapConfig, PointData, SvgElement } from "../types";
4
+ import BaseSeria from "./BaseSeria";
5
+ export default class TreeMap extends BaseSeria {
6
+ config: ITreeMapConfig;
7
+ protected _data: TreeCollection;
8
+ private _sum;
9
+ private _maxLevel;
10
+ private _aspectRatio;
11
+ private _layout;
12
+ private _headerHeight;
13
+ private _textLocator;
14
+ private _valueLocator;
15
+ scaleReady(sizes: IFitPosition): IFitPosition;
16
+ toggle(id?: string): void;
17
+ dataReady(): PointData[];
18
+ paint(width: number, height: number): SvgElement;
19
+ private _drawBar;
20
+ private _getBar;
21
+ protected _setDefaults(config: ITreeMapConfig): void;
22
+ protected _defaultLocator(v: any): any[];
23
+ private _getSerie;
24
+ private _getDataLevel;
25
+ private _getMaxLevel;
26
+ private _getDeepParent;
27
+ private _getLayoutObj;
28
+ private _recountParentArea;
29
+ private _toggleGroup;
30
+ }