@nativescript-community/ui-chart 1.2.35 → 2.0.0

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.
Files changed (375) hide show
  1. package/README.md +6 -0
  2. package/animation/ChartAnimator.d.ts +47 -4
  3. package/animation/ChartAnimator.js +49 -11
  4. package/animation/ChartAnimator.js.map +1 -1
  5. package/animation/Tween.d.ts +1 -1
  6. package/animation/Tween.js +4 -2
  7. package/animation/Tween.js.map +1 -1
  8. package/buffer/AbstractBuffer.d.ts +28 -3
  9. package/buffer/AbstractBuffer.js +22 -3
  10. package/buffer/AbstractBuffer.js.map +1 -1
  11. package/buffer/BarBuffer.d.ts +8 -12
  12. package/buffer/BarBuffer.js +33 -36
  13. package/buffer/BarBuffer.js.map +1 -1
  14. package/buffer/HorizontalBarBuffer.js +13 -10
  15. package/buffer/HorizontalBarBuffer.js.map +1 -1
  16. package/charts/BarChart.d.ts +70 -15
  17. package/charts/BarChart.js +92 -63
  18. package/charts/BarChart.js.map +1 -1
  19. package/charts/BarLineChartBase.d.ts +494 -73
  20. package/charts/BarLineChartBase.js +788 -407
  21. package/charts/BarLineChartBase.js.map +1 -1
  22. package/charts/BubbleChart.d.ts +11 -5
  23. package/charts/BubbleChart.js +10 -8
  24. package/charts/BubbleChart.js.map +1 -1
  25. package/charts/CandleStickChart.d.ts +8 -5
  26. package/charts/CandleStickChart.js +9 -10
  27. package/charts/CandleStickChart.js.map +1 -1
  28. package/charts/Chart.d.ts +424 -92
  29. package/charts/Chart.js +590 -290
  30. package/charts/Chart.js.map +1 -1
  31. package/charts/CombinedChart.d.ts +59 -29
  32. package/charts/CombinedChart.js +74 -67
  33. package/charts/CombinedChart.js.map +1 -1
  34. package/charts/HorizontalBarChart.d.ts +37 -7
  35. package/charts/HorizontalBarChart.js +97 -59
  36. package/charts/HorizontalBarChart.js.map +1 -1
  37. package/charts/LineChart.d.ts +3 -5
  38. package/charts/LineChart.js +6 -10
  39. package/charts/LineChart.js.map +1 -1
  40. package/charts/PieChart.d.ts +218 -64
  41. package/charts/PieChart.js +278 -168
  42. package/charts/PieChart.js.map +1 -1
  43. package/charts/PieRadarChartBase.d.ts +107 -18
  44. package/charts/PieRadarChartBase.js +156 -73
  45. package/charts/PieRadarChartBase.js.map +1 -1
  46. package/charts/RadarChart.d.ts +75 -35
  47. package/charts/RadarChart.js +114 -103
  48. package/charts/RadarChart.js.map +1 -1
  49. package/charts/ScatterChart.d.ts +10 -5
  50. package/charts/ScatterChart.js +11 -10
  51. package/charts/ScatterChart.js.map +1 -1
  52. package/components/AxisBase.d.ts +271 -101
  53. package/components/AxisBase.js +264 -254
  54. package/components/AxisBase.js.map +1 -1
  55. package/components/ComponentBase.d.ts +54 -19
  56. package/components/ComponentBase.js +60 -48
  57. package/components/ComponentBase.js.map +1 -1
  58. package/components/Description.d.ts +18 -9
  59. package/components/Description.js +12 -26
  60. package/components/Description.js.map +1 -1
  61. package/components/IMarker.d.ts +30 -1
  62. package/components/IMarker.js.map +1 -1
  63. package/components/Legend.d.ts +155 -58
  64. package/components/Legend.js +208 -172
  65. package/components/Legend.js.map +1 -1
  66. package/components/LegendEntry.d.ts +38 -0
  67. package/components/LegendEntry.js +34 -0
  68. package/components/LegendEntry.js.map +1 -1
  69. package/components/LimitLine.d.ts +40 -22
  70. package/components/LimitLine.js +44 -56
  71. package/components/LimitLine.js.map +1 -1
  72. package/components/MarkerImage.d.ts +1 -0
  73. package/components/MarkerImage.js +97 -0
  74. package/components/MarkerImage.js.map +1 -0
  75. package/components/XAxis.d.ts +41 -10
  76. package/components/XAxis.js +42 -24
  77. package/components/XAxis.js.map +1 -1
  78. package/components/YAxis.d.ts +114 -37
  79. package/components/YAxis.js +138 -106
  80. package/components/YAxis.js.map +1 -1
  81. package/data/BarData.d.ts +32 -4
  82. package/data/BarData.js +92 -24
  83. package/data/BarData.js.map +1 -1
  84. package/data/BarDataSet.d.ts +35 -18
  85. package/data/BarDataSet.js +42 -47
  86. package/data/BarDataSet.js.map +1 -1
  87. package/data/BarEntry.d.ts +3 -0
  88. package/data/BarEntry.js.map +1 -1
  89. package/data/BarLineScatterCandleBubbleData.d.ts +5 -0
  90. package/data/BarLineScatterCandleBubbleData.js +5 -0
  91. package/data/BarLineScatterCandleBubbleData.js.map +1 -1
  92. package/data/BarLineScatterCandleBubbleDataSet.d.ts +11 -3
  93. package/data/BarLineScatterCandleBubbleDataSet.js +11 -7
  94. package/data/BarLineScatterCandleBubbleDataSet.js.map +1 -1
  95. package/data/BaseDataSet.d.ts +129 -71
  96. package/data/BaseDataSet.js +146 -169
  97. package/data/BaseDataSet.js.map +1 -1
  98. package/data/BaseEntry.d.ts +3 -0
  99. package/data/BaseEntry.js.map +1 -1
  100. package/data/BubbleData.d.ts +7 -1
  101. package/data/BubbleData.js +8 -2
  102. package/data/BubbleData.js.map +1 -1
  103. package/data/BubbleDataSet.d.ts +7 -7
  104. package/data/BubbleDataSet.js +8 -15
  105. package/data/BubbleDataSet.js.map +1 -1
  106. package/data/BubbleEntry.d.ts +1 -0
  107. package/data/BubbleEntry.js.map +1 -1
  108. package/data/CandleData.js.map +1 -1
  109. package/data/CandleDataSet.d.ts +64 -30
  110. package/data/CandleDataSet.js +67 -74
  111. package/data/CandleDataSet.js.map +1 -1
  112. package/data/CandleEntry.d.ts +4 -0
  113. package/data/CandleEntry.js.map +1 -1
  114. package/data/ChartData.d.ts +273 -18
  115. package/data/ChartData.js +398 -93
  116. package/data/ChartData.js.map +1 -1
  117. package/data/CombinedData.d.ts +39 -12
  118. package/data/CombinedData.js +87 -71
  119. package/data/CombinedData.js.map +1 -1
  120. package/data/DataSet.d.ts +59 -8
  121. package/data/DataSet.js +114 -26
  122. package/data/DataSet.js.map +1 -1
  123. package/data/Entry.js.map +1 -1
  124. package/data/LineData.d.ts +5 -0
  125. package/data/LineData.js +5 -0
  126. package/data/LineData.js.map +1 -1
  127. package/data/LineDataSet.d.ts +80 -49
  128. package/data/LineDataSet.js +90 -135
  129. package/data/LineDataSet.js.map +1 -1
  130. package/data/LineRadarDataSet.d.ts +27 -17
  131. package/data/LineRadarDataSet.js +22 -35
  132. package/data/LineRadarDataSet.js.map +1 -1
  133. package/data/LineScatterCandleRadarDataSet.d.ts +30 -15
  134. package/data/LineScatterCandleRadarDataSet.js +36 -39
  135. package/data/LineScatterCandleRadarDataSet.js.map +1 -1
  136. package/data/PieData.d.ts +26 -0
  137. package/data/PieData.js +28 -2
  138. package/data/PieData.js.map +1 -1
  139. package/data/PieDataSet.d.ts +40 -36
  140. package/data/PieDataSet.js +36 -88
  141. package/data/PieDataSet.js.map +1 -1
  142. package/data/PieEntry.d.ts +3 -0
  143. package/data/PieEntry.js.map +1 -1
  144. package/data/RadarData.d.ts +10 -4
  145. package/data/RadarData.js +5 -6
  146. package/data/RadarData.js.map +1 -1
  147. package/data/RadarDataSet.d.ts +7 -21
  148. package/data/RadarDataSet.js +10 -49
  149. package/data/RadarDataSet.js.map +1 -1
  150. package/data/RadarEntry.js.map +1 -1
  151. package/data/ScatterData.d.ts +4 -1
  152. package/data/ScatterData.js +5 -2
  153. package/data/ScatterData.js.map +1 -1
  154. package/data/ScatterDataSet.d.ts +24 -14
  155. package/data/ScatterDataSet.js +26 -31
  156. package/data/ScatterDataSet.js.map +1 -1
  157. package/formatter/DefaultAxisValueFormatter.d.ts +17 -3
  158. package/formatter/DefaultAxisValueFormatter.js +12 -5
  159. package/formatter/DefaultAxisValueFormatter.js.map +1 -1
  160. package/formatter/DefaultFillFormatter.js +7 -7
  161. package/formatter/DefaultFillFormatter.js.map +1 -1
  162. package/formatter/DefaultValueFormatter.js.map +1 -1
  163. package/formatter/IAxisValueFormatter.d.ts +20 -2
  164. package/formatter/IAxisValueFormatter.js.map +1 -1
  165. package/formatter/IFillFormatter.d.ts +25 -0
  166. package/formatter/IFillFormatter.js.map +1 -1
  167. package/formatter/IValueFormatter.d.ts +21 -0
  168. package/formatter/IValueFormatter.js.map +1 -1
  169. package/formatter/ValueFormatter.d.ts +60 -0
  170. package/formatter/ValueFormatter.js +60 -0
  171. package/formatter/ValueFormatter.js.map +1 -1
  172. package/highlight/BarHighlighter.d.ts +22 -2
  173. package/highlight/BarHighlighter.js +43 -17
  174. package/highlight/BarHighlighter.js.map +1 -1
  175. package/highlight/ChartHighlighter.d.ts +87 -5
  176. package/highlight/ChartHighlighter.js +126 -23
  177. package/highlight/ChartHighlighter.js.map +1 -1
  178. package/highlight/CombinedHighlighter.d.ts +6 -0
  179. package/highlight/CombinedHighlighter.js +31 -16
  180. package/highlight/CombinedHighlighter.js.map +1 -1
  181. package/highlight/Highlight.d.ts +54 -1
  182. package/highlight/Highlight.js +5 -0
  183. package/highlight/Highlight.js.map +1 -1
  184. package/highlight/HorizontalBarHighlighter.d.ts +1 -1
  185. package/highlight/HorizontalBarHighlighter.js +14 -13
  186. package/highlight/HorizontalBarHighlighter.js.map +1 -1
  187. package/highlight/IHighlighter.d.ts +11 -1
  188. package/highlight/IHighlighter.js.map +1 -1
  189. package/highlight/PieHighlighter.js +2 -2
  190. package/highlight/PieHighlighter.js.map +1 -1
  191. package/highlight/PieRadarHighlighter.d.ts +12 -1
  192. package/highlight/PieRadarHighlighter.js +12 -4
  193. package/highlight/PieRadarHighlighter.js.map +1 -1
  194. package/highlight/RadarHighlighter.d.ts +12 -0
  195. package/highlight/RadarHighlighter.js +24 -10
  196. package/highlight/RadarHighlighter.js.map +1 -1
  197. package/index.d.ts +11 -0
  198. package/index.js +15 -0
  199. package/index.js.map +1 -0
  200. package/interfaces/dataprovider/BarDataProvider.d.ts +4 -4
  201. package/interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider.d.ts +8 -3
  202. package/interfaces/dataprovider/BubbleDataProvider.d.ts +1 -1
  203. package/interfaces/dataprovider/CandleDataProvider.d.ts +1 -1
  204. package/interfaces/dataprovider/ChartInterface.d.ts +17 -22
  205. package/interfaces/dataprovider/CombinedDataProvider.d.ts +1 -1
  206. package/interfaces/dataprovider/LineDataProvider.d.ts +1 -1
  207. package/interfaces/dataprovider/ScatterDataProvider.d.ts +1 -1
  208. package/interfaces/datasets/IBarDataSet.d.ts +8 -22
  209. package/interfaces/datasets/IBarLineScatterCandleBubbleDataSet.d.ts +1 -3
  210. package/interfaces/datasets/IBubbleDataSet.d.ts +3 -9
  211. package/interfaces/datasets/ICandleDataSet.d.ts +44 -41
  212. package/interfaces/datasets/IDataSet.d.ts +35 -151
  213. package/interfaces/datasets/ILineDataSet.d.ts +15 -54
  214. package/interfaces/datasets/ILineRadarDataSet.d.ts +7 -28
  215. package/interfaces/datasets/ILineScatterCandleRadarDataSet.d.ts +5 -4
  216. package/interfaces/datasets/IPieDataSet.d.ts +22 -40
  217. package/interfaces/datasets/IRadarDataSet.d.ts +7 -13
  218. package/interfaces/datasets/IScatterDataSet.d.ts +17 -16
  219. package/jobs/AnimatedMoveViewJob.d.ts +3 -0
  220. package/jobs/AnimatedMoveViewJob.js +12 -8
  221. package/jobs/AnimatedMoveViewJob.js.map +1 -1
  222. package/jobs/AnimatedViewPortJob.d.ts +7 -8
  223. package/jobs/AnimatedViewPortJob.js +16 -23
  224. package/jobs/AnimatedViewPortJob.js.map +1 -1
  225. package/jobs/AnimatedZoomJob.d.ts +8 -5
  226. package/jobs/AnimatedZoomJob.js +30 -26
  227. package/jobs/AnimatedZoomJob.js.map +1 -1
  228. package/jobs/MoveViewJob.d.ts +3 -0
  229. package/jobs/MoveViewJob.js +10 -7
  230. package/jobs/MoveViewJob.js.map +1 -1
  231. package/jobs/ViewPortJob.d.ts +3 -5
  232. package/jobs/ViewPortJob.js +5 -11
  233. package/jobs/ViewPortJob.js.map +1 -1
  234. package/jobs/ZoomJob.js +14 -14
  235. package/jobs/ZoomJob.js.map +1 -1
  236. package/listener/BarLineChartTouchListener.d.ts +83 -1
  237. package/listener/BarLineChartTouchListener.js +169 -67
  238. package/listener/BarLineChartTouchListener.js.map +1 -1
  239. package/listener/ChartTouchListener.d.ts +39 -5
  240. package/listener/ChartTouchListener.js +38 -11
  241. package/listener/ChartTouchListener.js.map +1 -1
  242. package/listener/PieRadarChartTouchListener.d.ts +81 -1
  243. package/listener/PieRadarChartTouchListener.js +212 -16
  244. package/listener/PieRadarChartTouchListener.js.map +1 -1
  245. package/model/GradientColor.js.map +1 -1
  246. package/package.json +23 -15
  247. package/renderer/AxisRenderer.d.ts +66 -7
  248. package/renderer/AxisRenderer.js +69 -21
  249. package/renderer/AxisRenderer.js.map +1 -1
  250. package/renderer/BarChartRenderer.d.ts +11 -0
  251. package/renderer/BarChartRenderer.js +99 -71
  252. package/renderer/BarChartRenderer.js.map +1 -1
  253. package/renderer/BarLineScatterCandleBubbleRenderer.d.ts +37 -0
  254. package/renderer/BarLineScatterCandleBubbleRenderer.js +36 -8
  255. package/renderer/BarLineScatterCandleBubbleRenderer.js.map +1 -1
  256. package/renderer/BubbleChartRenderer.d.ts +6 -2
  257. package/renderer/BubbleChartRenderer.js +51 -40
  258. package/renderer/BubbleChartRenderer.js.map +1 -1
  259. package/renderer/CandleStickChartRenderer.d.ts +1 -1
  260. package/renderer/CandleStickChartRenderer.js +64 -50
  261. package/renderer/CandleStickChartRenderer.js.map +1 -1
  262. package/renderer/CombinedChartRenderer.d.ts +20 -1
  263. package/renderer/CombinedChartRenderer.js +72 -42
  264. package/renderer/CombinedChartRenderer.js.map +1 -1
  265. package/renderer/DataRenderer.d.ts +78 -4
  266. package/renderer/DataRenderer.js +65 -6
  267. package/renderer/DataRenderer.js.map +1 -1
  268. package/renderer/HorizontalBarChartRenderer.d.ts +5 -2
  269. package/renderer/HorizontalBarChartRenderer.js +87 -66
  270. package/renderer/HorizontalBarChartRenderer.js.map +1 -1
  271. package/renderer/LegendRenderer.d.ts +32 -0
  272. package/renderer/LegendRenderer.js +98 -59
  273. package/renderer/LegendRenderer.js.map +1 -1
  274. package/renderer/LineChartRenderer.d.ts +38 -1
  275. package/renderer/LineChartRenderer.js +185 -110
  276. package/renderer/LineChartRenderer.js.map +1 -1
  277. package/renderer/LineRadarRenderer.d.ts +19 -0
  278. package/renderer/LineRadarRenderer.js +25 -1
  279. package/renderer/LineRadarRenderer.js.map +1 -1
  280. package/renderer/LineScatterCandleRadarRenderer.d.ts +11 -0
  281. package/renderer/LineScatterCandleRadarRenderer.js +26 -9
  282. package/renderer/LineScatterCandleRadarRenderer.js.map +1 -1
  283. package/renderer/PieChartRenderer.d.ts +45 -1
  284. package/renderer/PieChartRenderer.js +195 -122
  285. package/renderer/PieChartRenderer.js.map +1 -1
  286. package/renderer/RadarChartRenderer.d.ts +10 -0
  287. package/renderer/RadarChartRenderer.js +119 -77
  288. package/renderer/RadarChartRenderer.js.map +1 -1
  289. package/renderer/Renderer.d.ts +8 -0
  290. package/renderer/Renderer.js +5 -0
  291. package/renderer/Renderer.js.map +1 -1
  292. package/renderer/ScatterChartRenderer.d.ts +5 -5
  293. package/renderer/ScatterChartRenderer.js +51 -37
  294. package/renderer/ScatterChartRenderer.js.map +1 -1
  295. package/renderer/XAxisRenderer.d.ts +29 -4
  296. package/renderer/XAxisRenderer.js +128 -95
  297. package/renderer/XAxisRenderer.js.map +1 -1
  298. package/renderer/XAxisRendererHorizontalBarChart.d.ts +11 -0
  299. package/renderer/XAxisRendererHorizontalBarChart.js +75 -57
  300. package/renderer/XAxisRendererHorizontalBarChart.js.map +1 -1
  301. package/renderer/XAxisRendererRadarChart.d.ts +5 -0
  302. package/renderer/XAxisRendererRadarChart.js +26 -13
  303. package/renderer/XAxisRendererRadarChart.js.map +1 -1
  304. package/renderer/YAxisRenderer.d.ts +42 -5
  305. package/renderer/YAxisRenderer.js +126 -69
  306. package/renderer/YAxisRenderer.js.map +1 -1
  307. package/renderer/YAxisRendererHorizontalBarChart.d.ts +22 -1
  308. package/renderer/YAxisRendererHorizontalBarChart.js +80 -58
  309. package/renderer/YAxisRendererHorizontalBarChart.js.map +1 -1
  310. package/renderer/YAxisRendererRadarChart.js +62 -32
  311. package/renderer/YAxisRendererRadarChart.js.map +1 -1
  312. package/renderer/scatter/ChevronDownShapeRenderer.d.ts +4 -0
  313. package/renderer/scatter/ChevronDownShapeRenderer.js +5 -1
  314. package/renderer/scatter/ChevronDownShapeRenderer.js.map +1 -1
  315. package/renderer/scatter/ChevronUpShapeRenderer.d.ts +4 -0
  316. package/renderer/scatter/ChevronUpShapeRenderer.js +5 -1
  317. package/renderer/scatter/ChevronUpShapeRenderer.js.map +1 -1
  318. package/renderer/scatter/CircleShapeRenderer.d.ts +4 -0
  319. package/renderer/scatter/CircleShapeRenderer.js +8 -5
  320. package/renderer/scatter/CircleShapeRenderer.js.map +1 -1
  321. package/renderer/scatter/CrossShapeRenderer.d.ts +4 -0
  322. package/renderer/scatter/CrossShapeRenderer.js +5 -1
  323. package/renderer/scatter/CrossShapeRenderer.js.map +1 -1
  324. package/renderer/scatter/IShapeRenderer.d.ts +14 -0
  325. package/renderer/scatter/IShapeRenderer.js.map +1 -1
  326. package/renderer/scatter/SquareShapeRenderer.d.ts +4 -0
  327. package/renderer/scatter/SquareShapeRenderer.js +8 -5
  328. package/renderer/scatter/SquareShapeRenderer.js.map +1 -1
  329. package/renderer/scatter/TriangleShapeRenderer.d.ts +4 -0
  330. package/renderer/scatter/TriangleShapeRenderer.js +9 -5
  331. package/renderer/scatter/TriangleShapeRenderer.js.map +1 -1
  332. package/renderer/scatter/XShapeRenderer.d.ts +4 -0
  333. package/renderer/scatter/XShapeRenderer.js +5 -1
  334. package/renderer/scatter/XShapeRenderer.js.map +1 -1
  335. package/utils/ColorTemplate.d.ts +21 -1
  336. package/utils/ColorTemplate.js +21 -3
  337. package/utils/ColorTemplate.js.map +1 -1
  338. package/utils/HorizontalViewPortHandler.d.ts +3 -0
  339. package/utils/HorizontalViewPortHandler.js +3 -0
  340. package/utils/HorizontalViewPortHandler.js.map +1 -1
  341. package/utils/MPSize.d.ts +7 -0
  342. package/utils/ObjectPool.d.ts +56 -0
  343. package/utils/ObjectPool.js +66 -8
  344. package/utils/ObjectPool.js.map +1 -1
  345. package/utils/Transformer.d.ts +118 -0
  346. package/utils/Transformer.js +141 -7
  347. package/utils/Transformer.js.map +1 -1
  348. package/utils/TransformerHorizontalBarChart.d.ts +10 -0
  349. package/utils/TransformerHorizontalBarChart.js +18 -2
  350. package/utils/TransformerHorizontalBarChart.js.map +1 -1
  351. package/utils/Utils.d.ts +139 -17
  352. package/utils/Utils.js +185 -60
  353. package/utils/Utils.js.map +1 -1
  354. package/utils/ViewPortHandler.d.ts +234 -19
  355. package/utils/ViewPortHandler.js +306 -63
  356. package/utils/ViewPortHandler.js.map +1 -1
  357. package/utils/colors/colorful.js.map +1 -1
  358. package/utils/colors/joyful.js.map +1 -1
  359. package/utils/colors/liberty.js.map +1 -1
  360. package/utils/colors/material.js.map +1 -1
  361. package/utils/colors/pastel.js.map +1 -1
  362. package/utils/colors/vordiplom.js.map +1 -1
  363. package/animation/ChartAnimator2.d.ts +0 -18
  364. package/animation/ChartAnimator2.js +0 -69
  365. package/animation/ChartAnimator2.js.map +0 -1
  366. package/charts/index.d.ts +0 -11
  367. package/charts/index.js +0 -15
  368. package/charts/index.js.map +0 -1
  369. package/utils/Curve.d.ts +0 -12
  370. package/utils/Curve.js +0 -156
  371. package/utils/Curve.js.map +0 -1
  372. package/utils/MPPointD.js +0 -1
  373. package/utils/MPPointD.js.map +0 -1
  374. package/utils/MPPointF.js +0 -1
  375. package/utils/MPPointF.js.map +0 -1
