@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,42 +1,76 @@
1
1
  import { CandleEntry } from './CandleEntry';
2
2
  import { ICandleDataSet } from '../interfaces/datasets/ICandleDataSet';
3
3
  import { LineScatterCandleRadarDataSet } from './LineScatterCandleRadarDataSet';
4
+ import { Color } from '@nativescript/core';
4
5
  export declare class CandleDataSet extends LineScatterCandleRadarDataSet<CandleEntry> implements ICandleDataSet {
6
+ /**
7
+ * property to access the "high" value of an entry for this set
8
+ *
9
+ */
5
10
  highProperty: string;
11
+ /**
12
+ * property to access the "low" value of an entry for this set
13
+ *
14
+ */
6
15
  lowProperty: string;
16
+ /**
17
+ * property to access the "close" value of an entry for this set
18
+ *
19
+ */
7
20
  closeProperty: string;
21
+ /**
22
+ * property to access the "open" value of an entry for this set
23
+ *
24
+ */
8
25
  openProperty: string;
9
- private mShadowWidth;
10
- private mShowCandleBar;
11
- private mBarSpace;
12
- private mShadowColorSameAsCandle;
13
- protected mIncreasingPaintStyle: globalAndroid.graphics.Paint.Style;
14
- protected mDecreasingPaintStyle: globalAndroid.graphics.Paint.Style;
15
- protected mNeutralColor: import("@nativescript/core").Color;
16
- protected mIncreasingColor: import("@nativescript/core").Color;
17
- protected mDecreasingColor: import("@nativescript/core").Color;
18
- protected mShadowColor: import("@nativescript/core").Color;
26
+ /**
27
+ * the width of the shadow of the candle
28
+ */
29
+ shadowWidth: number;
30
+ /**
31
+ * should the candle bars show?
32
+ * when false, only "ticks" will show
33
+ * <p/>
34
+ * - default: true
35
+ */
36
+ showCandleBar: boolean;
37
+ /**
38
+ * the space between the candle entries, default 0.1 (10%)
39
+ */
40
+ barSpace: number;
41
+ /**
42
+ * use candle color for the shadow
43
+ */
44
+ shadowColorSameAsCandle: boolean;
45
+ /**
46
+ * palet style when open < close
47
+ * increasing candlesticks are traditionally hollow
48
+ */
49
+ increasingPaintStyle: globalAndroid.graphics.Paint.Style;
50
+ /**
51
+ * palet style when open > close
52
+ * descreasing candlesticks are traditionally filled
53
+ */
54
+ decreasingPaintStyle: globalAndroid.graphics.Paint.Style;
55
+ /**
56
+ * color for open === close
57
+ */
58
+ neutralColor: Color | string;
59
+ /**
60
+ * color for open < close
61
+ */
62
+ increasingColor: Color | string;
63
+ /**
64
+ * color for open > close
65
+ */
66
+ decreasingColor: Color | string;
67
+ /**
68
+ * shadow line color, set -1 for backward compatibility and uses default
69
+ * color
70
+ */
71
+ shadowColor: Color | string;
19
72
  constructor(yVals: any, label: any, xProperty?: any, yProperty?: any, highProperty?: any, lowProperty?: any, openProperty?: any, closeProperty?: any);
73
+ getEntryYValue(e: CandleEntry): number;
20
74
  protected calcMinMaxForEntry(e?: CandleEntry, index?: number): void;
21
75
  protected calcMinMaxY(e: CandleEntry): void;
22
- setBarSpace(space: any): void;
23
- getBarSpace(): number;
24
- setShadowWidth(width: any): void;
25
- getShadowWidth(): number;
26
- setShowCandleBar(showCandleBar: any): void;
27
- getShowCandleBar(): boolean;
28
- setNeutralColor(color: any): void;
29
- getNeutralColor(): import("@nativescript/core").Color;
30
- setIncreasingColor(color: any): void;
31
- getIncreasingColor(): import("@nativescript/core").Color;
32
- setDecreasingColor(color: any): void;
33
- getDecreasingColor(): import("@nativescript/core").Color;
34
- getIncreasingPaintStyle(): globalAndroid.graphics.Paint.Style;
35
- setIncreasingPaintStyle(paintStyle: any): void;
36
- getDecreasingPaintStyle(): globalAndroid.graphics.Paint.Style;
37
- setDecreasingPaintStyle(decreasingPaintStyle: any): void;
38
- getShadowColor(): import("@nativescript/core").Color;
39
- setShadowColor(shadowColor: any): void;
40
- getShadowColorSameAsCandle(): boolean;
41
- setShadowColorSameAsCandle(shadowColorSameAsCandle: any): void;
42
76
  }
