1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | import { AxisRendererY, IAxisRendererYProperties, IAxisRendererYAdapters, IAxisRendererYEvents } from "./AxisRendererY";
|
11 | import { AxisTick } from "./AxisTick";
|
12 | import { RadarChart } from "../types/RadarChart";
|
13 | import { IPoint } from "../../core/defs/IPoint";
|
14 | import { Grid } from "./Grid";
|
15 | import { AxisBreak } from "./AxisBreak";
|
16 | import { MutableValueDisposer } from "../../core/utils/Disposer";
|
17 | import { Percent } from "../../core/utils/Percent";
|
18 | import { Sprite } from "../../core/Sprite";
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | export interface IAxisRendererRadialProperties extends IAxisRendererYProperties {
|
29 | |
30 |
|
31 |
|
32 | startAngle?: number;
|
33 | |
34 |
|
35 |
|
36 | endAngle?: number;
|
37 | |
38 |
|
39 |
|
40 |
|
41 |
|
42 | gridType?: "circles" | "polygons";
|
43 | |
44 |
|
45 |
|
46 | axisAngle?: number;
|
47 | |
48 |
|
49 |
|
50 |
|
51 |
|
52 | radius?: number | Percent;
|
53 | |
54 |
|
55 |
|
56 |
|
57 |
|
58 | innerRadius?: number | Percent;
|
59 | }
|
60 |
|
61 |
|
62 |
|
63 | export interface IAxisRendererRadialEvents extends IAxisRendererYEvents {
|
64 | }
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | export interface IAxisRendererRadialAdapters extends IAxisRendererYAdapters, IAxisRendererRadialProperties {
|
71 | }
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 | export declare class AxisRendererRadial extends AxisRendererY {
|
82 | |
83 |
|
84 |
|
85 | _properties: IAxisRendererRadialProperties;
|
86 | |
87 |
|
88 |
|
89 | _adapter: IAxisRendererRadialAdapters;
|
90 | |
91 |
|
92 |
|
93 | _events: IAxisRendererRadialEvents;
|
94 | |
95 |
|
96 |
|
97 | protected _chart: MutableValueDisposer<RadarChart>;
|
98 | |
99 |
|
100 |
|
101 | pixelRadiusReal: number;
|
102 | |
103 |
|
104 |
|
105 | _chartType: RadarChart;
|
106 | |
107 |
|
108 |
|
109 |
|
110 |
|
111 | constructor();
|
112 | /**
|
113 | * Validates Axis renderer.
|
114 | *
|
115 | * @ignore Exclude from docs
|
116 | */
|
117 | validate(): void;
|
118 | /**
|
119 | * Returns actual length of the Axis, in pixels.
|
120 | *
|
121 | * @return Length (px)
|
122 | */
|
123 | readonly axisLength: number;
|
124 | /**
|
125 | * Outer radius of the axis.
|
126 | *
|
127 | * Can be absolute (px) or relative ([[Percent]]).
|
128 | *
|
129 | * @param value Outer radius
|
130 | */
|
131 | /**
|
132 | * @return Outer radius
|
133 | */
|
134 | radius: number | Percent;
|
135 | /**
|
136 | * Outer radius in pixels.
|
137 | *
|
138 | * @return Outer radius (px)
|
139 | */
|
140 | readonly pixelRadius: number;
|
141 | /**
|
142 | * Inner radius of the axis.
|
143 | *
|
144 | * Can be absolute (px) or relative ([[Percent]]).
|
145 | *
|
146 | * @param value Outer radius
|
147 | */
|
148 | /**
|
149 | * @return Inner radius
|
150 | */
|
151 | innerRadius: number | Percent;
|
152 | /**
|
153 | * Inner radius in pixels.
|
154 | *
|
155 | * @return Inner radius (px)
|
156 | */
|
157 | readonly pixelInnerRadius: number;
|
158 | /**
|
159 | * Converts relative position on axis to point coordinates.
|
160 | *
|
161 | * @param position Position (0-1)
|
162 | * @param position2 Position (0-1) Position on the second axis
|
163 | * @return Point
|
164 | */
|
165 | positionToPoint(position: number, position2?: number): IPoint;
|
166 | /**
|
167 | * Updates and positions the axis line element.
|
168 | *
|
169 | * @ignore Exclude from docs
|
170 | */
|
171 | updateAxisLine(): void;
|
172 | /**
|
173 | * Updates and positions a grid element.
|
174 | *
|
175 | * @ignore Exclude from docs
|
176 | * @param grid Grid element
|
177 | * @param position Starting position
|
178 | * @param endPosition End position
|
179 | */
|
180 | updateGridElement(grid: Grid, position: number, endPosition: number): void;
|
181 | /**
|
182 | * Updates and positions a label element.
|
183 | *
|
184 | * @ignore Exclude from docs
|
185 | * @param label Label element
|
186 | * @param position Starting position
|
187 | * @param endPosition Ending position
|
188 | */
|
189 | updateLabelElement(label: this["_labelType"], position: number, endPosition: number, location?: number): void;
|
190 | /**
|
191 | * Updates and positions the base grid element.
|
192 | *
|
193 | * @ignore Exclude from docs
|
194 | */
|
195 | updateBaseGridElement(): void;
|
196 | /**
|
197 | * Checks if point is within bounds of a container.
|
198 | *
|
199 | * @ignore Exclude from docs
|
200 | * @param point Point coordinates
|
201 | * @return Fits?
|
202 | */
|
203 | fitsToBounds(point: IPoint): boolean;
|
204 | /**
|
205 | * Start angle of the axis in degrees. (0-360)
|
206 | *
|
207 | * @param value Start angle
|
208 | */
|
209 | /**
|
210 | * @return Start angle
|
211 | */
|
212 | startAngle: number;
|
213 | /**
|
214 | * End angle of the axis in degrees. (0-360)
|
215 | *
|
216 | * @param value End angle
|
217 | */
|
218 | /**
|
219 | * @return End angle
|
220 | */
|
221 | endAngle: number;
|
222 | /**
|
223 | * Angle of the radial axis in degrees. (0-360)
|
224 | *
|
225 | * @param value Axis angle
|
226 | */
|
227 | /**
|
228 | * @return Axis angle
|
229 | */
|
230 | axisAngle: number;
|
231 | /**
|
232 | * Grid type for radial axis.
|
233 | *
|
234 | * A grid on radia axis can either be perfect circles ("circles"), or
|
235 | * straight lines ("polygons").
|
236 | *
|
237 | * @default "circles"
|
238 | * @param value Grid type
|
239 | */
|
240 | /**
|
241 | * Grid type
|
242 | */
|
243 | gridType: "circles" | "polygons";
|
244 | /**
|
245 | * [getPositionRangePath description]
|
246 | *
|
247 | * @ignore Exclude from docs
|
248 | * @todo Description
|
249 | * @param startPosition Starting position
|
250 | * @param endPosition End position
|
251 | * @return SVG path
|
252 | */
|
253 | getPositionRangePath(startPosition: number, endPosition: number): string;
|
254 | /**
|
255 | * Updates and positions an axis break element.
|
256 | *
|
257 | * @ignore Exclude from docs
|
258 | * @param axisBreak Break element
|
259 | */
|
260 | updateBreakElement(axisBreak: AxisBreak): void;
|
261 | /**
|
262 | * Creates visual elements for and axis break.
|
263 | *
|
264 | * @ignore Exclude from docs
|
265 | * @param axisBreak Axis break
|
266 | */
|
267 | createBreakSprites(axisBreak: AxisBreak): void;
|
268 | /**
|
269 | * Updates some of the Axis tooltip's visual properties, related to
|
270 | * rendering of the Axis.
|
271 | *
|
272 | * @todo Description (review)
|
273 | * @ignore Exclude from docs
|
274 | */
|
275 | updateTooltip(): void;
|
276 | /**
|
277 | * Updates and positions a tick element.
|
278 | *
|
279 | * @ignore Exclude from docs
|
280 | * @param tick Tick element
|
281 | * @param position Position
|
282 | */
|
283 | updateTickElement(tick: AxisTick, position: number, endPosition: number): void;
|
284 | /**
|
285 | * Updates and positions axis bullet.
|
286 | *
|
287 | * @ignore Exclude from docs
|
288 | * @param bullet AxisBullet element
|
289 | * @param position Starting position
|
290 | * @param endPosition End position
|
291 | */
|
292 | updateBullet(bullet: Sprite, position: number, endPosition: number): void;
|
293 | /**
|
294 | * Converts a position on the axis to a coordinate in pixels.
|
295 | *
|
296 | * @ignore Exclude from docs
|
297 | * @param position Position (0-1)
|
298 | * @return Coordinate (px)
|
299 | */
|
300 | positionToCoordinate(position: number): number;
|
301 | /**
|
302 | * Converts a point at specific coordinates to a relative position (0-1)
|
303 | * on the axis.
|
304 | *
|
305 | * @param point Point
|
306 | * @return Position (0-1)
|
307 | */
|
308 | pointToPosition(point: IPoint): number;
|
309 | /**
|
310 | * A chart, associated with the Axis.
|
311 | *
|
312 | * @ignore Exclude from docs
|
313 | * @param value Chart
|
314 | */
|
315 | /**
|
316 | * @ignore Exclude from docs
|
317 | * @return Chart
|
318 | */
|
319 | chart: RadarChart;
|
320 | }
|