@nativescript-community/ui-chart 1.2.23 → 1.2.25
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/CHANGELOG.md +5 -5
- package/animation/ChartAnimator.js +2 -2
- package/animation/ChartAnimator.js.map +1 -1
- package/animation/ChartAnimator2.d.ts +18 -0
- package/animation/ChartAnimator2.js +69 -0
- package/animation/ChartAnimator2.js.map +1 -0
- package/charts/Chart.d.ts +2 -0
- package/charts/Chart.js +20 -5
- package/charts/Chart.js.map +1 -1
- package/charts/CombinedChart.js +5 -10
- package/charts/CombinedChart.js.map +1 -1
- package/data/ChartData.js +1 -2
- package/data/ChartData.js.map +1 -1
- package/data/PieData.js +1 -2
- package/data/PieData.js.map +1 -1
- package/interfaces/dataprovider/BarDataProvider.d.ts +9 -0
- package/interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider.d.ts +14 -0
- package/interfaces/dataprovider/BubbleDataProvider.d.ts +6 -0
- package/interfaces/dataprovider/CandleDataProvider.d.ts +6 -0
- package/interfaces/dataprovider/ChartInterface.d.ts +65 -0
- package/interfaces/dataprovider/CombinedDataProvider.d.ts +13 -0
- package/interfaces/dataprovider/LineDataProvider.d.ts +9 -0
- package/interfaces/dataprovider/ScatterDataProvider.d.ts +6 -0
- package/interfaces/datasets/IBarDataSet.d.ts +61 -0
- package/interfaces/datasets/IBarLineScatterCandleBubbleDataSet.d.ts +14 -0
- package/interfaces/datasets/IBubbleDataSet.d.ts +25 -0
- package/interfaces/datasets/ICandleDataSet.d.ts +78 -0
- package/interfaces/datasets/IDataSet.d.ts +501 -0
- package/interfaces/datasets/ILineDataSet.d.ts +106 -0
- package/interfaces/datasets/ILineRadarDataSet.d.ts +56 -0
- package/interfaces/datasets/ILineScatterCandleRadarDataSet.d.ts +31 -0
- package/interfaces/datasets/IPieDataSet.d.ts +67 -0
- package/interfaces/datasets/IRadarDataSet.d.ts +27 -0
- package/interfaces/datasets/IScatterDataSet.d.ts +36 -0
- package/listener/BarLineChartTouchListener.js +27 -11
- package/listener/BarLineChartTouchListener.js.map +1 -1
- package/listener/PieRadarChartTouchListener.js +5 -1
- package/listener/PieRadarChartTouchListener.js.map +1 -1
- package/package.json +2 -2
- package/renderer/CandleStickChartRenderer.js +2 -2
- package/renderer/CandleStickChartRenderer.js.map +1 -1
- package/renderer/LineChartRenderer.js +4 -4
- package/renderer/LineChartRenderer.js.map +1 -1
- package/renderer/PieChartRenderer.js +1 -1
- package/renderer/PieChartRenderer.js.map +1 -1
- package/renderer/RadarChartRenderer.js +1 -1
- package/renderer/RadarChartRenderer.js.map +1 -1
- package/utils/Curve.d.ts +12 -0
- package/utils/Curve.js +156 -0
- package/utils/Curve.js.map +1 -0
- package/utils/MPPointD.d.ts +5 -0
- package/utils/MPPointD.js +1 -0
- package/utils/MPPointD.js.map +1 -0
- package/utils/MPPointF.d.ts +7 -0
- package/utils/MPPointF.js +1 -0
- package/utils/MPPointF.js.map +1 -0
- package/utils/Transformer.js +2 -2
- package/utils/Transformer.js.map +1 -1
- package/utils/Utils.js +2 -2
- package/utils/Utils.js.map +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Entry } from '../../data/Entry';
|
|
2
|
+
import { IDataSet } from './IDataSet';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Created by philipp on 21/10/15.
|
|
6
|
+
*/
|
|
7
|
+
export interface IBarLineScatterCandleBubbleDataSet<T extends Entry> extends IDataSet<T> {
|
|
8
|
+
/**
|
|
9
|
+
* Returns the color that is used for drawing the highlight indicators.
|
|
10
|
+
*
|
|
11
|
+
* @return
|
|
12
|
+
*/
|
|
13
|
+
getHighLightColor();
|
|
14
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by philipp on 21/10/15.
|
|
3
|
+
*/
|
|
4
|
+
import { IBarLineScatterCandleBubbleDataSet } from './IBarLineScatterCandleBubbleDataSet';
|
|
5
|
+
import { BubbleEntry } from '../../data/BubbleEntry';
|
|
6
|
+
|
|
7
|
+
export interface IBubbleDataSet extends IBarLineScatterCandleBubbleDataSet<BubbleEntry> {
|
|
8
|
+
/**
|
|
9
|
+
* Sets the width of the circle that surrounds the bubble when highlighted,
|
|
10
|
+
* in dp.
|
|
11
|
+
*
|
|
12
|
+
* @param width
|
|
13
|
+
*/
|
|
14
|
+
setHighlightCircleWidth(width: number);
|
|
15
|
+
|
|
16
|
+
getMaxSize(): number;
|
|
17
|
+
|
|
18
|
+
isNormalizeSizeEnabled(): boolean;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Returns the width of the highlight-circle that surrounds the bubble
|
|
22
|
+
* @return
|
|
23
|
+
*/
|
|
24
|
+
getHighlightCircleWidth(): number;
|
|
25
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ILineScatterCandleRadarDataSet } from './ILineScatterCandleRadarDataSet';
|
|
2
|
+
import { CandleEntry } from '../../data/CandleEntry';
|
|
3
|
+
|
|
4
|
+
export interface ICandleDataSet extends ILineScatterCandleRadarDataSet<CandleEntry> {
|
|
5
|
+
/**
|
|
6
|
+
* Returns the space that is left out on the left and right side of each
|
|
7
|
+
* candle.
|
|
8
|
+
*
|
|
9
|
+
* @return
|
|
10
|
+
*/
|
|
11
|
+
getBarSpace();
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Returns whether the candle bars should show?
|
|
15
|
+
* When false, only "ticks" will show
|
|
16
|
+
*
|
|
17
|
+
* - default: true
|
|
18
|
+
*
|
|
19
|
+
* @return
|
|
20
|
+
*/
|
|
21
|
+
getShowCandleBar();
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Returns the width of the candle-shadow-line in pixels.
|
|
25
|
+
*
|
|
26
|
+
* @return
|
|
27
|
+
*/
|
|
28
|
+
getShadowWidth();
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Returns shadow color for all entries
|
|
32
|
+
*
|
|
33
|
+
* @return
|
|
34
|
+
*/
|
|
35
|
+
getShadowColor();
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Returns the neutral color (for open == close)
|
|
39
|
+
*
|
|
40
|
+
* @return
|
|
41
|
+
*/
|
|
42
|
+
getNeutralColor();
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Returns the increasing color (for open < close).
|
|
46
|
+
*
|
|
47
|
+
* @return
|
|
48
|
+
*/
|
|
49
|
+
getIncreasingColor();
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Returns the decreasing color (for open > close).
|
|
53
|
+
*
|
|
54
|
+
* @return
|
|
55
|
+
*/
|
|
56
|
+
getDecreasingColor();
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Returns palet style when open < close
|
|
60
|
+
*
|
|
61
|
+
* @return
|
|
62
|
+
*/
|
|
63
|
+
getIncreasingPaintStyle();
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Returns palet style when open > close
|
|
67
|
+
*
|
|
68
|
+
* @return
|
|
69
|
+
*/
|
|
70
|
+
getDecreasingPaintStyle();
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Is the shadow color same as the candle color?
|
|
74
|
+
*
|
|
75
|
+
* @return
|
|
76
|
+
*/
|
|
77
|
+
getShadowColorSameAsCandle();
|
|
78
|
+
}
|
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
import { Color, ObservableArray } from '@nativescript/core';
|
|
2
|
+
import { Font } from '@nativescript/core/ui/styling/font';
|
|
3
|
+
import { DashPathEffect } from '@nativescript-community/ui-canvas';
|
|
4
|
+
import { Entry } from '../../data/Entry';
|
|
5
|
+
import { Rounding } from '../../data/DataSet';
|
|
6
|
+
import { AxisDependency } from '../../components/YAxis';
|
|
7
|
+
import { GradientColor } from '../../model/GradientColor';
|
|
8
|
+
import { IValueFormatter } from '../../formatter/IValueFormatter';
|
|
9
|
+
import { ValueFormatter } from '../../formatter/ValueFormatter';
|
|
10
|
+
import { MPPointF } from '../../utils/MPPointF';
|
|
11
|
+
import { LegendForm } from '../../components/Legend';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Created by Philipp Jahoda on 21/10/15.
|
|
15
|
+
*/
|
|
16
|
+
export interface IDataSet<T extends Entry> {
|
|
17
|
+
xProperty: string;
|
|
18
|
+
yProperty: string;
|
|
19
|
+
/** ###### ###### DATA RELATED METHODS ###### ###### */
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Initializes DataSet chart data.
|
|
23
|
+
*/
|
|
24
|
+
init();
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* returns the minimum y-value this DataSet holds
|
|
28
|
+
*
|
|
29
|
+
* @return
|
|
30
|
+
*/
|
|
31
|
+
getYMin(): number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* returns the maximum y-value this DataSet holds
|
|
35
|
+
*
|
|
36
|
+
* @return
|
|
37
|
+
*/
|
|
38
|
+
getYMax(): number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* returns the minimum x-value this DataSet holds
|
|
42
|
+
*
|
|
43
|
+
* @return
|
|
44
|
+
*/
|
|
45
|
+
getXMin(): number;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* returns the maximum x-value this DataSet holds
|
|
49
|
+
*
|
|
50
|
+
* @return
|
|
51
|
+
*/
|
|
52
|
+
getXMax(): number;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Returns the number of y-values this DataSet represents -> the size of the y-values array
|
|
56
|
+
* -> yvals.length
|
|
57
|
+
*
|
|
58
|
+
* @return
|
|
59
|
+
*/
|
|
60
|
+
getEntryCount(): number;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Returns the values that belong to DataSet.
|
|
64
|
+
*
|
|
65
|
+
* @return
|
|
66
|
+
*/
|
|
67
|
+
getValues(): T[] | ObservableArray<T>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Calculates the minimum and maximum x and y values (mXMin, this.mXMax, this.mYMin, this.mYMax).
|
|
71
|
+
*/
|
|
72
|
+
calcMinMax();
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Calculates the min and max y-values from the Entry closest to the given fromX to the Entry closest to the given toX value.
|
|
76
|
+
* This is only needed for the autoScaleMinMax feature.
|
|
77
|
+
*
|
|
78
|
+
* @param fromX
|
|
79
|
+
* @param toX
|
|
80
|
+
*/
|
|
81
|
+
calcMinMaxYRange(fromX: number, toX: number);
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Returns the first Entry object found at the given x-value with binary
|
|
85
|
+
* search.
|
|
86
|
+
* If the no Entry at the specified x-value is found, this method
|
|
87
|
+
* returns the Entry at the closest x-value according to the rounding.
|
|
88
|
+
* INFORMATION: This method does calculations at runtime. Do
|
|
89
|
+
* not over-use in performance critical situations.
|
|
90
|
+
*
|
|
91
|
+
* @param xValue the x-value
|
|
92
|
+
* @param closestToY If there are multiple y-values for the specified x-value,
|
|
93
|
+
* @param rounding determine whether to round up/down/closest
|
|
94
|
+
* if there is no Entry matching the provided x-value
|
|
95
|
+
* @return
|
|
96
|
+
*
|
|
97
|
+
*
|
|
98
|
+
*/
|
|
99
|
+
getEntryForXValue(xValue: number, closestToY: number, rounding?: Rounding): T;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Returns the first Entry object found at the given x-value with binary
|
|
103
|
+
* search.
|
|
104
|
+
* If the no Entry at the specified x-value is found, this method
|
|
105
|
+
* returns the Entry at the closest x-value according to the rounding.
|
|
106
|
+
* INFORMATION: This method does calculations at runtime. Do
|
|
107
|
+
* not over-use in performance critical situations.
|
|
108
|
+
*
|
|
109
|
+
* @param xValue the x-value
|
|
110
|
+
* @param closestToY If there are multiple y-values for the specified x-value,
|
|
111
|
+
* @param rounding determine whether to round up/down/closest
|
|
112
|
+
* if there is no Entry matching the provided x-value
|
|
113
|
+
* @return
|
|
114
|
+
*
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
117
|
+
getEntryAndIndexForXValue(xValue: number, closestToY: number, rounding?: Rounding): { entry: T; index: number };
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Returns all Entry objects found at the given x-value with binary
|
|
121
|
+
* search. An empty array if no Entry object at that x-value.
|
|
122
|
+
* INFORMATION: This method does calculations at runtime. Do
|
|
123
|
+
* not over-use in performance critical situations.
|
|
124
|
+
*
|
|
125
|
+
* @param xValue
|
|
126
|
+
* @return
|
|
127
|
+
*/
|
|
128
|
+
getEntriesForXValue(xValue: number): T[] | ObservableArray<T>;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Returns all Entry objects found at the given x-value with binary
|
|
132
|
+
* search. An empty array if no Entry object at that x-value.
|
|
133
|
+
* INFORMATION: This method does calculations at runtime. Do
|
|
134
|
+
* not over-use in performance critical situations.
|
|
135
|
+
*
|
|
136
|
+
* @param xValue
|
|
137
|
+
* @return
|
|
138
|
+
*/
|
|
139
|
+
getEntriesAndIndexesForXValue(xValue: number): { entry: T; index: number }[];
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Returns the Entry object found at the given index (NOT xIndex) in the values array.
|
|
143
|
+
*
|
|
144
|
+
* @param index
|
|
145
|
+
* @return
|
|
146
|
+
*/
|
|
147
|
+
getEntryForIndex(index: number): T;
|
|
148
|
+
|
|
149
|
+
getEntryXValue(e: BaseEntry, entryIndex: number): number;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Returns the first Entry index found at the given x-value with binary
|
|
153
|
+
* search.
|
|
154
|
+
* If the no Entry at the specified x-value is found, this method
|
|
155
|
+
* returns the Entry at the closest x-value according to the rounding.
|
|
156
|
+
* INFORMATION: This method does calculations at runtime. Do
|
|
157
|
+
* not over-use in performance critical situations.
|
|
158
|
+
*
|
|
159
|
+
* @param xValue the x-value
|
|
160
|
+
* @param closestToY If there are multiple y-values for the specified x-value,
|
|
161
|
+
* @param rounding determine whether to round up/down/closest
|
|
162
|
+
* if there is no Entry matching the provided x-value
|
|
163
|
+
* @return
|
|
164
|
+
*/
|
|
165
|
+
getEntryIndexForXValue(xValue: number, closestToY: number, rounding: Rounding): number;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Returns the position of the provided entry in the DataSets Entry array.
|
|
169
|
+
* Returns -1 if doesn't exist.
|
|
170
|
+
*
|
|
171
|
+
* @param e
|
|
172
|
+
* @return
|
|
173
|
+
*/
|
|
174
|
+
getEntryIndex(e: T): number;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* This method returns the actual
|
|
178
|
+
* index in the Entry array of the DataSet for a given xIndex. IMPORTANT: This method does
|
|
179
|
+
* calculations at runtime, do not over-use in performance critical
|
|
180
|
+
* situations.
|
|
181
|
+
*
|
|
182
|
+
* @param xIndex
|
|
183
|
+
* @return
|
|
184
|
+
*/
|
|
185
|
+
getIndexInEntries(xIndex: number): number;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Adds an Entry to the DataSet dynamically.
|
|
189
|
+
* Entries are added to the end of the list.
|
|
190
|
+
* This will also recalculate the current minimum and maximum
|
|
191
|
+
* values of the DataSet and the value-sum.
|
|
192
|
+
*
|
|
193
|
+
* @param e
|
|
194
|
+
*/
|
|
195
|
+
addEntry(e: T): boolean;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Adds an Entry to the DataSet dynamically.
|
|
199
|
+
* Entries are added to their appropriate index in the values array respective to their x-position.
|
|
200
|
+
* This will also recalculate the current minimum and maximum
|
|
201
|
+
* values of the DataSet and the value-sum.
|
|
202
|
+
*
|
|
203
|
+
* @param e
|
|
204
|
+
*/
|
|
205
|
+
addEntryOrdered(e: T);
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Removes the first Entry (at index 0) of this DataSet from the entries array.
|
|
209
|
+
* Returns true if successful, false if not.
|
|
210
|
+
*
|
|
211
|
+
* @return
|
|
212
|
+
*/
|
|
213
|
+
removeFirst(): boolean;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Removes the last Entry (at index size-1) of this DataSet from the entries array.
|
|
217
|
+
* Returns true if successful, false if not.
|
|
218
|
+
*
|
|
219
|
+
* @return
|
|
220
|
+
*/
|
|
221
|
+
removeLast(): boolean;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Removes an Entry from the DataSets entries array. This will also
|
|
225
|
+
* recalculate the current minimum and maximum values of the DataSet and the
|
|
226
|
+
* value-sum. Returns true if an Entry was removed, false if no Entry could
|
|
227
|
+
* be removed.
|
|
228
|
+
*
|
|
229
|
+
* @param e
|
|
230
|
+
*/
|
|
231
|
+
removeEntry(e: T): boolean;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Removes the Entry object closest to the given x-value from the DataSet.
|
|
235
|
+
* Returns true if an Entry was removed, false if no Entry could be removed.
|
|
236
|
+
*
|
|
237
|
+
* @param xValue
|
|
238
|
+
*/
|
|
239
|
+
removeEntryByXValue(xValue: number): boolean;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Removes the Entry object at the given index in the values array from the DataSet.
|
|
243
|
+
* Returns true if an Entry was removed, false if no Entry could be removed.
|
|
244
|
+
*
|
|
245
|
+
* @param index
|
|
246
|
+
* @return
|
|
247
|
+
*/
|
|
248
|
+
removeEntryAtIndex(index: number): boolean;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Checks if this DataSet contains the specified Entry. Returns true if so,
|
|
252
|
+
* false if not. NOTE: Performance is pretty bad on this one, do not
|
|
253
|
+
* over-use in performance critical situations.
|
|
254
|
+
*
|
|
255
|
+
* @param entry
|
|
256
|
+
* @return
|
|
257
|
+
*/
|
|
258
|
+
contains(entry: T): boolean;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Removes all values from this DataSet and does all necessary recalculations.
|
|
262
|
+
*/
|
|
263
|
+
clear();
|
|
264
|
+
|
|
265
|
+
/** ###### ###### STYLING RELATED (& OTHER) METHODS ###### ###### */
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Returns the label string that describes the DataSet.
|
|
269
|
+
*
|
|
270
|
+
* @return
|
|
271
|
+
*/
|
|
272
|
+
getLabel(): string;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Sets the label string that describes the DataSet.
|
|
276
|
+
*
|
|
277
|
+
* @param label
|
|
278
|
+
*/
|
|
279
|
+
setLabel(label: string);
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Returns the axis this DataSet should be plotted against.
|
|
283
|
+
*
|
|
284
|
+
* @return
|
|
285
|
+
*/
|
|
286
|
+
getAxisDependency(): AxisDependency;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Set the y-axis this DataSet should be plotted against (either LEFT or
|
|
290
|
+
* RIGHT). Default: LEFT
|
|
291
|
+
*
|
|
292
|
+
* @param dependency
|
|
293
|
+
*/
|
|
294
|
+
setAxisDependency(dependency: AxisDependency);
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* returns all the colors that are set for this DataSet
|
|
298
|
+
*
|
|
299
|
+
* @return
|
|
300
|
+
*/
|
|
301
|
+
getColors(): (string | Color)[];
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Returns the color at the given index of the DataSet's color array.
|
|
305
|
+
* Performs a IndexOutOfBounds check by modulus.
|
|
306
|
+
*
|
|
307
|
+
* @param index
|
|
308
|
+
* @return
|
|
309
|
+
*/
|
|
310
|
+
getColor(index?: number): string | Color;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* returns true if highlighting of values is enabled, false if not
|
|
314
|
+
*
|
|
315
|
+
* @return
|
|
316
|
+
*/
|
|
317
|
+
isHighlightEnabled(): boolean;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* If set to true, value highlighting is enabled which means that values can
|
|
321
|
+
* be highlighted programmatically or by touch gesture.
|
|
322
|
+
*
|
|
323
|
+
* @param enabled
|
|
324
|
+
*/
|
|
325
|
+
setHighlightEnabled(enabled: boolean);
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Sets the formatter to be used for drawing the values inside the chart. If
|
|
329
|
+
* no formatter is set, the chart will automatically determine a reasonable
|
|
330
|
+
* formatting (concerning decimals) for all the values that are drawn inside
|
|
331
|
+
* the chart. Use chart.getDefaultValueFormatter() to use the formatter
|
|
332
|
+
* calculated by the chart.
|
|
333
|
+
*
|
|
334
|
+
* @param f
|
|
335
|
+
*/
|
|
336
|
+
setValueFormatter(f: IValueFormatter);
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Returns the formatter used for drawing the values inside the chart.
|
|
340
|
+
*
|
|
341
|
+
* @return
|
|
342
|
+
*/
|
|
343
|
+
getValueFormatter(): IValueFormatter;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Returns true if the valueFormatter object of this DataSet is null.
|
|
347
|
+
*
|
|
348
|
+
* @return
|
|
349
|
+
*/
|
|
350
|
+
needsFormatter(): boolean;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Sets the color the value-labels of this DataSet should have.
|
|
354
|
+
*
|
|
355
|
+
* @param color
|
|
356
|
+
*/
|
|
357
|
+
setValueTextColor(color: number);
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Sets a list of colors to be used as the colors for the drawn values.
|
|
361
|
+
*
|
|
362
|
+
* @param colors
|
|
363
|
+
*/
|
|
364
|
+
setValueTextColors(colors: number[]);
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Sets a Typeface for the value-labels of this DataSet.
|
|
368
|
+
*
|
|
369
|
+
* @param tf
|
|
370
|
+
*/
|
|
371
|
+
setValueTypeface(tf: string);
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Sets the text-size of the value-labels of this DataSet in dp.
|
|
375
|
+
*
|
|
376
|
+
* @param size
|
|
377
|
+
*/
|
|
378
|
+
setValueTextSize(size: number);
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Returns the color at the specified index that is used for drawing the values inside the chart.
|
|
382
|
+
* Uses modulus internally.
|
|
383
|
+
*
|
|
384
|
+
* @param index
|
|
385
|
+
* @return
|
|
386
|
+
*/
|
|
387
|
+
getValueTextColor(index?: number): string | Color;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Returns the typeface that is used for drawing the values inside the chart
|
|
391
|
+
*
|
|
392
|
+
* @return
|
|
393
|
+
*/
|
|
394
|
+
getValueTypeface(): Font;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Returns the text size that is used for drawing the values inside the chart
|
|
398
|
+
*
|
|
399
|
+
* @return
|
|
400
|
+
*/
|
|
401
|
+
getValueTextSize(): number;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* The form to draw for this dataset in the legend.
|
|
405
|
+
* <p/>
|
|
406
|
+
* Return `DEFAULT` to use the default legend form.
|
|
407
|
+
*/
|
|
408
|
+
getForm(): LegendForm;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* The form size to draw for this dataset in the legend.
|
|
412
|
+
* <p/>
|
|
413
|
+
* Return `Float.NaN` to use the default legend form size.
|
|
414
|
+
*/
|
|
415
|
+
getFormSize(): number;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* The line width for drawing the form of this dataset in the legend
|
|
419
|
+
* <p/>
|
|
420
|
+
* Return `Float.NaN` to use the default legend form line width.
|
|
421
|
+
*/
|
|
422
|
+
getFormLineWidth(): number;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* The line dash path effect used for shapes that consist of lines.
|
|
426
|
+
* <p/>
|
|
427
|
+
* Return `null` to use the default legend form line dash effect.
|
|
428
|
+
*/
|
|
429
|
+
getFormLineDashEffect(): DashPathEffect;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* set this to true to draw y-values on the chart.
|
|
433
|
+
*
|
|
434
|
+
* NOTE (for bar and line charts): if `maxVisibleCount` is reached, no values will be drawn even
|
|
435
|
+
* if this is enabled
|
|
436
|
+
* @param enabled
|
|
437
|
+
*/
|
|
438
|
+
setDrawValues(enabled: boolean);
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Returns true if y-value drawing is enabled, false if not
|
|
442
|
+
*
|
|
443
|
+
* @return
|
|
444
|
+
*/
|
|
445
|
+
isDrawValuesEnabled(): boolean;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Set this to true to draw y-icons on the chart.
|
|
449
|
+
*
|
|
450
|
+
* NOTE (for bar and line charts): if `maxVisibleCount` is reached, no icons will be drawn even
|
|
451
|
+
* if this is enabled
|
|
452
|
+
*
|
|
453
|
+
* @param enabled
|
|
454
|
+
*/
|
|
455
|
+
setDrawIcons(enabled: boolean);
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Returns true if y-icon drawing is enabled, false if not
|
|
459
|
+
*
|
|
460
|
+
* @return
|
|
461
|
+
*/
|
|
462
|
+
isDrawIconsEnabled(): boolean;
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Offset of icons drawn on the chart.
|
|
466
|
+
*
|
|
467
|
+
* For all charts except Pie and Radar it will be ordinary (x offset,y offset).
|
|
468
|
+
*
|
|
469
|
+
* For Pie and Radar chart it will be (y offset, distance from center offset); so if you want icon to be rendered under value, you should increase X component of CGPoint, and if you want icon to be rendered closet to center, you should decrease height component of CGPoint.
|
|
470
|
+
* @param offset
|
|
471
|
+
*/
|
|
472
|
+
setIconsOffset(offset: MPPointF);
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Get the offset for drawing icons.
|
|
476
|
+
*/
|
|
477
|
+
getIconsOffset(): MPPointF;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Set the visibility of this DataSet. If not visible, the DataSet will not
|
|
481
|
+
* be drawn to the chart upon refreshing it.
|
|
482
|
+
*
|
|
483
|
+
* @param visible
|
|
484
|
+
*/
|
|
485
|
+
setVisible(visible: boolean);
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Returns true if this DataSet is visible inside the chart, or false if it
|
|
489
|
+
* is currently hidden.
|
|
490
|
+
*
|
|
491
|
+
* @return
|
|
492
|
+
*/
|
|
493
|
+
isVisible(): boolean;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Returns the shader used for filling the area below the line.
|
|
497
|
+
*
|
|
498
|
+
* @return
|
|
499
|
+
*/
|
|
500
|
+
getFillShader();
|
|
501
|
+
}
|