@amcharts/amcharts5 5.11.2 → 5.12.0
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/.internal/charts/radar/RadarChart.d.ts +1 -0
- package/.internal/charts/radar/RadarChart.d.ts.map +1 -1
- package/.internal/charts/radar/RadarChart.js +4 -0
- package/.internal/charts/radar/RadarChart.js.map +1 -1
- package/.internal/charts/stock/SettingsModal.d.ts +1 -0
- package/.internal/charts/stock/SettingsModal.d.ts.map +1 -1
- package/.internal/charts/stock/SettingsModal.js +11 -3
- package/.internal/charts/stock/SettingsModal.js.map +1 -1
- package/.internal/charts/stock/indicators/Indicator.d.ts +1 -1
- package/.internal/charts/stock/indicators/Indicator.d.ts.map +1 -1
- package/.internal/charts/stock/indicators/Indicator.js.map +1 -1
- package/.internal/charts/stock/toolbar/DrawingControl.d.ts.map +1 -1
- package/.internal/charts/stock/toolbar/DrawingControl.js +6 -3
- package/.internal/charts/stock/toolbar/DrawingControl.js.map +1 -1
- package/.internal/charts/timeline/AxisRendererCurveX.d.ts +132 -0
- package/.internal/charts/timeline/AxisRendererCurveX.d.ts.map +1 -0
- package/.internal/charts/timeline/AxisRendererCurveX.js +537 -0
- package/.internal/charts/timeline/AxisRendererCurveX.js.map +1 -0
- package/.internal/charts/timeline/AxisRendererCurveY.d.ts +132 -0
- package/.internal/charts/timeline/AxisRendererCurveY.d.ts.map +1 -0
- package/.internal/charts/timeline/AxisRendererCurveY.js +308 -0
- package/.internal/charts/timeline/AxisRendererCurveY.js.map +1 -0
- package/.internal/charts/timeline/CurveChart.d.ts +63 -0
- package/.internal/charts/timeline/CurveChart.d.ts.map +1 -0
- package/.internal/charts/timeline/CurveChart.js +123 -0
- package/.internal/charts/timeline/CurveChart.js.map +1 -0
- package/.internal/charts/timeline/CurveColumnSeries.d.ts +66 -0
- package/.internal/charts/timeline/CurveColumnSeries.d.ts.map +1 -0
- package/.internal/charts/timeline/CurveColumnSeries.js +163 -0
- package/.internal/charts/timeline/CurveColumnSeries.js.map +1 -0
- package/.internal/charts/timeline/CurveCursor.d.ts +61 -0
- package/.internal/charts/timeline/CurveCursor.d.ts.map +1 -0
- package/.internal/charts/timeline/CurveCursor.js +134 -0
- package/.internal/charts/timeline/CurveCursor.js.map +1 -0
- package/.internal/charts/timeline/CurveDefaultTheme.d.ts +8 -0
- package/.internal/charts/timeline/CurveDefaultTheme.d.ts.map +1 -0
- package/.internal/charts/timeline/CurveDefaultTheme.js +72 -0
- package/.internal/charts/timeline/CurveDefaultTheme.js.map +1 -0
- package/.internal/charts/timeline/CurveLineSeries.d.ts +40 -0
- package/.internal/charts/timeline/CurveLineSeries.d.ts.map +1 -0
- package/.internal/charts/timeline/CurveLineSeries.js +101 -0
- package/.internal/charts/timeline/CurveLineSeries.js.map +1 -0
- package/.internal/charts/timeline/SerpentineChart.d.ts +60 -0
- package/.internal/charts/timeline/SerpentineChart.d.ts.map +1 -0
- package/.internal/charts/timeline/SerpentineChart.js +146 -0
- package/.internal/charts/timeline/SerpentineChart.js.map +1 -0
- package/.internal/charts/timeline/SpiralChart.d.ts +60 -0
- package/.internal/charts/timeline/SpiralChart.d.ts.map +1 -0
- package/.internal/charts/timeline/SpiralChart.js +58 -0
- package/.internal/charts/timeline/SpiralChart.js.map +1 -0
- package/.internal/charts/xy/axes/DateAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.js +1 -0
- package/.internal/charts/xy/axes/DateAxis.js.map +1 -1
- package/.internal/charts/xy/series/BaseColumnSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/BaseColumnSeries.js +3 -1
- package/.internal/charts/xy/series/BaseColumnSeries.js.map +1 -1
- package/.internal/core/Classes.d.ts +16 -0
- package/.internal/core/Classes.d.ts.map +1 -1
- package/.internal/core/Classes.js.map +1 -1
- package/.internal/core/Registry.js +1 -1
- package/.internal/core/Registry.js.map +1 -1
- package/.internal/core/render/SerialChart.d.ts.map +1 -1
- package/.internal/core/render/SerialChart.js +12 -0
- package/.internal/core/render/SerialChart.js.map +1 -1
- package/.internal/core/render/Sprite.d.ts +7 -0
- package/.internal/core/render/Sprite.d.ts.map +1 -1
- package/.internal/core/render/Sprite.js +10 -0
- package/.internal/core/render/Sprite.js.map +1 -1
- package/.internal/core/util/List.d.ts +12 -0
- package/.internal/core/util/List.d.ts.map +1 -1
- package/.internal/core/util/List.js +23 -2
- package/.internal/core/util/List.js.map +1 -1
- package/.internal/core/util/Math.d.ts.map +1 -1
- package/.internal/core/util/Math.js +12 -5
- package/.internal/core/util/Math.js.map +1 -1
- package/.internal/plugins/json/Classes-script.d.ts +16 -0
- package/.internal/plugins/json/Classes-script.d.ts.map +1 -1
- package/.internal/plugins/json/Classes-script.js +8 -0
- package/.internal/plugins/json/Classes-script.js.map +1 -1
- package/.internal/plugins/json/Classes.d.ts +16 -0
- package/.internal/plugins/json/Classes.d.ts.map +1 -1
- package/.internal/plugins/json/Classes.js +8 -0
- package/.internal/plugins/json/Classes.js.map +1 -1
- package/CHANGELOG.md +24 -0
- package/examples/javascript/flow-arc-horizontal/package.json +1 -1
- package/examples/javascript/flow-arc-vertical/package.json +1 -1
- package/examples/javascript/flow-chord/package.json +1 -1
- package/examples/javascript/flow-chord-directed/package.json +1 -1
- package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/javascript/flow-sankey/package.json +1 -1
- package/examples/javascript/gauge/package.json +1 -1
- package/examples/javascript/gauge-bands/package.json +1 -1
- package/examples/javascript/hierarchy-force-directed/package.json +1 -1
- package/examples/javascript/hierarchy-pack/package.json +1 -1
- package/examples/javascript/hierarchy-partition/package.json +1 -1
- package/examples/javascript/hierarchy-sunburst/package.json +1 -1
- package/examples/javascript/hierarchy-tree/package.json +1 -1
- package/examples/javascript/hierarchy-treemap/package.json +1 -1
- package/examples/javascript/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/javascript/jest/package.json +1 -1
- package/examples/javascript/json-pie/package.json +1 -1
- package/examples/javascript/json-xy/package.json +1 -1
- package/examples/javascript/map-animating-along-lines/package.json +1 -1
- package/examples/javascript/map-clustered-points/package.json +1 -1
- package/examples/javascript/map-day-and-night/package.json +1 -1
- package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/javascript/map-with-bubbles/package.json +1 -1
- package/examples/javascript/map-zoom-to-country/package.json +1 -1
- package/examples/javascript/misc-40-charts/package.json +1 -1
- package/examples/javascript/misc-microchart-grid/package.json +1 -1
- package/examples/javascript/pie-chart/package.json +1 -1
- package/examples/javascript/pie-donut-chart/package.json +1 -1
- package/examples/javascript/pie-variable-radius/package.json +1 -1
- package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
- package/examples/javascript/radar-heat-map/package.json +1 -1
- package/examples/javascript/radar-line/package.json +1 -1
- package/examples/javascript/radar-time-line/package.json +1 -1
- package/examples/javascript/sliced-funnel/package.json +1 -1
- package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/javascript/sliced-pyramid/package.json +1 -1
- package/examples/javascript/stock-chart/package.json +1 -1
- package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
- package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
- package/examples/javascript/stock-chart-intraday/package.json +1 -1
- package/examples/javascript/stock-chart-live/package.json +1 -1
- package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/javascript/timeline-horizontal-serpentine-chart/README.md +6 -0
- package/examples/javascript/timeline-horizontal-serpentine-chart/index.css +11 -0
- package/examples/javascript/timeline-horizontal-serpentine-chart/index.html +12 -0
- package/examples/javascript/timeline-horizontal-serpentine-chart/index.js +268 -0
- package/examples/javascript/timeline-horizontal-serpentine-chart/package.json +16 -0
- package/examples/javascript/timeline-horizontal-serpentine-chart/webpack.config.js +38 -0
- package/examples/javascript/timeline-linear-process-diagram/README.md +6 -0
- package/examples/javascript/timeline-linear-process-diagram/index.css +11 -0
- package/examples/javascript/timeline-linear-process-diagram/index.html +12 -0
- package/examples/javascript/timeline-linear-process-diagram/index.js +365 -0
- package/examples/javascript/timeline-linear-process-diagram/package.json +16 -0
- package/examples/javascript/timeline-linear-process-diagram/webpack.config.js +38 -0
- package/examples/javascript/timeline-serpentine-chart/README.md +6 -0
- package/examples/javascript/timeline-serpentine-chart/index.css +11 -0
- package/examples/javascript/timeline-serpentine-chart/index.html +12 -0
- package/examples/javascript/timeline-serpentine-chart/index.js +274 -0
- package/examples/javascript/timeline-serpentine-chart/package.json +16 -0
- package/examples/javascript/timeline-serpentine-chart/webpack.config.js +38 -0
- package/examples/javascript/timeline-spiral-chart/README.md +6 -0
- package/examples/javascript/timeline-spiral-chart/index.css +11 -0
- package/examples/javascript/timeline-spiral-chart/index.html +12 -0
- package/examples/javascript/timeline-spiral-chart/index.js +274 -0
- package/examples/javascript/timeline-spiral-chart/package.json +16 -0
- package/examples/javascript/timeline-spiral-chart/webpack.config.js +38 -0
- package/examples/javascript/venn-diagram/package.json +1 -1
- package/examples/javascript/wordcloud-with-data/package.json +1 -1
- package/examples/javascript/wordcloud-with-text/package.json +1 -1
- package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/javascript/xy-bubble/package.json +1 -1
- package/examples/javascript/xy-candlestick/package.json +1 -1
- package/examples/javascript/xy-clustered-column/package.json +1 -1
- package/examples/javascript/xy-column/package.json +1 -1
- package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/javascript/xy-data-grouping/package.json +1 -1
- package/examples/javascript/xy-draggable-range/package.json +1 -1
- package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/javascript/xy-dumbbell plot/package.json +1 -1
- package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/javascript/xy-line/package.json +1 -1
- package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/javascript/xy-live-data/package.json +1 -1
- package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/javascript/xy-ohlc/package.json +1 -1
- package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/javascript/xy-smoothed-line/package.json +1 -1
- package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/javascript/xy-stacked-column/package.json +1 -1
- package/examples/javascript/xy-stacked-step/package.json +1 -1
- package/examples/javascript/xy-stock/package.json +1 -1
- package/examples/javascript/xy-stock-comparing/package.json +1 -1
- package/examples/typescript/flow-arc-horizontal/package.json +1 -1
- package/examples/typescript/flow-arc-vertical/package.json +1 -1
- package/examples/typescript/flow-chord/package.json +1 -1
- package/examples/typescript/flow-chord-directed/package.json +1 -1
- package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/typescript/flow-sankey/package.json +1 -1
- package/examples/typescript/gauge/package.json +1 -1
- package/examples/typescript/gauge-bands/package.json +1 -1
- package/examples/typescript/hierarchy-force-directed/package.json +1 -1
- package/examples/typescript/hierarchy-pack/package.json +1 -1
- package/examples/typescript/hierarchy-partition/package.json +1 -1
- package/examples/typescript/hierarchy-sunburst/package.json +1 -1
- package/examples/typescript/hierarchy-tree/package.json +1 -1
- package/examples/typescript/hierarchy-treemap/package.json +1 -1
- package/examples/typescript/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/typescript/jest/package.json +1 -1
- package/examples/typescript/json-pie/package.json +1 -1
- package/examples/typescript/json-xy/package.json +1 -1
- package/examples/typescript/map-animating-along-lines/package.json +1 -1
- package/examples/typescript/map-clustered-points/package.json +1 -1
- package/examples/typescript/map-day-and-night/package.json +1 -1
- package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/typescript/map-with-bubbles/package.json +1 -1
- package/examples/typescript/map-zoom-to-country/package.json +1 -1
- package/examples/typescript/misc-40-charts/package.json +1 -1
- package/examples/typescript/misc-microchart-grid/package.json +1 -1
- package/examples/typescript/pie-chart/package.json +1 -1
- package/examples/typescript/pie-donut-chart/package.json +1 -1
- package/examples/typescript/pie-variable-radius/package.json +1 -1
- package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
- package/examples/typescript/radar-heat-map/package.json +1 -1
- package/examples/typescript/radar-line/package.json +1 -1
- package/examples/typescript/radar-time-line/package.json +1 -1
- package/examples/typescript/sliced-funnel/package.json +1 -1
- package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/typescript/sliced-pyramid/package.json +1 -1
- package/examples/typescript/stock-chart/package.json +1 -1
- package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
- package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
- package/examples/typescript/stock-chart-intraday/package.json +1 -1
- package/examples/typescript/stock-chart-live/package.json +1 -1
- package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/typescript/timeline-horizontal-serpentine-chart/README.md +6 -0
- package/examples/typescript/timeline-horizontal-serpentine-chart/index.css +11 -0
- package/examples/typescript/timeline-horizontal-serpentine-chart/index.html +12 -0
- package/examples/typescript/timeline-horizontal-serpentine-chart/index.ts +268 -0
- package/examples/typescript/timeline-horizontal-serpentine-chart/package.json +18 -0
- package/examples/typescript/timeline-horizontal-serpentine-chart/tsconfig.json +12 -0
- package/examples/typescript/timeline-horizontal-serpentine-chart/webpack.config.js +45 -0
- package/examples/typescript/timeline-linear-process-diagram/README.md +6 -0
- package/examples/typescript/timeline-linear-process-diagram/index.css +11 -0
- package/examples/typescript/timeline-linear-process-diagram/index.html +12 -0
- package/examples/typescript/timeline-linear-process-diagram/index.ts +365 -0
- package/examples/typescript/timeline-linear-process-diagram/package.json +18 -0
- package/examples/typescript/timeline-linear-process-diagram/tsconfig.json +12 -0
- package/examples/typescript/timeline-linear-process-diagram/webpack.config.js +45 -0
- package/examples/typescript/timeline-serpentine-chart/README.md +6 -0
- package/examples/typescript/timeline-serpentine-chart/index.css +11 -0
- package/examples/typescript/timeline-serpentine-chart/index.html +12 -0
- package/examples/typescript/timeline-serpentine-chart/index.ts +274 -0
- package/examples/typescript/timeline-serpentine-chart/package.json +18 -0
- package/examples/typescript/timeline-serpentine-chart/tsconfig.json +12 -0
- package/examples/typescript/timeline-serpentine-chart/webpack.config.js +45 -0
- package/examples/typescript/timeline-spiral-chart/README.md +6 -0
- package/examples/typescript/timeline-spiral-chart/index.css +11 -0
- package/examples/typescript/timeline-spiral-chart/index.html +12 -0
- package/examples/typescript/timeline-spiral-chart/index.ts +274 -0
- package/examples/typescript/timeline-spiral-chart/package.json +18 -0
- package/examples/typescript/timeline-spiral-chart/tsconfig.json +12 -0
- package/examples/typescript/timeline-spiral-chart/webpack.config.js +45 -0
- package/examples/typescript/venn-diagram/package.json +1 -1
- package/examples/typescript/wordcloud-with-data/package.json +1 -1
- package/examples/typescript/wordcloud-with-text/package.json +1 -1
- package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/typescript/xy-bubble/package.json +1 -1
- package/examples/typescript/xy-candlestick/package.json +1 -1
- package/examples/typescript/xy-clustered-column/package.json +1 -1
- package/examples/typescript/xy-column/package.json +1 -1
- package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/typescript/xy-data-grouping/package.json +1 -1
- package/examples/typescript/xy-draggable-range/package.json +1 -1
- package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/typescript/xy-dumbbell plot/package.json +1 -1
- package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/typescript/xy-line/package.json +1 -1
- package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/typescript/xy-live-data/package.json +1 -1
- package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/typescript/xy-ohlc/package.json +1 -1
- package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/typescript/xy-smoothed-line/package.json +1 -1
- package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/typescript/xy-stacked-column/package.json +1 -1
- package/examples/typescript/xy-stacked-step/package.json +1 -1
- package/examples/typescript/xy-stock/package.json +1 -1
- package/examples/typescript/xy-stock-comparing/package.json +1 -1
- package/package.json +1 -1
- package/timeline.d.ts +11 -0
- package/timeline.d.ts.map +1 -0
- package/timeline.js +11 -0
- package/timeline.js.map +1 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { CurveChart } from "./CurveChart";
|
|
2
|
+
import type { Grid } from "../xy/axes/Grid";
|
|
3
|
+
import type { IPoint } from "../../core/util/IPoint";
|
|
4
|
+
import type { Graphics } from "../../core/render/Graphics";
|
|
5
|
+
import type { AxisTick } from "../xy/axes/AxisTick";
|
|
6
|
+
import type { AxisBullet } from "../xy/axes/AxisBullet";
|
|
7
|
+
import type { Tooltip } from "../../core/render/Tooltip";
|
|
8
|
+
import type { AxisRendererCurveX } from "./AxisRendererCurveX";
|
|
9
|
+
import { AxisRenderer, IAxisRendererSettings, IAxisRendererPrivate } from "../xy/axes/AxisRenderer";
|
|
10
|
+
import { AxisLabelRadial } from "../xy/axes/AxisLabelRadial";
|
|
11
|
+
import { ListTemplate } from "../../core/util/List";
|
|
12
|
+
export interface IAxisRendererCurveYSettings extends IAxisRendererSettings {
|
|
13
|
+
/**
|
|
14
|
+
* Axis length in pixels.
|
|
15
|
+
*
|
|
16
|
+
* [[SerpentineChart]] and [[SpiralChart]] will ignore this setting as they
|
|
17
|
+
* calculate axis length by the `yAxisRadius` setting of a chart itself.
|
|
18
|
+
*
|
|
19
|
+
* @default 60
|
|
20
|
+
*/
|
|
21
|
+
axisLength?: number;
|
|
22
|
+
/**
|
|
23
|
+
* X-axis renderer.
|
|
24
|
+
*
|
|
25
|
+
* This setting is required.
|
|
26
|
+
*/
|
|
27
|
+
xRenderer?: AxisRendererCurveX;
|
|
28
|
+
/**
|
|
29
|
+
* Relative location of the axis on the chart: 0-1.
|
|
30
|
+
*
|
|
31
|
+
* * `0` - start
|
|
32
|
+
* * `1` - end
|
|
33
|
+
*
|
|
34
|
+
* @default 0.5
|
|
35
|
+
*/
|
|
36
|
+
axisLocation?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Should axis labels rotation should be adjusted to the axis rotation?
|
|
39
|
+
*
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
rotateLabels?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface IAxisRendererCurveYPrivate extends IAxisRendererPrivate {
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Renderer for [[CurveChart]] "vertical" axes.
|
|
48
|
+
*
|
|
49
|
+
* @see {@link https://www.amcharts.com/docs/v5/charts/timeline/} for more info
|
|
50
|
+
* @since 5.12.0
|
|
51
|
+
* @important
|
|
52
|
+
*/
|
|
53
|
+
export declare class AxisRendererCurveY extends AxisRenderer {
|
|
54
|
+
/**
|
|
55
|
+
* Chart this renderer is for.
|
|
56
|
+
*/
|
|
57
|
+
chart: CurveChart | undefined;
|
|
58
|
+
static className: string;
|
|
59
|
+
static classNames: Array<string>;
|
|
60
|
+
_settings: IAxisRendererCurveYSettings;
|
|
61
|
+
_privateSettings: IAxisRendererCurveYPrivate;
|
|
62
|
+
protected _fillGenerator: import("d3-shape").Arc<any, import("d3-shape").DefaultArcObject>;
|
|
63
|
+
/**
|
|
64
|
+
* A [[TemplateList]] with all the labels attached to the axis.
|
|
65
|
+
*
|
|
66
|
+
* `labels.template` can be used to configure appearance of the labels.
|
|
67
|
+
*
|
|
68
|
+
* @default new ListTemplate<AxisLabelRadial>
|
|
69
|
+
*/
|
|
70
|
+
readonly labels: ListTemplate<AxisLabelRadial>;
|
|
71
|
+
_afterNew(): void;
|
|
72
|
+
_changed(): void;
|
|
73
|
+
/**
|
|
74
|
+
* @ignore
|
|
75
|
+
*/
|
|
76
|
+
processAxis(): void;
|
|
77
|
+
/**
|
|
78
|
+
* @ignore
|
|
79
|
+
*/
|
|
80
|
+
updateLayout(): void;
|
|
81
|
+
/**
|
|
82
|
+
* @ignore
|
|
83
|
+
*/
|
|
84
|
+
updateGrid(grid?: Grid, position?: number, endPosition?: number): void;
|
|
85
|
+
protected _handleOpposite(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Converts relative position to X/Y point.
|
|
88
|
+
*
|
|
89
|
+
* @param position Position
|
|
90
|
+
* @return Point
|
|
91
|
+
*/
|
|
92
|
+
positionToPoint(position: number, positionX?: number, doNotFix?: boolean): IPoint;
|
|
93
|
+
/**
|
|
94
|
+
* @ignore
|
|
95
|
+
*/
|
|
96
|
+
updateLabel(label?: AxisLabelRadial, position?: number, endPosition?: number, count?: number): void;
|
|
97
|
+
/**
|
|
98
|
+
* @ignore
|
|
99
|
+
*/
|
|
100
|
+
updateTick(tick?: AxisTick, position?: number, endPosition?: number, count?: number): void;
|
|
101
|
+
/**
|
|
102
|
+
* @ignore
|
|
103
|
+
*/
|
|
104
|
+
updateBullet(bullet?: AxisBullet, position?: number, endPosition?: number): void;
|
|
105
|
+
getPoints(positionX: number, positionY: number, endPositionX: number, endPositionY: number): IPoint[] | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* @ignore
|
|
108
|
+
*/
|
|
109
|
+
updateFill(fill?: Graphics, position?: number, endPosition?: number): void;
|
|
110
|
+
/**
|
|
111
|
+
* Returns axis length in pixels.
|
|
112
|
+
*
|
|
113
|
+
* @return Length
|
|
114
|
+
*/
|
|
115
|
+
axisLength(): number;
|
|
116
|
+
/**
|
|
117
|
+
* @ignore
|
|
118
|
+
*/
|
|
119
|
+
updateTooltipBounds(_tooltip: Tooltip): void;
|
|
120
|
+
/**
|
|
121
|
+
* Converts relative position to pixels.
|
|
122
|
+
*
|
|
123
|
+
* @param position Position
|
|
124
|
+
* @return Pixels
|
|
125
|
+
*/
|
|
126
|
+
positionToCoordinate(position: number): number;
|
|
127
|
+
/**
|
|
128
|
+
* @ignore
|
|
129
|
+
*/
|
|
130
|
+
positionTooltip(tooltip: Tooltip, position: number): void;
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=AxisRendererCurveY.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AxisRendererCurveY.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/charts/timeline/AxisRendererCurveY.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAQpD,MAAM,WAAW,2BAA4B,SAAQ,qBAAqB;IAEzE;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B;;;;;;;MAOE;IACF,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CAEvB;AAED,MAAM,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M,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IAIjG;;OAEG;IACI,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;IAsB1E;;;;OAIG;IACI,UAAU,IAAI,MAAM;IAI3B;;OAEG;IACI,mBAAmB,CAAC,QAAQ,EAAE,OAAO;IAI5C;;;;;OAKG;IACI,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAWrD;;OAEG;IACI,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM;CAOzD"}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { AxisRenderer } from "../xy/axes/AxisRenderer";
|
|
2
|
+
import { AxisLabelRadial } from "../xy/axes/AxisLabelRadial";
|
|
3
|
+
import { arc } from "d3-shape";
|
|
4
|
+
import { ListTemplate } from "../../core/util/List";
|
|
5
|
+
import { Template } from "../../core/util/Template";
|
|
6
|
+
import * as $utils from "../../core/util/Utils";
|
|
7
|
+
import * as $type from "../../core/util/Type";
|
|
8
|
+
import * as $math from "../../core/util/Math";
|
|
9
|
+
import * as $array from "../../core/util/Array";
|
|
10
|
+
/**
|
|
11
|
+
* Renderer for [[CurveChart]] "vertical" axes.
|
|
12
|
+
*
|
|
13
|
+
* @see {@link https://www.amcharts.com/docs/v5/charts/timeline/} for more info
|
|
14
|
+
* @since 5.12.0
|
|
15
|
+
* @important
|
|
16
|
+
*/
|
|
17
|
+
export class AxisRendererCurveY extends AxisRenderer {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
Object.defineProperty(this, "_fillGenerator", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
configurable: true,
|
|
23
|
+
writable: true,
|
|
24
|
+
value: arc()
|
|
25
|
+
});
|
|
26
|
+
/**
|
|
27
|
+
* A [[TemplateList]] with all the labels attached to the axis.
|
|
28
|
+
*
|
|
29
|
+
* `labels.template` can be used to configure appearance of the labels.
|
|
30
|
+
*
|
|
31
|
+
* @default new ListTemplate<AxisLabelRadial>
|
|
32
|
+
*/
|
|
33
|
+
Object.defineProperty(this, "labels", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
value: this.addDisposer(new ListTemplate(Template.new({}), () => AxisLabelRadial._new(this._root, {
|
|
38
|
+
themeTags: $utils.mergeTags(this.labels.template.get("themeTags", []), this.get("themeTags", []))
|
|
39
|
+
}, [this.labels.template])))
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
_afterNew() {
|
|
43
|
+
this._settings.themeTags = $utils.mergeTags(this._settings.themeTags, ["renderer", "radial"]);
|
|
44
|
+
super._afterNew();
|
|
45
|
+
this.setPrivate("letter", "Y");
|
|
46
|
+
this.setRaw("position", "absolute");
|
|
47
|
+
}
|
|
48
|
+
_changed() {
|
|
49
|
+
super._changed();
|
|
50
|
+
if (this.isDirty("axisLength")) {
|
|
51
|
+
this.updateLayout();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @ignore
|
|
56
|
+
*/
|
|
57
|
+
processAxis() {
|
|
58
|
+
super.processAxis();
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @ignore
|
|
62
|
+
*/
|
|
63
|
+
updateLayout() {
|
|
64
|
+
const chart = this.chart;
|
|
65
|
+
if (chart) {
|
|
66
|
+
const p0 = this.positionToPoint(0, 0);
|
|
67
|
+
const p1 = this.positionToPoint(1, 0);
|
|
68
|
+
// draw axis
|
|
69
|
+
this.set("draw", (display) => {
|
|
70
|
+
display.moveTo(p0.x, p0.y);
|
|
71
|
+
display.lineTo(p1.x, p1.y);
|
|
72
|
+
});
|
|
73
|
+
this.axis.markDirtySize();
|
|
74
|
+
chart._updateMasks();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @ignore
|
|
79
|
+
*/
|
|
80
|
+
updateGrid(grid, position, endPosition) {
|
|
81
|
+
if (grid) {
|
|
82
|
+
if (!$type.isNumber(position)) {
|
|
83
|
+
position = 0;
|
|
84
|
+
}
|
|
85
|
+
let location = grid.get("location", 0.5);
|
|
86
|
+
if ($type.isNumber(endPosition) && endPosition != position) {
|
|
87
|
+
position = position + (endPosition - position) * location;
|
|
88
|
+
}
|
|
89
|
+
this.toggleVisibility(grid, position, 0, 1);
|
|
90
|
+
let xRenderer = this.get("xRenderer");
|
|
91
|
+
if (xRenderer) {
|
|
92
|
+
const points = xRenderer.get("points");
|
|
93
|
+
if (points) {
|
|
94
|
+
grid.set("draw", (display) => {
|
|
95
|
+
let previousPoint;
|
|
96
|
+
$array.each(points, (_point, index) => {
|
|
97
|
+
let pointPostion = xRenderer.pointPostion[index];
|
|
98
|
+
let p = this.positionToPoint(position, pointPostion, true);
|
|
99
|
+
if (index == 0) {
|
|
100
|
+
display.moveTo(p.x, p.y);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
// if distance between previous and current is very small, we skip it
|
|
104
|
+
if (previousPoint && Math.hypot(previousPoint.x - p.x, previousPoint.y - p.y) < .5) {
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
display.lineTo(p.x, p.y);
|
|
108
|
+
previousPoint = p;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
// do not delete
|
|
118
|
+
_handleOpposite() { }
|
|
119
|
+
/**
|
|
120
|
+
* Converts relative position to X/Y point.
|
|
121
|
+
*
|
|
122
|
+
* @param position Position
|
|
123
|
+
* @return Point
|
|
124
|
+
*/
|
|
125
|
+
positionToPoint(position, positionX, doNotFix) {
|
|
126
|
+
if (positionX == undefined) {
|
|
127
|
+
positionX = 0;
|
|
128
|
+
}
|
|
129
|
+
const xRenderer = this.get("xRenderer");
|
|
130
|
+
if (xRenderer) {
|
|
131
|
+
return xRenderer.positionToPoint(positionX, position, doNotFix);
|
|
132
|
+
}
|
|
133
|
+
return { x: 0, y: 0 };
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @ignore
|
|
137
|
+
*/
|
|
138
|
+
updateLabel(label, position, endPosition, count) {
|
|
139
|
+
if (label) {
|
|
140
|
+
if (!$type.isNumber(position)) {
|
|
141
|
+
position = 0;
|
|
142
|
+
}
|
|
143
|
+
let location = 0.5;
|
|
144
|
+
if ($type.isNumber(count) && count > 1) {
|
|
145
|
+
location = label.get("multiLocation", location);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
location = label.get("location", location);
|
|
149
|
+
}
|
|
150
|
+
if ($type.isNumber(endPosition) && endPosition != position) {
|
|
151
|
+
position = position + (endPosition - position) * location;
|
|
152
|
+
}
|
|
153
|
+
const point = this.positionToPoint(position, 0);
|
|
154
|
+
const xRenderer = this.get("xRenderer");
|
|
155
|
+
if (xRenderer) {
|
|
156
|
+
let angle = 0;
|
|
157
|
+
if (xRenderer) {
|
|
158
|
+
angle = xRenderer.positionToAngle(0) - 90;
|
|
159
|
+
}
|
|
160
|
+
label.setAll({
|
|
161
|
+
x: point.x,
|
|
162
|
+
y: point.y
|
|
163
|
+
});
|
|
164
|
+
if (this.get("rotateLabels", true)) {
|
|
165
|
+
label.set("rotation", angle);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
this.toggleVisibility(label, position, label.get("minPosition", 0), label.get("maxPosition", 1));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* @ignore
|
|
173
|
+
*/
|
|
174
|
+
updateTick(tick, position, endPosition, count) {
|
|
175
|
+
if (tick) {
|
|
176
|
+
if (!$type.isNumber(position)) {
|
|
177
|
+
position = 0;
|
|
178
|
+
}
|
|
179
|
+
let location = 0.5;
|
|
180
|
+
if ($type.isNumber(count) && count > 1) {
|
|
181
|
+
location = tick.get("multiLocation", location);
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
location = tick.get("location", location);
|
|
185
|
+
}
|
|
186
|
+
if ($type.isNumber(endPosition) && endPosition != position) {
|
|
187
|
+
position = position + (endPosition - position) * location;
|
|
188
|
+
}
|
|
189
|
+
const point = this.positionToPoint(position, 0);
|
|
190
|
+
const xRenderer = this.get("xRenderer");
|
|
191
|
+
if (xRenderer) {
|
|
192
|
+
let angle = 0;
|
|
193
|
+
if (xRenderer) {
|
|
194
|
+
angle = xRenderer.positionToAngle(0) - 90;
|
|
195
|
+
}
|
|
196
|
+
let length = tick.get("length", 0);
|
|
197
|
+
const inside = tick.get("inside");
|
|
198
|
+
if (inside) {
|
|
199
|
+
length *= -1;
|
|
200
|
+
}
|
|
201
|
+
tick.set("draw", (display) => {
|
|
202
|
+
display.moveTo(point.x, point.y);
|
|
203
|
+
display.lineTo(point.x + length * $math.cos(angle), point.y + length * $math.sin(angle));
|
|
204
|
+
});
|
|
205
|
+
this.toggleVisibility(tick, position, tick.get("minPosition", 0), tick.get("maxPosition", 1));
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* @ignore
|
|
211
|
+
*/
|
|
212
|
+
updateBullet(bullet, position, endPosition) {
|
|
213
|
+
if (bullet) {
|
|
214
|
+
const sprite = bullet.get("sprite");
|
|
215
|
+
if (sprite) {
|
|
216
|
+
if (!$type.isNumber(position)) {
|
|
217
|
+
position = 0;
|
|
218
|
+
}
|
|
219
|
+
let location = bullet.get("location", 0.5);
|
|
220
|
+
if ($type.isNumber(endPosition) && endPosition != position) {
|
|
221
|
+
position = position + (endPosition - position) * location;
|
|
222
|
+
}
|
|
223
|
+
const point = this.positionToPoint(position);
|
|
224
|
+
sprite.setAll({ x: point.x, y: point.y });
|
|
225
|
+
this.toggleVisibility(sprite, position, 0, 1);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
getPoints(positionX, positionY, endPositionX, endPositionY) {
|
|
230
|
+
var _a;
|
|
231
|
+
return (_a = this.get("xRenderer")) === null || _a === void 0 ? void 0 : _a.getPoints(positionX, positionY, endPositionX, endPositionY);
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* @ignore
|
|
235
|
+
*/
|
|
236
|
+
updateFill(fill, position, endPosition) {
|
|
237
|
+
if (fill) {
|
|
238
|
+
if (position == null) {
|
|
239
|
+
position = 0;
|
|
240
|
+
}
|
|
241
|
+
if (endPosition == null) {
|
|
242
|
+
endPosition = 1;
|
|
243
|
+
}
|
|
244
|
+
const points = this.getPoints(0, position, 1, endPosition);
|
|
245
|
+
if (points) {
|
|
246
|
+
fill.set("draw", (display) => {
|
|
247
|
+
display.moveTo(points[0].x, points[0].y);
|
|
248
|
+
$array.each(points, (point) => {
|
|
249
|
+
display.lineTo(point.x, point.y);
|
|
250
|
+
});
|
|
251
|
+
display.closePath();
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Returns axis length in pixels.
|
|
258
|
+
*
|
|
259
|
+
* @return Length
|
|
260
|
+
*/
|
|
261
|
+
axisLength() {
|
|
262
|
+
return this.get("axisLength", 60);
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* @ignore
|
|
266
|
+
*/
|
|
267
|
+
updateTooltipBounds(_tooltip) {
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Converts relative position to pixels.
|
|
271
|
+
*
|
|
272
|
+
* @param position Position
|
|
273
|
+
* @return Pixels
|
|
274
|
+
*/
|
|
275
|
+
positionToCoordinate(position) {
|
|
276
|
+
if (this._inversed) {
|
|
277
|
+
position = Math.min(this._end, position);
|
|
278
|
+
return (this._end - position) * this._axisLength;
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
position = Math.max(this._start, position);
|
|
282
|
+
return (position - this._start) * this._axisLength;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* @ignore
|
|
287
|
+
*/
|
|
288
|
+
positionTooltip(tooltip, position) {
|
|
289
|
+
const xRenderer = this.get("xRenderer");
|
|
290
|
+
if (xRenderer) {
|
|
291
|
+
const point = this.positionToPoint(position, xRenderer.axis.get("start", 0));
|
|
292
|
+
this._positionTooltip(tooltip, point);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
Object.defineProperty(AxisRendererCurveY, "className", {
|
|
297
|
+
enumerable: true,
|
|
298
|
+
configurable: true,
|
|
299
|
+
writable: true,
|
|
300
|
+
value: "AxisRendererCurveY"
|
|
301
|
+
});
|
|
302
|
+
Object.defineProperty(AxisRendererCurveY, "classNames", {
|
|
303
|
+
enumerable: true,
|
|
304
|
+
configurable: true,
|
|
305
|
+
writable: true,
|
|
306
|
+
value: AxisRenderer.classNames.concat([AxisRendererCurveY.className])
|
|
307
|
+
});
|
|
308
|
+
//# sourceMappingURL=AxisRendererCurveY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AxisRendererCurveY.js","sourceRoot":"","sources":["../../../../../src/.internal/charts/timeline/AxisRendererCurveY.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAA+C,MAAM,yBAAyB,CAAC;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AA2ChD;;;;;;GAM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AC;GAAC","sourcesContent":["import type { CurveChart } from \"./CurveChart\";\nimport type { Grid } from \"../xy/axes/Grid\";\nimport type { IPoint } from \"../../core/util/IPoint\";\nimport type { Graphics } from \"../../core/render/Graphics\";\nimport type { AxisTick } from \"../xy/axes/AxisTick\";\nimport type { AxisBullet } from \"../xy/axes/AxisBullet\";\nimport type { Tooltip } from \"../../core/render/Tooltip\";\nimport type { AxisRendererCurveX } from \"./AxisRendererCurveX\";\n\nimport { AxisRenderer, IAxisRendererSettings, IAxisRendererPrivate } from \"../xy/axes/AxisRenderer\";\nimport { AxisLabelRadial } from \"../xy/axes/AxisLabelRadial\";\nimport { arc } from \"d3-shape\";\nimport { ListTemplate } from \"../../core/util/List\";\nimport { Template } from \"../../core/util/Template\";\n\nimport * as $utils from \"../../core/util/Utils\";\nimport * as $type from \"../../core/util/Type\";\nimport * as $math from \"../../core/util/Math\";\nimport * as $array from \"../../core/util/Array\";\n\nexport interface IAxisRendererCurveYSettings extends IAxisRendererSettings {\n\n\t/**\n\t * Axis length in pixels.\n\t * \n\t * [[SerpentineChart]] and [[SpiralChart]] will ignore this setting as they\n\t * calculate axis length by the `yAxisRadius` setting of a chart itself.\n\t *\n\t * @default 60\n\t */\n\taxisLength?: number;\n\n\t/**\n\t * X-axis renderer.\n\t *\n\t * This setting is required.\n\t */\n\txRenderer?: AxisRendererCurveX;\n\n\t/**\n\t* Relative location of the axis on the chart: 0-1.\n\t*\n\t* * `0` - start\n\t* * `1` - end\n\t*\n\t* @default 0.5\n\t*/\n\taxisLocation?: number;\n\t\n\t/**\n\t * Should axis labels rotation should be adjusted to the axis rotation?\n\t *\n\t * @default false\n\t */\n\trotateLabels?: boolean;\n\n}\n\nexport interface IAxisRendererCurveYPrivate extends IAxisRendererPrivate {\n}\n\n/**\n * Renderer for [[CurveChart]] \"vertical\" axes.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/timeline/} for more info\n * @since 5.12.0\n * @important\n */\nexport class AxisRendererCurveY extends AxisRenderer {\n\n\t/**\n\t * Chart this renderer is for.\n\t */\n\tdeclare public chart: CurveChart | undefined;\n\n\tpublic static className: string = \"AxisRendererCurveY\";\n\tpublic static classNames: Array<string> = AxisRenderer.classNames.concat([AxisRendererCurveY.className]);\n\n\tdeclare public _settings: IAxisRendererCurveYSettings;\n\tdeclare public _privateSettings: IAxisRendererCurveYPrivate;\n\n\tprotected _fillGenerator = arc();\n\n\t/**\n\t * A [[TemplateList]] with all the labels attached to the axis.\n\t *\n\t * `labels.template` can be used to configure appearance of the labels.\n\t *\n\t * @default new ListTemplate<AxisLabelRadial>\n\t */\n\tpublic readonly labels: ListTemplate<AxisLabelRadial> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => AxisLabelRadial._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.labels.template.get(\"themeTags\", []), this.get(\"themeTags\", []))\n\t\t}, [this.labels.template])\n\t));\n\n\tpublic _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"renderer\", \"radial\"]);\n\t\tsuper._afterNew();\n\t\tthis.setPrivate(\"letter\", \"Y\");\n\t\tthis.setRaw(\"position\", \"absolute\");\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"axisLength\")) {\n\t\t\tthis.updateLayout();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processAxis() {\n\t\tsuper.processAxis();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLayout() {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tconst p0 = this.positionToPoint(0, 0);\n\t\t\tconst p1 = this.positionToPoint(1, 0);\n\n\t\t\t// draw axis\n\t\t\tthis.set(\"draw\", (display) => {\n\t\t\t\tdisplay.moveTo(p0.x, p0.y);\n\t\t\t\tdisplay.lineTo(p1.x, p1.y);\n\t\t\t})\n\n\t\t\tthis.axis.markDirtySize();\n\t\t\tchart._updateMasks();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateGrid(grid?: Grid, position?: number, endPosition?: number) {\n\t\tif (grid) {\n\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = grid.get(\"location\", 0.5);\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tthis.toggleVisibility(grid, position, 0, 1);\n\n\t\t\tlet xRenderer = this.get(\"xRenderer\")!;\n\t\t\tif (xRenderer) {\n\t\t\t\tconst points = xRenderer.get(\"points\");\n\t\t\t\tif (points) {\n\t\t\t\t\tgrid.set(\"draw\", (display) => {\n\t\t\t\t\t\tlet previousPoint: IPoint | undefined;\n\t\t\t\t\t\t$array.each(points, (_point, index) => {\n\t\t\t\t\t\t\tlet pointPostion = xRenderer.pointPostion[index];\n\t\t\t\t\t\t\tlet p = this.positionToPoint(position!, pointPostion, true);\n\n\t\t\t\t\t\t\tif (index == 0) {\n\t\t\t\t\t\t\t\tdisplay.moveTo(p.x, p.y);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// if distance between previous and current is very small, we skip it\n\t\t\t\t\t\t\t\tif (previousPoint && Math.hypot(previousPoint.x - p.x, previousPoint.y - p.y) < .5) {\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tdisplay.lineTo(p.x, p.y);\n\t\t\t\t\t\t\t\t\tpreviousPoint = p;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\n\n\t// do not delete\n\tprotected _handleOpposite() { }\n\n\t/**\n\t * Converts relative position to X/Y point.\n\t *\n\t * @param position Position\n\t * @return Point\n\t */\n\tpublic positionToPoint(position: number, positionX?: number, doNotFix?: boolean): IPoint {\n\t\tif (positionX == undefined) {\n\t\t\tpositionX = 0;\n\t\t}\n\n\t\tconst xRenderer = this.get(\"xRenderer\");\n\t\tif (xRenderer) {\n\t\t\treturn xRenderer.positionToPoint(positionX, position, doNotFix)\n\t\t}\n\t\treturn { x: 0, y: 0 };\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLabel(label?: AxisLabelRadial, position?: number, endPosition?: number, count?: number) {\n\t\tif (label) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = label.get(\"multiLocation\", location);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = label.get(\"location\", location);\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tconst point = this.positionToPoint(position, 0);\n\t\t\tconst xRenderer = this.get(\"xRenderer\");\n\t\t\tif (xRenderer) {\n\t\t\t\tlet angle = 0;\n\t\t\t\tif (xRenderer) {\n\t\t\t\t\tangle = xRenderer.positionToAngle(0) - 90;\n\t\t\t\t}\n\t\t\t\tlabel.setAll({\n\t\t\t\t\tx: point.x,\n\t\t\t\t\ty: point.y\n\t\t\t\t});\n\n\t\t\t\tif(this.get(\"rotateLabels\", true)){\n\t\t\t\t\tlabel.set(\"rotation\", angle);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\tthis.toggleVisibility(label, position, label.get(\"minPosition\", 0), label.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTick(tick?: AxisTick, position?: number, endPosition?: number, count?: number) {\n\t\tif (tick) {\n\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = tick.get(\"multiLocation\", location);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = tick.get(\"location\", location);\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tconst point = this.positionToPoint(position, 0);\n\t\t\tconst xRenderer = this.get(\"xRenderer\");\n\t\t\tif (xRenderer) {\n\t\t\t\tlet angle = 0;\n\t\t\t\tif (xRenderer) {\n\t\t\t\t\tangle = xRenderer.positionToAngle(0) - 90;\n\t\t\t\t}\n\n\t\t\t\tlet length = tick.get(\"length\", 0);\n\t\t\t\tconst inside = tick.get(\"inside\");\n\n\t\t\t\tif (inside) {\n\t\t\t\t\tlength *= -1\n\t\t\t\t}\n\n\t\t\t\ttick.set(\"draw\", (display) => {\n\t\t\t\t\tdisplay.moveTo(point.x, point.y);\n\t\t\t\t\tdisplay.lineTo(point.x + length * $math.cos(angle), point.y + length * $math.sin(angle));\n\t\t\t\t})\n\n\t\t\t\tthis.toggleVisibility(tick, position, tick.get(\"minPosition\", 0), tick.get(\"maxPosition\", 1));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateBullet(bullet?: AxisBullet, position?: number, endPosition?: number) {\n\t\tif (bullet) {\n\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\n\t\t\tif (sprite) {\n\n\t\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\t\tposition = 0;\n\t\t\t\t}\n\n\t\t\t\tlet location = bullet.get(\"location\", 0.5);\n\t\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t\t}\n\n\t\t\t\tconst point = this.positionToPoint(position);\n\n\t\t\t\tsprite.setAll({ x: point.x, y: point.y });\n\n\t\t\t\tthis.toggleVisibility(sprite, position, 0, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\n\tpublic getPoints(positionX: number, positionY: number, endPositionX: number, endPositionY: number) {\n\t\treturn this.get(\"xRenderer\")?.getPoints(positionX, positionY, endPositionX, endPositionY);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateFill(fill?: Graphics, position?: number, endPosition?: number) {\n\t\tif (fill) {\n\t\t\tif (position == null) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t\tif (endPosition == null) {\n\t\t\t\tendPosition = 1;\n\t\t\t}\n\n\t\t\tconst points = this.getPoints(0, position, 1, endPosition);\n\t\t\tif (points) {\n\t\t\t\tfill.set(\"draw\", (display) => {\n\t\t\t\t\tdisplay.moveTo(points[0].x, points[0].y);\n\t\t\t\t\t$array.each(points, (point) => {\n\t\t\t\t\t\tdisplay.lineTo(point.x, point.y);\n\t\t\t\t\t})\n\t\t\t\t\tdisplay.closePath();\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns axis length in pixels.\n\t *\n\t * @return Length\n\t */\n\tpublic axisLength(): number {\n\t\treturn this.get(\"axisLength\", 60);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltipBounds(_tooltip: Tooltip) {\n\n\t}\n\n\t/**\n\t * Converts relative position to pixels.\n\t *\n\t * @param position Position\n\t * @return Pixels\n\t */\n\tpublic positionToCoordinate(position: number): number {\n\t\tif (this._inversed) {\n\t\t\tposition = Math.min(this._end, position);\n\t\t\treturn (this._end - position) * this._axisLength;\n\t\t}\n\t\telse {\n\t\t\tposition = Math.max(this._start, position);\n\t\t\treturn (position - this._start) * this._axisLength;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic positionTooltip(tooltip: Tooltip, position: number) {\n\t\tconst xRenderer = this.get(\"xRenderer\");\t\t\n\t\tif(xRenderer){\n\t\t\tconst point = this.positionToPoint(position, xRenderer.axis.get(\"start\", 0));\n\t\t\tthis._positionTooltip(tooltip, point);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { AxisRendererCurveX } from "./AxisRendererCurveX";
|
|
2
|
+
import type { AxisRendererCurveY } from "./AxisRendererCurveY";
|
|
3
|
+
import type { Axis } from "../xy/axes/Axis";
|
|
4
|
+
import type { CurveCursor } from "./CurveCursor";
|
|
5
|
+
import type { CurveColumnSeries } from "./CurveColumnSeries";
|
|
6
|
+
import type { IPoint } from "../../core/util/IPoint";
|
|
7
|
+
import { XYChart, IXYChartPrivate, IXYChartSettings } from "../xy/XYChart";
|
|
8
|
+
import { Container } from "../../core/render/Container";
|
|
9
|
+
export interface ICurveChartSettings extends IXYChartSettings {
|
|
10
|
+
/**
|
|
11
|
+
* [[CurveCursor]] instance.
|
|
12
|
+
*
|
|
13
|
+
* @see {@link https://www.amcharts.com/docs/v5/charts/timeline-chart/#Cursor} for more info
|
|
14
|
+
*/
|
|
15
|
+
cursor?: CurveCursor;
|
|
16
|
+
}
|
|
17
|
+
export interface ICurveChartPrivate extends IXYChartPrivate {
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Base chart for a Timeline chart.
|
|
21
|
+
*
|
|
22
|
+
* For this chart to work, it needs curve points provided via renderer of
|
|
23
|
+
* its X-axis.
|
|
24
|
+
*
|
|
25
|
+
* Note: it is an experimental chart type and does not support all the
|
|
26
|
+
* functionality of the [[XYChart]].
|
|
27
|
+
*
|
|
28
|
+
* @see {@link https://www.amcharts.com/docs/v5/charts/timeline/} for more info
|
|
29
|
+
* @since 5.12.0
|
|
30
|
+
* @important
|
|
31
|
+
*/
|
|
32
|
+
export declare class CurveChart extends XYChart {
|
|
33
|
+
/**
|
|
34
|
+
* [[Container]] where chart elements go.
|
|
35
|
+
*
|
|
36
|
+
* @default Container.new()
|
|
37
|
+
*/
|
|
38
|
+
readonly curveContainer: Container;
|
|
39
|
+
static className: string;
|
|
40
|
+
static classNames: Array<string>;
|
|
41
|
+
_settings: ICurveChartSettings;
|
|
42
|
+
_privateSettings: ICurveChartPrivate;
|
|
43
|
+
_seriesType: CurveColumnSeries;
|
|
44
|
+
protected _afterNew(): void;
|
|
45
|
+
protected _maskGrid(): void;
|
|
46
|
+
protected _addCursor(cursor: CurveCursor): void;
|
|
47
|
+
_updateMasks(): void;
|
|
48
|
+
/**
|
|
49
|
+
* @ignore
|
|
50
|
+
*/
|
|
51
|
+
_updateMask(container: Container): void;
|
|
52
|
+
/**
|
|
53
|
+
* @ignore
|
|
54
|
+
*/
|
|
55
|
+
processAxis(axis: Axis<AxisRendererCurveY | AxisRendererCurveX>): void;
|
|
56
|
+
/**
|
|
57
|
+
* @ignore
|
|
58
|
+
*/
|
|
59
|
+
inPlot(_point: IPoint): boolean;
|
|
60
|
+
protected _tooltipToLocal(point: IPoint): IPoint;
|
|
61
|
+
protected _handlePinch(): void;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=CurveChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CurveChart.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/charts/timeline/CurveChart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGrD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAIxD,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAE5D;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CAErB;AAED,MAAM,WAAW,kBAAmB,SAAQ,eAAe;CAE1D;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,UAAW,SAAQ,OAAO;IAEtC;;;;OAIG;IACH,SAAgB,cAAc,YAAmF;IAEjH,OAAc,SAAS,EAAE,MAAM,CAAgB;IAC/C,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAqD;IAE7E,SAAS,EAAE,mBAAmB,CAAC;IAC/B,gBAAgB,EAAE,kBAAkB,CAAC;IAErC,WAAW,EAAE,iBAAiB,CAAC;IAG9C,SAAS,CAAC,SAAS;IAqBnB,SAAS,CAAC,SAAS;IAKnB,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,WAAW;IAMjC,YAAY;IAoBnB;;OAEG;IACI,WAAW,CAAC,SAAS,EAAE,SAAS;IAuBvC;;OAEG;IACI,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IAItE;;OAEG;IACI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAItC,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAIhD,SAAS,CAAC,YAAY;CAGtB"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { CurveDefaultTheme } from "./CurveDefaultTheme";
|
|
2
|
+
import { XYChart } from "../xy/XYChart";
|
|
3
|
+
import { p50 } from "../../core/util/Percent";
|
|
4
|
+
import { Container } from "../../core/render/Container";
|
|
5
|
+
import { Graphics } from "../../core/render/Graphics";
|
|
6
|
+
/**
|
|
7
|
+
* Base chart for a Timeline chart.
|
|
8
|
+
*
|
|
9
|
+
* For this chart to work, it needs curve points provided via renderer of
|
|
10
|
+
* its X-axis.
|
|
11
|
+
*
|
|
12
|
+
* Note: it is an experimental chart type and does not support all the
|
|
13
|
+
* functionality of the [[XYChart]].
|
|
14
|
+
*
|
|
15
|
+
* @see {@link https://www.amcharts.com/docs/v5/charts/timeline/} for more info
|
|
16
|
+
* @since 5.12.0
|
|
17
|
+
* @important
|
|
18
|
+
*/
|
|
19
|
+
export class CurveChart extends XYChart {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
/**
|
|
23
|
+
* [[Container]] where chart elements go.
|
|
24
|
+
*
|
|
25
|
+
* @default Container.new()
|
|
26
|
+
*/
|
|
27
|
+
Object.defineProperty(this, "curveContainer", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: this.plotContainer.children.push(Container.new(this._root, { x: p50, y: p50 }))
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
_afterNew() {
|
|
35
|
+
this._defaultThemes.push(CurveDefaultTheme.new(this._root));
|
|
36
|
+
super._afterNew();
|
|
37
|
+
const curveContainer = this.curveContainer;
|
|
38
|
+
const gridContainer = this.gridContainer;
|
|
39
|
+
const topGridContainer = this.topGridContainer;
|
|
40
|
+
const seriesContainer = this.seriesContainer;
|
|
41
|
+
const bulletsContainer = this.bulletsContainer;
|
|
42
|
+
curveContainer.children.pushAll([gridContainer, seriesContainer, topGridContainer, bulletsContainer]);
|
|
43
|
+
seriesContainer.set("mask", Graphics.new(this._root, {}));
|
|
44
|
+
gridContainer.set("mask", Graphics.new(this._root, {}));
|
|
45
|
+
this._disposers.push(this.plotContainer.events.on("boundschanged", () => {
|
|
46
|
+
this._updateMasks();
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
_maskGrid() {
|
|
50
|
+
}
|
|
51
|
+
_addCursor(cursor) {
|
|
52
|
+
this.curveContainer.children.push(cursor);
|
|
53
|
+
}
|
|
54
|
+
// do not delete
|
|
55
|
+
_updateMasks() {
|
|
56
|
+
this.xAxes.each((axis) => {
|
|
57
|
+
const renderer = axis.get("renderer");
|
|
58
|
+
renderer._updateLayout();
|
|
59
|
+
});
|
|
60
|
+
this._updateMask(this.seriesContainer);
|
|
61
|
+
this._updateMask(this.gridContainer);
|
|
62
|
+
this.series.each((series) => {
|
|
63
|
+
if (series.get("maskBullets")) {
|
|
64
|
+
this._updateMask(series.bulletsContainer);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
series.bulletsContainer.set("mask", undefined);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @ignore
|
|
73
|
+
*/
|
|
74
|
+
_updateMask(container) {
|
|
75
|
+
const mask = container.get("mask");
|
|
76
|
+
if (mask) {
|
|
77
|
+
const xAxis = this.xAxes.getIndex(0);
|
|
78
|
+
const yAxis = this.yAxes.getIndex(0);
|
|
79
|
+
if (xAxis && yAxis) {
|
|
80
|
+
const renderer = xAxis.get("renderer");
|
|
81
|
+
const points = renderer.getPoints(xAxis.get("start", 0), yAxis.get("start", 0), xAxis.get("end", 1), yAxis.get("end", 1));
|
|
82
|
+
mask.set("draw", (display) => {
|
|
83
|
+
display.moveTo(points[0].x, points[0].y);
|
|
84
|
+
for (let i = 1; i < points.length; i++) {
|
|
85
|
+
display.lineTo(points[i].x, points[i].y);
|
|
86
|
+
}
|
|
87
|
+
display.closePath();
|
|
88
|
+
});
|
|
89
|
+
xAxis.markDirtySize();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* @ignore
|
|
95
|
+
*/
|
|
96
|
+
processAxis(axis) {
|
|
97
|
+
this.curveContainer.children.unshift(axis);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @ignore
|
|
101
|
+
*/
|
|
102
|
+
inPlot(_point) {
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
_tooltipToLocal(point) {
|
|
106
|
+
return this.curveContainer._display.toLocal(point);
|
|
107
|
+
}
|
|
108
|
+
_handlePinch() {
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
Object.defineProperty(CurveChart, "className", {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
configurable: true,
|
|
114
|
+
writable: true,
|
|
115
|
+
value: "CurveChart"
|
|
116
|
+
});
|
|
117
|
+
Object.defineProperty(CurveChart, "classNames", {
|
|
118
|
+
enumerable: true,
|
|
119
|
+
configurable: true,
|
|
120
|
+
writable: true,
|
|
121
|
+
value: XYChart.classNames.concat([CurveChart.className])
|
|
122
|
+
});
|
|
123
|
+
//# sourceMappingURL=CurveChart.js.map
|