UNPKG

4.35 kBTypeScriptView Raw
1/**
2 * A module which defines functionality related to Category Axis Break.
3 */
4/**
5 * ============================================================================
6 * IMPORTS
7 * ============================================================================
8 * @hidden
9 */
10import { AxisBreak, IAxisBreakProperties, IAxisBreakAdapters, IAxisBreakEvents } from "./AxisBreak";
11import { CategoryAxis } from "./CategoryAxis";
12/**
13 * ============================================================================
14 * REQUISITES
15 * ============================================================================
16 * @hidden
17 */
18/**
19 * Defines properties for [[CategoryAxisBreak]].
20 */
21export interface ICategoryAxisBreakProperties extends IAxisBreakProperties {
22 /**
23 * Category break starts on.
24 */
25 startCategory?: string;
26 /**
27 * Category break ends on.
28 */
29 endCategory?: string;
30 /**
31 * Location where break starts within cell (0-1).
32 */
33 startLocation?: number;
34 /**
35 * Location where break ends within cell (0-1).
36 */
37 endLocation?: number;
38}
39/**
40 * Defines events for [[CategoryAxisBreak]].
41 */
42export interface ICategoryAxisBreakEvents extends IAxisBreakEvents {
43}
44/**
45 * Defines adapters for [[CategoryAxisBreak]].
46 *
47 * @see {@link Adapter}
48 */
49export interface ICategoryAxisBreakAdapters extends IAxisBreakAdapters, ICategoryAxisBreakProperties {
50}
51/**
52 * ============================================================================
53 * MAIN CLASS
54 * ============================================================================
55 * @hidden
56 */
57/**
58 * Base class to define "breaks" in axes
59 * @see {@link ICategoryAxisBreakEvents} for a list of available events
60 * @see {@link ICategoryAxisBreakAdapters} for a list of available Adapters
61 */
62export declare class CategoryAxisBreak extends AxisBreak {
63 /**
64 * Defines available properties.
65 */
66 _properties: ICategoryAxisBreakProperties;
67 /**
68 * Defines available adapters.
69 */
70 _adapter: ICategoryAxisBreakAdapters;
71 /**
72 * Defines available events.
73 */
74 _events: ICategoryAxisBreakEvents;
75 /**
76 * Defines the type of the Axis this break is used for.
77 */
78 _axisType: CategoryAxis;
79 /**
80 * Constructor
81 */
82 constructor();
83 /**
84 * Pixel position of the break's start.
85 *
86 * @return Position (px)
87 * @readonly
88 */
89 readonly startPosition: number;
90 /**
91 * Pixel position of the break's end.
92 *
93 * @return Position (px)
94 * @readonly
95 */
96 readonly endPosition: number;
97 /**
98 * A category break starts on.
99 *
100 * @param value Start category
101 */
102 /**
103 * @return Start category
104 */
105 startCategory: string;
106 /**
107 * A category break ends on.
108 *
109 * @param value End category
110 */
111 /**
112 * @return End category
113 */
114 endCategory: string;
115 /**
116 * An index of start category.
117 *
118 * @param value Value
119 */
120 /**
121 * @return Value
122 */
123 startValue: number;
124 /**
125 * An index of end category or a end value.
126 *
127 * @param value Value
128 */
129 /**
130 * @return Value
131 */
132 endValue: number;
133 /**
134 * Indicates where within starting category break should begin.
135 *
136 * Values range from `0` (start) to `1` (end), with default being `0.5` (middle).
137 *
138 * E.g. if you want to a break to fully encompass start and end categories,
139 * you should set `startLocation = 0` and `endLocation = 1`.
140 *
141 * @since 4.9.17
142 * @default 0.5
143 * @param value Break start location
144 */
145 /**
146 * @return Break start location
147 */
148 startLocation: number;
149 /**
150 * Indicates where within ending category break should end.
151 *
152 * Values range from `0` (start) to `1` (end), with default being `0.5` (middle).
153 *
154 * E.g. if you want to a break to fully encompass start and end categories,
155 * you should set `startLocation = 0` and `endLocation = 1`.
156 *
157 * @since 4.9.17
158 * @default 0.5
159 * @param value Break end location
160 */
161 /**
162 * @return Break end location
163 */
164 endLocation: number;
165}