@nativescript-community/ui-chart 1.2.30 → 1.2.31
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/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/package.json +2 -2
- package/utils/MPPointD.d.ts +5 -0
- package/utils/MPPointF.d.ts +7 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BarLineScatterCandleBubbleDataProvider } from './BarLineScatterCandleBubbleDataProvider';
|
|
2
|
+
import { BarData } from '../../data/BarData';
|
|
3
|
+
|
|
4
|
+
export interface BarDataProvider extends BarLineScatterCandleBubbleDataProvider {
|
|
5
|
+
getBarData(): BarData;
|
|
6
|
+
isDrawBarShadowEnabled(): boolean;
|
|
7
|
+
isDrawValueAboveBarEnabled(): boolean;
|
|
8
|
+
isHighlightFullBarEnabled(): boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChartInterface } from './ChartInterface';
|
|
2
|
+
import { BarLineScatterCandleBubbleData } from '../../data/BarLineScatterCandleBubbleData';
|
|
3
|
+
import { AxisDependency } from '../../components/YAxis';
|
|
4
|
+
import { Transformer } from '../../utils/Transformer';
|
|
5
|
+
|
|
6
|
+
export interface BarLineScatterCandleBubbleDataProvider extends ChartInterface {
|
|
7
|
+
getTransformer(axis?: AxisDependency): Transformer;
|
|
8
|
+
isInverted(axis: AxisDependency);
|
|
9
|
+
|
|
10
|
+
getLowestVisibleX();
|
|
11
|
+
getHighestVisibleX();
|
|
12
|
+
|
|
13
|
+
getData(): BarLineScatterCandleBubbleData<any, any>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BubbleData } from '../../data/BubbleData';
|
|
2
|
+
import { BarLineScatterCandleBubbleDataProvider } from './BarLineScatterCandleBubbleDataProvider';
|
|
3
|
+
|
|
4
|
+
export interface BubbleDataProvider extends BarLineScatterCandleBubbleDataProvider {
|
|
5
|
+
getBubbleData(): BubbleData;
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CandleData } from '../../data/CandleData';
|
|
2
|
+
import { BarLineScatterCandleBubbleDataProvider } from './BarLineScatterCandleBubbleDataProvider';
|
|
3
|
+
|
|
4
|
+
export interface CandleDataProvider extends BarLineScatterCandleBubbleDataProvider {
|
|
5
|
+
getCandleData(): CandleData;
|
|
6
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { MPPointF } from '../../utils/MPPointF';
|
|
2
|
+
import { ValueFormatter } from '../../formatter/ValueFormatter';
|
|
3
|
+
import { ChartData } from '../../data/ChartData';
|
|
4
|
+
import { Rect } from '@nativescript-community/ui-canvas';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Interface that provides everything there is to know about the dimensions,
|
|
8
|
+
* bounds, and range of the chart.
|
|
9
|
+
*
|
|
10
|
+
|
|
11
|
+
*/
|
|
12
|
+
export interface ChartInterface {
|
|
13
|
+
/**
|
|
14
|
+
* Returns the minimum x value of the chart, regardless of zoom or translation.
|
|
15
|
+
*
|
|
16
|
+
* @return
|
|
17
|
+
*/
|
|
18
|
+
getXChartMin();
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Returns the maximum x value of the chart, regardless of zoom or translation.
|
|
22
|
+
*
|
|
23
|
+
* @return
|
|
24
|
+
*/
|
|
25
|
+
getXChartMax();
|
|
26
|
+
|
|
27
|
+
getXRange();
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Returns the minimum y value of the chart, regardless of zoom or translation.
|
|
31
|
+
*
|
|
32
|
+
* @return
|
|
33
|
+
*/
|
|
34
|
+
getYChartMin();
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Returns the maximum y value of the chart, regardless of zoom or translation.
|
|
38
|
+
*
|
|
39
|
+
* @return
|
|
40
|
+
*/
|
|
41
|
+
getYChartMax();
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Returns the maximum distance in scren dp a touch can be away from an entry to cause it to get highlighted.
|
|
45
|
+
*
|
|
46
|
+
* @return
|
|
47
|
+
*/
|
|
48
|
+
getMaxHighlightDistance();
|
|
49
|
+
|
|
50
|
+
getMeasuredWidth();
|
|
51
|
+
|
|
52
|
+
getMeasuredHeight();
|
|
53
|
+
|
|
54
|
+
getCenterOfView(): MPPointF;
|
|
55
|
+
|
|
56
|
+
getCenterOffsets(): MPPointF;
|
|
57
|
+
|
|
58
|
+
getContentRect(): Rect;
|
|
59
|
+
|
|
60
|
+
getDefaultValueFormatter(): ValueFormatter;
|
|
61
|
+
|
|
62
|
+
getData(): ChartData<any, any>;
|
|
63
|
+
|
|
64
|
+
getMaxVisibleCount();
|
|
65
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CombinedData } from '../../data/CombinedData';
|
|
2
|
+
import { BubbleDataProvider } from './BubbleDataProvider';
|
|
3
|
+
import { CandleDataProvider } from './CandleDataProvider';
|
|
4
|
+
import { LineDataProvider } from './LineDataProvider';
|
|
5
|
+
import { ScatterDataProvider } from './ScatterDataProvider';
|
|
6
|
+
import { BarDataProvider } from './BarDataProvider';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Created by philipp on 11/06/16.
|
|
10
|
+
*/
|
|
11
|
+
export interface CombinedDataProvider extends LineDataProvider, BarDataProvider, BubbleDataProvider, CandleDataProvider, ScatterDataProvider {
|
|
12
|
+
getCombinedData(): CombinedData;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LineData } from '../../data/LineData';
|
|
2
|
+
import { BarLineScatterCandleBubbleDataProvider } from './BarLineScatterCandleBubbleDataProvider';
|
|
3
|
+
import { AxisDependency } from '../../components/YAxis';
|
|
4
|
+
|
|
5
|
+
export interface LineDataProvider extends BarLineScatterCandleBubbleDataProvider {
|
|
6
|
+
getLineData(): LineData;
|
|
7
|
+
|
|
8
|
+
getAxis(dependency: AxisDependency);
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ScatterData } from '../../data/ScatterData';
|
|
2
|
+
import { BarLineScatterCandleBubbleDataProvider } from './BarLineScatterCandleBubbleDataProvider';
|
|
3
|
+
|
|
4
|
+
export interface ScatterDataProvider extends BarLineScatterCandleBubbleDataProvider {
|
|
5
|
+
getScatterData(): ScatterData;
|
|
6
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { BarEntry } from '../../data/BarEntry';
|
|
2
|
+
import { IBarLineScatterCandleBubbleDataSet } from './IBarLineScatterCandleBubbleDataSet';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Created by philipp on 21/10/15.
|
|
6
|
+
*/
|
|
7
|
+
export interface IBarDataSet extends IBarLineScatterCandleBubbleDataSet<BarEntry> {
|
|
8
|
+
/**
|
|
9
|
+
* Returns true if this DataSet is stacked (stacksize > 1) or not.
|
|
10
|
+
*
|
|
11
|
+
* @return
|
|
12
|
+
*/
|
|
13
|
+
isStacked(): boolean;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Returns the maximum number of bars that can be stacked upon another in
|
|
17
|
+
* this DataSet. This should return 1 for non stacked bars, and > 1 for stacked bars.
|
|
18
|
+
*
|
|
19
|
+
* @return
|
|
20
|
+
*/
|
|
21
|
+
getStackSize();
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Returns the color used for drawing the bar-shadows. The bar shadows is a
|
|
25
|
+
* surface behind the bar that indicates the maximum value.
|
|
26
|
+
*
|
|
27
|
+
* @return
|
|
28
|
+
*/
|
|
29
|
+
getBarShadowColor();
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Returns the width used for drawing borders around the bars.
|
|
33
|
+
* If borderWidth == 0, no border will be drawn.
|
|
34
|
+
*
|
|
35
|
+
* @return
|
|
36
|
+
*/
|
|
37
|
+
getBarBorderWidth();
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Returns the color drawing borders around the bars.
|
|
41
|
+
*
|
|
42
|
+
* @return
|
|
43
|
+
*/
|
|
44
|
+
getBarBorderColor();
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Returns the alpha value (transparency) that is used for drawing the
|
|
48
|
+
* highlight indicator.
|
|
49
|
+
*
|
|
50
|
+
* @return
|
|
51
|
+
*/
|
|
52
|
+
getHighLightAlpha();
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Returns the labels used for the different value-stacks in the legend.
|
|
56
|
+
* This is only relevant for stacked bar entries.
|
|
57
|
+
*
|
|
58
|
+
* @return
|
|
59
|
+
*/
|
|
60
|
+
getStackLabels(): string[];
|
|
61
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Entry } from '../../data/Entry';
|
|
2
|
+
import { ILineRadarDataSet } from './ILineRadarDataSet';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Created by Philpp Jahoda on 21/10/15.
|
|
6
|
+
*/
|
|
7
|
+
export interface ILineDataSet extends ILineRadarDataSet<Entry> {
|
|
8
|
+
/**
|
|
9
|
+
* Returns the drawing mode for this line dataset
|
|
10
|
+
*
|
|
11
|
+
* @return
|
|
12
|
+
*/
|
|
13
|
+
getMode();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Returns the intensity of the cubic lines (the effect intensity).
|
|
17
|
+
* Max = 1 = very cubic, Min = 0.05f = low cubic effect, Default: 0.2f
|
|
18
|
+
*
|
|
19
|
+
* @return
|
|
20
|
+
*/
|
|
21
|
+
getCubicIntensity();
|
|
22
|
+
|
|
23
|
+
isDrawCubicEnabled();
|
|
24
|
+
|
|
25
|
+
isDrawSteppedEnabled();
|
|
26
|
+
|
|
27
|
+
getUseColorsForFill(): boolean;
|
|
28
|
+
setUseColorsForFill(value: boolean);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Returns the size of the drawn circles.
|
|
32
|
+
*/
|
|
33
|
+
getCircleRadius();
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Defines whether the circle are drawn in high res (better rendering but slower drawing)
|
|
37
|
+
*/
|
|
38
|
+
circleHighRes: boolean;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Returns the hole radius of the drawn circles.
|
|
42
|
+
*/
|
|
43
|
+
getCircleHoleRadius();
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Returns the color at the given index of the DataSet's circle-color array.
|
|
47
|
+
* Performs a IndexOutOfBounds check by modulus.
|
|
48
|
+
*
|
|
49
|
+
* @param index
|
|
50
|
+
* @return
|
|
51
|
+
*/
|
|
52
|
+
getCircleColor(index);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Returns the number of colors in this DataSet's circle-color array.
|
|
56
|
+
*
|
|
57
|
+
* @return
|
|
58
|
+
*/
|
|
59
|
+
getCircleColorCount();
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Returns true if drawing circles for this DataSet is enabled, false if not
|
|
63
|
+
*
|
|
64
|
+
* @return
|
|
65
|
+
*/
|
|
66
|
+
isDrawCirclesEnabled();
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Returns the color of the inner circle (the circle-hole).
|
|
70
|
+
*
|
|
71
|
+
* @return
|
|
72
|
+
*/
|
|
73
|
+
getCircleHoleColor();
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Returns true if drawing the circle-holes is enabled, false if not.
|
|
77
|
+
*
|
|
78
|
+
* @return
|
|
79
|
+
*/
|
|
80
|
+
isDrawCircleHoleEnabled();
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Returns the DashPathEffect that is used for drawing the lines.
|
|
84
|
+
*
|
|
85
|
+
* @return
|
|
86
|
+
*/
|
|
87
|
+
getDashPathEffect();
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Returns true if the dashed-line effect is enabled, false if not.
|
|
91
|
+
* If the DashPathEffect object is null, also return false here.
|
|
92
|
+
*
|
|
93
|
+
* @return
|
|
94
|
+
*/
|
|
95
|
+
isDashedLineEnabled();
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Returns the IFillFormatter that is set for this DataSet.
|
|
99
|
+
*
|
|
100
|
+
* @return
|
|
101
|
+
*/
|
|
102
|
+
getFillFormatter();
|
|
103
|
+
|
|
104
|
+
applyFiltering(scaleX: number);
|
|
105
|
+
setMaxFilterNumber(value: number);
|
|
106
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ILineScatterCandleRadarDataSet } from './ILineScatterCandleRadarDataSet';
|
|
2
|
+
import { Entry } from '../../data/Entry';
|
|
3
|
+
import { RadarEntry } from '../../data/RadarEntry';
|
|
4
|
+
import { ImageSource } from '@nativescript/core';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Created by Philipp Jahoda on 21/10/15.
|
|
8
|
+
*/
|
|
9
|
+
export interface ILineRadarDataSet<T extends Entry> extends ILineScatterCandleRadarDataSet<T> {
|
|
10
|
+
/**
|
|
11
|
+
* Returns the color that is used for filling the line surface area.
|
|
12
|
+
*
|
|
13
|
+
* @return
|
|
14
|
+
*/
|
|
15
|
+
getFillColor();
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Returns the drawable used for filling the area below the line.
|
|
19
|
+
*
|
|
20
|
+
* @return
|
|
21
|
+
*/
|
|
22
|
+
getFillDrawable(): ImageSource;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns the alpha value that is used for filling the line surface,
|
|
26
|
+
* default: 85
|
|
27
|
+
*
|
|
28
|
+
* @return
|
|
29
|
+
*/
|
|
30
|
+
getFillAlpha();
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Returns the stroke-width of the drawn line
|
|
34
|
+
*
|
|
35
|
+
* @return
|
|
36
|
+
*/
|
|
37
|
+
getLineWidth();
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Returns true if filled drawing is enabled, false if not
|
|
41
|
+
*
|
|
42
|
+
* @return
|
|
43
|
+
*/
|
|
44
|
+
isDrawFilledEnabled();
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Set to true if the DataSet should be drawn filled (surface), and not just
|
|
48
|
+
* as a line, disabling this will give great performance boost. Please note that this method
|
|
49
|
+
* uses the canvas.clipPath(...) method for drawing the filled area.
|
|
50
|
+
* For devices with API level < 18 (Android 4.3), hardware acceleration of the chart should
|
|
51
|
+
* be turned off. Default: false
|
|
52
|
+
*
|
|
53
|
+
* @param enabled
|
|
54
|
+
*/
|
|
55
|
+
setDrawFilled(enabled);
|
|
56
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Entry } from '../../data/Entry';
|
|
2
|
+
import { IBarLineScatterCandleBubbleDataSet } from './IBarLineScatterCandleBubbleDataSet';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Created by Philipp Jahoda on 21/10/15.
|
|
6
|
+
*/
|
|
7
|
+
export interface ILineScatterCandleRadarDataSet<T extends Entry> extends IBarLineScatterCandleBubbleDataSet<T> {
|
|
8
|
+
/**
|
|
9
|
+
* Returns true if vertical highlight indicator lines are enabled (drawn)
|
|
10
|
+
* @return
|
|
11
|
+
*/
|
|
12
|
+
isVerticalHighlightIndicatorEnabled();
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Returns true if vertical highlight indicator lines are enabled (drawn)
|
|
16
|
+
* @return
|
|
17
|
+
*/
|
|
18
|
+
isHorizontalHighlightIndicatorEnabled();
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Returns the line-width in which highlight lines are to be drawn.
|
|
22
|
+
* @return
|
|
23
|
+
*/
|
|
24
|
+
getHighlightLineWidth();
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Returns the DashPathEffect that is used for highlighting.
|
|
28
|
+
* @return
|
|
29
|
+
*/
|
|
30
|
+
getDashPathEffectHighlight();
|
|
31
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { IDataSet } from './IDataSet';
|
|
2
|
+
import { PieEntry } from '../../data/PieEntry';
|
|
3
|
+
import { ValuePosition } from '../../data/PieDataSet';
|
|
4
|
+
|
|
5
|
+
export interface IPieDataSet extends IDataSet<PieEntry> {
|
|
6
|
+
/**
|
|
7
|
+
* Returns the space that is set to be between the piechart-slices of this
|
|
8
|
+
* DataSet, in pixels.
|
|
9
|
+
*
|
|
10
|
+
* @return
|
|
11
|
+
*/
|
|
12
|
+
getSliceSpace();
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* When enabled, slice spacing will be 0.0 when the smallest value is going to be
|
|
16
|
+
* smaller than the slice spacing itself.
|
|
17
|
+
*
|
|
18
|
+
* @return
|
|
19
|
+
*/
|
|
20
|
+
isAutomaticallyDisableSliceSpacingEnabled();
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Returns the distance a highlighted piechart slice is "shifted" away from
|
|
24
|
+
* the chart-center in dp.
|
|
25
|
+
*
|
|
26
|
+
* @return
|
|
27
|
+
*/
|
|
28
|
+
getSelectionShift();
|
|
29
|
+
|
|
30
|
+
getXValuePosition(): ValuePosition;
|
|
31
|
+
getYValuePosition(): ValuePosition;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* When valuePosition is OutsideSlice, use slice colors as line color if true
|
|
35
|
+
* */
|
|
36
|
+
isUsingSliceColorAsValueLineColor();
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* When valuePosition is OutsideSlice, indicates line color
|
|
40
|
+
* */
|
|
41
|
+
getValueLineColor();
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* When valuePosition is OutsideSlice, indicates line width
|
|
45
|
+
* */
|
|
46
|
+
getValueLineWidth();
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* When valuePosition is OutsideSlice, indicates offset as percentage out of the slice size
|
|
50
|
+
* */
|
|
51
|
+
getValueLinePart1OffsetPercentage();
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* When valuePosition is OutsideSlice, indicates length of first half of the line
|
|
55
|
+
* */
|
|
56
|
+
getValueLinePart1Length();
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* When valuePosition is OutsideSlice, indicates length of second half of the line
|
|
60
|
+
* */
|
|
61
|
+
getValueLinePart2Length();
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* When valuePosition is OutsideSlice, this allows variable line length
|
|
65
|
+
* */
|
|
66
|
+
isValueLineVariableLength();
|
|
67
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Color } from '@nativescript/core';
|
|
2
|
+
import { ILineRadarDataSet } from './ILineRadarDataSet';
|
|
3
|
+
import { RadarEntry } from '../../data/RadarEntry';
|
|
4
|
+
/**
|
|
5
|
+
* Created by Philipp Jahoda on 03/11/15.
|
|
6
|
+
*/
|
|
7
|
+
export interface IRadarDataSet extends ILineRadarDataSet<RadarEntry> {
|
|
8
|
+
/// flag indicating whether highlight circle should be drawn or not
|
|
9
|
+
isDrawHighlightCircleEnabled(): boolean;
|
|
10
|
+
|
|
11
|
+
/// Sets whether highlight circle should be drawn or not
|
|
12
|
+
setDrawHighlightCircleEnabled(enabled: boolean);
|
|
13
|
+
|
|
14
|
+
getHighlightCircleFillColor(): string | Color;
|
|
15
|
+
|
|
16
|
+
/// The stroke color for highlight circle.
|
|
17
|
+
/// If Utils.COLOR_NONE, the color of the dataset is taken.
|
|
18
|
+
getHighlightCircleStrokeColor(): string | Color;
|
|
19
|
+
|
|
20
|
+
getHighlightCircleStrokeAlpha(): number;
|
|
21
|
+
|
|
22
|
+
getHighlightCircleInnerRadius(): number;
|
|
23
|
+
|
|
24
|
+
getHighlightCircleOuterRadius(): number;
|
|
25
|
+
|
|
26
|
+
getHighlightCircleStrokeWidth(): number;
|
|
27
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Color } from '@nativescript/core';
|
|
2
|
+
import { Entry } from '../../data/Entry';
|
|
3
|
+
import { IShapeRenderer } from '../../renderer/scatter/IShapeRenderer';
|
|
4
|
+
import { ILineScatterCandleRadarDataSet } from './ILineScatterCandleRadarDataSet';
|
|
5
|
+
/**
|
|
6
|
+
* Created by philipp on 21/10/15.
|
|
7
|
+
*/
|
|
8
|
+
export interface IScatterDataSet extends ILineScatterCandleRadarDataSet<Entry> {
|
|
9
|
+
/**
|
|
10
|
+
* Returns the currently set scatter shape size
|
|
11
|
+
*
|
|
12
|
+
* @return
|
|
13
|
+
*/
|
|
14
|
+
getScatterShapeSize(): number;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Returns radius of the hole in the shape
|
|
18
|
+
*
|
|
19
|
+
* @return
|
|
20
|
+
*/
|
|
21
|
+
getScatterShapeHoleRadius(): number;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Returns the color for the hole in the shape
|
|
25
|
+
*
|
|
26
|
+
* @return
|
|
27
|
+
*/
|
|
28
|
+
getScatterShapeHoleColor(): string | Color;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Returns the IShapeRenderer responsible for rendering this DataSet.
|
|
32
|
+
*
|
|
33
|
+
* @return
|
|
34
|
+
*/
|
|
35
|
+
getShapeRenderer(): IShapeRenderer;
|
|
36
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nativescript-community/ui-chart",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.31",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "A powerful chart / graph plugin, supporting line, bar, pie, radar, bubble, and candlestick charts as well as scaling, panning and animations.",
|
|
6
6
|
"keywords": [
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"downsample": "^1.4.0",
|
|
40
40
|
"number-format.js": "^2.0.9"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "f2fe24c16755173407f564b1598bee95d7f09052"
|
|
43
43
|
}
|