@@ -4,20 +4,72 @@ import { ColorTemplate } from '../utils/ColorTemplate';
4
4
  export class CandleDataSet extends LineScatterCandleRadarDataSet {
5
5
  constructor(yVals, label, xProperty, yProperty, highProperty, lowProperty, openProperty, closeProperty) {
6
6
  super(yVals, label, xProperty, yProperty);
7
+ /**
8
+ * property to access the "high" value of an entry for this set
9
+ *
10
+ */
7
11
  this.highProperty = 'high';
12
+ /**
13
+ * property to access the "low" value of an entry for this set
14
+ *
15
+ */
8
16
  this.lowProperty = 'low';
17
+ /**
18
+ * property to access the "close" value of an entry for this set
19
+ *
20
+ */
9
21
  this.closeProperty = 'close';
22
+ /**
23
+ * property to access the "open" value of an entry for this set
24
+ *
25
+ */
10
26
  this.openProperty = 'open';
11
- this.mShadowWidth = 3;
12
- this.mShowCandleBar = true;
13
- this.mBarSpace = 0.1;
14
- this.mShadowColorSameAsCandle = false;
15
- this.mIncreasingPaintStyle = Style.STROKE;
16
- this.mDecreasingPaintStyle = Style.FILL;
17
- this.mNeutralColor = ColorTemplate.COLOR_SKIP;
18
- this.mIncreasingColor = ColorTemplate.COLOR_SKIP;
19
- this.mDecreasingColor = ColorTemplate.COLOR_SKIP;
20
- this.mShadowColor = ColorTemplate.COLOR_SKIP;
27
+ /**
28
+ * the width of the shadow of the candle
29
+ */
30
+ this.shadowWidth = 3;
31
+ /**
32
+ * should the candle bars show?
33
+ * when false, only "ticks" will show
34
+ * <p/>
35
+ * - default: true
36
+ */
37
+ this.showCandleBar = true;
38
+ /**
39
+ * the space between the candle entries, default 0.1 (10%)
40
+ */
41
+ this.barSpace = 0.1;
42
+ /**
43
+ * use candle color for the shadow
44
+ */
45
+ this.shadowColorSameAsCandle = false;
46
+ /**
47
+ * palet style when open < close
48
+ * increasing candlesticks are traditionally hollow
49
+ */
50
+ this.increasingPaintStyle = Style.STROKE;
51
+ /**
52
+ * palet style when open > close
53
+ * descreasing candlesticks are traditionally filled
54
+ */
55
+ this.decreasingPaintStyle = Style.FILL;
56
+ /**
57
+ * color for open === close
58
+ */
59
+ this.neutralColor = ColorTemplate.COLOR_SKIP;
60
+ /**
61
+ * color for open < close
62
+ */
63
+ this.increasingColor = ColorTemplate.COLOR_SKIP;
64
+ /**
65
+ * color for open > close
66
+ */
67
+ this.decreasingColor = ColorTemplate.COLOR_SKIP;
68
+ /**
69
+ * shadow line color, set -1 for backward compatibility and uses default
70
+ * color
71
+ */
72
+ this.shadowColor = ColorTemplate.COLOR_SKIP;
21
73
  if (highProperty) {
22
74
  this.highProperty = highProperty;
23
75
  }
@@ -32,6 +84,11 @@ export class CandleDataSet extends LineScatterCandleRadarDataSet {
32
84
  }
33
85
  this.init();
34
86
  }
87
+ getEntryYValue(e) {
88
+ const lowValue = e[this.lowProperty] || 0;
89
+ const highValue = e[this.highProperty] || 0;
90
+ return (lowValue + highValue) / 2;
91
+ }
35
92
  calcMinMaxForEntry(e, index) {
36
93
  if (!e)
37
94
  return;
@@ -55,69 +112,5 @@ export class CandleDataSet extends LineScatterCandleRadarDataSet {
55
112
  if (low > this.mYMax)
56
113
  this.mYMax = low;
57
114
  }
58
- setBarSpace(space) {
59
- if (space < 0)
60
- space = 0;
61
- if (space > 0.45)
62
- space = 0.45;
63
- this.mBarSpace = space;
64
- }
65
- getBarSpace() {
66
- return this.mBarSpace;
67
- }
68
- setShadowWidth(width) {
69
- this.mShadowWidth = width;
70
- }
71
- getShadowWidth() {
72
- return this.mShadowWidth;
73
- }
74
- setShowCandleBar(showCandleBar) {
75
- this.mShowCandleBar = showCandleBar;
76
- }
77
- getShowCandleBar() {
78
- return this.mShowCandleBar;
79
- }
80
- setNeutralColor(color) {
81
- this.mNeutralColor = color;
82
- }
83
- getNeutralColor() {
84
- return this.mNeutralColor;
85
- }
86
- setIncreasingColor(color) {
87
- this.mIncreasingColor = color;
88
- }
89
- getIncreasingColor() {
90
- return this.mIncreasingColor;
91
- }
92
- setDecreasingColor(color) {
93
- this.mDecreasingColor = color;
94
- }
95
- getDecreasingColor() {
96
- return this.mDecreasingColor;
97
- }
98
- getIncreasingPaintStyle() {
99
- return this.mIncreasingPaintStyle;
100
- }
101
- setIncreasingPaintStyle(paintStyle) {
102
- this.mIncreasingPaintStyle = paintStyle;
103
- }
104
- getDecreasingPaintStyle() {
105
- return this.mDecreasingPaintStyle;
106
- }
107
- setDecreasingPaintStyle(decreasingPaintStyle) {
108
- this.mDecreasingPaintStyle = decreasingPaintStyle;
109
- }
110
- getShadowColor() {
111
- return this.mShadowColor;
112
- }
113
- setShadowColor(shadowColor) {
114
- this.mShadowColor = shadowColor;
115
- }
116
- getShadowColorSameAsCandle() {
117
- return this.mShadowColorSameAsCandle;
118
- }
119
- setShadowColorSameAsCandle(shadowColorSameAsCandle) {
120
- this.mShadowColorSameAsCandle = shadowColorSameAsCandle;
121
- }
122
115
  }
123
116
  //# sourceMappingURL=CandleDataSet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CandleDataSet.js","sourceRoot":"../src/","sources":["data/CandleDataSet.ts"],"names":[],"mappings":"AAEA,OAAO,E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AAI,CAAC,WAAW,CAAC,CAAC;QAChC,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAEzC,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAEzC,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QAEvC,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;IAC3C,CAAC;CAGJ"}
@@ -1,7 +1,11 @@
1
1
  import { Entry } from './Entry';
2
2
  export interface CandleEntry extends Entry {
3
+ /** shadow-high value */
3
4
  high: number;
5
+ /** shadow-low value */
4
6
  low: number;
7
+ /** close value */
5
8
  close: number;
9
+ /** open value */
6
10
  open: number;
7
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CandleEntry.js","sourceRoot":"../src/","sources":["data/CandleEntry.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"CandleEntry.js","sourceRoot":"","sources":["../../../src/ui-chart/data/CandleEntry.ts"],"names":[],"mappings":""}
@@ -4,62 +4,317 @@ import { IValueFormatter } from '../formatter/IValueFormatter';
4
4
  import { Highlight } from '../highlight/Highlight';
5
5
  import { IDataSet } from '../interfaces/datasets/IDataSet';
6
6
  export declare abstract class ChartData<U extends Entry, T extends IDataSet<U>> {
7
+ /**
8
+ * maximum y-value in the value array across all axes
9
+ */
7
10
  mYMax: number;
11
+ /**
12
+ * the minimum y-value in the value array across all axes
13
+ */
8
14
  mYMin: number;
15
+ /**
16
+ * maximum x-value in the value array
17
+ */
9
18
  mXMax: number;
19
+ /**
20
+ * minimum x-value in the value array
21
+ */
10
22
  mXMin: number;
11
23
  mLeftAxisMax: number;
12
24
  mLeftAxisMin: number;
13
25
  mRightAxisMax: number;
14
26
  mRightAxisMin: number;
27
+ /**
28
+ * array that holds all DataSets the ChartData object represents
29
+ */
15
30
  protected mDataSets: T[];
31
+ /**
32
+ * Default constructor.
33
+ */
34
+ /**
35
+ * Constructor taking single or multiple DataSet objects.
36
+ *
37
+ * @param dataSets
38
+ */
16
39
  constructor(dataSets?: T[]);
40
+ /**
41
+ * Call this method to let the ChartData know that the underlying data has
42
+ * changed. Calling this performs all necessary recalculations needed when
43
+ * the contained data has changed.
44
+ */
17
45
  notifyDataChanged(): void;
46
+ /**
47
+ * Calc minimum and maximum y-values over all DataSets.
48
+ * Tell DataSets to recalculate their min and max y-values, this is only needed for autoScaleMinMax.
49
+ *
50
+ * @param fromX the x-value to start the calculation from
51
+ * @param toX the x-value to which the calculation should be performed
52
+ */
18
53
  calcMinMaxYRange(fromX: any, toX: any): void;
54
+ /**
55
+ * Calc minimum and maximum values (both x and y) over all DataSets.
56
+ */
19
57
  calcMinMax(): void;
20
- getDataSetCount(): number;
58
+ /** ONLY GETTERS AND SETTERS BELOW THIS */
59
+ /**
60
+ * returns the number of LineDataSets this object contains
61
+ */
62
+ get dataSetCount(): number;
63
+ /**
64
+ * Returns the minimum y-value for the specified axis.
65
+ *
66
+ * @param axis
67
+ * @return
68
+ */
21
69
  getYMin(axis?: any): number;
70
+ get yMin(): number;
71
+ get yMax(): number;
72
+ /**
73
+ * Returns the maximum y-value for the specified axis.
74
+ *
75
+ * @param axis
76
+ * @return
77
+ */
22
78
  getYMax(axis?: AxisDependency): number;
23
- getXMin(): number;
24
- getXMax(): number;
25
- getDataSets(): T[];
26
- getVisibleDataSets(): T[];
79
+ /**
80
+ * Returns the minimum x-value this data object contains.
81
+ */
82
+ get xMin(): number;
83
+ /**
84
+ * Returns the maximum x-value this data object contains.
85
+ */
86
+ get xMax(): number;
87
+ /**
88
+ * Returns all DataSet objects this ChartData object holds.
89
+ */
90
+ get dataSets(): T[];
91
+ get visibleDataSets(): T[];
92
+ /**
93
+ * Retrieve the index of a DataSet with a specific label from the ChartData.
94
+ * Search can be case sensitive or not. IMPORTANT: This method does
95
+ * calculations at runtime, do not over-use in performance critical
96
+ * situations.
97
+ *
98
+ * @param dataSets the DataSet array to search
99
+ * @param label
100
+ * @param ignorecase if true, the search is not case-sensitive
101
+ * @return
102
+ */
27
103
  protected getDataSetIndexByLabel(dataSets: T[], label: string, ignorecase: any): number;
104
+ /**
105
+ * Returns the labels of all DataSets as a string array.
106
+ */
28
107
  getDataSetLabels(): any[];
108
+ /**
109
+ * Get the Entry for a corresponding highlight object
110
+ *
111
+ * @param highlight
112
+ * @return the entry that is highlighted
113
+ */
29
114
  getEntryForHighlight(highlight: Highlight): Entry;
115
+ /**
116
+ * Get the Entry for a corresponding highlight object
117
+ *
118
+ * @param highlight
119
+ * @return the entry that is highlighted
120
+ */
30
121
  getEntryAndIndexForHighlight(highlight: Highlight): {
31
122
  entry: Entry;
32
123
  index: number;
33
124
  };
125
+ /**
126
+ * Returns the DataSet object with the given label. Search can be case
127
+ * sensitive or not. IMPORTANT: This method does calculations at runtime.
128
+ * Use with care in performance critical situations.
129
+ *
130
+ * @param label
131
+ * @param ignorecase
132
+ * @return
133
+ */
34
134
  getDataSetByLabel(label: any, ignorecase: any): T;
35
135
  getDataSetByIndex(index: number): T;
136
+ /**
137
+ * Adds a DataSet dynamically.
138
+ *
139
+ * @param d
140
+ */
36
141
  addDataSet(d: T): void;
142
+ /**
143
+ * Removes the given DataSet from this data object. Also recalculates all
144
+ * minimum and maximum values. Returns true if a DataSet was removed, false
145
+ * if no DataSet could be removed.
146
+ *
147
+ * @param d
148
+ */
37
149
  removeDataSet(d: T): boolean;
150
+ /**
151
+ * Removes the DataSet at the given index in the DataSet array from the data
152
+ * object. Also recalculates all minimum and maximum values. Returns true if
153
+ * a DataSet was removed, false if no DataSet could be removed.
154
+ *
155
+ * @param index
156
+ */
38
157
  removeDataSetAtIndex(index: any): boolean;
158
+ /**
159
+ * Adds an Entry to the DataSet at the specified index.
160
+ * Entries are added to the end of the list.
161
+ *
162
+ * @param e
163
+ * @param dataSetIndex
164
+ */
39
165
  addEntry(e: any, dataSetIndex: any): void;
166
+ /**
167
+ * Adjusts the current minimum and maximum values based on the provided Entry object.
168
+ *
169
+ * @param e
170
+ * @param axis
171
+ */
40
172
  protected calcMinMaxForEntry(set: IDataSet<Entry>, e: Entry, entryIndex: number, axis: AxisDependency): void;
173
+ /**
174
+ * Adjusts the minimum and maximum values based on the given DataSet.
175
+ *
176
+ * @param d
177
+ */
41
178
  protected calcMinMaxForDataSet(d: T): void;
179
+ /**
180
+ * Removes the given Entry object from the DataSet at the specified index.
181
+ *
182
+ * @param e
183
+ * @param dataSetIndex
184
+ */
42
185
  removeEntry(e: any, dataSetIndex: any): boolean;
186
+ /**
187
+ * Removes the Entry object closest to the given DataSet at the
188
+ * specified index. Returns true if an Entry was removed, false if no Entry
189
+ * was found that meets the specified requirements.
190
+ *
191
+ * @param xValue
192
+ * @param dataSetIndex
193
+ * @return
194
+ */
43
195
  removeEntryForXValue(xValue: any, dataSetIndex: any): boolean;
196
+ /**
197
+ * Removes the Entry object closest to the given DataSet at the
198
+ * specified index. Returns true if an Entry was removed, false if no Entry
199
+ * was found that meets the specified requirements.
200
+ *
201
+ * @param xValue
202
+ * @param dataSetIndex
203
+ * @return
204
+ */
205
+ removeEntryAtIndex(index: any, dataSetIndex: any): boolean;
206
+ /**
207
+ * Returns the DataSet that contains the provided Entry, or null, if no
208
+ * DataSet contains this Entry.
209
+ *
210
+ * @param e
211
+ * @return
212
+ */
44
213
  getDataSetForEntry(e: Entry): T;
214
+ /**
215
+ * Returns the DataSet that contains the provided Entry and the entry index, or null, if no
216
+ * DataSet contains this Entry.
217
+ *
218
+ * @param e
219
+ * @return
220
+ */
45
221
  getDataSetAndIndexForEntry(e: Entry): {
46
222
  set: T;
47
223
  index: number;
48
224
  };
49
- getColors(): any[];
50
- getIndexOfDataSet(dataSet: any): number;
51
- protected getFirstLeft(sets: any): any;
52
- getFirstRight(sets: any): any;
53
- setValueFormatter(f: IValueFormatter): void;
54
- setValueTextColor(color: any): void;
55
- setValueTextColors(colors: any): void;
56
- setValueTypeface(tf: any): void;
57
- setValueTextSize(size: any): void;
58
- setDrawValues(enabled: any): void;
225
+ /**
226
+ * Returns all colors used across all DataSet objects this object
227
+ * represents.
228
+ */
229
+ get colors(): any[];
230
+ /**
231
+ * Returns the index of the provided DataSet in the DataSet array of this data object, or -1 if it does not exist.
232
+ *
233
+ * @param dataSet
234
+ * @return
235
+ */
236
+ getIndexOfDataSet(dataSet: T): number;
237
+ /**
238
+ * Returns the first DataSet from the datasets-array that has it's dependency on the left axis.
239
+ * Returns null if no DataSet with left dependency could be found.
240
+ */
241
+ protected getFirstLeft(sets: T[]): T;
242
+ /**
243
+ * Returns the first DataSet from the datasets-array that has it's dependency on the right axis.
244
+ * Returns null if no DataSet with right dependency could be found.
245
+ */
246
+ getFirstRight(sets: T[]): T;
247
+ /**
248
+ * Sets a custom IValueFormatter for all DataSets this data object contains.
249
+ *
250
+ * @param f
251
+ */
252
+ set valueFormatter(f: IValueFormatter);
253
+ /**
254
+ * Sets the color of the value-text (color in which the value-labels are
255
+ * drawn) for all DataSets this data object contains.
256
+ *
257
+ * @param color
258
+ */
259
+ set valueTextColor(color: any);
260
+ /**
261
+ * Sets the same list of value-colors for all DataSets this
262
+ * data object contains.
263
+ *
264
+ * @param colors
265
+ */
266
+ set valueTextColors(colors: any);
267
+ /**
268
+ * Sets the Typeface for all value-labels for all DataSets this data object
269
+ * contains.
270
+ *
271
+ * @param tf
272
+ */
273
+ set valueTypeface(tf: any);
274
+ /**
275
+ * Sets the size (in dp) of the value-text for all DataSets this data object
276
+ * contains.
277
+ *
278
+ * @param size
279
+ */
280
+ set valueTextSize(size: any);
281
+ /**
282
+ * Enables / disables drawing values (value-text) for all DataSets this data
283
+ * object contains.
284
+ *
285
+ * @param enabled
286
+ */
287
+ set drawValuesEnabled(enabled: any);
288
+ /**
289
+ * Enables / disables highlighting values for all DataSets this data object
290
+ * contains. If set to true, this means that values can
291
+ * be highlighted programmatically or by touch gesture.
292
+ */
59
293
  setHighlightEnabled(enabled: any): void;
60
- isHighlightEnabled(): boolean;
294
+ /**
295
+ * Returns true if highlighting of all underlying values is enabled, false
296
+ * if not.
297
+ */
298
+ get highlightEnabled(): boolean;
299
+ /**
300
+ * Clears this data object from all DataSets and removes all Entries. Don't
301
+ * forget to invalidate the chart after this.
302
+ */
61
303
  clearValues(): void;
304
+ /**
305
+ * Checks if this data object contains the specified DataSet. Returns true
306
+ * if so, false if not.
307
+ *
308
+ * @param dataSet
309
+ * @return
310
+ */
62
311
  contains(dataSet: any): boolean;
63
- getEntryCount(): number;
64
- getMaxEntryCountSet(): T;
312
+ /**
313
+ * Returns the total entry count across all DataSet objects this data object contains.
314
+ */
315
+ get entryCount(): number;
316
+ /**
317
+ * Returns the DataSet object with the maximum number of entries or null if there are no DataSets.
318
+ */
319
+ get maxEntryCountSet(): T;
65
320
  }