@nativescript-community/ui-chart 2.0.4 → 2.0.7
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/package.json +3 -3
- package/animation/ChartAnimator.d.ts +0 -61
- package/animation/ChartAnimator.js +0 -95
- package/animation/ChartAnimator.js.map +0 -1
- package/animation/Tween.d.ts +0 -4
- package/animation/Tween.js +0 -25
- package/animation/Tween.js.map +0 -1
- package/buffer/AbstractBuffer.d.ts +0 -40
- package/buffer/AbstractBuffer.js +0 -49
- package/buffer/AbstractBuffer.js.map +0 -1
- package/buffer/BarBuffer.d.ts +0 -15
- package/buffer/BarBuffer.js +0 -109
- package/buffer/BarBuffer.js.map +0 -1
- package/buffer/HorizontalBarBuffer.d.ts +0 -6
- package/buffer/HorizontalBarBuffer.js +0 -81
- package/buffer/HorizontalBarBuffer.js.map +0 -1
- package/charts/BarChart.d.ts +0 -94
- package/charts/BarChart.js +0 -141
- package/charts/BarChart.js.map +0 -1
- package/charts/BarLineChartBase.d.ts +0 -592
- package/charts/BarLineChartBase.js +0 -1253
- package/charts/BarLineChartBase.js.map +0 -1
- package/charts/BubbleChart.d.ts +0 -27
- package/charts/BubbleChart.js +0 -20
- package/charts/BubbleChart.js.map +0 -1
- package/charts/CandleStickChart.d.ts +0 -29
- package/charts/CandleStickChart.js +0 -19
- package/charts/CandleStickChart.js.map +0 -1
- package/charts/Chart.d.ts +0 -491
- package/charts/Chart.js +0 -778
- package/charts/Chart.js.map +0 -1
- package/charts/CombinedChart.d.ts +0 -78
- package/charts/CombinedChart.js +0 -119
- package/charts/CombinedChart.js.map +0 -1
- package/charts/HorizontalBarChart.d.ts +0 -54
- package/charts/HorizontalBarChart.js +0 -180
- package/charts/HorizontalBarChart.js.map +0 -1
- package/charts/LineChart.d.ts +0 -20
- package/charts/LineChart.js +0 -19
- package/charts/LineChart.js.map +0 -1
- package/charts/PieChart.d.ts +0 -249
- package/charts/PieChart.js +0 -468
- package/charts/PieChart.js.map +0 -1
- package/charts/PieRadarChartBase.d.ts +0 -130
- package/charts/PieRadarChartBase.js +0 -360
- package/charts/PieRadarChartBase.js.map +0 -1
- package/charts/RadarChart.d.ts +0 -101
- package/charts/RadarChart.js +0 -181
- package/charts/RadarChart.js.map +0 -1
- package/charts/ScatterChart.d.ts +0 -36
- package/charts/ScatterChart.js +0 -31
- package/charts/ScatterChart.js.map +0 -1
- package/charts/index.d.ts +0 -9
- package/charts/index.js +0 -10
- package/charts/index.js.map +0 -1
- package/components/AxisBase.d.ts +0 -299
- package/components/AxisBase.js +0 -351
- package/components/AxisBase.js.map +0 -1
- package/components/ComponentBase.d.ts +0 -60
- package/components/ComponentBase.js +0 -77
- package/components/ComponentBase.js.map +0 -1
- package/components/Description.d.ts +0 -22
- package/components/Description.js +0 -21
- package/components/Description.js.map +0 -1
- package/components/IMarker.d.ts +0 -39
- package/components/IMarker.js +0 -2
- package/components/IMarker.js.map +0 -1
- package/components/Legend.d.ts +0 -198
- package/components/Legend.js +0 -386
- package/components/Legend.js.map +0 -1
- package/components/LegendEntry.d.ts +0 -50
- package/components/LegendEntry.js +0 -51
- package/components/LegendEntry.js.map +0 -1
- package/components/LimitLine.d.ts +0 -55
- package/components/LimitLine.js +0 -62
- package/components/LimitLine.js.map +0 -1
- package/components/MarkerImage.d.ts +0 -1
- package/components/MarkerImage.js +0 -97
- package/components/MarkerImage.js.map +0 -1
- package/components/XAxis.d.ts +0 -55
- package/components/XAxis.js +0 -59
- package/components/XAxis.js.map +0 -1
- package/components/YAxis.d.ts +0 -135
- package/components/YAxis.js +0 -205
- package/components/YAxis.js.map +0 -1
- package/data/BarData.d.ts +0 -38
- package/data/BarData.js +0 -122
- package/data/BarData.js.map +0 -1
- package/data/BarDataSet.d.ts +0 -47
- package/data/BarDataSet.js +0 -109
- package/data/BarDataSet.js.map +0 -1
- package/data/BarEntry.d.ts +0 -11
- package/data/BarEntry.js +0 -2
- package/data/BarEntry.js.map +0 -1
- package/data/BarLineScatterCandleBubbleData.d.ts +0 -10
- package/data/BarLineScatterCandleBubbleData.js +0 -9
- package/data/BarLineScatterCandleBubbleData.js.map +0 -1
- package/data/BarLineScatterCandleBubbleDataSet.d.ts +0 -17
- package/data/BarLineScatterCandleBubbleDataSet.js +0 -18
- package/data/BarLineScatterCandleBubbleDataSet.js.map +0 -1
- package/data/BaseDataSet.d.ts +0 -180
- package/data/BaseDataSet.js +0 -220
- package/data/BaseDataSet.js.map +0 -1
- package/data/BaseEntry.d.ts +0 -10
- package/data/BaseEntry.js +0 -2
- package/data/BaseEntry.js.map +0 -1
- package/data/BubbleData.d.ts +0 -12
- package/data/BubbleData.js +0 -15
- package/data/BubbleData.js.map +0 -1
- package/data/BubbleDataSet.d.ts +0 -18
- package/data/BubbleDataSet.js +0 -36
- package/data/BubbleDataSet.js.map +0 -1
- package/data/BubbleEntry.d.ts +0 -5
- package/data/BubbleEntry.js +0 -2
- package/data/BubbleEntry.js.map +0 -1
- package/data/CandleData.d.ts +0 -5
- package/data/CandleData.js +0 -4
- package/data/CandleData.js.map +0 -1
- package/data/CandleDataSet.d.ts +0 -76
- package/data/CandleDataSet.js +0 -116
- package/data/CandleDataSet.js.map +0 -1
- package/data/CandleEntry.d.ts +0 -11
- package/data/CandleEntry.js +0 -2
- package/data/CandleEntry.js.map +0 -1
- package/data/ChartData.d.ts +0 -320
- package/data/ChartData.js +0 -702
- package/data/ChartData.js.map +0 -1
- package/data/CombinedData.d.ts +0 -61
- package/data/CombinedData.js +0 -153
- package/data/CombinedData.js.map +0 -1
- package/data/DataSet.d.ts +0 -98
- package/data/DataSet.js +0 -424
- package/data/DataSet.js.map +0 -1
- package/data/Entry.d.ts +0 -3
- package/data/Entry.js +0 -2
- package/data/Entry.js.map +0 -1
- package/data/LineData.d.ts +0 -10
- package/data/LineData.js +0 -9
- package/data/LineData.js.map +0 -1
- package/data/LineDataSet.d.ts +0 -106
- package/data/LineDataSet.js +0 -153
- package/data/LineDataSet.js.map +0 -1
- package/data/LineRadarDataSet.d.ts +0 -32
- package/data/LineRadarDataSet.js +0 -29
- package/data/LineRadarDataSet.js.map +0 -1
- package/data/LineScatterCandleRadarDataSet.d.ts +0 -36
- package/data/LineScatterCandleRadarDataSet.js +0 -44
- package/data/LineScatterCandleRadarDataSet.js.map +0 -1
- package/data/PieData.d.ts +0 -39
- package/data/PieData.js +0 -55
- package/data/PieData.js.map +0 -1
- package/data/PieDataSet.d.ts +0 -52
- package/data/PieDataSet.js +0 -54
- package/data/PieDataSet.js.map +0 -1
- package/data/PieEntry.d.ts +0 -7
- package/data/PieEntry.js +0 -2
- package/data/PieEntry.js.map +0 -1
- package/data/RadarData.d.ts +0 -17
- package/data/RadarData.js +0 -15
- package/data/RadarData.js.map +0 -1
- package/data/RadarDataSet.d.ts +0 -14
- package/data/RadarDataSet.js +0 -20
- package/data/RadarDataSet.js.map +0 -1
- package/data/RadarEntry.d.ts +0 -3
- package/data/RadarEntry.js +0 -2
- package/data/RadarEntry.js.map +0 -1
- package/data/ScatterData.d.ts +0 -9
- package/data/ScatterData.js +0 -17
- package/data/ScatterData.js.map +0 -1
- package/data/ScatterDataSet.d.ts +0 -40
- package/data/ScatterDataSet.js +0 -61
- package/data/ScatterDataSet.js.map +0 -1
- package/formatter/DefaultAxisValueFormatter.d.ts +0 -23
- package/formatter/DefaultAxisValueFormatter.js +0 -30
- package/formatter/DefaultAxisValueFormatter.js.map +0 -1
- package/formatter/DefaultFillFormatter.d.ts +0 -6
- package/formatter/DefaultFillFormatter.js +0 -29
- package/formatter/DefaultFillFormatter.js.map +0 -1
- package/formatter/DefaultValueFormatter.d.ts +0 -3
- package/formatter/DefaultValueFormatter.js +0 -4
- package/formatter/DefaultValueFormatter.js.map +0 -1
- package/formatter/IAxisValueFormatter.d.ts +0 -23
- package/formatter/IAxisValueFormatter.js +0 -2
- package/formatter/IAxisValueFormatter.js.map +0 -1
- package/formatter/IFillFormatter.d.ts +0 -30
- package/formatter/IFillFormatter.js +0 -2
- package/formatter/IFillFormatter.js.map +0 -1
- package/formatter/IValueFormatter.d.ts +0 -25
- package/formatter/IValueFormatter.js +0 -2
- package/formatter/IValueFormatter.js.map +0 -1
- package/formatter/ValueFormatter.d.ts +0 -81
- package/formatter/ValueFormatter.js +0 -90
- package/formatter/ValueFormatter.js.map +0 -1
- package/highlight/BarHighlighter.d.ts +0 -33
- package/highlight/BarHighlighter.js +0 -89
- package/highlight/BarHighlighter.js.map +0 -1
- package/highlight/ChartHighlighter.d.ts +0 -102
- package/highlight/ChartHighlighter.js +0 -220
- package/highlight/ChartHighlighter.js.map +0 -1
- package/highlight/CombinedHighlighter.d.ts +0 -17
- package/highlight/CombinedHighlighter.js +0 -59
- package/highlight/CombinedHighlighter.js.map +0 -1
- package/highlight/Highlight.d.ts +0 -69
- package/highlight/Highlight.js +0 -8
- package/highlight/Highlight.js.map +0 -1
- package/highlight/HorizontalBarHighlighter.d.ts +0 -10
- package/highlight/HorizontalBarHighlighter.js +0 -54
- package/highlight/HorizontalBarHighlighter.js.map +0 -1
- package/highlight/IHighlighter.d.ts +0 -15
- package/highlight/IHighlighter.js +0 -2
- package/highlight/IHighlighter.js.map +0 -1
- package/highlight/PieHighlighter.d.ts +0 -9
- package/highlight/PieHighlighter.js +0 -21
- package/highlight/PieHighlighter.js.map +0 -1
- package/highlight/PieRadarHighlighter.d.ts +0 -25
- package/highlight/PieRadarHighlighter.js +0 -33
- package/highlight/PieRadarHighlighter.js.map +0 -1
- package/highlight/RadarHighlighter.d.ts +0 -20
- package/highlight/RadarHighlighter.js +0 -59
- package/highlight/RadarHighlighter.js.map +0 -1
- package/index.d.ts +0 -11
- package/index.js +0 -15
- package/index.js.map +0 -1
- package/interfaces/dataprovider/BarDataProvider.d.ts +0 -9
- package/interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider.d.ts +0 -19
- package/interfaces/dataprovider/BubbleDataProvider.d.ts +0 -6
- package/interfaces/dataprovider/CandleDataProvider.d.ts +0 -6
- package/interfaces/dataprovider/ChartInterface.d.ts +0 -60
- package/interfaces/dataprovider/CombinedDataProvider.d.ts +0 -13
- package/interfaces/dataprovider/LineDataProvider.d.ts +0 -9
- package/interfaces/dataprovider/ScatterDataProvider.d.ts +0 -6
- package/interfaces/datasets/IBarDataSet.d.ts +0 -47
- package/interfaces/datasets/IBarLineScatterCandleBubbleDataSet.d.ts +0 -12
- package/interfaces/datasets/IBubbleDataSet.d.ts +0 -19
- package/interfaces/datasets/ICandleDataSet.d.ts +0 -81
- package/interfaces/datasets/IDataSet.d.ts +0 -385
- package/interfaces/datasets/ILineDataSet.d.ts +0 -67
- package/interfaces/datasets/ILineRadarDataSet.d.ts +0 -35
- package/interfaces/datasets/ILineScatterCandleRadarDataSet.d.ts +0 -32
- package/interfaces/datasets/IPieDataSet.d.ts +0 -49
- package/interfaces/datasets/IRadarDataSet.d.ts +0 -21
- package/interfaces/datasets/IScatterDataSet.d.ts +0 -37
- package/jobs/AnimatedMoveViewJob.d.ts +0 -15
- package/jobs/AnimatedMoveViewJob.js +0 -42
- package/jobs/AnimatedMoveViewJob.js.map +0 -1
- package/jobs/AnimatedViewPortJob.d.ts +0 -31
- package/jobs/AnimatedViewPortJob.js +0 -52
- package/jobs/AnimatedViewPortJob.js.map +0 -1
- package/jobs/AnimatedZoomJob.d.ts +0 -23
- package/jobs/AnimatedZoomJob.js +0 -63
- package/jobs/AnimatedZoomJob.js.map +0 -1
- package/jobs/MoveViewJob.d.ts +0 -14
- package/jobs/MoveViewJob.js +0 -36
- package/jobs/MoveViewJob.js.map +0 -1
- package/jobs/ViewPortJob.d.ts +0 -13
- package/jobs/ViewPortJob.js +0 -14
- package/jobs/ViewPortJob.js.map +0 -1
- package/jobs/ZoomJob.d.ts +0 -15
- package/jobs/ZoomJob.js +0 -48
- package/jobs/ZoomJob.js.map +0 -1
- package/listener/BarLineChartTouchListener.d.ts +0 -187
- package/listener/BarLineChartTouchListener.js +0 -544
- package/listener/BarLineChartTouchListener.js.map +0 -1
- package/listener/ChartTouchListener.d.ts +0 -69
- package/listener/ChartTouchListener.js +0 -81
- package/listener/ChartTouchListener.js.map +0 -1
- package/listener/PieRadarChartTouchListener.d.ts +0 -100
- package/listener/PieRadarChartTouchListener.js +0 -282
- package/listener/PieRadarChartTouchListener.js.map +0 -1
- package/model/GradientColor.d.ts +0 -9
- package/model/GradientColor.js +0 -19
- package/model/GradientColor.js.map +0 -1
- package/renderer/AxisRenderer.d.ts +0 -101
- package/renderer/AxisRenderer.js +0 -219
- package/renderer/AxisRenderer.js.map +0 -1
- package/renderer/BarChartRenderer.d.ts +0 -40
- package/renderer/BarChartRenderer.js +0 -366
- package/renderer/BarChartRenderer.js.map +0 -1
- package/renderer/BarLineScatterCandleBubbleRenderer.d.ts +0 -57
- package/renderer/BarLineScatterCandleBubbleRenderer.js +0 -63
- package/renderer/BarLineScatterCandleBubbleRenderer.js.map +0 -1
- package/renderer/BubbleChartRenderer.d.ts +0 -22
- package/renderer/BubbleChartRenderer.js +0 -204
- package/renderer/BubbleChartRenderer.js.map +0 -1
- package/renderer/CandleStickChartRenderer.d.ts +0 -18
- package/renderer/CandleStickChartRenderer.js +0 -268
- package/renderer/CandleStickChartRenderer.js.map +0 -1
- package/renderer/CombinedChartRenderer.d.ts +0 -40
- package/renderer/CombinedChartRenderer.js +0 -133
- package/renderer/CombinedChartRenderer.js.map +0 -1
- package/renderer/DataRenderer.d.ts +0 -103
- package/renderer/DataRenderer.js +0 -110
- package/renderer/DataRenderer.js.map +0 -1
- package/renderer/HorizontalBarChartRenderer.d.ts +0 -20
- package/renderer/HorizontalBarChartRenderer.js +0 -303
- package/renderer/HorizontalBarChartRenderer.js.map +0 -1
- package/renderer/LegendRenderer.d.ts +0 -54
- package/renderer/LegendRenderer.js +0 -340
- package/renderer/LegendRenderer.js.map +0 -1
- package/renderer/LineChartRenderer.d.ts +0 -100
- package/renderer/LineChartRenderer.js +0 -766
- package/renderer/LineChartRenderer.js.map +0 -1
- package/renderer/LineRadarRenderer.d.ts +0 -30
- package/renderer/LineRadarRenderer.js +0 -85
- package/renderer/LineRadarRenderer.js.map +0 -1
- package/renderer/LineScatterCandleRadarRenderer.d.ts +0 -20
- package/renderer/LineScatterCandleRadarRenderer.js +0 -45
- package/renderer/LineScatterCandleRadarRenderer.js.map +0 -1
- package/renderer/PieChartRenderer.d.ts +0 -86
- package/renderer/PieChartRenderer.js +0 -718
- package/renderer/PieChartRenderer.js.map +0 -1
- package/renderer/RadarChartRenderer.d.ts +0 -33
- package/renderer/RadarChartRenderer.js +0 -290
- package/renderer/RadarChartRenderer.js.map +0 -1
- package/renderer/Renderer.d.ts +0 -13
- package/renderer/Renderer.js +0 -11
- package/renderer/Renderer.js.map +0 -1
- package/renderer/ScatterChartRenderer.d.ts +0 -16
- package/renderer/ScatterChartRenderer.js +0 -147
- package/renderer/ScatterChartRenderer.js.map +0 -1
- package/renderer/XAxisRenderer.d.ts +0 -58
- package/renderer/XAxisRenderer.js +0 -458
- package/renderer/XAxisRenderer.js.map +0 -1
- package/renderer/XAxisRendererHorizontalBarChart.d.ts +0 -31
- package/renderer/XAxisRendererHorizontalBarChart.js +0 -271
- package/renderer/XAxisRendererHorizontalBarChart.js.map +0 -1
- package/renderer/XAxisRendererRadarChart.d.ts +0 -17
- package/renderer/XAxisRendererRadarChart.js +0 -51
- package/renderer/XAxisRendererRadarChart.js.map +0 -1
- package/renderer/YAxisRenderer.d.ts +0 -60
- package/renderer/YAxisRenderer.js +0 -379
- package/renderer/YAxisRenderer.js.map +0 -1
- package/renderer/YAxisRendererHorizontalBarChart.d.ts +0 -33
- package/renderer/YAxisRendererHorizontalBarChart.js +0 -250
- package/renderer/YAxisRendererHorizontalBarChart.js.map +0 -1
- package/renderer/YAxisRendererRadarChart.d.ts +0 -14
- package/renderer/YAxisRendererRadarChart.js +0 -180
- package/renderer/YAxisRendererRadarChart.js.map +0 -1
- package/renderer/scatter/ChevronDownShapeRenderer.d.ts +0 -11
- package/renderer/scatter/ChevronDownShapeRenderer.js +0 -15
- package/renderer/scatter/ChevronDownShapeRenderer.js.map +0 -1
- package/renderer/scatter/ChevronUpShapeRenderer.d.ts +0 -11
- package/renderer/scatter/ChevronUpShapeRenderer.js +0 -15
- package/renderer/scatter/ChevronUpShapeRenderer.js.map +0 -1
- package/renderer/scatter/CircleShapeRenderer.d.ts +0 -11
- package/renderer/scatter/CircleShapeRenderer.js +0 -31
- package/renderer/scatter/CircleShapeRenderer.js.map +0 -1
- package/renderer/scatter/CrossShapeRenderer.d.ts +0 -11
- package/renderer/scatter/CrossShapeRenderer.js +0 -15
- package/renderer/scatter/CrossShapeRenderer.js.map +0 -1
- package/renderer/scatter/IShapeRenderer.d.ts +0 -20
- package/renderer/scatter/IShapeRenderer.js +0 -2
- package/renderer/scatter/IShapeRenderer.js.map +0 -1
- package/renderer/scatter/SquareShapeRenderer.d.ts +0 -11
- package/renderer/scatter/SquareShapeRenderer.js +0 -31
- package/renderer/scatter/SquareShapeRenderer.js.map +0 -1
- package/renderer/scatter/TriangleShapeRenderer.d.ts +0 -12
- package/renderer/scatter/TriangleShapeRenderer.js +0 -43
- package/renderer/scatter/TriangleShapeRenderer.js.map +0 -1
- package/renderer/scatter/XShapeRenderer.d.ts +0 -11
- package/renderer/scatter/XShapeRenderer.js +0 -15
- package/renderer/scatter/XShapeRenderer.js.map +0 -1
- package/utils/ColorTemplate.d.ts +0 -34
- package/utils/ColorTemplate.js +0 -51
- package/utils/ColorTemplate.js.map +0 -1
- package/utils/HorizontalViewPortHandler.d.ts +0 -6
- package/utils/HorizontalViewPortHandler.js +0 -7
- package/utils/HorizontalViewPortHandler.js.map +0 -1
- package/utils/MPPointD.d.ts +0 -5
- package/utils/MPPointF.d.ts +0 -7
- package/utils/MPSize.d.ts +0 -7
- package/utils/ObjectPool.d.ts +0 -81
- package/utils/ObjectPool.js +0 -183
- package/utils/ObjectPool.js.map +0 -1
- package/utils/Transformer.d.ts +0 -175
- package/utils/Transformer.js +0 -356
- package/utils/Transformer.js.map +0 -1
- package/utils/TransformerHorizontalBarChart.d.ts +0 -14
- package/utils/TransformerHorizontalBarChart.js +0 -30
- package/utils/TransformerHorizontalBarChart.js.map +0 -1
- package/utils/Utils.d.ts +0 -203
- package/utils/Utils.js +0 -653
- package/utils/Utils.js.map +0 -1
- package/utils/ViewPortHandler.d.ts +0 -299
- package/utils/ViewPortHandler.js +0 -580
- package/utils/ViewPortHandler.js.map +0 -1
- package/utils/colors/colorful.d.ts +0 -1
- package/utils/colors/colorful.js +0 -2
- package/utils/colors/colorful.js.map +0 -1
- package/utils/colors/joyful.d.ts +0 -1
- package/utils/colors/joyful.js +0 -2
- package/utils/colors/joyful.js.map +0 -1
- package/utils/colors/liberty.d.ts +0 -1
- package/utils/colors/liberty.js +0 -2
- package/utils/colors/liberty.js.map +0 -1
- package/utils/colors/material.d.ts +0 -1
- package/utils/colors/material.js +0 -2
- package/utils/colors/material.js.map +0 -1
- package/utils/colors/pastel.d.ts +0 -1
- package/utils/colors/pastel.js +0 -2
- package/utils/colors/pastel.js.map +0 -1
- package/utils/colors/vordiplom.d.ts +0 -1
- package/utils/colors/vordiplom.js +0 -2
- package/utils/colors/vordiplom.js.map +0 -1
package/components/AxisBase.js
DELETED
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
import { Align, DashPathEffect, parseDashEffect } from '@nativescript-community/ui-canvas';
|
|
2
|
-
import { DefaultAxisValueFormatter } from '../formatter/DefaultAxisValueFormatter';
|
|
3
|
-
import { ComponentBase } from './ComponentBase';
|
|
4
|
-
/**
|
|
5
|
-
* Base-class of all axes (previously called labels).
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
export class AxisBase extends ComponentBase {
|
|
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
|
-
*/
|
|
36
|
-
this.mEntries = [];
|
|
37
|
-
this.mLabels = [];
|
|
38
|
-
/**
|
|
39
|
-
* axis label entries only used for centered labels
|
|
40
|
-
*/
|
|
41
|
-
this.mCenteredEntries = [];
|
|
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;
|
|
71
|
-
this.ensureLastLabel = false;
|
|
72
|
-
this.allowLastLabelAboveMax = false;
|
|
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
|
-
*/
|
|
84
|
-
this.mLimitLines = [];
|
|
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
|
-
*/
|
|
100
|
-
this.clipLimitLinesToContent = true;
|
|
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
|
-
*/
|
|
126
|
-
this.mCustomAxisMin = false;
|
|
127
|
-
/**
|
|
128
|
-
* flag indicating that the axis-max value has been customized
|
|
129
|
-
*/
|
|
130
|
-
this.mCustomAxisMax = false;
|
|
131
|
-
/**
|
|
132
|
-
* don't touch this direclty, use setter
|
|
133
|
-
*/
|
|
134
|
-
this.mAxisMaximum = 0;
|
|
135
|
-
/**
|
|
136
|
-
* don't touch this directly, use setter
|
|
137
|
-
*/
|
|
138
|
-
this.mAxisMinimum = 0;
|
|
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
|
-
*/
|
|
154
|
-
addLimitLine(l) {
|
|
155
|
-
this.mLimitLines.push(l);
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Removes the specified LimitLine from the axis.
|
|
159
|
-
*
|
|
160
|
-
* @param l
|
|
161
|
-
*/
|
|
162
|
-
removeLimitLine(l) {
|
|
163
|
-
const index = this.mLimitLines.indexOf(l);
|
|
164
|
-
if (index >= 0) {
|
|
165
|
-
this.mLimitLines.splice(index, 1);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Removes all LimitLines from the axis.
|
|
170
|
-
*/
|
|
171
|
-
removeAllLimitLines() {
|
|
172
|
-
this.mLimitLines = [];
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Returns the LimitLines of this axis.
|
|
176
|
-
*/
|
|
177
|
-
get limitLines() {
|
|
178
|
-
return this.mLimitLines;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Returns the longest formatted label (in terms of characters), this axis
|
|
182
|
-
* contains.
|
|
183
|
-
*/
|
|
184
|
-
get longestLabel() {
|
|
185
|
-
let longest = '';
|
|
186
|
-
const labels = this.mLabels;
|
|
187
|
-
for (let i = 0; i < this.mEntries.length; i++) {
|
|
188
|
-
const text = labels[i];
|
|
189
|
-
if (text && longest.length < text.length) {
|
|
190
|
-
longest = text;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
return longest;
|
|
194
|
-
}
|
|
195
|
-
getFormattedLabel(index) {
|
|
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)
|
|
213
|
-
this.mAxisValueFormatter = new DefaultAxisValueFormatter(this.mDecimals);
|
|
214
|
-
else
|
|
215
|
-
this.mAxisValueFormatter = f;
|
|
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)) {
|
|
222
|
-
this.mAxisValueFormatter = new DefaultAxisValueFormatter(this.mDecimals);
|
|
223
|
-
}
|
|
224
|
-
return this.mAxisValueFormatter;
|
|
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
|
-
*/
|
|
235
|
-
enableGridDashedLine(lineLength, spaceLength, phase) {
|
|
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
|
-
*/
|
|
247
|
-
enableAxisLineDashedLine(lineLength, spaceLength, phase) {
|
|
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
|
-
*/
|
|
258
|
-
resetAxisMaximum() {
|
|
259
|
-
this.mCustomAxisMax = false;
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* Returns true if the axis max value has been customized (and is not calculated automatically)
|
|
263
|
-
*/
|
|
264
|
-
isAxisMaxCustom() {
|
|
265
|
-
return this.mCustomAxisMax;
|
|
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
|
-
*/
|
|
272
|
-
resetAxisMinimum() {
|
|
273
|
-
this.mCustomAxisMin = false;
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* Returns true if the axis min value has been customized (and is not calculated automatically)
|
|
277
|
-
*/
|
|
278
|
-
isAxisMinCustom() {
|
|
279
|
-
return this.mCustomAxisMin;
|
|
280
|
-
}
|
|
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) {
|
|
291
|
-
this.mCustomAxisMin = true;
|
|
292
|
-
this.mAxisMinimum = min;
|
|
293
|
-
this.axisRange = Math.abs(this.mAxisMaximum - min);
|
|
294
|
-
}
|
|
295
|
-
get axisMinimum() {
|
|
296
|
-
return this.mAxisMinimum;
|
|
297
|
-
}
|
|
298
|
-
get axisMaximum() {
|
|
299
|
-
return this.mAxisMaximum;
|
|
300
|
-
}
|
|
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) {
|
|
309
|
-
this.mCustomAxisMax = true;
|
|
310
|
-
this.mAxisMaximum = max;
|
|
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
|
-
*/
|
|
320
|
-
calculate(dataMin, dataMax) {
|
|
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);
|
|
326
|
-
}
|
|
327
|
-
if (this.axisSuggestedMaximum !== undefined) {
|
|
328
|
-
max = Math.max(max, this.axisSuggestedMaximum);
|
|
329
|
-
}
|
|
330
|
-
// temporary range (before calculations)
|
|
331
|
-
let range = Math.abs(max - min);
|
|
332
|
-
// in case all values are equal
|
|
333
|
-
if (range === 0) {
|
|
334
|
-
max = max + 1;
|
|
335
|
-
min = min - 1;
|
|
336
|
-
}
|
|
337
|
-
if (!Number.isFinite(min)) {
|
|
338
|
-
min = 0;
|
|
339
|
-
}
|
|
340
|
-
if (!Number.isFinite(max)) {
|
|
341
|
-
max = 0;
|
|
342
|
-
}
|
|
343
|
-
// recalculate
|
|
344
|
-
range = Math.abs(max - min);
|
|
345
|
-
this.mAxisMinimum = min;
|
|
346
|
-
this.mAxisMaximum = max;
|
|
347
|
-
// actual range
|
|
348
|
-
this.axisRange = range;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
//# sourceMappingURL=AxisBase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AxisBase.js","sourceRoot":"","sources":["../../../src/ui-chart/components/AxisBase.ts"],"names":[],"mappings":"AAAA,OAAO,EA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1
|
-
import { Font } from '@nativescript/core/ui/styling/font';
|
|
2
|
-
/**
|
|
3
|
-
* This class encapsulates everything both Axis, Legend and LimitLines have in common.
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
export declare abstract class ComponentBase {
|
|
8
|
-
/**
|
|
9
|
-
* flag that indicates if this axis / legend is enabled or not
|
|
10
|
-
*/
|
|
11
|
-
enabled: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* the offset in pixels this component has on the x-axis
|
|
14
|
-
*/
|
|
15
|
-
xOffset: number;
|
|
16
|
-
/**
|
|
17
|
-
* the offset in pixels this component has on the Y-axis
|
|
18
|
-
*/
|
|
19
|
-
yOffset: number;
|
|
20
|
-
/**
|
|
21
|
-
* the typeface used for the labels
|
|
22
|
-
*/
|
|
23
|
-
typeface: Font;
|
|
24
|
-
/**
|
|
25
|
-
* the text size of the labels
|
|
26
|
-
*/
|
|
27
|
-
protected mTextSize: number;
|
|
28
|
-
/**
|
|
29
|
-
* the text color to use for the labels
|
|
30
|
-
*/
|
|
31
|
-
textColor: string;
|
|
32
|
-
ComponentBase(): void;
|
|
33
|
-
/**
|
|
34
|
-
* returns the Typeface used for the labels, returns null if none is set
|
|
35
|
-
*
|
|
36
|
-
* @return {@link Font}
|
|
37
|
-
*/
|
|
38
|
-
get font(): Font;
|
|
39
|
-
/**
|
|
40
|
-
* sets a specific Typeface for the labels
|
|
41
|
-
*
|
|
42
|
-
* @param tf
|
|
43
|
-
*/
|
|
44
|
-
set font(tf: Font);
|
|
45
|
-
/**
|
|
46
|
-
* sets the size of the label text in density pixels min = 6f, max = 24f, default
|
|
47
|
-
* 10
|
|
48
|
-
*
|
|
49
|
-
* @param size the text size, in DP
|
|
50
|
-
*/
|
|
51
|
-
set textSize(size: number);
|
|
52
|
-
/**
|
|
53
|
-
* returns the text size that is currently set for the labels, in pixels
|
|
54
|
-
*/
|
|
55
|
-
get textSize(): number;
|
|
56
|
-
/**
|
|
57
|
-
* Defines if the renderer should ensure we always see the component fully
|
|
58
|
-
*/
|
|
59
|
-
ensureVisible: boolean;
|
|
60
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { Font } from '@nativescript/core/ui/styling/font';
|
|
2
|
-
const DEFAULT_FONT = Font.default.withFontSize(10);
|
|
3
|
-
/**
|
|
4
|
-
* This class encapsulates everything both Axis, Legend and LimitLines have in common.
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
export class ComponentBase {
|
|
9
|
-
constructor() {
|
|
10
|
-
/**
|
|
11
|
-
* flag that indicates if this axis / legend is enabled or not
|
|
12
|
-
*/
|
|
13
|
-
this.enabled = true;
|
|
14
|
-
/**
|
|
15
|
-
* the offset in pixels this component has on the x-axis
|
|
16
|
-
*/
|
|
17
|
-
this.xOffset = 5;
|
|
18
|
-
/**
|
|
19
|
-
* the offset in pixels this component has on the Y-axis
|
|
20
|
-
*/
|
|
21
|
-
this.yOffset = 5;
|
|
22
|
-
/**
|
|
23
|
-
* the typeface used for the labels
|
|
24
|
-
*/
|
|
25
|
-
this.typeface = DEFAULT_FONT;
|
|
26
|
-
/**
|
|
27
|
-
* the text size of the labels
|
|
28
|
-
*/
|
|
29
|
-
this.mTextSize = 10;
|
|
30
|
-
/**
|
|
31
|
-
* the text color to use for the labels
|
|
32
|
-
*/
|
|
33
|
-
this.textColor = 'black';
|
|
34
|
-
/**
|
|
35
|
-
* Defines if the renderer should ensure we always see the component fully
|
|
36
|
-
*/
|
|
37
|
-
this.ensureVisible = false;
|
|
38
|
-
}
|
|
39
|
-
ComponentBase() { }
|
|
40
|
-
/**
|
|
41
|
-
* returns the Typeface used for the labels, returns null if none is set
|
|
42
|
-
*
|
|
43
|
-
* @return {@link Font}
|
|
44
|
-
*/
|
|
45
|
-
get font() {
|
|
46
|
-
return this.typeface;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* sets a specific Typeface for the labels
|
|
50
|
-
*
|
|
51
|
-
* @param tf
|
|
52
|
-
*/
|
|
53
|
-
set font(tf) {
|
|
54
|
-
if (tf.fontSize <= 0) {
|
|
55
|
-
tf = tf.withFontSize(this.textSize);
|
|
56
|
-
}
|
|
57
|
-
this.typeface = tf;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* sets the size of the label text in density pixels min = 6f, max = 24f, default
|
|
61
|
-
* 10
|
|
62
|
-
*
|
|
63
|
-
* @param size the text size, in DP
|
|
64
|
-
*/
|
|
65
|
-
set textSize(size) {
|
|
66
|
-
this.mTextSize = size;
|
|
67
|
-
// this bit is important to make sure we dont create crazy amount of native fonts on render
|
|
68
|
-
this.typeface = this.typeface.withFontSize(size);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* returns the text size that is currently set for the labels, in pixels
|
|
72
|
-
*/
|
|
73
|
-
get textSize() {
|
|
74
|
-
return this.mTextSize;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=ComponentBase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentBase.js","sourceRoot":"","sources":["../../../src/ui-chart/components/ComponentBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AACnD;;;;GAIG;AACH,MAAM,OAAgB,aAAa;IAAnC;QACI;;WAEG;QACH,YAAO,GAAY,IAAI,CAAC;QAExB;;WAEG;QACH,YAAO,GAAW,CAAC,CAAC;QAEpB;;WAEG;QACH,YAAO,GAAW,CAAC,CAAC;QAEpB;;WAEG;QACH,aAAQ,GAAS,YAAY,CAAC;QAE9B;;WAEG;QACO,cAAS,GAAW,EAAE,CAAC;QAEjC;;WAEG;QACH,cAAS,GAAW,OAAO,CAAC;QA2C5B;;WAEG;QACI,kBAAa,GAAG,KAAK,CAAC;IACjC,CAAC;IA7CU,aAAa,KAAI,CAAC;IAEzB;;;;OAIG;IACH,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,IAAW,IAAI,CAAC,EAAQ;QACpB,IAAI,EAAE,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC;YACnB,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,CAAC;IACD;;;;;OAKG;IACH,IAAI,QAAQ,CAAC,IAAI;QACb,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,2FAA2F;QAC3F,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IAED;;OAEG;IACH,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;CAMJ"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentBase } from './ComponentBase';
|
|
2
|
-
/**
|
|
3
|
-
* Created by Philipp Jahoda on 17/09/16.
|
|
4
|
-
*/
|
|
5
|
-
export declare class Description extends ComponentBase {
|
|
6
|
-
/**
|
|
7
|
-
* the text used in the description
|
|
8
|
-
*/
|
|
9
|
-
text: string;
|
|
10
|
-
/**
|
|
11
|
-
* the custom position of the description text
|
|
12
|
-
*/
|
|
13
|
-
position: {
|
|
14
|
-
x: number;
|
|
15
|
-
y: number;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* the alignment of the description text
|
|
19
|
-
*/
|
|
20
|
-
textAlign: globalAndroid.graphics.Paint.Align;
|
|
21
|
-
constructor();
|
|
22
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentBase } from './ComponentBase';
|
|
2
|
-
import { Align } from '@nativescript-community/ui-canvas';
|
|
3
|
-
/**
|
|
4
|
-
* Created by Philipp Jahoda on 17/09/16.
|
|
5
|
-
*/
|
|
6
|
-
export class Description extends ComponentBase {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
/**
|
|
10
|
-
* the text used in the description
|
|
11
|
-
*/
|
|
12
|
-
this.text = 'Description Label';
|
|
13
|
-
/**
|
|
14
|
-
* the alignment of the description text
|
|
15
|
-
*/
|
|
16
|
-
this.textAlign = Align.RIGHT;
|
|
17
|
-
// default size
|
|
18
|
-
this.textSize = 8;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=Description.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Description.js","sourceRoot":"","sources":["../../../src/ui-chart/components/Description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAG1D;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,aAAa;IAgB1C;QACI,KAAK,EAAE,CAAC;QAhBZ;;WAEG;QACH,SAAI,GAAG,mBAAmB,CAAC;QAO3B;;WAEG;QACH,cAAS,GAAG,KAAK,CAAC,KAAK,CAAC;QAIpB,eAAe;QACf,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IACtB,CAAC;CACJ"}
|
package/components/IMarker.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Highlight } from '../highlight/Highlight';
|
|
2
|
-
import { Entry } from '../data/Entry';
|
|
3
|
-
import { MPPointF } from '../utils/MPPointF';
|
|
4
|
-
import { Canvas } from '@nativescript-community/ui-canvas';
|
|
5
|
-
export interface IMarker {
|
|
6
|
-
/**
|
|
7
|
-
* @return The desired (general) offset you wish the IMarker to have on the x- and y-axis.
|
|
8
|
-
* By returning x: -(width / 2) you will center the IMarker horizontally.
|
|
9
|
-
* By returning y: -(height / 2) you will center the IMarker vertically.
|
|
10
|
-
*/
|
|
11
|
-
readonly offset: MPPointF;
|
|
12
|
-
/**
|
|
13
|
-
* @return The offset for drawing at the specific `point`. This allows conditional adjusting of the Marker position.
|
|
14
|
-
* If you have no adjustments to make, return getOffset().
|
|
15
|
-
*
|
|
16
|
-
* @param posX This is the X position at which the marker wants to be drawn.
|
|
17
|
-
* You can adjust the offset conditionally based on this argument.
|
|
18
|
-
* @param posY This is the X position at which the marker wants to be drawn.
|
|
19
|
-
* You can adjust the offset conditionally based on this argument.
|
|
20
|
-
*/
|
|
21
|
-
getOffsetForDrawingAtPoint(posX: any, posY: any): MPPointF;
|
|
22
|
-
/**
|
|
23
|
-
* This method enables a specified custom IMarker to update it's content every time the IMarker is redrawn.
|
|
24
|
-
*
|
|
25
|
-
* @param e The Entry the IMarker belongs to. This can also be any subclass of Entry, like BarEntry or
|
|
26
|
-
* CandleEntry, simply cast it at runtime.
|
|
27
|
-
* @param highlight The highlight object contains information about the highlighted value such as it's dataset-index, the
|
|
28
|
-
* selected range or stack-index (only stacked bar entries).
|
|
29
|
-
*/
|
|
30
|
-
refreshContent(e: Entry, highlight: Highlight): any;
|
|
31
|
-
/**
|
|
32
|
-
* Draws the IMarker on the given position on the screen with the given Canvas object.
|
|
33
|
-
*
|
|
34
|
-
* @param canvas
|
|
35
|
-
* @param posX
|
|
36
|
-
* @param posY
|
|
37
|
-
*/
|
|
38
|
-
draw(canvas: Canvas, posX: any, posY: any): any;
|
|
39
|
-
}
|
package/components/IMarker.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IMarker.js","sourceRoot":"","sources":["../../../src/ui-chart/components/IMarker.ts"],"names":[],"mappings":""}
|