@@ -1,25 +1,60 @@
1
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
+ */
2
7
  export declare abstract class ComponentBase {
3
- protected mEnabled: boolean;
4
- protected mXOffset: number;
5
- protected mYOffset: number;
6
- protected mTypeface: Font;
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
+ */
7
27
  protected mTextSize: number;
8
- protected mTextColor: string;
28
+ /**
29
+ * the text color to use for the labels
30
+ */
31
+ textColor: string;
9
32
  ComponentBase(): void;
10
- getXOffset(): number;
11
- setXOffset(xOffset: number): void;
12
- getYOffset(): number;
13
- setYOffset(yOffset: any): void;
14
- getTypeface(): Font;
15
- setTypeface(tf: Font): void;
16
- getFont(): Font;
17
- setFont(tf: Font): void;
18
- setTextSize(size: any): void;
19
- getTextSize(): number;
20
- setTextColor(color: any): void;
21
- getTextColor(): string;
22
- setEnabled(enabled: any): void;
23
- isEnabled(): boolean;
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
+ */
24
59
  ensureVisible: boolean;
25
60
  }
@@ -1,65 +1,77 @@
1
1
  import { Font } from '@nativescript/core/ui/styling/font';
2
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
+ */
3
8
  export class ComponentBase {
4
9
  constructor() {
5
- this.mEnabled = true;
6
- this.mXOffset = 5;
7
- this.mYOffset = 5;
8
- this.mTypeface = DEFAULT_FONT;
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
+ */
9
29
  this.mTextSize = 10;
10
- this.mTextColor = 'black';
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
+ */
11
37
  this.ensureVisible = false;
12
38
  }
13
39
  ComponentBase() { }
14
- getXOffset() {
15
- return this.mXOffset;
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;
16
47
  }
17
- setXOffset(xOffset) {
18
- this.mXOffset = xOffset;
19
- }
20
- getYOffset() {
21
- return this.mYOffset;
22
- }
23
- setYOffset(yOffset) {
24
- this.mYOffset = yOffset;
25
- }
26
- getTypeface() {
27
- return this.getFont();
28
- }
29
- setTypeface(tf) {
30
- this.setFont(tf);
31
- }
32
- getFont() {
33
- return this.mTypeface;
34
- }
35
- setFont(tf) {
36
- if (!tf.fontSize) {
37
- tf = tf.withFontSize(this.mTextSize);
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);
38
56
  }
39
- this.mTypeface = tf;
57
+ this.typeface = tf;
40
58
  }
