@nativescript-community/ui-chart 1.2.36 → 2.0.1
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/README.md +6 -0
- package/animation/ChartAnimator.d.ts +47 -4
- package/animation/ChartAnimator.js +49 -11
- package/animation/ChartAnimator.js.map +1 -1
- package/animation/Tween.d.ts +1 -1
- package/animation/Tween.js +4 -2
- package/animation/Tween.js.map +1 -1
- package/buffer/AbstractBuffer.d.ts +28 -3
- package/buffer/AbstractBuffer.js +22 -3
- package/buffer/AbstractBuffer.js.map +1 -1
- package/buffer/BarBuffer.d.ts +8 -12
- package/buffer/BarBuffer.js +33 -36
- package/buffer/BarBuffer.js.map +1 -1
- package/buffer/HorizontalBarBuffer.js +13 -10
- package/buffer/HorizontalBarBuffer.js.map +1 -1
- package/charts/BarChart.d.ts +70 -15
- package/charts/BarChart.js +92 -63
- package/charts/BarChart.js.map +1 -1
- package/charts/BarLineChartBase.d.ts +494 -73
- package/charts/BarLineChartBase.js +788 -407
- package/charts/BarLineChartBase.js.map +1 -1
- package/charts/BubbleChart.d.ts +11 -5
- package/charts/BubbleChart.js +10 -8
- package/charts/BubbleChart.js.map +1 -1
- package/charts/CandleStickChart.d.ts +8 -5
- package/charts/CandleStickChart.js +9 -10
- package/charts/CandleStickChart.js.map +1 -1
- package/charts/Chart.d.ts +420 -91
- package/charts/Chart.js +590 -290
- package/charts/Chart.js.map +1 -1
- package/charts/CombinedChart.d.ts +59 -29
- package/charts/CombinedChart.js +74 -67
- package/charts/CombinedChart.js.map +1 -1
- package/charts/HorizontalBarChart.d.ts +37 -7
- package/charts/HorizontalBarChart.js +97 -59
- package/charts/HorizontalBarChart.js.map +1 -1
- package/charts/LineChart.d.ts +3 -5
- package/charts/LineChart.js +6 -10
- package/charts/LineChart.js.map +1 -1
- package/charts/PieChart.d.ts +218 -64
- package/charts/PieChart.js +278 -168
- package/charts/PieChart.js.map +1 -1
- package/charts/PieRadarChartBase.d.ts +107 -18
- package/charts/PieRadarChartBase.js +156 -73
- package/charts/PieRadarChartBase.js.map +1 -1
- package/charts/RadarChart.d.ts +75 -35
- package/charts/RadarChart.js +114 -103
- package/charts/RadarChart.js.map +1 -1
- package/charts/ScatterChart.d.ts +10 -5
- package/charts/ScatterChart.js +11 -10
- package/charts/ScatterChart.js.map +1 -1
- package/components/AxisBase.d.ts +271 -101
- package/components/AxisBase.js +264 -254
- package/components/AxisBase.js.map +1 -1
- package/components/ComponentBase.d.ts +54 -19
- package/components/ComponentBase.js +60 -48
- package/components/ComponentBase.js.map +1 -1
- package/components/Description.d.ts +18 -9
- package/components/Description.js +12 -26
- package/components/Description.js.map +1 -1
- package/components/IMarker.d.ts +30 -1
- package/components/IMarker.js.map +1 -1
- package/components/Legend.d.ts +155 -58
- package/components/Legend.js +208 -172
- package/components/Legend.js.map +1 -1
- package/components/LegendEntry.d.ts +38 -0
- package/components/LegendEntry.js +34 -0
- package/components/LegendEntry.js.map +1 -1
- package/components/LimitLine.d.ts +40 -22
- package/components/LimitLine.js +44 -56
- package/components/LimitLine.js.map +1 -1
- package/components/MarkerImage.d.ts +1 -0
- package/components/MarkerImage.js +97 -0
- package/components/MarkerImage.js.map +1 -0
- package/components/XAxis.d.ts +41 -10
- package/components/XAxis.js +42 -24
- package/components/XAxis.js.map +1 -1
- package/components/YAxis.d.ts +114 -37
- package/components/YAxis.js +138 -106
- package/components/YAxis.js.map +1 -1
- package/data/BarData.d.ts +32 -4
- package/data/BarData.js +92 -24
- package/data/BarData.js.map +1 -1
- package/data/BarDataSet.d.ts +35 -18
- package/data/BarDataSet.js +42 -47
- package/data/BarDataSet.js.map +1 -1
- package/data/BarEntry.d.ts +3 -0
- package/data/BarEntry.js.map +1 -1
- package/data/BarLineScatterCandleBubbleData.d.ts +5 -0
- package/data/BarLineScatterCandleBubbleData.js +5 -0
- package/data/BarLineScatterCandleBubbleData.js.map +1 -1
- package/data/BarLineScatterCandleBubbleDataSet.d.ts +11 -3
- package/data/BarLineScatterCandleBubbleDataSet.js +11 -7
- package/data/BarLineScatterCandleBubbleDataSet.js.map +1 -1
- package/data/BaseDataSet.d.ts +129 -71
- package/data/BaseDataSet.js +146 -169
- package/data/BaseDataSet.js.map +1 -1
- package/data/BaseEntry.d.ts +3 -0
- package/data/BaseEntry.js.map +1 -1
- package/data/BubbleData.d.ts +7 -1
- package/data/BubbleData.js +8 -2
- package/data/BubbleData.js.map +1 -1
- package/data/BubbleDataSet.d.ts +7 -7
- package/data/BubbleDataSet.js +8 -15
- package/data/BubbleDataSet.js.map +1 -1
- package/data/BubbleEntry.d.ts +1 -0
- package/data/BubbleEntry.js.map +1 -1
- package/data/CandleData.js.map +1 -1
- package/data/CandleDataSet.d.ts +64 -30
- package/data/CandleDataSet.js +67 -74
- package/data/CandleDataSet.js.map +1 -1
- package/data/CandleEntry.d.ts +4 -0
- package/data/CandleEntry.js.map +1 -1
- package/data/ChartData.d.ts +275 -20
- package/data/ChartData.js +400 -95
- package/data/ChartData.js.map +1 -1
- package/data/CombinedData.d.ts +39 -12
- package/data/CombinedData.js +87 -71
- package/data/CombinedData.js.map +1 -1
- package/data/DataSet.d.ts +59 -8
- package/data/DataSet.js +114 -26
- package/data/DataSet.js.map +1 -1
- package/data/Entry.js.map +1 -1
- package/data/LineData.d.ts +5 -0
- package/data/LineData.js +5 -0
- package/data/LineData.js.map +1 -1
- package/data/LineDataSet.d.ts +84 -49
- package/data/LineDataSet.js +94 -135
- package/data/LineDataSet.js.map +1 -1
- package/data/LineRadarDataSet.d.ts +27 -17
- package/data/LineRadarDataSet.js +22 -35
- package/data/LineRadarDataSet.js.map +1 -1
- package/data/LineScatterCandleRadarDataSet.d.ts +30 -15
- package/data/LineScatterCandleRadarDataSet.js +36 -39
- package/data/LineScatterCandleRadarDataSet.js.map +1 -1
- package/data/PieData.d.ts +26 -0
- package/data/PieData.js +28 -2
- package/data/PieData.js.map +1 -1
- package/data/PieDataSet.d.ts +40 -36
- package/data/PieDataSet.js +36 -88
- package/data/PieDataSet.js.map +1 -1
- package/data/PieEntry.d.ts +3 -0
- package/data/PieEntry.js.map +1 -1
- package/data/RadarData.d.ts +10 -4
- package/data/RadarData.js +5 -6
- package/data/RadarData.js.map +1 -1
- package/data/RadarDataSet.d.ts +7 -21
- package/data/RadarDataSet.js +10 -49
- package/data/RadarDataSet.js.map +1 -1
- package/data/RadarEntry.js.map +1 -1
- package/data/ScatterData.d.ts +4 -1
- package/data/ScatterData.js +5 -2
- package/data/ScatterData.js.map +1 -1
- package/data/ScatterDataSet.d.ts +24 -14
- package/data/ScatterDataSet.js +26 -31
- package/data/ScatterDataSet.js.map +1 -1
- package/formatter/DefaultAxisValueFormatter.d.ts +17 -3
- package/formatter/DefaultAxisValueFormatter.js +12 -5
- package/formatter/DefaultAxisValueFormatter.js.map +1 -1
- package/formatter/DefaultFillFormatter.js +7 -7
- package/formatter/DefaultFillFormatter.js.map +1 -1
- package/formatter/DefaultValueFormatter.js.map +1 -1
- package/formatter/IAxisValueFormatter.d.ts +20 -2
- package/formatter/IAxisValueFormatter.js.map +1 -1
- package/formatter/IFillFormatter.d.ts +25 -0
- package/formatter/IFillFormatter.js.map +1 -1
- package/formatter/IValueFormatter.d.ts +21 -0
- package/formatter/IValueFormatter.js.map +1 -1
- package/formatter/ValueFormatter.d.ts +60 -0
- package/formatter/ValueFormatter.js +60 -0
- package/formatter/ValueFormatter.js.map +1 -1
- package/highlight/BarHighlighter.d.ts +22 -2
- package/highlight/BarHighlighter.js +43 -17
- package/highlight/BarHighlighter.js.map +1 -1
- package/highlight/ChartHighlighter.d.ts +87 -5
- package/highlight/ChartHighlighter.js +129 -25
- package/highlight/ChartHighlighter.js.map +1 -1
- package/highlight/CombinedHighlighter.d.ts +6 -0
- package/highlight/CombinedHighlighter.js +31 -16
- package/highlight/CombinedHighlighter.js.map +1 -1
- package/highlight/Highlight.d.ts +54 -1
- package/highlight/Highlight.js +5 -0
- package/highlight/Highlight.js.map +1 -1
- package/highlight/HorizontalBarHighlighter.d.ts +1 -1
- package/highlight/HorizontalBarHighlighter.js +14 -13
- package/highlight/HorizontalBarHighlighter.js.map +1 -1
- package/highlight/IHighlighter.d.ts +11 -1
- package/highlight/IHighlighter.js.map +1 -1
- package/highlight/PieHighlighter.js +2 -2
- package/highlight/PieHighlighter.js.map +1 -1
- package/highlight/PieRadarHighlighter.d.ts +12 -1
- package/highlight/PieRadarHighlighter.js +12 -4
- package/highlight/PieRadarHighlighter.js.map +1 -1
- package/highlight/RadarHighlighter.d.ts +12 -0
- package/highlight/RadarHighlighter.js +24 -10
- package/highlight/RadarHighlighter.js.map +1 -1
- package/index.d.ts +11 -0
- package/index.js +15 -0
- package/index.js.map +1 -0
- package/interfaces/dataprovider/BarDataProvider.d.ts +4 -4
- package/interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider.d.ts +8 -3
- package/interfaces/dataprovider/BubbleDataProvider.d.ts +1 -1
- package/interfaces/dataprovider/CandleDataProvider.d.ts +1 -1
- package/interfaces/dataprovider/ChartInterface.d.ts +17 -22
- package/interfaces/dataprovider/CombinedDataProvider.d.ts +1 -1
- package/interfaces/dataprovider/LineDataProvider.d.ts +1 -1
- package/interfaces/dataprovider/ScatterDataProvider.d.ts +1 -1
- package/interfaces/datasets/IBarDataSet.d.ts +8 -22
- package/interfaces/datasets/IBarLineScatterCandleBubbleDataSet.d.ts +1 -3
- package/interfaces/datasets/IBubbleDataSet.d.ts +3 -9
- package/interfaces/datasets/ICandleDataSet.d.ts +44 -41
- package/interfaces/datasets/IDataSet.d.ts +35 -151
- package/interfaces/datasets/ILineDataSet.d.ts +15 -54
- package/interfaces/datasets/ILineRadarDataSet.d.ts +7 -28
- package/interfaces/datasets/ILineScatterCandleRadarDataSet.d.ts +5 -4
- package/interfaces/datasets/IPieDataSet.d.ts +22 -40
- package/interfaces/datasets/IRadarDataSet.d.ts +7 -13
- package/interfaces/datasets/IScatterDataSet.d.ts +17 -16
- package/jobs/AnimatedMoveViewJob.d.ts +3 -0
- package/jobs/AnimatedMoveViewJob.js +12 -8
- package/jobs/AnimatedMoveViewJob.js.map +1 -1
- package/jobs/AnimatedViewPortJob.d.ts +7 -8
- package/jobs/AnimatedViewPortJob.js +16 -23
- package/jobs/AnimatedViewPortJob.js.map +1 -1
- package/jobs/AnimatedZoomJob.d.ts +8 -5
- package/jobs/AnimatedZoomJob.js +30 -26
- package/jobs/AnimatedZoomJob.js.map +1 -1
- package/jobs/MoveViewJob.d.ts +3 -0
- package/jobs/MoveViewJob.js +10 -7
- package/jobs/MoveViewJob.js.map +1 -1
- package/jobs/ViewPortJob.d.ts +3 -5
- package/jobs/ViewPortJob.js +5 -11
- package/jobs/ViewPortJob.js.map +1 -1
- package/jobs/ZoomJob.js +14 -14
- package/jobs/ZoomJob.js.map +1 -1
- package/listener/BarLineChartTouchListener.d.ts +82 -1
- package/listener/BarLineChartTouchListener.js +169 -67
- package/listener/BarLineChartTouchListener.js.map +1 -1
- package/listener/ChartTouchListener.d.ts +39 -5
- package/listener/ChartTouchListener.js +38 -11
- package/listener/ChartTouchListener.js.map +1 -1
- package/listener/PieRadarChartTouchListener.d.ts +56 -1
- package/listener/PieRadarChartTouchListener.js +201 -17
- package/listener/PieRadarChartTouchListener.js.map +1 -1
- package/model/GradientColor.js.map +1 -1
- package/package.json +23 -15
- package/renderer/AxisRenderer.d.ts +66 -7
- package/renderer/AxisRenderer.js +69 -21
- package/renderer/AxisRenderer.js.map +1 -1
- package/renderer/BarChartRenderer.d.ts +11 -0
- package/renderer/BarChartRenderer.js +99 -71
- package/renderer/BarChartRenderer.js.map +1 -1
- package/renderer/BarLineScatterCandleBubbleRenderer.d.ts +37 -0
- package/renderer/BarLineScatterCandleBubbleRenderer.js +36 -8
- package/renderer/BarLineScatterCandleBubbleRenderer.js.map +1 -1
- package/renderer/BubbleChartRenderer.d.ts +6 -2
- package/renderer/BubbleChartRenderer.js +51 -40
- package/renderer/BubbleChartRenderer.js.map +1 -1
- package/renderer/CandleStickChartRenderer.d.ts +1 -1
- package/renderer/CandleStickChartRenderer.js +64 -50
- package/renderer/CandleStickChartRenderer.js.map +1 -1
- package/renderer/CombinedChartRenderer.d.ts +20 -1
- package/renderer/CombinedChartRenderer.js +72 -42
- package/renderer/CombinedChartRenderer.js.map +1 -1
- package/renderer/DataRenderer.d.ts +78 -4
- package/renderer/DataRenderer.js +65 -6
- package/renderer/DataRenderer.js.map +1 -1
- package/renderer/HorizontalBarChartRenderer.d.ts +5 -2
- package/renderer/HorizontalBarChartRenderer.js +87 -66
- package/renderer/HorizontalBarChartRenderer.js.map +1 -1
- package/renderer/LegendRenderer.d.ts +32 -0
- package/renderer/LegendRenderer.js +98 -59
- package/renderer/LegendRenderer.js.map +1 -1
- package/renderer/LineChartRenderer.d.ts +38 -1
- package/renderer/LineChartRenderer.js +198 -113
- package/renderer/LineChartRenderer.js.map +1 -1
- package/renderer/LineRadarRenderer.d.ts +19 -0
- package/renderer/LineRadarRenderer.js +25 -1
- package/renderer/LineRadarRenderer.js.map +1 -1
- package/renderer/LineScatterCandleRadarRenderer.d.ts +11 -0
- package/renderer/LineScatterCandleRadarRenderer.js +26 -9
- package/renderer/LineScatterCandleRadarRenderer.js.map +1 -1
- package/renderer/PieChartRenderer.d.ts +45 -1
- package/renderer/PieChartRenderer.js +195 -122
- package/renderer/PieChartRenderer.js.map +1 -1
- package/renderer/RadarChartRenderer.d.ts +10 -0
- package/renderer/RadarChartRenderer.js +119 -77
- package/renderer/RadarChartRenderer.js.map +1 -1
- package/renderer/Renderer.d.ts +8 -0
- package/renderer/Renderer.js +5 -0
- package/renderer/Renderer.js.map +1 -1
- package/renderer/ScatterChartRenderer.d.ts +5 -5
- package/renderer/ScatterChartRenderer.js +51 -37
- package/renderer/ScatterChartRenderer.js.map +1 -1
- package/renderer/XAxisRenderer.d.ts +29 -4
- package/renderer/XAxisRenderer.js +128 -95
- package/renderer/XAxisRenderer.js.map +1 -1
- package/renderer/XAxisRendererHorizontalBarChart.d.ts +11 -0
- package/renderer/XAxisRendererHorizontalBarChart.js +75 -57
- package/renderer/XAxisRendererHorizontalBarChart.js.map +1 -1
- package/renderer/XAxisRendererRadarChart.d.ts +5 -0
- package/renderer/XAxisRendererRadarChart.js +26 -13
- package/renderer/XAxisRendererRadarChart.js.map +1 -1
- package/renderer/YAxisRenderer.d.ts +42 -5
- package/renderer/YAxisRenderer.js +126 -69
- package/renderer/YAxisRenderer.js.map +1 -1
- package/renderer/YAxisRendererHorizontalBarChart.d.ts +22 -1
- package/renderer/YAxisRendererHorizontalBarChart.js +80 -58
- package/renderer/YAxisRendererHorizontalBarChart.js.map +1 -1
- package/renderer/YAxisRendererRadarChart.js +62 -32
- package/renderer/YAxisRendererRadarChart.js.map +1 -1
- package/renderer/scatter/ChevronDownShapeRenderer.d.ts +4 -0
- package/renderer/scatter/ChevronDownShapeRenderer.js +5 -1
- package/renderer/scatter/ChevronDownShapeRenderer.js.map +1 -1
- package/renderer/scatter/ChevronUpShapeRenderer.d.ts +4 -0
- package/renderer/scatter/ChevronUpShapeRenderer.js +5 -1
- package/renderer/scatter/ChevronUpShapeRenderer.js.map +1 -1
- package/renderer/scatter/CircleShapeRenderer.d.ts +4 -0
- package/renderer/scatter/CircleShapeRenderer.js +8 -5
- package/renderer/scatter/CircleShapeRenderer.js.map +1 -1
- package/renderer/scatter/CrossShapeRenderer.d.ts +4 -0
- package/renderer/scatter/CrossShapeRenderer.js +5 -1
- package/renderer/scatter/CrossShapeRenderer.js.map +1 -1
- package/renderer/scatter/IShapeRenderer.d.ts +14 -0
- package/renderer/scatter/IShapeRenderer.js.map +1 -1
- package/renderer/scatter/SquareShapeRenderer.d.ts +4 -0
- package/renderer/scatter/SquareShapeRenderer.js +8 -5
- package/renderer/scatter/SquareShapeRenderer.js.map +1 -1
- package/renderer/scatter/TriangleShapeRenderer.d.ts +4 -0
- package/renderer/scatter/TriangleShapeRenderer.js +9 -5
- package/renderer/scatter/TriangleShapeRenderer.js.map +1 -1
- package/renderer/scatter/XShapeRenderer.d.ts +4 -0
- package/renderer/scatter/XShapeRenderer.js +5 -1
- package/renderer/scatter/XShapeRenderer.js.map +1 -1
- package/utils/ColorTemplate.d.ts +21 -1
- package/utils/ColorTemplate.js +21 -3
- package/utils/ColorTemplate.js.map +1 -1
- package/utils/HorizontalViewPortHandler.d.ts +3 -0
- package/utils/HorizontalViewPortHandler.js +3 -0
- package/utils/HorizontalViewPortHandler.js.map +1 -1
- package/utils/MPSize.d.ts +7 -0
- package/utils/ObjectPool.d.ts +56 -0
- package/utils/ObjectPool.js +66 -8
- package/utils/ObjectPool.js.map +1 -1
- package/utils/Transformer.d.ts +118 -0
- package/utils/Transformer.js +141 -7
- package/utils/Transformer.js.map +1 -1
- package/utils/TransformerHorizontalBarChart.d.ts +10 -0
- package/utils/TransformerHorizontalBarChart.js +18 -2
- package/utils/TransformerHorizontalBarChart.js.map +1 -1
- package/utils/Utils.d.ts +139 -17
- package/utils/Utils.js +185 -60
- package/utils/Utils.js.map +1 -1
- package/utils/ViewPortHandler.d.ts +234 -19
- package/utils/ViewPortHandler.js +306 -63
- package/utils/ViewPortHandler.js.map +1 -1
- package/utils/colors/colorful.js.map +1 -1
- package/utils/colors/joyful.js.map +1 -1
- package/utils/colors/liberty.js.map +1 -1
- package/utils/colors/material.js.map +1 -1
- package/utils/colors/pastel.js.map +1 -1
- package/utils/colors/vordiplom.js.map +1 -1
- package/charts/index.d.ts +0 -11
- package/charts/index.js +0 -15
- package/charts/index.js.map +0 -1
package/components/AxisBase.js
CHANGED
|
@@ -1,303 +1,335 @@
|
|
|
1
1
|
import { Align, DashPathEffect, parseDashEffect } from '@nativescript-community/ui-canvas';
|
|
2
|
-
import { ComponentBase } from './ComponentBase';
|
|
3
2
|
import { DefaultAxisValueFormatter } from '../formatter/DefaultAxisValueFormatter';
|
|
3
|
+
import { ComponentBase } from './ComponentBase';
|
|
4
|
+
/**
|
|
5
|
+
* Base-class of all axes (previously called labels).
|
|
6
|
+
*
|
|
7
|
+
|
|
8
|
+
*/
|
|
4
9
|
export class AxisBase extends ComponentBase {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* default constructor
|
|
12
|
+
*/
|
|
13
|
+
constructor(chart) {
|
|
14
|
+
super();
|
|
15
|
+
/**
|
|
16
|
+
* the color of the grid lines for this axis (the horizontal lines
|
|
17
|
+
* coming from each label).
|
|
18
|
+
*/
|
|
19
|
+
this.gridColor = 'gray';
|
|
20
|
+
/**
|
|
21
|
+
* the width of the grid lines that are drawn away from each axis
|
|
22
|
+
* label.
|
|
23
|
+
*/
|
|
24
|
+
this.gridLineWidth = 1;
|
|
25
|
+
/**
|
|
26
|
+
* the color of the border surrounding the chart.
|
|
27
|
+
*/
|
|
28
|
+
this.axisLineColor = 'gray';
|
|
29
|
+
/**
|
|
30
|
+
* the width of the border surrounding the chart in dp.
|
|
31
|
+
*/
|
|
32
|
+
this.axisLineWidth = 1;
|
|
33
|
+
/**
|
|
34
|
+
* the actual array of entries
|
|
35
|
+
*/
|
|
11
36
|
this.mEntries = [];
|
|
12
37
|
this.mLabels = [];
|
|
38
|
+
/**
|
|
39
|
+
* axis label entries only used for centered labels
|
|
40
|
+
*/
|
|
13
41
|
this.mCenteredEntries = [];
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
this.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
42
|
+
/**
|
|
43
|
+
* the number of label entries the axis should have, default 6
|
|
44
|
+
*/
|
|
45
|
+
this.labelCount = 6;
|
|
46
|
+
/**
|
|
47
|
+
* the labels text alignment of the axis labels.
|
|
48
|
+
*/
|
|
49
|
+
this.labelTextAlign = Align.LEFT;
|
|
50
|
+
/**
|
|
51
|
+
* if true, the set number of y-labels will be forced
|
|
52
|
+
*/
|
|
53
|
+
this.forceLabelsEnabled = false;
|
|
54
|
+
/**
|
|
55
|
+
* flag indicating if the grid lines for this axis should be drawn
|
|
56
|
+
*/
|
|
57
|
+
this.drawGridLines = true;
|
|
58
|
+
/**
|
|
59
|
+
* flag that indicates if the line alongside the axis is drawn or not
|
|
60
|
+
*/
|
|
61
|
+
this.drawAxisLine = true;
|
|
62
|
+
/**
|
|
63
|
+
* flag that indicates of the labels of this axis should be drawn or not
|
|
64
|
+
*/
|
|
65
|
+
this.drawLabels = true;
|
|
66
|
+
/**
|
|
67
|
+
* Centers the axis labels instead of drawing them at their original position.
|
|
68
|
+
* This is useful especially for grouped BarChart.
|
|
69
|
+
*/
|
|
70
|
+
this.centerAxisLabels = false;
|
|
25
71
|
this.ensureLastLabel = false;
|
|
26
72
|
this.allowLastLabelAboveMax = false;
|
|
27
|
-
|
|
28
|
-
|
|
73
|
+
/**
|
|
74
|
+
* the path effect of the axis line that makes dashed lines possible
|
|
75
|
+
*/
|
|
76
|
+
this.axisLineDashPathEffect = null;
|
|
77
|
+
/**
|
|
78
|
+
* the path effect of the grid lines that makes dashed lines possible
|
|
79
|
+
*/
|
|
80
|
+
this.gridDashPathEffect = null;
|
|
81
|
+
/**
|
|
82
|
+
* array of limit lines that can be set for the axis
|
|
83
|
+
*/
|
|
29
84
|
this.mLimitLines = [];
|
|
30
|
-
|
|
31
|
-
|
|
85
|
+
/**
|
|
86
|
+
* flag indicating if the limit lines are drawn
|
|
87
|
+
*/
|
|
88
|
+
this.drawLimitLines = true;
|
|
89
|
+
/**
|
|
90
|
+
* When enabled the LimitLines are drawn behind the actual data,
|
|
91
|
+
* otherwise on top. Default: false
|
|
92
|
+
*
|
|
93
|
+
* @param enabled
|
|
94
|
+
*/
|
|
95
|
+
this.drawLimitLinesBehindData = false;
|
|
96
|
+
/**
|
|
97
|
+
* When enabled the limitlines will be clipped to contentRect,
|
|
98
|
+
* otherwise they can bleed outside the content rect.
|
|
99
|
+
*/
|
|
32
100
|
this.clipLimitLinesToContent = true;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
this.
|
|
101
|
+
/**
|
|
102
|
+
* When enabled the labels are drawn behind the actual data,
|
|
103
|
+
* otherwise on top. Default: false
|
|
104
|
+
*/
|
|
105
|
+
this.drawLabelsBehindData = false;
|
|
106
|
+
/**
|
|
107
|
+
* When enabled the grid lines are draw on top of the actual data,
|
|
108
|
+
* otherwise behind. Default: true
|
|
109
|
+
*/
|
|
110
|
+
this.drawGridLinesBehindData = true;
|
|
111
|
+
/**
|
|
112
|
+
* flag indicating the mark ticks should be drawn
|
|
113
|
+
*/
|
|
114
|
+
this.drawMarkTicks = false;
|
|
115
|
+
/**
|
|
116
|
+
* Extra spacing for `axisMinimum` to be added to automatically calculated `axisMinimum`
|
|
117
|
+
*/
|
|
118
|
+
this.spaceMin = 0;
|
|
119
|
+
/**
|
|
120
|
+
* Extra spacing for `axisMaximum` to be added to automatically calculated `axisMaximum`
|
|
121
|
+
*/
|
|
122
|
+
this.spaceMax = 0;
|
|
123
|
+
/**
|
|
124
|
+
* flag indicating that the axis-min value has been customized
|
|
125
|
+
*/
|
|
38
126
|
this.mCustomAxisMin = false;
|
|
127
|
+
/**
|
|
128
|
+
* flag indicating that the axis-max value has been customized
|
|
129
|
+
*/
|
|
39
130
|
this.mCustomAxisMax = false;
|
|
131
|
+
/**
|
|
132
|
+
* don't touch this direclty, use setter
|
|
133
|
+
*/
|
|
40
134
|
this.mAxisMaximum = 0;
|
|
135
|
+
/**
|
|
136
|
+
* don't touch this directly, use setter
|
|
137
|
+
*/
|
|
41
138
|
this.mAxisMinimum = 0;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
this.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
this.
|
|
50
|
-
this.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return this.mDrawGridLines;
|
|
58
|
-
}
|
|
59
|
-
setDrawAxisLine(enabled) {
|
|
60
|
-
this.mDrawAxisLine = enabled;
|
|
61
|
-
}
|
|
62
|
-
isDrawAxisLineEnabled() {
|
|
63
|
-
return this.mDrawAxisLine;
|
|
64
|
-
}
|
|
65
|
-
setIgnoreOffsets(enabled) {
|
|
66
|
-
this.mIgnoreOffsets = enabled;
|
|
67
|
-
}
|
|
68
|
-
isIgnoringOffsets() {
|
|
69
|
-
return this.mIgnoreOffsets;
|
|
70
|
-
}
|
|
71
|
-
setCenterAxisLabels(enabled) {
|
|
72
|
-
this.mCenterAxisLabels = enabled;
|
|
73
|
-
}
|
|
74
|
-
isCenterAxisLabelsEnabled() {
|
|
75
|
-
return this.mCenterAxisLabels && this.mEntryCount > 0;
|
|
76
|
-
}
|
|
77
|
-
setGridColor(color) {
|
|
78
|
-
this.mGridColor = color;
|
|
79
|
-
}
|
|
80
|
-
getGridColor() {
|
|
81
|
-
return this.mGridColor;
|
|
82
|
-
}
|
|
83
|
-
setAxisLineWidth(width) {
|
|
84
|
-
this.mAxisLineWidth = width;
|
|
85
|
-
}
|
|
86
|
-
getAxisLineWidth() {
|
|
87
|
-
return this.mAxisLineWidth;
|
|
88
|
-
}
|
|
89
|
-
setGridLineWidth(width) {
|
|
90
|
-
this.mGridLineWidth = width;
|
|
91
|
-
}
|
|
92
|
-
getGridLineWidth() {
|
|
93
|
-
return this.mGridLineWidth;
|
|
94
|
-
}
|
|
95
|
-
setAxisLineColor(color) {
|
|
96
|
-
this.mAxisLineColor = color;
|
|
97
|
-
}
|
|
98
|
-
getAxisLineColor() {
|
|
99
|
-
return this.mAxisLineColor;
|
|
100
|
-
}
|
|
101
|
-
setDrawLabels(enabled) {
|
|
102
|
-
this.mDrawLabels = enabled;
|
|
103
|
-
}
|
|
104
|
-
isDrawLabelsEnabled() {
|
|
105
|
-
return this.mDrawLabels;
|
|
106
|
-
}
|
|
107
|
-
setLabelCount(count, force) {
|
|
108
|
-
if (count > 25)
|
|
109
|
-
count = 25;
|
|
110
|
-
if (count < 2)
|
|
111
|
-
count = 2;
|
|
112
|
-
this.mLabelCount = count;
|
|
113
|
-
this.mForceLabels = !!force;
|
|
114
|
-
}
|
|
115
|
-
isForceLabelsEnabled() {
|
|
116
|
-
return this.mForceLabels;
|
|
117
|
-
}
|
|
118
|
-
getLabelCount() {
|
|
119
|
-
return this.mLabelCount;
|
|
120
|
-
}
|
|
121
|
-
isForceIntervalEnabled() {
|
|
122
|
-
return this.mForcedIntervalEnabled;
|
|
123
|
-
}
|
|
124
|
-
setForcedInterval(interval) {
|
|
125
|
-
this.mForcedInterval = interval;
|
|
126
|
-
this.mForcedIntervalEnabled = interval > 0;
|
|
127
|
-
}
|
|
128
|
-
getForcedInterval() {
|
|
129
|
-
return this.mForcedInterval;
|
|
130
|
-
}
|
|
131
|
-
isGranularityEnabled() {
|
|
132
|
-
return this.mGranularityEnabled;
|
|
133
|
-
}
|
|
134
|
-
setGranularityEnabled(enabled) {
|
|
135
|
-
this.mGranularityEnabled = enabled;
|
|
136
|
-
}
|
|
137
|
-
getGranularity() {
|
|
138
|
-
return this.mGranularity;
|
|
139
|
-
}
|
|
140
|
-
setGranularity(granularity) {
|
|
141
|
-
this.mGranularity = granularity;
|
|
142
|
-
this.mGranularityEnabled = true;
|
|
143
|
-
}
|
|
139
|
+
/**
|
|
140
|
+
* the total range of values this axis covers
|
|
141
|
+
*/
|
|
142
|
+
this.axisRange = 0;
|
|
143
|
+
/**
|
|
144
|
+
* the total range of values this axis covers
|
|
145
|
+
*/
|
|
146
|
+
this.ignoreOffsets = false;
|
|
147
|
+
this.chart = chart;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Adds a new LimitLine to this axis.
|
|
151
|
+
*
|
|
152
|
+
* @param l
|
|
153
|
+
*/
|
|
144
154
|
addLimitLine(l) {
|
|
145
155
|
this.mLimitLines.push(l);
|
|
146
|
-
if (this.mLimitLines.length > 6) {
|
|
147
|
-
console.error('MPAndroiChart', 'Warning! You have more than 6 LimitLines on your axis, do you really want ' + 'that?');
|
|
148
|
-
}
|
|
149
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Removes the specified LimitLine from the axis.
|
|
159
|
+
*
|
|
160
|
+
* @param l
|
|
161
|
+
*/
|
|
150
162
|
removeLimitLine(l) {
|
|
151
163
|
const index = this.mLimitLines.indexOf(l);
|
|
152
164
|
if (index >= 0) {
|
|
153
165
|
this.mLimitLines.splice(index, 1);
|
|
154
166
|
}
|
|
155
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* Removes all LimitLines from the axis.
|
|
170
|
+
*/
|
|
156
171
|
removeAllLimitLines() {
|
|
157
172
|
this.mLimitLines = [];
|
|
158
173
|
}
|
|
159
|
-
|
|
174
|
+
/**
|
|
175
|
+
* Returns the LimitLines of this axis.
|
|
176
|
+
*/
|
|
177
|
+
get limitLines() {
|
|
160
178
|
return this.mLimitLines;
|
|
161
179
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
setDrawLimitLinesBehindData(enabled) {
|
|
169
|
-
this.mDrawLimitLineBehindData = enabled;
|
|
170
|
-
}
|
|
171
|
-
isDrawLimitLinesBehindDataEnabled() {
|
|
172
|
-
return this.mDrawLimitLineBehindData;
|
|
173
|
-
}
|
|
174
|
-
setDrawLimitLines(enabled) {
|
|
175
|
-
this.mDrawLimitLines = enabled;
|
|
176
|
-
}
|
|
177
|
-
isDrawLimitLinesEnabled() {
|
|
178
|
-
return this.mDrawLimitLines;
|
|
179
|
-
}
|
|
180
|
-
setDrawGridLinesBehindData(enabled) {
|
|
181
|
-
this.mDrawGridLinesBehindData = enabled;
|
|
182
|
-
}
|
|
183
|
-
isDrawGridLinesBehindDataEnabled() {
|
|
184
|
-
return this.mDrawGridLinesBehindData;
|
|
185
|
-
}
|
|
186
|
-
setDrawMarkTicks(enabled) {
|
|
187
|
-
this.mDrawMarkTicks = enabled;
|
|
188
|
-
}
|
|
189
|
-
isDrawMarkTicksEnabled() {
|
|
190
|
-
return this.mDrawMarkTicks;
|
|
191
|
-
}
|
|
192
|
-
getLongestLabel() {
|
|
180
|
+
/**
|
|
181
|
+
* Returns the longest formatted label (in terms of characters), this axis
|
|
182
|
+
* contains.
|
|
183
|
+
*/
|
|
184
|
+
get longestLabel() {
|
|
193
185
|
let longest = '';
|
|
194
186
|
const labels = this.mLabels;
|
|
195
187
|
for (let i = 0; i < this.mEntries.length; i++) {
|
|
196
188
|
const text = labels[i];
|
|
197
|
-
if (text
|
|
189
|
+
if (text && longest.length < text.length) {
|
|
198
190
|
longest = text;
|
|
199
191
|
}
|
|
200
192
|
}
|
|
201
193
|
return longest;
|
|
202
194
|
}
|
|
203
195
|
getFormattedLabel(index) {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
196
|
+
// let label = this.mLabels[index];
|
|
197
|
+
// if (!label) {
|
|
198
|
+
// label = this.mLabels[index] = this.valueFormatter.getAxisLabel()
|
|
199
|
+
// }
|
|
200
|
+
return this.mLabels[index];
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Sets the formatter to be used for formatting the axis labels. If no formatter is set, the
|
|
204
|
+
* chart will
|
|
205
|
+
* automatically determine a reasonable formatting (concerning decimals) for all the values
|
|
206
|
+
* that are drawn inside
|
|
207
|
+
* the chart. Use chart.defaultValueFormatter to use the formatter calculated by the chart.
|
|
208
|
+
*
|
|
209
|
+
* @param f
|
|
210
|
+
*/
|
|
211
|
+
set valueFormatter(f) {
|
|
212
|
+
if (!f)
|
|
211
213
|
this.mAxisValueFormatter = new DefaultAxisValueFormatter(this.mDecimals);
|
|
212
214
|
else
|
|
213
215
|
this.mAxisValueFormatter = f;
|
|
214
216
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
+
/**
|
|
218
|
+
* Returns the formatter used for formatting the axis labels.
|
|
219
|
+
*/
|
|
220
|
+
get valueFormatter() {
|
|
221
|
+
if (!this.mAxisValueFormatter || (this.mAxisValueFormatter instanceof DefaultAxisValueFormatter && this.mAxisValueFormatter.decimalDigits !== this.mDecimals)) {
|
|
217
222
|
this.mAxisValueFormatter = new DefaultAxisValueFormatter(this.mDecimals);
|
|
218
223
|
}
|
|
219
224
|
return this.mAxisValueFormatter;
|
|
220
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* Enables the grid line to be drawn in dashed mode, e.g. like this
|
|
228
|
+
* "- - - - - -". THIS ONLY WORKS IF HARDWARE-ACCELERATION IS TURNED OFF.
|
|
229
|
+
* Keep in mind that hardware acceleration boosts performance.
|
|
230
|
+
*
|
|
231
|
+
* @param lineLength the length of the line pieces
|
|
232
|
+
* @param spaceLength the length of space in between the pieces
|
|
233
|
+
* @param phase offset, in degrees (normally, use 0)
|
|
234
|
+
*/
|
|
221
235
|
enableGridDashedLine(lineLength, spaceLength, phase) {
|
|
222
|
-
this.
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
getGridDashPathEffect() {
|
|
234
|
-
return this.mGridDashPathEffect;
|
|
235
|
-
}
|
|
236
|
+
this.gridDashPathEffect = new DashPathEffect([lineLength, spaceLength], phase);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Enables the axis line to be drawn in dashed mode, e.g. like this
|
|
240
|
+
* "- - - - - -". THIS ONLY WORKS IF HARDWARE-ACCELERATION IS TURNED OFF.
|
|
241
|
+
* Keep in mind that hardware acceleration boosts performance.
|
|
242
|
+
*
|
|
243
|
+
* @param lineLength the length of the line pieces
|
|
244
|
+
* @param spaceLength the length of space in between the pieces
|
|
245
|
+
* @param phase offset, in degrees (normally, use 0)
|
|
246
|
+
*/
|
|
236
247
|
enableAxisLineDashedLine(lineLength, spaceLength, phase) {
|
|
237
|
-
this.
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
getAxisLineDashPathEffect() {
|
|
249
|
-
return this.mAxisLineDashPathEffect;
|
|
250
|
-
}
|
|
251
|
-
getAxisMaximum() {
|
|
252
|
-
return this.mAxisMaximum;
|
|
253
|
-
}
|
|
254
|
-
getAxisMinimum() {
|
|
255
|
-
return this.mAxisMinimum;
|
|
256
|
-
}
|
|
248
|
+
this.axisLineDashPathEffect = parseDashEffect(`${lineLength} ${spaceLength} ${phase}`);
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* ###### BELOW CODE RELATED TO CUSTOM AXIS VALUES ######
|
|
252
|
+
*/
|
|
253
|
+
/**
|
|
254
|
+
* By calling this method, any custom maximum value that has been previously set is reseted,
|
|
255
|
+
* and the calculation is
|
|
256
|
+
* done automatically.
|
|
257
|
+
*/
|
|
257
258
|
resetAxisMaximum() {
|
|
258
259
|
this.mCustomAxisMax = false;
|
|
259
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
* Returns true if the axis max value has been customized (and is not calculated automatically)
|
|
263
|
+
*/
|
|
260
264
|
isAxisMaxCustom() {
|
|
261
265
|
return this.mCustomAxisMax;
|
|
262
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* By calling this method, any custom minimum value that has been previously set is reseted,
|
|
269
|
+
* and the calculation is
|
|
270
|
+
* done automatically.
|
|
271
|
+
*/
|
|
263
272
|
resetAxisMinimum() {
|
|
264
273
|
this.mCustomAxisMin = false;
|
|
265
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* Returns true if the axis min value has been customized (and is not calculated automatically)
|
|
277
|
+
*/
|
|
266
278
|
isAxisMinCustom() {
|
|
267
279
|
return this.mCustomAxisMin;
|
|
268
280
|
}
|
|
269
|
-
|
|
281
|
+
/**
|
|
282
|
+
* Set a custom minimum value for this axis. If set, this value will not be calculated
|
|
283
|
+
* automatically depending on
|
|
284
|
+
* the provided data. Use resetAxisMinValue() to undo this. Do not forget to call
|
|
285
|
+
* setStartAtZero(false) if you use
|
|
286
|
+
* this method. Otherwise, the axis-minimum value will still be forced to 0.
|
|
287
|
+
*
|
|
288
|
+
* @param min
|
|
289
|
+
*/
|
|
290
|
+
set axisMinimum(min) {
|
|
270
291
|
this.mCustomAxisMin = true;
|
|
271
292
|
this.mAxisMinimum = min;
|
|
272
|
-
this.
|
|
293
|
+
this.axisRange = Math.abs(this.mAxisMaximum - min);
|
|
273
294
|
}
|
|
274
|
-
|
|
275
|
-
this.
|
|
276
|
-
}
|
|
277
|
-
setSuggestedAxisMaximum(max) {
|
|
278
|
-
this.mAxisSuggestedMaximum = max;
|
|
295
|
+
get axisMinimum() {
|
|
296
|
+
return this.mAxisMinimum;
|
|
279
297
|
}
|
|
280
|
-
|
|
281
|
-
this.
|
|
298
|
+
get axisMaximum() {
|
|
299
|
+
return this.mAxisMaximum;
|
|
282
300
|
}
|
|
283
|
-
|
|
301
|
+
/**
|
|
302
|
+
* Set a custom maximum value for this axis. If set, this value will not be calculated
|
|
303
|
+
* automatically depending on
|
|
304
|
+
* the provided data. Use resetAxisMaxValue() to undo this.
|
|
305
|
+
*
|
|
306
|
+
* @param max
|
|
307
|
+
*/
|
|
308
|
+
set axisMaximum(max) {
|
|
284
309
|
this.mCustomAxisMax = true;
|
|
285
310
|
this.mAxisMaximum = max;
|
|
286
|
-
this.
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
311
|
+
this.axisRange = Math.abs(max - this.mAxisMinimum);
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Calculates the minimum / maximum and range values of the axis with the given
|
|
315
|
+
* minimum and maximum values from the chart data.
|
|
316
|
+
*
|
|
317
|
+
* @param dataMin the min value according to chart data
|
|
318
|
+
* @param dataMax the max value according to chart data
|
|
319
|
+
*/
|
|
291
320
|
calculate(dataMin, dataMax) {
|
|
292
|
-
|
|
293
|
-
let
|
|
294
|
-
|
|
295
|
-
|
|
321
|
+
// if custom, use value as is, else use data value
|
|
322
|
+
let min = this.mCustomAxisMin ? this.mAxisMinimum : dataMin - this.spaceMin;
|
|
323
|
+
let max = this.mCustomAxisMax ? this.mAxisMaximum : dataMax + this.spaceMax;
|
|
324
|
+
if (this.axisSuggestedMinimum !== undefined) {
|
|
325
|
+
min = Math.min(min, this.axisSuggestedMinimum);
|
|
296
326
|
}
|
|
297
|
-
if (this.
|
|
298
|
-
max = Math.max(max, this.
|
|
327
|
+
if (this.axisSuggestedMaximum !== undefined) {
|
|
328
|
+
max = Math.max(max, this.axisSuggestedMaximum);
|
|
299
329
|
}
|
|
330
|
+
// temporary range (before calculations)
|
|
300
331
|
let range = Math.abs(max - min);
|
|
332
|
+
// in case all values are equal
|
|
301
333
|
if (range === 0) {
|
|
302
334
|
max = max + 1;
|
|
303
335
|
min = min - 1;
|
|
@@ -308,34 +340,12 @@ export class AxisBase extends ComponentBase {
|
|
|
308
340
|
if (!Number.isFinite(max)) {
|
|
309
341
|
max = 0;
|
|
310
342
|
}
|
|
343
|
+
// recalculate
|
|
311
344
|
range = Math.abs(max - min);
|
|
312
345
|
this.mAxisMinimum = min;
|
|
313
346
|
this.mAxisMaximum = max;
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
getSpaceMin() {
|
|
317
|
-
return this.mSpaceMin;
|
|
318
|
-
}
|
|
319
|
-
setSpaceMin(spaceMin) {
|
|
320
|
-
this.mSpaceMin = spaceMin;
|
|
321
|
-
}
|
|
322
|
-
getSpaceMax() {
|
|
323
|
-
return this.mSpaceMax;
|
|
324
|
-
}
|
|
325
|
-
setSpaceMax(spaceMax) {
|
|
326
|
-
this.mSpaceMax = spaceMax;
|
|
327
|
-
}
|
|
328
|
-
getLabelTextAlign() {
|
|
329
|
-
return this.mLabelTextAlign;
|
|
330
|
-
}
|
|
331
|
-
setLabelTextAlign(value) {
|
|
332
|
-
this.mLabelTextAlign = value;
|
|
333
|
-
}
|
|
334
|
-
setCustomRenderer(renderer) {
|
|
335
|
-
this.mCustomRenderer = renderer;
|
|
336
|
-
}
|
|
337
|
-
getCustomRenderer() {
|
|
338
|
-
return this.mCustomRenderer;
|
|
347
|
+
// actual range
|
|
348
|
+
this.axisRange = range;
|
|
339
349
|
}
|
|
340
350
|
}
|
|
341
351
|
//# sourceMappingURL=AxisBase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AxisBase.js","sourceRoot":"
|
|
1
|
+
{"version":3,"file":"AxisBase.js","sourceRoot":"","sources":["../../../src/ui-chart/components/AxisBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAGnF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD;;;;GAIG;AACH,MAAM,OAAgB,QAAS,SAAQ,aAAa;IAoNhD;;OAEG;IACH,YAAmB,KAAoC;QACnD,KAAK,EAAE,CAAC;QAlNZ;;;WAGG;QACH,cAAS,GAAG,MAAM,CAAC;QAEnB;;;WAGG;QACH,kBAAa,GAAG,CAAC,CAAC;QAElB;;WAEG;QACH,kBAAa,GAAG,MAAM,CAAC;QAEvB;;WAEG;QACH,kBAAa,GAAG,CAAC,CAAC;QAElB;;WAEG;QACI,aAAQ,GAAa,EAAE,CAAC;QACxB,YAAO,GAAa,EAAE,CAAC;QAE9B;;WAEG;QACI,qBAAgB,GAAa,EAAE,CAAC;QAYvC;;WAEG;QACH,eAAU,GAAW,CAAC,CAAC;QAEvB;;WAEG;QACH,mBAAc,GAAU,KAAK,CAAC,IAAI,CAAC;QAanC;;WAEG;QACH,uBAAkB,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACH,kBAAa,GAAG,IAAI,CAAC;QAErB;;WAEG;QACH,iBAAY,GAAG,IAAI,CAAC;QAEpB;;WAEG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