1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | import { Container, IContainerProperties, IContainerAdapters, IContainerEvents } from "../../core/Container";
|
11 | import { Axis, AxisDataItem } from "./Axis";
|
12 | import { MutableValueDisposer } from "../../core/utils/Disposer";
|
13 | import { IWavedShape } from "../../core/defs/IWavedShape";
|
14 | import { List } from "../../core/utils/List";
|
15 | import { IPoint } from "../../core/defs/IPoint";
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | export interface IAxisBreakProperties extends IContainerProperties {
|
26 | |
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | breakSize?: number;
|
39 | |
40 |
|
41 |
|
42 | startValue?: number;
|
43 | |
44 |
|
45 |
|
46 | endValue?: number;
|
47 | }
|
48 |
|
49 |
|
50 |
|
51 | export interface IAxisBreakEvents extends IContainerEvents {
|
52 | }
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 | export interface IAxisBreakAdapters extends IContainerAdapters, IAxisBreakProperties {
|
59 | }
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | export declare class AxisBreak extends Container {
|
74 | |
75 |
|
76 |
|
77 | _properties: IAxisBreakProperties;
|
78 | |
79 |
|
80 |
|
81 | _adapter: IAxisBreakAdapters;
|
82 | |
83 |
|
84 |
|
85 | _events: IAxisBreakEvents;
|
86 | |
87 |
|
88 |
|
89 | _axisType: Axis;
|
90 | |
91 |
|
92 |
|
93 | protected _axis: MutableValueDisposer<this["_axisType"]>;
|
94 | |
95 |
|
96 |
|
97 | protected _startLine: IWavedShape;
|
98 | |
99 |
|
100 |
|
101 | protected _endLine: IWavedShape;
|
102 | |
103 |
|
104 |
|
105 | protected _fillShape: IWavedShape;
|
106 | |
107 |
|
108 |
|
109 | dataItems: List<AxisDataItem>;
|
110 | |
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 | adjustedStartValue: number;
|
117 | |
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 | adjustedEndValue: number;
|
124 | |
125 |
|
126 |
|
127 | constructor();
|
128 | dispose(): void;
|
129 | /**
|
130 | * An element used for the starting line of the break.
|
131 | *
|
132 | * @param sprite Element
|
133 | */
|
134 | /**
|
135 | * @return Element
|
136 | */
|
137 | startLine: IWavedShape;
|
138 | /**
|
139 | * An element used for the end line of the break.
|
140 | *
|
141 | * @param sprite Element
|
142 | */
|
143 | /**
|
144 | * @return Element
|
145 | */
|
146 | endLine: IWavedShape;
|
147 | /**
|
148 | * An element used for fill of the break.
|
149 | *
|
150 | * @param sprite Element
|
151 | */
|
152 | /**
|
153 | * @return Element
|
154 | */
|
155 | fillShape: IWavedShape;
|
156 | /**
|
157 | * Adds a break element (e.g. lines, fill) to the break, which is
|
158 | * [[Container]].
|
159 | *
|
160 | * @ignore Exclude from docs
|
161 | * @param sprite Element to add
|
162 | */
|
163 | addBreakSprite(sprite: IWavedShape): void;
|
164 | /**
|
165 | * An Axis this Break is associated with.
|
166 | *
|
167 | * @param axis Axis
|
168 | */
|
169 | /**
|
170 | * @return Axis
|
171 | */
|
172 | axis: this["_axisType"];
|
173 | /**
|
174 | * A size of the break relative to the actual size of the scope break spans.
|
175 | *
|
176 | * For example, if `breakSize = 0.1` and unbroken scope of values it spans
|
177 | * would be 100 pixels, the break would be 10 pixels wide.
|
178 | *
|
179 | * 0 means the break will completely collapse and hide the values.
|
180 | * 1 means break would be not collapse at all, which would make it
|
181 | * effectively useless.
|
182 | *
|
183 | * @default 0.01
|
184 | * @param value Relative axis break
|
185 | */
|
186 | /**
|
187 | * @return Relative axis break
|
188 | */
|
189 | breakSize: number;
|
190 | /**
|
191 | * Returns pixel coordinates of axis break's start.
|
192 | *
|
193 | * @return Start point
|
194 | */
|
195 | readonly startPoint: IPoint;
|
196 | /**
|
197 | * Returns pixel coordinates of axis break's end.
|
198 | *
|
199 | * @return End point
|
200 | */
|
201 | readonly endPoint: IPoint;
|
202 | /**
|
203 | * Returns a relative position at which axis break starts.
|
204 | *
|
205 | * This is a calculated position, meaning it shows relative position of the
|
206 | * break after break is applied.
|
207 | *
|
208 | * @return Start position
|
209 | */
|
210 | readonly startPosition: number;
|
211 | /**
|
212 | * Returns a relative position at which axis break ends.
|
213 | *
|
214 | * This is a calculated position, meaning it shows relative position of the
|
215 | * break after break is applied.
|
216 | *
|
217 | * @return End position
|
218 | */
|
219 | readonly endPosition: number;
|
220 | /**
|
221 | * Draws the axis break.
|
222 | *
|
223 | * @ignore Exclude from docs
|
224 | */
|
225 | draw(): void;
|
226 | /**
|
227 | * A starting value for the break.
|
228 | *
|
229 | * @param value Starting value
|
230 | */
|
231 | /**
|
232 | * @return Starting value
|
233 | */
|
234 | startValue: number;
|
235 | /**
|
236 | * An end value for the break.
|
237 | *
|
238 | * @param value End value
|
239 | */
|
240 | /**
|
241 | * @return End value
|
242 | */
|
243 | endValue: number;
|
244 | }
|