41
- setTextSize(size) {
42
- if (size > 24)
43
- size = 24;
44
- if (size < 6)
45
- size = 6;
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) {
46
66
  this.mTextSize = size;
47
- this.mTypeface = this.mTypeface.withFontSize(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);
48
69
  }
49
- getTextSize() {
70
+ /**
71
+ * returns the text size that is currently set for the labels, in pixels
72
+ */
73
+ get textSize() {
50
74
  return this.mTextSize;
51
75
  }
52
- setTextColor(color) {
53
- this.mTextColor = color;
54
- }
55
- getTextColor() {
56
- return this.mTextColor;
57
- }
58
- setEnabled(enabled) {
59
- this.mEnabled = enabled;
60
- }
61
- isEnabled() {
62
- return this.mEnabled;
63
- }
64
76
  }
65
77
  //# sourceMappingURL=ComponentBase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComponentBase.js","sourceRoot":"../src/","sources":["components/ComponentBase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAMnD,MAAM,OAAgB,aAAa;IAAnC;QAIc,aAAQ,GAAY,IAAI,CAAC;QAKzB,aAAQ,GAAW,CAAC,CAAC;QAKrB,aAAQ,GAAW,CAAC,CAAC;QAKrB,cAAS,GAAS,YAAY,CAAC;QAK/B,cAAS,GAAW,EAAE,CAAC;QAKvB,eAAU,GAAW,OAAO,CAAC;QAuJhC,kBAAa,GAAG,KAAK,CAAC;IACjC,CAAC;IAtJU,aAAa,KAAI,CAAC;IAQlB,UAAU;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAOM,UAAU,CAAC,OAAe;QAC7B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5B,CAAC;IAQM,UAAU;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IASM,UAAU,CAAC,OAAO;QACrB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5B,CAAC;IAQM,WAAW;QACd,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAQM,WAAW,CAAC,EAAQ;QACvB,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACrB,CAAC;IAOM,OAAO;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAOM,OAAO,CAAC,EAAQ;QACnB,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE;YACd,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACxC;QACD,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACxB,CAAC;IAQM,WAAW,CAAC,IAAI;QACnB,IAAI,IAAI,GAAG,EAAE;YAAE,IAAI,GAAG,EAAE,CAAC;QACzB,IAAI,IAAI,GAAG,CAAC;YAAE,IAAI,GAAG,CAAC,CAAC;QAEvB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QAEtB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC;IAOM,WAAW;QACd,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAQM,YAAY,CAAC,KAAK;QACrB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;IAOM,YAAY;QACf,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IASM,UAAU,CAAC,OAAO;QACrB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5B,CAAC;IAOM,SAAS;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;CAMJ"}
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,13 +1,22 @@
1
1
  import { ComponentBase } from './ComponentBase';
