@nativescript-community/ui-chart 2.0.7 → 2.0.11
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/animation/ChartAnimator.d.ts +61 -0
- package/animation/ChartAnimator.js +95 -0
- package/animation/ChartAnimator.js.map +1 -0
- package/animation/Tween.d.ts +4 -0
- package/animation/Tween.js +25 -0
- package/animation/Tween.js.map +1 -0
- package/buffer/AbstractBuffer.d.ts +40 -0
- package/buffer/AbstractBuffer.js +49 -0
- package/buffer/AbstractBuffer.js.map +1 -0
- package/buffer/BarBuffer.d.ts +15 -0
- package/buffer/BarBuffer.js +109 -0
- package/buffer/BarBuffer.js.map +1 -0
- package/buffer/HorizontalBarBuffer.d.ts +6 -0
- package/buffer/HorizontalBarBuffer.js +81 -0
- package/buffer/HorizontalBarBuffer.js.map +1 -0
- package/charts/BarChart.d.ts +96 -0
- package/charts/BarChart.js +143 -0
- package/charts/BarChart.js.map +1 -0
- package/charts/BarLineChartBase.d.ts +583 -0
- package/charts/BarLineChartBase.js +1231 -0
- package/charts/BarLineChartBase.js.map +1 -0
- package/charts/BubbleChart.d.ts +27 -0
- package/charts/BubbleChart.js +20 -0
- package/charts/BubbleChart.js.map +1 -0
- package/charts/CandleStickChart.d.ts +29 -0
- package/charts/CandleStickChart.js +19 -0
- package/charts/CandleStickChart.js.map +1 -0
- package/charts/Chart.d.ts +498 -0
- package/charts/Chart.js +799 -0
- package/charts/Chart.js.map +1 -0
- package/charts/CombinedChart.d.ts +78 -0
- package/charts/CombinedChart.js +119 -0
- package/charts/CombinedChart.js.map +1 -0
- package/charts/HorizontalBarChart.d.ts +54 -0
- package/charts/HorizontalBarChart.js +180 -0
- package/charts/HorizontalBarChart.js.map +1 -0
- package/charts/LineChart.d.ts +20 -0
- package/charts/LineChart.js +19 -0
- package/charts/LineChart.js.map +1 -0
- package/charts/PieChart.d.ts +247 -0
- package/charts/PieChart.js +453 -0
- package/charts/PieChart.js.map +1 -0
- package/charts/PieRadarChartBase.d.ts +130 -0
- package/charts/PieRadarChartBase.js +360 -0
- package/charts/PieRadarChartBase.js.map +1 -0
- package/charts/RadarChart.d.ts +101 -0
- package/charts/RadarChart.js +172 -0
- package/charts/RadarChart.js.map +1 -0
- package/charts/ScatterChart.d.ts +36 -0
- package/charts/ScatterChart.js +31 -0
- package/charts/ScatterChart.js.map +1 -0
- package/charts/index.d.ts +9 -0
- package/charts/index.js +10 -0
- package/charts/index.js.map +1 -0
- package/components/AxisBase.d.ts +299 -0
- package/components/AxisBase.js +352 -0
- package/components/AxisBase.js.map +1 -0
- package/components/ComponentBase.d.ts +60 -0
- package/components/ComponentBase.js +77 -0
- package/components/ComponentBase.js.map +1 -0
- package/components/Description.d.ts +22 -0
- package/components/Description.js +21 -0
- package/components/Description.js.map +1 -0
- package/components/IMarker.d.ts +39 -0
- package/components/IMarker.js +2 -0
- package/components/IMarker.js.map +1 -0
- package/components/Legend.d.ts +198 -0
- package/components/Legend.js +386 -0
- package/components/Legend.js.map +1 -0
- package/components/LegendEntry.d.ts +50 -0
- package/components/LegendEntry.js +51 -0
- package/components/LegendEntry.js.map +1 -0
- package/components/LimitLine.d.ts +55 -0
- package/components/LimitLine.js +62 -0
- package/components/LimitLine.js.map +1 -0
- 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 +55 -0
- package/components/XAxis.js +59 -0
- package/components/XAxis.js.map +1 -0
- package/components/YAxis.d.ts +135 -0
- package/components/YAxis.js +205 -0
- package/components/YAxis.js.map +1 -0
- package/data/BarData.d.ts +39 -0
- package/data/BarData.js +126 -0
- package/data/BarData.js.map +1 -0
- package/data/BarDataSet.d.ts +47 -0
- package/data/BarDataSet.js +109 -0
- package/data/BarDataSet.js.map +1 -0
- package/data/BarEntry.d.ts +11 -0
- package/data/BarEntry.js +2 -0
- package/data/BarEntry.js.map +1 -0
- package/data/BarLineScatterCandleBubbleData.d.ts +10 -0
- package/data/BarLineScatterCandleBubbleData.js +9 -0
- package/data/BarLineScatterCandleBubbleData.js.map +1 -0
- package/data/BarLineScatterCandleBubbleDataSet.d.ts +17 -0
- package/data/BarLineScatterCandleBubbleDataSet.js +18 -0
- package/data/BarLineScatterCandleBubbleDataSet.js.map +1 -0
- package/data/BaseDataSet.d.ts +180 -0
- package/data/BaseDataSet.js +220 -0
- package/data/BaseDataSet.js.map +1 -0
- package/data/BaseEntry.d.ts +10 -0
- package/data/BaseEntry.js +2 -0
- package/data/BaseEntry.js.map +1 -0
- package/data/BubbleData.d.ts +12 -0
- package/data/BubbleData.js +15 -0
- package/data/BubbleData.js.map +1 -0
- package/data/BubbleDataSet.d.ts +18 -0
- package/data/BubbleDataSet.js +36 -0
- package/data/BubbleDataSet.js.map +1 -0
- package/data/BubbleEntry.d.ts +5 -0
- package/data/BubbleEntry.js +2 -0
- package/data/BubbleEntry.js.map +1 -0
- package/data/CandleData.d.ts +5 -0
- package/data/CandleData.js +4 -0
- package/data/CandleData.js.map +1 -0
- package/data/CandleDataSet.d.ts +76 -0
- package/data/CandleDataSet.js +116 -0
- package/data/CandleDataSet.js.map +1 -0
- package/data/CandleEntry.d.ts +11 -0
- package/data/CandleEntry.js +2 -0
- package/data/CandleEntry.js.map +1 -0
- package/data/ChartData.d.ts +320 -0
- package/data/ChartData.js +702 -0
- package/data/ChartData.js.map +1 -0
- package/data/CombinedData.d.ts +61 -0
- package/data/CombinedData.js +153 -0
- package/data/CombinedData.js.map +1 -0
- package/data/DataSet.d.ts +98 -0
- package/data/DataSet.js +424 -0
- package/data/DataSet.js.map +1 -0
- package/data/Entry.d.ts +3 -0
- package/data/Entry.js +2 -0
- package/data/Entry.js.map +1 -0
- package/data/LineData.d.ts +10 -0
- package/data/LineData.js +9 -0
- package/data/LineData.js.map +1 -0
- package/data/LineDataSet.d.ts +106 -0
- package/data/LineDataSet.js +148 -0
- package/data/LineDataSet.js.map +1 -0
- package/data/LineRadarDataSet.d.ts +32 -0
- package/data/LineRadarDataSet.js +29 -0
- package/data/LineRadarDataSet.js.map +1 -0
- package/data/LineScatterCandleRadarDataSet.d.ts +36 -0
- package/data/LineScatterCandleRadarDataSet.js +44 -0
- package/data/LineScatterCandleRadarDataSet.js.map +1 -0
- package/data/PieData.d.ts +39 -0
- package/data/PieData.js +55 -0
- package/data/PieData.js.map +1 -0
- package/data/PieDataSet.d.ts +52 -0
- package/data/PieDataSet.js +54 -0
- package/data/PieDataSet.js.map +1 -0
- package/data/PieEntry.d.ts +7 -0
- package/data/PieEntry.js +2 -0
- package/data/PieEntry.js.map +1 -0
- package/data/RadarData.d.ts +17 -0
- package/data/RadarData.js +15 -0
- package/data/RadarData.js.map +1 -0
- package/data/RadarDataSet.d.ts +14 -0
- package/data/RadarDataSet.js +20 -0
- package/data/RadarDataSet.js.map +1 -0
- package/data/RadarEntry.d.ts +3 -0
- package/data/RadarEntry.js +2 -0
- package/data/RadarEntry.js.map +1 -0
- package/data/ScatterData.d.ts +9 -0
- package/data/ScatterData.js +17 -0
- package/data/ScatterData.js.map +1 -0
- package/data/ScatterDataSet.d.ts +40 -0
- package/data/ScatterDataSet.js +61 -0
- package/data/ScatterDataSet.js.map +1 -0
- package/formatter/DefaultAxisValueFormatter.d.ts +23 -0
- package/formatter/DefaultAxisValueFormatter.js +30 -0
- package/formatter/DefaultAxisValueFormatter.js.map +1 -0
- package/formatter/DefaultFillFormatter.d.ts +6 -0
- package/formatter/DefaultFillFormatter.js +29 -0
- package/formatter/DefaultFillFormatter.js.map +1 -0
- package/formatter/DefaultValueFormatter.d.ts +3 -0
- package/formatter/DefaultValueFormatter.js +4 -0
- package/formatter/DefaultValueFormatter.js.map +1 -0
- package/formatter/IAxisValueFormatter.d.ts +23 -0
- package/formatter/IAxisValueFormatter.js +2 -0
- package/formatter/IAxisValueFormatter.js.map +1 -0
- package/formatter/IFillFormatter.d.ts +30 -0
- package/formatter/IFillFormatter.js +2 -0
- package/formatter/IFillFormatter.js.map +1 -0
- package/formatter/IValueFormatter.d.ts +25 -0
- package/formatter/IValueFormatter.js +2 -0
- package/formatter/IValueFormatter.js.map +1 -0
- package/formatter/ValueFormatter.d.ts +81 -0
- package/formatter/ValueFormatter.js +90 -0
- package/formatter/ValueFormatter.js.map +1 -0
- package/highlight/BarHighlighter.d.ts +33 -0
- package/highlight/BarHighlighter.js +89 -0
- package/highlight/BarHighlighter.js.map +1 -0
- package/highlight/ChartHighlighter.d.ts +102 -0
- package/highlight/ChartHighlighter.js +220 -0
- package/highlight/ChartHighlighter.js.map +1 -0
- package/highlight/CombinedHighlighter.d.ts +17 -0
- package/highlight/CombinedHighlighter.js +59 -0
- package/highlight/CombinedHighlighter.js.map +1 -0
- package/highlight/Highlight.d.ts +69 -0
- package/highlight/Highlight.js +8 -0
- package/highlight/Highlight.js.map +1 -0
- package/highlight/HorizontalBarHighlighter.d.ts +10 -0
- package/highlight/HorizontalBarHighlighter.js +54 -0
- package/highlight/HorizontalBarHighlighter.js.map +1 -0
- package/highlight/IHighlighter.d.ts +15 -0
- package/highlight/IHighlighter.js +2 -0
- package/highlight/IHighlighter.js.map +1 -0
- package/highlight/PieHighlighter.d.ts +9 -0
- package/highlight/PieHighlighter.js +21 -0
- package/highlight/PieHighlighter.js.map +1 -0
- package/highlight/PieRadarHighlighter.d.ts +25 -0
- package/highlight/PieRadarHighlighter.js +33 -0
- package/highlight/PieRadarHighlighter.js.map +1 -0
- package/highlight/RadarHighlighter.d.ts +20 -0
- package/highlight/RadarHighlighter.js +59 -0
- package/highlight/RadarHighlighter.js.map +1 -0
- package/index.d.ts +11 -0
- package/index.js +15 -0
- package/index.js.map +1 -0
- package/interfaces/dataprovider/BarDataProvider.d.ts +9 -0
- package/interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider.d.ts +19 -0
- package/interfaces/dataprovider/BubbleDataProvider.d.ts +6 -0
- package/interfaces/dataprovider/CandleDataProvider.d.ts +6 -0
- package/interfaces/dataprovider/ChartInterface.d.ts +60 -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 +47 -0
- package/interfaces/datasets/IBarLineScatterCandleBubbleDataSet.d.ts +12 -0
- package/interfaces/datasets/IBubbleDataSet.d.ts +19 -0
- package/interfaces/datasets/ICandleDataSet.d.ts +81 -0
- package/interfaces/datasets/IDataSet.d.ts +385 -0
- package/interfaces/datasets/ILineDataSet.d.ts +67 -0
- package/interfaces/datasets/ILineRadarDataSet.d.ts +35 -0
- package/interfaces/datasets/ILineScatterCandleRadarDataSet.d.ts +32 -0
- package/interfaces/datasets/IPieDataSet.d.ts +49 -0
- package/interfaces/datasets/IRadarDataSet.d.ts +21 -0
- package/interfaces/datasets/IScatterDataSet.d.ts +37 -0
- package/jobs/AnimatedMoveViewJob.d.ts +15 -0
- package/jobs/AnimatedMoveViewJob.js +42 -0
- package/jobs/AnimatedMoveViewJob.js.map +1 -0
- package/jobs/AnimatedViewPortJob.d.ts +31 -0
- package/jobs/AnimatedViewPortJob.js +52 -0
- package/jobs/AnimatedViewPortJob.js.map +1 -0
- package/jobs/AnimatedZoomJob.d.ts +23 -0
- package/jobs/AnimatedZoomJob.js +63 -0
- package/jobs/AnimatedZoomJob.js.map +1 -0
- package/jobs/MoveViewJob.d.ts +14 -0
- package/jobs/MoveViewJob.js +36 -0
- package/jobs/MoveViewJob.js.map +1 -0
- package/jobs/ViewPortJob.d.ts +13 -0
- package/jobs/ViewPortJob.js +14 -0
- package/jobs/ViewPortJob.js.map +1 -0
- package/jobs/ZoomJob.d.ts +15 -0
- package/jobs/ZoomJob.js +48 -0
- package/jobs/ZoomJob.js.map +1 -0
- package/listener/BarLineChartTouchListener.d.ts +187 -0
- package/listener/BarLineChartTouchListener.js +544 -0
- package/listener/BarLineChartTouchListener.js.map +1 -0
- package/listener/ChartTouchListener.d.ts +69 -0
- package/listener/ChartTouchListener.js +81 -0
- package/listener/ChartTouchListener.js.map +1 -0
- package/listener/PieRadarChartTouchListener.d.ts +100 -0
- package/listener/PieRadarChartTouchListener.js +282 -0
- package/listener/PieRadarChartTouchListener.js.map +1 -0
- package/model/GradientColor.d.ts +9 -0
- package/model/GradientColor.js +19 -0
- package/model/GradientColor.js.map +1 -0
- package/package.json +9 -2
- package/renderer/AxisRenderer.d.ts +103 -0
- package/renderer/AxisRenderer.js +215 -0
- package/renderer/AxisRenderer.js.map +1 -0
- package/renderer/BarChartRenderer.d.ts +40 -0
- package/renderer/BarChartRenderer.js +362 -0
- package/renderer/BarChartRenderer.js.map +1 -0
- package/renderer/BarLineScatterCandleBubbleRenderer.d.ts +57 -0
- package/renderer/BarLineScatterCandleBubbleRenderer.js +63 -0
- package/renderer/BarLineScatterCandleBubbleRenderer.js.map +1 -0
- package/renderer/BubbleChartRenderer.d.ts +22 -0
- package/renderer/BubbleChartRenderer.js +204 -0
- package/renderer/BubbleChartRenderer.js.map +1 -0
- package/renderer/CandleStickChartRenderer.d.ts +18 -0
- package/renderer/CandleStickChartRenderer.js +268 -0
- package/renderer/CandleStickChartRenderer.js.map +1 -0
- package/renderer/CombinedChartRenderer.d.ts +40 -0
- package/renderer/CombinedChartRenderer.js +133 -0
- package/renderer/CombinedChartRenderer.js.map +1 -0
- package/renderer/DataRenderer.d.ts +103 -0
- package/renderer/DataRenderer.js +110 -0
- package/renderer/DataRenderer.js.map +1 -0
- package/renderer/HorizontalBarChartRenderer.d.ts +20 -0
- package/renderer/HorizontalBarChartRenderer.js +303 -0
- package/renderer/HorizontalBarChartRenderer.js.map +1 -0
- package/renderer/LegendRenderer.d.ts +54 -0
- package/renderer/LegendRenderer.js +336 -0
- package/renderer/LegendRenderer.js.map +1 -0
- package/renderer/LineChartRenderer.d.ts +100 -0
- package/renderer/LineChartRenderer.js +745 -0
- package/renderer/LineChartRenderer.js.map +1 -0
- package/renderer/LineRadarRenderer.d.ts +30 -0
- package/renderer/LineRadarRenderer.js +76 -0
- package/renderer/LineRadarRenderer.js.map +1 -0
- package/renderer/LineScatterCandleRadarRenderer.d.ts +20 -0
- package/renderer/LineScatterCandleRadarRenderer.js +45 -0
- package/renderer/LineScatterCandleRadarRenderer.js.map +1 -0
- package/renderer/PieChartRenderer.d.ts +86 -0
- package/renderer/PieChartRenderer.js +714 -0
- package/renderer/PieChartRenderer.js.map +1 -0
- package/renderer/RadarChartRenderer.d.ts +33 -0
- package/renderer/RadarChartRenderer.js +290 -0
- package/renderer/RadarChartRenderer.js.map +1 -0
- package/renderer/Renderer.d.ts +13 -0
- package/renderer/Renderer.js +11 -0
- package/renderer/Renderer.js.map +1 -0
- package/renderer/ScatterChartRenderer.d.ts +16 -0
- package/renderer/ScatterChartRenderer.js +147 -0
- package/renderer/ScatterChartRenderer.js.map +1 -0
- package/renderer/XAxisRenderer.d.ts +58 -0
- package/renderer/XAxisRenderer.js +458 -0
- package/renderer/XAxisRenderer.js.map +1 -0
- package/renderer/XAxisRendererHorizontalBarChart.d.ts +31 -0
- package/renderer/XAxisRendererHorizontalBarChart.js +264 -0
- package/renderer/XAxisRendererHorizontalBarChart.js.map +1 -0
- package/renderer/XAxisRendererRadarChart.d.ts +17 -0
- package/renderer/XAxisRendererRadarChart.js +51 -0
- package/renderer/XAxisRendererRadarChart.js.map +1 -0
- package/renderer/YAxisRenderer.d.ts +60 -0
- package/renderer/YAxisRenderer.js +379 -0
- package/renderer/YAxisRenderer.js.map +1 -0
- package/renderer/YAxisRendererHorizontalBarChart.d.ts +33 -0
- package/renderer/YAxisRendererHorizontalBarChart.js +258 -0
- package/renderer/YAxisRendererHorizontalBarChart.js.map +1 -0
- package/renderer/YAxisRendererRadarChart.d.ts +14 -0
- package/renderer/YAxisRendererRadarChart.js +180 -0
- package/renderer/YAxisRendererRadarChart.js.map +1 -0
- package/renderer/scatter/ChevronDownShapeRenderer.d.ts +11 -0
- package/renderer/scatter/ChevronDownShapeRenderer.js +15 -0
- package/renderer/scatter/ChevronDownShapeRenderer.js.map +1 -0
- package/renderer/scatter/ChevronUpShapeRenderer.d.ts +11 -0
- package/renderer/scatter/ChevronUpShapeRenderer.js +15 -0
- package/renderer/scatter/ChevronUpShapeRenderer.js.map +1 -0
- package/renderer/scatter/CircleShapeRenderer.d.ts +11 -0
- package/renderer/scatter/CircleShapeRenderer.js +31 -0
- package/renderer/scatter/CircleShapeRenderer.js.map +1 -0
- package/renderer/scatter/CrossShapeRenderer.d.ts +11 -0
- package/renderer/scatter/CrossShapeRenderer.js +15 -0
- package/renderer/scatter/CrossShapeRenderer.js.map +1 -0
- package/renderer/scatter/IShapeRenderer.d.ts +20 -0
- package/renderer/scatter/IShapeRenderer.js +2 -0
- package/renderer/scatter/IShapeRenderer.js.map +1 -0
- package/renderer/scatter/SquareShapeRenderer.d.ts +11 -0
- package/renderer/scatter/SquareShapeRenderer.js +31 -0
- package/renderer/scatter/SquareShapeRenderer.js.map +1 -0
- package/renderer/scatter/TriangleShapeRenderer.d.ts +12 -0
- package/renderer/scatter/TriangleShapeRenderer.js +43 -0
- package/renderer/scatter/TriangleShapeRenderer.js.map +1 -0
- package/renderer/scatter/XShapeRenderer.d.ts +11 -0
- package/renderer/scatter/XShapeRenderer.js +15 -0
- package/renderer/scatter/XShapeRenderer.js.map +1 -0
- package/utils/ColorTemplate.d.ts +34 -0
- package/utils/ColorTemplate.js +51 -0
- package/utils/ColorTemplate.js.map +1 -0
- package/utils/HorizontalViewPortHandler.d.ts +6 -0
- package/utils/HorizontalViewPortHandler.js +7 -0
- package/utils/HorizontalViewPortHandler.js.map +1 -0
- package/utils/MPPointD.d.ts +5 -0
- package/utils/MPPointF.d.ts +7 -0
- package/utils/MPSize.d.ts +7 -0
- package/utils/ObjectPool.d.ts +81 -0
- package/utils/ObjectPool.js +183 -0
- package/utils/ObjectPool.js.map +1 -0
- package/utils/Transformer.d.ts +175 -0
- package/utils/Transformer.js +356 -0
- package/utils/Transformer.js.map +1 -0
- package/utils/TransformerHorizontalBarChart.d.ts +14 -0
- package/utils/TransformerHorizontalBarChart.js +30 -0
- package/utils/TransformerHorizontalBarChart.js.map +1 -0
- package/utils/Utils.d.ts +203 -0
- package/utils/Utils.js +653 -0
- package/utils/Utils.js.map +1 -0
- package/utils/ViewPortHandler.d.ts +299 -0
- package/utils/ViewPortHandler.js +585 -0
- package/utils/ViewPortHandler.js.map +1 -0
- package/utils/colors/colorful.d.ts +1 -0
- package/utils/colors/colorful.js +2 -0
- package/utils/colors/colorful.js.map +1 -0
- package/utils/colors/joyful.d.ts +1 -0
- package/utils/colors/joyful.js +2 -0
- package/utils/colors/joyful.js.map +1 -0
- package/utils/colors/liberty.d.ts +1 -0
- package/utils/colors/liberty.js +2 -0
- package/utils/colors/liberty.js.map +1 -0
- package/utils/colors/material.d.ts +1 -0
- package/utils/colors/material.js +2 -0
- package/utils/colors/material.js.map +1 -0
- package/utils/colors/pastel.d.ts +1 -0
- package/utils/colors/pastel.js +2 -0
- package/utils/colors/pastel.js.map +1 -0
- package/utils/colors/vordiplom.d.ts +1 -0
- package/utils/colors/vordiplom.js +2 -0
- package/utils/colors/vordiplom.js.map +1 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { Color } from '@nativescript/core';
|
|
2
|
+
import { PieRadarChartBase } from './PieRadarChartBase';
|
|
3
|
+
import { AxisDependency, YAxis } from '../components/YAxis';
|
|
4
|
+
import { RadarHighlighter } from '../highlight/RadarHighlighter';
|
|
5
|
+
import { RadarChartRenderer } from '../renderer/RadarChartRenderer';
|
|
6
|
+
import { XAxisRendererRadarChart } from '../renderer/XAxisRendererRadarChart';
|
|
7
|
+
import { YAxisRendererRadarChart } from '../renderer/YAxisRendererRadarChart';
|
|
8
|
+
import { Utils } from '../utils/Utils';
|
|
9
|
+
const LOG_TAG = 'RadarChart';
|
|
10
|
+
/**
|
|
11
|
+
* Implementation of the RadarChart, a "spidernet"-like chart. It works best
|
|
12
|
+
* when displaying 5-10 entries per DataSet.
|
|
13
|
+
*
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
export class RadarChart extends PieRadarChartBase {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
/**
|
|
20
|
+
* width of the main web lines
|
|
21
|
+
*/
|
|
22
|
+
this.webLineWidth = 1.5;
|
|
23
|
+
/**
|
|
24
|
+
* width of the inner web lines
|
|
25
|
+
*/
|
|
26
|
+
this.webLineWidthInner = 1.5;
|
|
27
|
+
/**
|
|
28
|
+
* color for the main web lines
|
|
29
|
+
*/
|
|
30
|
+
this.webColor = new Color(255, 122, 122, 122);
|
|
31
|
+
/**
|
|
32
|
+
* color for the inner web
|
|
33
|
+
*/
|
|
34
|
+
this.webColorInner = new Color(255, 122, 122, 122);
|
|
35
|
+
/**
|
|
36
|
+
* transparency the grid is drawn with (0-255)
|
|
37
|
+
*/
|
|
38
|
+
this.webAlpha = 150;
|
|
39
|
+
/**
|
|
40
|
+
* flag indicating if the web lines should be drawn or not
|
|
41
|
+
*/
|
|
42
|
+
this.drawWeb = true;
|
|
43
|
+
/**
|
|
44
|
+
* modulus that determines how many labels and web-lines are skipped before the next is drawn
|
|
45
|
+
*/
|
|
46
|
+
this.mSkipWebLineCount = 0;
|
|
47
|
+
// for performance tracking
|
|
48
|
+
this.mTotalTime = 0;
|
|
49
|
+
this.mDrawCycles = 0;
|
|
50
|
+
}
|
|
51
|
+
init() {
|
|
52
|
+
super.init();
|
|
53
|
+
this.yAxis = new YAxis(AxisDependency.LEFT, new WeakRef(this));
|
|
54
|
+
this.renderer = new RadarChartRenderer(this, this.animator, this.viewPortHandler);
|
|
55
|
+
this.yAxisRenderer = new YAxisRendererRadarChart(this.viewPortHandler, this.yAxis, this);
|
|
56
|
+
this.xAxisRenderer = new XAxisRendererRadarChart(this.viewPortHandler, this.xAxis, this);
|
|
57
|
+
this.highlighter = new RadarHighlighter(this);
|
|
58
|
+
}
|
|
59
|
+
calcMinMax() {
|
|
60
|
+
super.calcMinMax();
|
|
61
|
+
this.yAxis.calculate(this.mData.getYMin(AxisDependency.LEFT), this.mData.getYMax(AxisDependency.LEFT));
|
|
62
|
+
this.xAxis.calculate(0, this.mData.maxEntryCountSet.entryCount);
|
|
63
|
+
}
|
|
64
|
+
notifyDataSetChanged() {
|
|
65
|
+
if (!this.mData)
|
|
66
|
+
return;
|
|
67
|
+
this.calcMinMax();
|
|
68
|
+
this.yAxisRenderer.computeAxis(this.yAxis.axisMinimum, this.yAxis.axisMaximum, this.yAxis.inverted);
|
|
69
|
+
this.xAxisRenderer.computeAxis(this.xAxis.axisMinimum, this.xAxis.axisMaximum, false);
|
|
70
|
+
if (this.mLegend && !this.mLegend.isLegendCustom())
|
|
71
|
+
this.legendRenderer.computeLegend(this.mData);
|
|
72
|
+
this.calculateOffsets();
|
|
73
|
+
}
|
|
74
|
+
draw(c) {
|
|
75
|
+
super.draw(c);
|
|
76
|
+
if (!this.mData)
|
|
77
|
+
return;
|
|
78
|
+
if (this.xAxis.enabled) {
|
|
79
|
+
this.xAxisRenderer.computeAxis(this.xAxis.axisMinimum, this.xAxis.axisMaximum, false);
|
|
80
|
+
this.xAxisRenderer.renderAxisLabels(c);
|
|
81
|
+
}
|
|
82
|
+
if (this.drawWeb)
|
|
83
|
+
this.renderer.drawExtras(c);
|
|
84
|
+
if (this.yAxis?.drawLimitLinesBehindData)
|
|
85
|
+
this.yAxisRenderer.renderLimitLines(c);
|
|
86
|
+
if (this.yAxis?.drawLabelsBehindData)
|
|
87
|
+
this.yAxisRenderer.renderAxisLabels(c);
|
|
88
|
+
this.renderer.drawData(c);
|
|
89
|
+
if (this.hasValuesToHighlight)
|
|
90
|
+
this.renderer.drawHighlighted(c, this.indicesToHighlight);
|
|
91
|
+
if (!this.yAxis?.drawLimitLinesBehindData)
|
|
92
|
+
this.yAxisRenderer.renderLimitLines(c);
|
|
93
|
+
if (!this.yAxis?.drawLabelsBehindData)
|
|
94
|
+
this.yAxisRenderer.renderAxisLabels(c);
|
|
95
|
+
this.renderer.drawValues(c);
|
|
96
|
+
this.legendRenderer?.renderLegend(c);
|
|
97
|
+
this.drawDescription(c);
|
|
98
|
+
this.drawMarkers(c);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Returns the factor that is needed to transform values into pixels.
|
|
102
|
+
*/
|
|
103
|
+
get factor() {
|
|
104
|
+
const content = this.viewPortHandler.contentRect;
|
|
105
|
+
return Math.min(content.width() / 2, content.height() / 2) / this.yAxis.axisRange;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Returns the angle that each slice in the radar chart occupies.
|
|
109
|
+
*/
|
|
110
|
+
get sliceAngle() {
|
|
111
|
+
return 360 / this.mData.maxEntryCountSet.entryCount;
|
|
112
|
+
}
|
|
113
|
+
getIndexForAngle(angle) {
|
|
114
|
+
// take the current angle of the chart into consideration
|
|
115
|
+
const a = Utils.getNormalizedAngle(angle - this.rotationAngle);
|
|
116
|
+
const sliceangle = this.sliceAngle;
|
|
117
|
+
const max = this.mData.maxEntryCountSet.entryCount;
|
|
118
|
+
let index = 0;
|
|
119
|
+
for (let i = 0; i < max; i++) {
|
|
120
|
+
const referenceAngle = sliceangle * (i + 1) - sliceangle / 2;
|
|
121
|
+
if (referenceAngle > a) {
|
|
122
|
+
index = i;
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return index;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Sets the number of web-lines that should be skipped on chart web before the
|
|
130
|
+
* next one is drawn. This targets the lines that come from the center of the RadarChart.
|
|
131
|
+
*
|
|
132
|
+
* @param count if count = 1 -> 1 line is skipped in between
|
|
133
|
+
*/
|
|
134
|
+
set skipWebLineCount(count) {
|
|
135
|
+
this.mSkipWebLineCount = Math.max(0, count);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Returns the modulus that is used for skipping web-lines.
|
|
139
|
+
*/
|
|
140
|
+
get skipWebLineCount() {
|
|
141
|
+
return this.mSkipWebLineCount;
|
|
142
|
+
}
|
|
143
|
+
get requiredLegendOffset() {
|
|
144
|
+
return this.legendRenderer.labelPaint.getTextSize() * 4;
|
|
145
|
+
}
|
|
146
|
+
get requiredBaseOffset() {
|
|
147
|
+
return this.xAxis.enabled && this.xAxis.drawLabels ? this.xAxis.mLabelRotatedWidth : 10;
|
|
148
|
+
}
|
|
149
|
+
get radius() {
|
|
150
|
+
const content = this.viewPortHandler.contentRect;
|
|
151
|
+
return Math.min(content.width() / 2, content.height() / 2);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Returns the maximum value this chart can display on it's y-axis.
|
|
155
|
+
*/
|
|
156
|
+
get yChartMax() {
|
|
157
|
+
return this.yAxis.axisMaximum;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Returns the minimum value this chart can display on it's y-axis.
|
|
161
|
+
*/
|
|
162
|
+
get yChartMin() {
|
|
163
|
+
return this.yAxis.axisMinimum;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Returns the range of y-values this chart can display.
|
|
167
|
+
*/
|
|
168
|
+
get yRange() {
|
|
169
|
+
return this.yAxis.axisRange;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=RadarChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadarChart.js","sourceRoot":"","sources":["../../../src/ui-chart/charts/RadarChart.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAS,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAI5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EA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;IAED,IAAc,kBAAkB;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5F,CAAC;IAED,IAAW,MAAM;QACb,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC;QACjD,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;IAChC,CAAC;CAGJ"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BarLineChartBase } from './BarLineChartBase';
|
|
2
|
+
import { ScatterData } from '../data/ScatterData';
|
|
3
|
+
import { ScatterDataProvider } from '../interfaces/dataprovider/ScatterDataProvider';
|
|
4
|
+
import { Entry } from '../data/Entry';
|
|
5
|
+
import { IScatterDataSet } from '../interfaces/datasets/IScatterDataSet';
|
|
6
|
+
import { ScatterChartRenderer } from '../renderer/ScatterChartRenderer';
|
|
7
|
+
import { Canvas, Paint } from '@nativescript-community/ui-canvas';
|
|
8
|
+
import { Highlight } from '../highlight/Highlight';
|
|
9
|
+
import { ViewPortHandler } from '../utils/ViewPortHandler';
|
|
10
|
+
import { BaseCustomRenderer } from '../renderer/DataRenderer';
|
|
11
|
+
export interface CustomRenderer extends BaseCustomRenderer {
|
|
12
|
+
drawShape?: (c: Canvas, e: Entry, dataSet: IScatterDataSet, viewPortHandler: ViewPortHandler, x: number, y: number, paint: Paint) => void;
|
|
13
|
+
drawHighlight?: (c: Canvas, e: Highlight, set: IScatterDataSet, paint: Paint) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare enum ScatterShape {
|
|
16
|
+
SQUARE = "SQUARE",
|
|
17
|
+
CIRCLE = "CIRCLE",
|
|
18
|
+
TRIANGLE = "TRIANGLE",
|
|
19
|
+
CROSS = "CROSS",
|
|
20
|
+
X = "X",
|
|
21
|
+
CHEVRON_UP = "CHEVRON_UP",
|
|
22
|
+
CHEVRON_DOWN = "CHEVRON_DOWN"
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The ScatterChart. Draws dots, triangles, squares and custom shapes into the
|
|
26
|
+
* Chart-View. CIRCLE and SCQUARE offer the best performance, TRIANGLE has the
|
|
27
|
+
* worst performance.
|
|
28
|
+
*
|
|
29
|
+
|
|
30
|
+
*/
|
|
31
|
+
export declare class ScatterChart extends BarLineChartBase<Entry, IScatterDataSet, ScatterData> implements ScatterDataProvider {
|
|
32
|
+
renderer: ScatterChartRenderer;
|
|
33
|
+
protected init(): void;
|
|
34
|
+
get scatterData(): ScatterData;
|
|
35
|
+
customRenderer: CustomRenderer;
|
|
36
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BarLineChartBase } from './BarLineChartBase';
|
|
2
|
+
import { ScatterChartRenderer } from '../renderer/ScatterChartRenderer';
|
|
3
|
+
export var ScatterShape;
|
|
4
|
+
(function (ScatterShape) {
|
|
5
|
+
ScatterShape["SQUARE"] = "SQUARE";
|
|
6
|
+
ScatterShape["CIRCLE"] = "CIRCLE";
|
|
7
|
+
ScatterShape["TRIANGLE"] = "TRIANGLE";
|
|
8
|
+
ScatterShape["CROSS"] = "CROSS";
|
|
9
|
+
ScatterShape["X"] = "X";
|
|
10
|
+
ScatterShape["CHEVRON_UP"] = "CHEVRON_UP";
|
|
11
|
+
ScatterShape["CHEVRON_DOWN"] = "CHEVRON_DOWN";
|
|
12
|
+
})(ScatterShape || (ScatterShape = {}));
|
|
13
|
+
/**
|
|
14
|
+
* The ScatterChart. Draws dots, triangles, squares and custom shapes into the
|
|
15
|
+
* Chart-View. CIRCLE and SCQUARE offer the best performance, TRIANGLE has the
|
|
16
|
+
* worst performance.
|
|
17
|
+
*
|
|
18
|
+
|
|
19
|
+
*/
|
|
20
|
+
export class ScatterChart extends BarLineChartBase {
|
|
21
|
+
init() {
|
|
22
|
+
super.init();
|
|
23
|
+
this.renderer = new ScatterChartRenderer(this, this.animator, this.viewPortHandler);
|
|
24
|
+
this.xAxis.spaceMin = 0.5;
|
|
25
|
+
this.xAxis.spaceMax = 0.5;
|
|
26
|
+
}
|
|
27
|
+
get scatterData() {
|
|
28
|
+
return this.mData;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=ScatterChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScatterChart.js","sourceRoot":"","sources":["../../../src/ui-chart/charts/ScatterChart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAMtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAWxE,MAAM,CAAN,IAAY,YAQX;AARD,WAAY,YAAY;IACpB,iCAAiB,CAAA;IACjB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,uBAAO,CAAA;IACP,yCAAyB,CAAA;IACzB,6CAA6B,CAAA;AACjC,CAAC,EARW,YAAY,KAAZ,YAAY,QAQvB;AACD;;;;;;GAMG;AACH,MAAM,OAAO,YAAa,SAAQ,gBAAqD;IAGzE,IAAI;QACV,KAAK,CAAC,IAAI,EAAE,CAAC;QAEb,IAAI,CAAC,QAAQ,GAAG,IAAI,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAEpF,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,GAAG,CAAC;QAC1B,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,GAAG,CAAC;IAC9B,CAAC;IAED,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;CAGJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { BarChart } from './BarChart';
|
|
2
|
+
export { HorizontalBarChart } from './HorizontalBarChart';
|
|
3
|
+
export { LineChart } from './LineChart';
|
|
4
|
+
export { PieChart } from './PieChart';
|
|
5
|
+
export { RadarChart } from './RadarChart';
|
|
6
|
+
export { ScatterChart } from './ScatterChart';
|
|
7
|
+
export { BubbleChart } from './BubbleChart';
|
|
8
|
+
export { CandleStickChart } from './CandleStickChart';
|
|
9
|
+
export { CombinedChart } from './CombinedChart';
|
package/charts/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { BarChart } from './BarChart';
|
|
2
|
+
export { HorizontalBarChart } from './HorizontalBarChart';
|
|
3
|
+
export { LineChart } from './LineChart';
|
|
4
|
+
export { PieChart } from './PieChart';
|
|
5
|
+
export { RadarChart } from './RadarChart';
|
|
6
|
+
export { ScatterChart } from './ScatterChart';
|
|
7
|
+
export { BubbleChart } from './BubbleChart';
|
|
8
|
+
export { CandleStickChart } from './CandleStickChart';
|
|
9
|
+
export { CombinedChart } from './CombinedChart';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui-chart/charts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { Align, DashPathEffect } from '@nativescript-community/ui-canvas';
|
|
2
|
+
import { IAxisValueFormatter } from '../formatter/IAxisValueFormatter';
|
|
3
|
+
import { CustomRenderer } from '../renderer/AxisRenderer';
|
|
4
|
+
import { ComponentBase } from './ComponentBase';
|
|
5
|
+
import { LimitLine } from './LimitLine';
|
|
6
|
+
import { Chart } from '../charts/Chart';
|
|
7
|
+
/**
|
|
8
|
+
* Base-class of all axes (previously called labels).
|
|
9
|
+
*
|
|
10
|
+
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class AxisBase extends ComponentBase {
|
|
13
|
+
/**
|
|
14
|
+
* custom formatter that is used instead of the auto-formatter if set
|
|
15
|
+
*/
|
|
16
|
+
protected mAxisValueFormatter: IAxisValueFormatter;
|
|
17
|
+
/**
|
|
18
|
+
* the color of the grid lines for this axis (the horizontal lines
|
|
19
|
+
* coming from each label).
|
|
20
|
+
*/
|
|
21
|
+
gridColor: string;
|
|
22
|
+
/**
|
|
23
|
+
* the width of the grid lines that are drawn away from each axis
|
|
24
|
+
* label.
|
|
25
|
+
*/
|
|
26
|
+
gridLineWidth: number;
|
|
27
|
+
/**
|
|
28
|
+
* the color of the border surrounding the chart.
|
|
29
|
+
*/
|
|
30
|
+
axisLineColor: string;
|
|
31
|
+
/**
|
|
32
|
+
* the width of the border surrounding the chart in dp.
|
|
33
|
+
*/
|
|
34
|
+
axisLineWidth: number;
|
|
35
|
+
/**
|
|
36
|
+
* the actual array of entries
|
|
37
|
+
*/
|
|
38
|
+
mEntries: number[];
|
|
39
|
+
mLabels: string[];
|
|
40
|
+
/**
|
|
41
|
+
* axis label entries only used for centered labels
|
|
42
|
+
*/
|
|
43
|
+
mCenteredEntries: number[];
|
|
44
|
+
/**
|
|
45
|
+
* the number of entries the legend contains
|
|
46
|
+
*/
|
|
47
|
+
mEntryCount: number;
|
|
48
|
+
/**
|
|
49
|
+
* the number of decimal digits to use
|
|
50
|
+
*/
|
|
51
|
+
mDecimals: number;
|
|
52
|
+
/**
|
|
53
|
+
* the number of label entries the axis should have, default 6
|
|
54
|
+
*/
|
|
55
|
+
labelCount: number;
|
|
56
|
+
/**
|
|
57
|
+
* the labels text alignment of the axis labels.
|
|
58
|
+
*/
|
|
59
|
+
labelTextAlign: Align;
|
|
60
|
+
/**
|
|
61
|
+
* the minimum interval between axis values
|
|
62
|
+
* When set, axis labels are controlled by the `granularity` property.
|
|
63
|
+
* When not set, axis values could possibly be repeated.
|
|
64
|
+
* This could happen if two adjacent axis values are rounded to same value.
|
|
65
|
+
* If using granularity this could be aed by having fewer axis values visible.
|
|
66
|
+
*/
|
|
67
|
+
granularity: number;
|
|
68
|
+
forcedInterval: number;
|
|
69
|
+
/**
|
|
70
|
+
* if true, the set number of y-labels will be forced
|
|
71
|
+
*/
|
|
72
|
+
forceLabelsEnabled: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* flag indicating if the grid lines for this axis should be drawn
|
|
75
|
+
*/
|
|
76
|
+
drawGridLines: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* flag that indicates if the line alongside the axis is drawn or not
|
|
79
|
+
*/
|
|
80
|
+
drawAxisLine: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* flag that indicates of the labels of this axis should be drawn or not
|
|
83
|
+
*/
|
|
84
|
+
drawLabels: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Centers the axis labels instead of drawing them at their original position.
|
|
87
|
+
* This is useful especially for grouped BarChart.
|
|
88
|
+
*/
|
|
89
|
+
centerAxisLabels: boolean;
|
|
90
|
+
ensureLastLabel: boolean;
|
|
91
|
+
allowLastLabelAboveMax: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* the path effect of the axis line that makes dashed lines possible
|
|
94
|
+
*/
|
|
95
|
+
axisLineDashPathEffect: DashPathEffect;
|
|
96
|
+
/**
|
|
97
|
+
* the path effect of the grid lines that makes dashed lines possible
|
|
98
|
+
*/
|
|
99
|
+
gridDashPathEffect: DashPathEffect;
|
|
100
|
+
/**
|
|
101
|
+
* array of limit lines that can be set for the axis
|
|
102
|
+
*/
|
|
103
|
+
protected mLimitLines: LimitLine[];
|
|
104
|
+
/**
|
|
105
|
+
* flag indicating if the limit lines are drawn
|
|
106
|
+
*/
|
|
107
|
+
drawLimitLines: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* When enabled the LimitLines are drawn behind the actual data,
|
|
110
|
+
* otherwise on top. Default: false
|
|
111
|
+
*
|
|
112
|
+
* @param enabled
|
|
113
|
+
*/
|
|
114
|
+
drawLimitLinesBehindData: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* When enabled the limitlines will be clipped to contentRect,
|
|
117
|
+
* otherwise they can bleed outside the content rect.
|
|
118
|
+
*/
|
|
119
|
+
clipLimitLinesToContent: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* When enabled the labels are drawn behind the actual data,
|
|
122
|
+
* otherwise on top. Default: false
|
|
123
|
+
*/
|
|
124
|
+
drawLabelsBehindData: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* When enabled the grid lines are draw on top of the actual data,
|
|
127
|
+
* otherwise behind. Default: true
|
|
128
|
+
*/
|
|
129
|
+
drawGridLinesBehindData: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* flag indicating the mark ticks should be drawn
|
|
132
|
+
*/
|
|
133
|
+
drawMarkTicks: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Extra spacing for `axisMinimum` to be added to automatically calculated `axisMinimum`
|
|
136
|
+
*/
|
|
137
|
+
spaceMin: number;
|
|
138
|
+
/**
|
|
139
|
+
* Extra spacing for `axisMaximum` to be added to automatically calculated `axisMaximum`
|
|
140
|
+
*/
|
|
141
|
+
spaceMax: number;
|
|
142
|
+
/**
|
|
143
|
+
* flag indicating that the axis-min value has been customized
|
|
144
|
+
*/
|
|
145
|
+
protected mCustomAxisMin: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* flag indicating that the axis-max value has been customized
|
|
148
|
+
*/
|
|
149
|
+
protected mCustomAxisMax: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* don't touch this direclty, use setter
|
|
152
|
+
*/
|
|
153
|
+
protected mAxisMaximum: number;
|
|
154
|
+
/**
|
|
155
|
+
* don't touch this directly, use setter
|
|
156
|
+
*/
|
|
157
|
+
protected mAxisMinimum: number;
|
|
158
|
+
/**
|
|
159
|
+
* Set a suggested maximum value for this axis. If set, this will be used
|
|
160
|
+
* as maximum is no value is greater than it.
|
|
161
|
+
*/
|
|
162
|
+
axisSuggestedMaximum: number;
|
|
163
|
+
/**
|
|
164
|
+
* Set a suggested minimum value for this axis. If set, this will be used
|
|
165
|
+
* as minimum is no value is greater than it.
|
|
166
|
+
*/
|
|
167
|
+
axisSuggestedMinimum: number;
|
|
168
|
+
/**
|
|
169
|
+
* the total range of values this axis covers
|
|
170
|
+
*/
|
|
171
|
+
axisRange: number;
|
|
172
|
+
/**
|
|
173
|
+
* the total range of values this axis covers
|
|
174
|
+
*/
|
|
175
|
+
ignoreOffsets: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* custom line renderer
|
|
178
|
+
*/
|
|
179
|
+
customRenderer: CustomRenderer;
|
|
180
|
+
/**
|
|
181
|
+
* chart it belongs to
|
|
182
|
+
*/
|
|
183
|
+
chart: WeakRef<Chart<any, any, any>>;
|
|
184
|
+
/**
|
|
185
|
+
* default constructor
|
|
186
|
+
*/
|
|
187
|
+
constructor(chart: WeakRef<Chart<any, any, any>>);
|
|
188
|
+
/**
|
|
189
|
+
* Adds a new LimitLine to this axis.
|
|
190
|
+
*
|
|
191
|
+
* @param l
|
|
192
|
+
*/
|
|
193
|
+
addLimitLine(l: LimitLine): void;
|
|
194
|
+
/**
|
|
195
|
+
* Removes the specified LimitLine from the axis.
|
|
196
|
+
*
|
|
197
|
+
* @param l
|
|
198
|
+
*/
|
|
199
|
+
removeLimitLine(l: LimitLine): void;
|
|
200
|
+
/**
|
|
201
|
+
* Removes all LimitLines from the axis.
|
|
202
|
+
*/
|
|
203
|
+
removeAllLimitLines(): void;
|
|
204
|
+
/**
|
|
205
|
+
* Returns the LimitLines of this axis.
|
|
206
|
+
*/
|
|
207
|
+
get limitLines(): LimitLine[];
|
|
208
|
+
/**
|
|
209
|
+
* Returns the longest formatted label (in terms of characters), this axis
|
|
210
|
+
* contains.
|
|
211
|
+
*/
|
|
212
|
+
get longestLabel(): string;
|
|
213
|
+
getFormattedLabel(index: any): string;
|
|
214
|
+
/**
|
|
215
|
+
* Sets the formatter to be used for formatting the axis labels. If no formatter is set, the
|
|
216
|
+
* chart will
|
|
217
|
+
* automatically determine a reasonable formatting (concerning decimals) for all the values
|
|
218
|
+
* that are drawn inside
|
|
219
|
+
* the chart. Use chart.defaultValueFormatter to use the formatter calculated by the chart.
|
|
220
|
+
*
|
|
221
|
+
* @param f
|
|
222
|
+
*/
|
|
223
|
+
set valueFormatter(f: IAxisValueFormatter);
|
|
224
|
+
/**
|
|
225
|
+
* Returns the formatter used for formatting the axis labels.
|
|
226
|
+
*/
|
|
227
|
+
get valueFormatter(): IAxisValueFormatter;
|
|
228
|
+
/**
|
|
229
|
+
* Enables the grid line to be drawn in dashed mode, e.g. like this
|
|
230
|
+
* "- - - - - -". THIS ONLY WORKS IF HARDWARE-ACCELERATION IS TURNED OFF.
|
|
231
|
+
* Keep in mind that hardware acceleration boosts performance.
|
|
232
|
+
*
|
|
233
|
+
* @param lineLength the length of the line pieces
|
|
234
|
+
* @param spaceLength the length of space in between the pieces
|
|
235
|
+
* @param phase offset, in degrees (normally, use 0)
|
|
236
|
+
*/
|
|
237
|
+
enableGridDashedLine(lineLength: any, spaceLength: any, phase: any): void;
|
|
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: any, spaceLength: any, phase: any): void;
|
|
248
|
+
/**
|
|
249
|
+
* ###### BELOW CODE RELATED TO CUSTOM AXIS VALUES ######
|
|
250
|
+
*/
|
|
251
|
+
/**
|
|
252
|
+
* By calling this method, any custom maximum value that has been previously set is reseted,
|
|
253
|
+
* and the calculation is
|
|
254
|
+
* done automatically.
|
|
255
|
+
*/
|
|
256
|
+
resetAxisMaximum(): void;
|
|
257
|
+
/**
|
|
258
|
+
* Returns true if the axis max value has been customized (and is not calculated automatically)
|
|
259
|
+
*/
|
|
260
|
+
isAxisMaxCustom(): boolean;
|
|
261
|
+
/**
|
|
262
|
+
* By calling this method, any custom minimum value that has been previously set is reseted,
|
|
263
|
+
* and the calculation is
|
|
264
|
+
* done automatically.
|
|
265
|
+
*/
|
|
266
|
+
resetAxisMinimum(): void;
|
|
267
|
+
/**
|
|
268
|
+
* Returns true if the axis min value has been customized (and is not calculated automatically)
|
|
269
|
+
*/
|
|
270
|
+
isAxisMinCustom(): boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Set a custom minimum value for this axis. If set, this value will not be calculated
|
|
273
|
+
* automatically depending on
|
|
274
|
+
* the provided data. Use resetAxisMinValue() to undo this. Do not forget to call
|
|
275
|
+
* setStartAtZero(false) if you use
|
|
276
|
+
* this method. Otherwise, the axis-minimum value will still be forced to 0.
|
|
277
|
+
*
|
|
278
|
+
* @param min
|
|
279
|
+
*/
|
|
280
|
+
set axisMinimum(min: number);
|
|
281
|
+
get axisMinimum(): number;
|
|
282
|
+
get axisMaximum(): number;
|
|
283
|
+
/**
|
|
284
|
+
* Set a custom maximum value for this axis. If set, this value will not be calculated
|
|
285
|
+
* automatically depending on
|
|
286
|
+
* the provided data. Use resetAxisMaxValue() to undo this.
|
|
287
|
+
*
|
|
288
|
+
* @param max
|
|
289
|
+
*/
|
|
290
|
+
set axisMaximum(max: number);
|
|
291
|
+
/**
|
|
292
|
+
* Calculates the minimum / maximum and range values of the axis with the given
|
|
293
|
+
* minimum and maximum values from the chart data.
|
|
294
|
+
*
|
|
295
|
+
* @param dataMin the min value according to chart data
|
|
296
|
+
* @param dataMax the max value according to chart data
|
|
297
|
+
*/
|
|
298
|
+
calculate(dataMin: any, dataMax: any): void;
|
|
299
|
+
}
|