2
+ /**
3
+ * Created by Philipp Jahoda on 17/09/16.
4
+ */
2
5
  export declare class Description extends ComponentBase {
3
- private text;
4
- private mPosition;
5
- private mTextAlign;
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;
6
21
  constructor();
7
- setText(text: any): void;
8
- getText(): string;
9
- setPosition(x: any, y: any): void;
10
- getPosition(): any;
11
- setTextAlign(align: any): void;
12
- getTextAlign(): globalAndroid.graphics.Paint.Align;
13
22
  }
@@ -1,35 +1,21 @@
1
1
  import { ComponentBase } from './ComponentBase';
2
2
  import { Align } from '@nativescript-community/ui-canvas';
3
+ /**
4
+ * Created by Philipp Jahoda on 17/09/16.
5
+ */
3
6
  export class Description extends ComponentBase {
4
7
  constructor() {
5
8
  super();
9
+ /**
10
+ * the text used in the description
11
+ */
6
12
  this.text = 'Description Label';
7
- this.mTextAlign = Align.RIGHT;
8
- this.mTextSize = 8;
9
- }
10
- setText(text) {
11
- this.text = text;
12
- }
13
- getText() {
14
- return this.text;
15
- }
16
- setPosition(x, y) {
17
- if (this.mPosition == null) {
18
- this.mPosition = { x, y };
19
- }
20
- else {
21
- this.mPosition.x = x;
22
- this.mPosition.y = y;
23
- }
24
- }
25
- getPosition() {
26
- return this.mPosition;
27
- }
28
- setTextAlign(align) {
29
- this.mTextAlign = align;
30
- }
31
- getTextAlign() {
32
- return this.mTextAlign;
13
+ /**
14
+ * the alignment of the description text
15
+ */
16
+ this.textAlign = Align.RIGHT;
17
+ // default size
18
+ this.textSize = 8;
33
19
  }
34
20
  }
35
21
  //# sourceMappingURL=Description.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Description.js","sourceRoot":"../src/","sources":["components/Description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAM1D,MAAM,OAAO,WAAY,SAAQ,aAAa;IAgB1C;QACI,KAAK,EAAE,CAAC;QAbJ,SAAI,GAAG,mBAAmB,CAAC;QAU3B,eAAU,GAAG,KAAK,CAAC,KAAK,CAAC;QAM7B,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACvB,CAAC;IAQM,OAAO,CAAC,IAAI;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAOM,OAAO;QACV,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAQM,WAAW,CAAC,CAAC,EAAE,CAAC;QACnB,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YACxB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;SAC7B;aAAM;YACH,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC;YACrB,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC;SACxB;IACL,CAAC;IAOM,WAAW;QACd,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAOM,YAAY,CAAC,KAAK;QACrB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC5B,CAAC;IAOM,YAAY;QACf,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CACJ"}
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"}
@@ -3,8 +3,37 @@ import { Entry } from '../data/Entry';
3
3
  import { MPPointF } from '../utils/MPPointF';
4
4
  import { Canvas } from '@nativescript-community/ui-canvas';
5
5
  export interface IMarker {
6
- getOffset(): MPPointF;
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
+ */
7
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
+ */
8
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
+ */
9
38
  draw(canvas: Canvas, posX: any, posY: any): any;
10
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IMarker.js","sourceRoot":"../src/","sources":["components/IMarker.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"IMarker.js","sourceRoot":"","sources":["../../../src/ui-chart/components/IMarker.ts"],"names":[],"mappings":""}
@@ -2,11 +2,29 @@ import { ComponentBase } from './ComponentBase';
2
2
  import { LegendEntry } from './LegendEntry';
3
3
  import { DashPathEffect, Paint } from '@nativescript-community/ui-canvas';
4
4
  export declare enum LegendForm {
5
+ /**
6
+ * Avoid drawing a form
7
+ */
5
8
  NONE = 0,
9
+ /**
10
+ * Do not draw the a form, but leave space for it
11
+ */
6
12
  EMPTY = 1,
13
+ /**
14
+ * Use default (default dataset's form to the legend's form)
15
+ */
7
16
  DEFAULT = 2,
17
+ /**
18
+ * Draw a square
19
+ */
8
20
  SQUARE = 3,
21
+ /**
22
+ * Draw a circle
23
+ */
9
24
  CIRCLE = 4,
25
+ /**
26
+ * Draw a horizontal line
27
+ */
10
28
  LINE = 5
11
29
  }
12
30
  export declare enum LegendHorizontalAlignment {
@@ -27,75 +45,154 @@ export declare enum LegendDirection {
27
45
  LEFT_TO_RIGHT = 0,
28
46
  RIGHT_TO_LEFT = 1
29
47
  }
48
+ /**
49
+ * Class representing the legend of the chart. The legend will contain one entry
50
+ * per color and DataSet. Multiple colors in one DataSet are grouped together.
51
+ * The legend object is NOT available before setting data to the chart.
52
+ *
53
+
54
+ */
30
55
  export declare class Legend extends ComponentBase {
31
- private mEntries;
32
- private mExtraEntries;
33
- private mIsLegendCustom;
34
- private mHorizontalAlignment;
35
- private mVerticalAlignment;
36
- private mOrientation;
37
- private mDrawInside;
38
- private mDirection;
39
- private mShape;
40
- private mFormSize;
41
- private mFormLineWidth;
42
- private mFormLineDashEffect;
43
- private mXEntrySpace;
44
- private mYEntrySpace;
45
- private mFormToTextSpace;
46
- private mStackSpace;
47
- private mMaxSizePercent;
56
+ /**
57
+ * The legend entries array
58
+ */
59
+ entries: LegendEntry[];
60
+ /**
61
+ * Entries that will be appended to the end of the auto calculated entries after calculating the legend.
62
+ * (if the legend has already been calculated, you will need to call notifyDataSetChanged() to let the changes take effect)
63
+ */
64
+ extraEntries: LegendEntry[];
65
+ /**
66
+ * Are the legend labels/colors a custom value or auto calculated? If false,
67
+ * then it's auto, if true, then custom. default false (automatic legend)
68
+ */
69
+ mIsLegendCustom: boolean;
70
+ horizontalAlignment: LegendHorizontalAlignment;
71
+ verticalAlignment: LegendVerticalAlignment;
72
+ orientation: LegendOrientation;
73
+ drawInside: boolean;
74
+ /**
75
+ * the text direction for the legend
76
+ */
77
+ direction: LegendDirection;
78
+ /**
79
+ * the shape/form the legend colors are drawn in
80
+ */
81
+ form: LegendForm;
82
+ /**
83
+ * the size of the legend forms/shapes
84
+ */
85
+ formSize: number;
86
+ /**
87
+ * the size of the legend forms/shapes
88
+ */
89
+ formLineWidth: number;
90
+ /**
91
+ * Line dash path effect used for shapes that consist of lines.
92
+ */
93
+ formLineDashEffect: DashPathEffect;
94
+ /**
95
+ * the space between the legend entries on a horizontal axis, default 6f
96
+ */
97
+ xEntrySpace: number;
98
+ /**
99
+ * the space between the legend entries on a vertical axis, default 5f
100
+ */
101
+ yEntrySpace: number;
102
+ /**
103
+ * the space between the legend entries on a vertical axis, default 2f
104
+ * private float this.mYEntrySpace = 2f; /** the space between the form and the
105
+ * actual label/text
106
+ */
107
+ formToTextSpace: number;
108
+ /**
109
+ * the space that should be left between stacked forms
110
+ */
111
+ stackSpace: number;
112
+ /**
113
+ * The maximum relative size out of the whole chart view. / If the legend is
114
+ * to the right/left of the chart, then this affects the width of the
115
+ * legend. / If the legend is to the top/bottom of the chart, then this
116
+ * affects the height of the legend. / If the legend is the center of the
117
+ * piechart, then this defines the size of the rectangular bounds out of the
118
+ * size of the "hole". / default: 0.95f (95%)
119
+ */
120
+ maxSizePercent: number;
121
+ /**
122
+ * Constructor. Provide entries for the legend.
123
+ *
124
+ * @param entries
125
+ */
48
126
  constructor(entries?: LegendEntry[]);
49
- setEntries(entries: LegendEntry[]): void;
50
- getEntries(): LegendEntry[];
127
+ /**
128
+ * returns the maximum length in pixels across all legend labels + formsize
129
+ * + formtotextspace
130
+ *
131
+ * @param p the paint object used for rendering the text
132
+ * @return
133
+ */
51
134
  getMaximumEntryWidth(p: Paint): number;
135
+ /**
136
+ * returns the maximum height in pixels across all legend labels
137
+ *
138
+ * @param p the paint object used for rendering the text
139
+ * @return
140
+ */
52
141
  getMaximumEntryHeight(p: Paint): number;
53
- getExtraEntries(): LegendEntry[];
54
- setExtraEntries(entries: any): void;
142
+ /**
143
+ * Entries that will be appended to the end of the auto calculated
144
+ * entries after calculating the legend.
145
+ * (if the legend has already been calculated, you will need to call notifyDataSetChanged()
146
+ * to let the changes take effect)
147
+ */
55
148
  setExtra(colors: any, labels: any): void;
149
+ /**
150
+ * Sets a custom legend's entries array.
151
+ * * A null label will start a group.
152
+ * This will disable the feature that automatically calculates the legend
153
+ * entries from the datasets.
154
+ * Call resetCustom() to re-enable automatic calculation (and then
155
+ * notifyDataSetChanged() is needed to auto-calculate the legend again)
156
+ */
56
157
  setCustom(entries: any): void;
158
+ /**
159
+ * Calling this will disable the custom legend entries (set by
160
+ * setCustom(...)). Instead, the entries will again be calculated
161
+ * automatically (after notifyDataSetChanged() is called).
162
+ */
57
163
  resetCustom(): void;
164
+ /**
165
+ * @return true if a custom legend entries has been set default
166
+ * false (automatic legend)
167
+ */
58
168
  isLegendCustom(): boolean;
59
- getHorizontalAlignment(): LegendHorizontalAlignment;
60
- setHorizontalAlignment(value: any): void;
61
- getVerticalAlignment(): LegendVerticalAlignment;
62
- setVerticalAlignment(value: any): void;
63
- getOrientation(): LegendOrientation;
64
- setOrientation(value: any): void;
65
- isDrawInsideEnabled(): boolean;
66
- setDrawInside(value: any): void;
67
- getDirection(): LegendDirection;
68
- setDirection(pos: any): void;
69
- getForm(): LegendForm;
70
- setForm(shape: any): void;
71
- setFormSize(size: any): void;
72
- getFormSize(): number;
73
- setFormLineWidth(size: any): void;
74
- getFormLineWidth(): number;
75
- setFormLineDashEffect(dashPathEffect: any): void;
76
- getFormLineDashEffect(): DashPathEffect;
77
- getXEntrySpace(): number;
78
- setXEntrySpace(space: any): void;
79
- getYEntrySpace(): number;
80
- setYEntrySpace(space: any): void;
81
- getFormToTextSpace(): number;
82
- setFormToTextSpace(space: any): void;
83
- getStackSpace(): number;
84
- setStackSpace(space: any): void;
169
+ /**
170
+ * the total width of the legend (needed width space)
171
+ */
85
172
  mNeededWidth: number;
173
+ /**
174
+ * the total height of the legend (needed height space)
175
+ */
86
176
  mNeededHeight: number;
87
177
  mTextHeightMax: number;
88
178
  mTextWidthMax: number;
89
- private mWordWrapEnabled;
90
- setWordWrapEnabled(enabled: any): void;
91
- isWordWrapEnabled(): boolean;
92
- getMaxSizePercent(): number;
93
- setMaxSizePercent(maxSize: any): void;
94
- private mCalculatedLabelSizes;
95
- private mCalculatedLabelBreakPoints;
96
- private mCalculatedLineSizes;
97
- getCalculatedLabelSizes(): any[];
98
- getCalculatedLabelBreakPoints(): any[];
99
- getCalculatedLineSizes(): any[];
179
+ /**
180
+ * Should the legend word wrap? / this is currently supported only for:
181
+ * BelowChartLeft, BelowChartRight, BelowChartCenter. / note that word
182
+ * wrapping a legend takes a toll on performance. / you may want to set
183
+ * maxSizePercent when word wrapping, to set the point where the text wraps.
184
+ * / default: false
185
+ */
186
+ wordWrapEnabled: boolean;
187
+ calculatedLabelSizes: any[];
188
+ calculatedLabelBreakPoints: any[];
189
+ calculatedLineSizes: any[];
190
+ /**
191
+ * Calculates the dimensions of the Legend. This includes the maximum width
192
+ * and height of a single entry, as well as the total width and height of
193
+ * the Legend.
194
+ *
195
+ * @param labelpaint
196
+ */
100
197
  calculateDimensions(labelpaint: Paint, viewPortHandler: any): void;
101
198
  }