@nativescript-community/ui-chart 2.0.7 → 2.0.10

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 (404) hide show
  1. package/animation/ChartAnimator.d.ts +61 -0
  2. package/animation/ChartAnimator.js +95 -0
  3. package/animation/ChartAnimator.js.map +1 -0
  4. package/animation/Tween.d.ts +4 -0
  5. package/animation/Tween.js +25 -0
  6. package/animation/Tween.js.map +1 -0
  7. package/buffer/AbstractBuffer.d.ts +40 -0
  8. package/buffer/AbstractBuffer.js +49 -0
  9. package/buffer/AbstractBuffer.js.map +1 -0
  10. package/buffer/BarBuffer.d.ts +15 -0
  11. package/buffer/BarBuffer.js +109 -0
  12. package/buffer/BarBuffer.js.map +1 -0
  13. package/buffer/HorizontalBarBuffer.d.ts +6 -0
  14. package/buffer/HorizontalBarBuffer.js +81 -0
  15. package/buffer/HorizontalBarBuffer.js.map +1 -0
  16. package/charts/BarChart.d.ts +96 -0
  17. package/charts/BarChart.js +143 -0
  18. package/charts/BarChart.js.map +1 -0
  19. package/charts/BarLineChartBase.d.ts +583 -0
  20. package/charts/BarLineChartBase.js +1231 -0
  21. package/charts/BarLineChartBase.js.map +1 -0
  22. package/charts/BubbleChart.d.ts +27 -0
  23. package/charts/BubbleChart.js +20 -0
  24. package/charts/BubbleChart.js.map +1 -0
  25. package/charts/CandleStickChart.d.ts +29 -0
  26. package/charts/CandleStickChart.js +19 -0
  27. package/charts/CandleStickChart.js.map +1 -0
  28. package/charts/Chart.d.ts +498 -0
  29. package/charts/Chart.js +799 -0
  30. package/charts/Chart.js.map +1 -0
  31. package/charts/CombinedChart.d.ts +78 -0
  32. package/charts/CombinedChart.js +119 -0
  33. package/charts/CombinedChart.js.map +1 -0
  34. package/charts/HorizontalBarChart.d.ts +54 -0
  35. package/charts/HorizontalBarChart.js +180 -0
  36. package/charts/HorizontalBarChart.js.map +1 -0
  37. package/charts/LineChart.d.ts +20 -0
  38. package/charts/LineChart.js +19 -0
  39. package/charts/LineChart.js.map +1 -0
  40. package/charts/PieChart.d.ts +247 -0
  41. package/charts/PieChart.js +453 -0
  42. package/charts/PieChart.js.map +1 -0
  43. package/charts/PieRadarChartBase.d.ts +130 -0
  44. package/charts/PieRadarChartBase.js +360 -0
  45. package/charts/PieRadarChartBase.js.map +1 -0
  46. package/charts/RadarChart.d.ts +101 -0
  47. package/charts/RadarChart.js +172 -0
  48. package/charts/RadarChart.js.map +1 -0
  49. package/charts/ScatterChart.d.ts +36 -0
  50. package/charts/ScatterChart.js +31 -0
  51. package/charts/ScatterChart.js.map +1 -0
  52. package/charts/index.d.ts +9 -0
  53. package/charts/index.js +10 -0
  54. package/charts/index.js.map +1 -0
  55. package/components/AxisBase.d.ts +299 -0
  56. package/components/AxisBase.js +352 -0
  57. package/components/AxisBase.js.map +1 -0
  58. package/components/ComponentBase.d.ts +60 -0
  59. package/components/ComponentBase.js +77 -0
  60. package/components/ComponentBase.js.map +1 -0
  61. package/components/Description.d.ts +22 -0
  62. package/components/Description.js +21 -0
  63. package/components/Description.js.map +1 -0
  64. package/components/IMarker.d.ts +39 -0
  65. package/components/IMarker.js +2 -0
  66. package/components/IMarker.js.map +1 -0
  67. package/components/Legend.d.ts +198 -0
  68. package/components/Legend.js +386 -0
  69. package/components/Legend.js.map +1 -0
  70. package/components/LegendEntry.d.ts +50 -0
  71. package/components/LegendEntry.js +51 -0
  72. package/components/LegendEntry.js.map +1 -0
  73. package/components/LimitLine.d.ts +55 -0
  74. package/components/LimitLine.js +62 -0
  75. package/components/LimitLine.js.map +1 -0
  76. package/components/MarkerImage.d.ts +1 -0
  77. package/components/MarkerImage.js +97 -0
  78. package/components/MarkerImage.js.map +1 -0
  79. package/components/XAxis.d.ts +55 -0
  80. package/components/XAxis.js +59 -0
  81. package/components/XAxis.js.map +1 -0
  82. package/components/YAxis.d.ts +135 -0
  83. package/components/YAxis.js +205 -0
  84. package/components/YAxis.js.map +1 -0
  85. package/data/BarData.d.ts +39 -0
  86. package/data/BarData.js +126 -0
  87. package/data/BarData.js.map +1 -0
  88. package/data/BarDataSet.d.ts +47 -0
  89. package/data/BarDataSet.js +109 -0
  90. package/data/BarDataSet.js.map +1 -0
  91. package/data/BarEntry.d.ts +11 -0
  92. package/data/BarEntry.js +2 -0
  93. package/data/BarEntry.js.map +1 -0
  94. package/data/BarLineScatterCandleBubbleData.d.ts +10 -0
  95. package/data/BarLineScatterCandleBubbleData.js +9 -0
  96. package/data/BarLineScatterCandleBubbleData.js.map +1 -0
  97. package/data/BarLineScatterCandleBubbleDataSet.d.ts +17 -0
  98. package/data/BarLineScatterCandleBubbleDataSet.js +18 -0
  99. package/data/BarLineScatterCandleBubbleDataSet.js.map +1 -0
  100. package/data/BaseDataSet.d.ts +180 -0
  101. package/data/BaseDataSet.js +220 -0
  102. package/data/BaseDataSet.js.map +1 -0
  103. package/data/BaseEntry.d.ts +10 -0
  104. package/data/BaseEntry.js +2 -0
  105. package/data/BaseEntry.js.map +1 -0
  106. package/data/BubbleData.d.ts +12 -0
  107. package/data/BubbleData.js +15 -0
  108. package/data/BubbleData.js.map +1 -0
  109. package/data/BubbleDataSet.d.ts +18 -0
  110. package/data/BubbleDataSet.js +36 -0
  111. package/data/BubbleDataSet.js.map +1 -0
  112. package/data/BubbleEntry.d.ts +5 -0
  113. package/data/BubbleEntry.js +2 -0
  114. package/data/BubbleEntry.js.map +1 -0
  115. package/data/CandleData.d.ts +5 -0
  116. package/data/CandleData.js +4 -0
  117. package/data/CandleData.js.map +1 -0
  118. package/data/CandleDataSet.d.ts +76 -0
  119. package/data/CandleDataSet.js +116 -0
  120. package/data/CandleDataSet.js.map +1 -0
  121. package/data/CandleEntry.d.ts +11 -0
  122. package/data/CandleEntry.js +2 -0
  123. package/data/CandleEntry.js.map +1 -0
  124. package/data/ChartData.d.ts +320 -0
  125. package/data/ChartData.js +702 -0
  126. package/data/ChartData.js.map +1 -0
  127. package/data/CombinedData.d.ts +61 -0
  128. package/data/CombinedData.js +153 -0
  129. package/data/CombinedData.js.map +1 -0
  130. package/data/DataSet.d.ts +98 -0
  131. package/data/DataSet.js +424 -0
  132. package/data/DataSet.js.map +1 -0
  133. package/data/Entry.d.ts +3 -0
  134. package/data/Entry.js +2 -0
  135. package/data/Entry.js.map +1 -0
  136. package/data/LineData.d.ts +10 -0
  137. package/data/LineData.js +9 -0
  138. package/data/LineData.js.map +1 -0
  139. package/data/LineDataSet.d.ts +106 -0
  140. package/data/LineDataSet.js +148 -0
  141. package/data/LineDataSet.js.map +1 -0
  142. package/data/LineRadarDataSet.d.ts +32 -0
  143. package/data/LineRadarDataSet.js +29 -0
  144. package/data/LineRadarDataSet.js.map +1 -0
  145. package/data/LineScatterCandleRadarDataSet.d.ts +36 -0
  146. package/data/LineScatterCandleRadarDataSet.js +44 -0
  147. package/data/LineScatterCandleRadarDataSet.js.map +1 -0
  148. package/data/PieData.d.ts +39 -0
  149. package/data/PieData.js +55 -0
  150. package/data/PieData.js.map +1 -0
  151. package/data/PieDataSet.d.ts +52 -0
  152. package/data/PieDataSet.js +54 -0
  153. package/data/PieDataSet.js.map +1 -0
  154. package/data/PieEntry.d.ts +7 -0
  155. package/data/PieEntry.js +2 -0
  156. package/data/PieEntry.js.map +1 -0
  157. package/data/RadarData.d.ts +17 -0
  158. package/data/RadarData.js +15 -0
  159. package/data/RadarData.js.map +1 -0
  160. package/data/RadarDataSet.d.ts +14 -0
  161. package/data/RadarDataSet.js +20 -0
  162. package/data/RadarDataSet.js.map +1 -0
  163. package/data/RadarEntry.d.ts +3 -0
  164. package/data/RadarEntry.js +2 -0
  165. package/data/RadarEntry.js.map +1 -0
  166. package/data/ScatterData.d.ts +9 -0
  167. package/data/ScatterData.js +17 -0
  168. package/data/ScatterData.js.map +1 -0
  169. package/data/ScatterDataSet.d.ts +40 -0
  170. package/data/ScatterDataSet.js +61 -0
  171. package/data/ScatterDataSet.js.map +1 -0
  172. package/formatter/DefaultAxisValueFormatter.d.ts +23 -0
  173. package/formatter/DefaultAxisValueFormatter.js +30 -0
  174. package/formatter/DefaultAxisValueFormatter.js.map +1 -0
  175. package/formatter/DefaultFillFormatter.d.ts +6 -0
  176. package/formatter/DefaultFillFormatter.js +29 -0
  177. package/formatter/DefaultFillFormatter.js.map +1 -0
  178. package/formatter/DefaultValueFormatter.d.ts +3 -0
  179. package/formatter/DefaultValueFormatter.js +4 -0
  180. package/formatter/DefaultValueFormatter.js.map +1 -0
  181. package/formatter/IAxisValueFormatter.d.ts +23 -0
  182. package/formatter/IAxisValueFormatter.js +2 -0
  183. package/formatter/IAxisValueFormatter.js.map +1 -0
  184. package/formatter/IFillFormatter.d.ts +30 -0
  185. package/formatter/IFillFormatter.js +2 -0
  186. package/formatter/IFillFormatter.js.map +1 -0
  187. package/formatter/IValueFormatter.d.ts +25 -0
  188. package/formatter/IValueFormatter.js +2 -0
  189. package/formatter/IValueFormatter.js.map +1 -0
  190. package/formatter/ValueFormatter.d.ts +81 -0
  191. package/formatter/ValueFormatter.js +90 -0
  192. package/formatter/ValueFormatter.js.map +1 -0
  193. package/highlight/BarHighlighter.d.ts +33 -0
  194. package/highlight/BarHighlighter.js +89 -0
  195. package/highlight/BarHighlighter.js.map +1 -0
  196. package/highlight/ChartHighlighter.d.ts +102 -0
  197. package/highlight/ChartHighlighter.js +220 -0
  198. package/highlight/ChartHighlighter.js.map +1 -0
  199. package/highlight/CombinedHighlighter.d.ts +17 -0
  200. package/highlight/CombinedHighlighter.js +59 -0
  201. package/highlight/CombinedHighlighter.js.map +1 -0
  202. package/highlight/Highlight.d.ts +69 -0
  203. package/highlight/Highlight.js +8 -0
  204. package/highlight/Highlight.js.map +1 -0
  205. package/highlight/HorizontalBarHighlighter.d.ts +10 -0
  206. package/highlight/HorizontalBarHighlighter.js +54 -0
  207. package/highlight/HorizontalBarHighlighter.js.map +1 -0
  208. package/highlight/IHighlighter.d.ts +15 -0
  209. package/highlight/IHighlighter.js +2 -0
  210. package/highlight/IHighlighter.js.map +1 -0
  211. package/highlight/PieHighlighter.d.ts +9 -0
  212. package/highlight/PieHighlighter.js +21 -0
  213. package/highlight/PieHighlighter.js.map +1 -0
  214. package/highlight/PieRadarHighlighter.d.ts +25 -0
  215. package/highlight/PieRadarHighlighter.js +33 -0
  216. package/highlight/PieRadarHighlighter.js.map +1 -0
  217. package/highlight/RadarHighlighter.d.ts +20 -0
  218. package/highlight/RadarHighlighter.js +59 -0
  219. package/highlight/RadarHighlighter.js.map +1 -0
  220. package/index.d.ts +11 -0
  221. package/index.js +15 -0
  222. package/index.js.map +1 -0
  223. package/interfaces/dataprovider/BarDataProvider.d.ts +9 -0
  224. package/interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider.d.ts +19 -0
  225. package/interfaces/dataprovider/BubbleDataProvider.d.ts +6 -0
  226. package/interfaces/dataprovider/CandleDataProvider.d.ts +6 -0
  227. package/interfaces/dataprovider/ChartInterface.d.ts +60 -0
  228. package/interfaces/dataprovider/CombinedDataProvider.d.ts +13 -0
  229. package/interfaces/dataprovider/LineDataProvider.d.ts +9 -0
  230. package/interfaces/dataprovider/ScatterDataProvider.d.ts +6 -0
  231. package/interfaces/datasets/IBarDataSet.d.ts +47 -0
  232. package/interfaces/datasets/IBarLineScatterCandleBubbleDataSet.d.ts +12 -0
  233. package/interfaces/datasets/IBubbleDataSet.d.ts +19 -0
  234. package/interfaces/datasets/ICandleDataSet.d.ts +81 -0
  235. package/interfaces/datasets/IDataSet.d.ts +385 -0
  236. package/interfaces/datasets/ILineDataSet.d.ts +67 -0
  237. package/interfaces/datasets/ILineRadarDataSet.d.ts +35 -0
  238. package/interfaces/datasets/ILineScatterCandleRadarDataSet.d.ts +32 -0
  239. package/interfaces/datasets/IPieDataSet.d.ts +49 -0
  240. package/interfaces/datasets/IRadarDataSet.d.ts +21 -0
  241. package/interfaces/datasets/IScatterDataSet.d.ts +37 -0
  242. package/jobs/AnimatedMoveViewJob.d.ts +15 -0
  243. package/jobs/AnimatedMoveViewJob.js +42 -0
  244. package/jobs/AnimatedMoveViewJob.js.map +1 -0
  245. package/jobs/AnimatedViewPortJob.d.ts +31 -0
  246. package/jobs/AnimatedViewPortJob.js +52 -0
  247. package/jobs/AnimatedViewPortJob.js.map +1 -0
  248. package/jobs/AnimatedZoomJob.d.ts +23 -0
  249. package/jobs/AnimatedZoomJob.js +63 -0
  250. package/jobs/AnimatedZoomJob.js.map +1 -0
  251. package/jobs/MoveViewJob.d.ts +14 -0
  252. package/jobs/MoveViewJob.js +36 -0
  253. package/jobs/MoveViewJob.js.map +1 -0
  254. package/jobs/ViewPortJob.d.ts +13 -0
  255. package/jobs/ViewPortJob.js +14 -0
  256. package/jobs/ViewPortJob.js.map +1 -0
  257. package/jobs/ZoomJob.d.ts +15 -0
  258. package/jobs/ZoomJob.js +48 -0
  259. package/jobs/ZoomJob.js.map +1 -0
  260. package/listener/BarLineChartTouchListener.d.ts +187 -0
  261. package/listener/BarLineChartTouchListener.js +544 -0
  262. package/listener/BarLineChartTouchListener.js.map +1 -0
  263. package/listener/ChartTouchListener.d.ts +69 -0
  264. package/listener/ChartTouchListener.js +81 -0
  265. package/listener/ChartTouchListener.js.map +1 -0
  266. package/listener/PieRadarChartTouchListener.d.ts +100 -0
  267. package/listener/PieRadarChartTouchListener.js +282 -0
  268. package/listener/PieRadarChartTouchListener.js.map +1 -0
  269. package/model/GradientColor.d.ts +9 -0
  270. package/model/GradientColor.js +19 -0
  271. package/model/GradientColor.js.map +1 -0
  272. package/package.json +2 -2
  273. package/renderer/AxisRenderer.d.ts +103 -0
  274. package/renderer/AxisRenderer.js +215 -0
  275. package/renderer/AxisRenderer.js.map +1 -0
  276. package/renderer/BarChartRenderer.d.ts +40 -0
  277. package/renderer/BarChartRenderer.js +362 -0
  278. package/renderer/BarChartRenderer.js.map +1 -0
  279. package/renderer/BarLineScatterCandleBubbleRenderer.d.ts +57 -0
  280. package/renderer/BarLineScatterCandleBubbleRenderer.js +63 -0
  281. package/renderer/BarLineScatterCandleBubbleRenderer.js.map +1 -0
  282. package/renderer/BubbleChartRenderer.d.ts +22 -0
  283. package/renderer/BubbleChartRenderer.js +204 -0
  284. package/renderer/BubbleChartRenderer.js.map +1 -0
  285. package/renderer/CandleStickChartRenderer.d.ts +18 -0
  286. package/renderer/CandleStickChartRenderer.js +268 -0
  287. package/renderer/CandleStickChartRenderer.js.map +1 -0
  288. package/renderer/CombinedChartRenderer.d.ts +40 -0
  289. package/renderer/CombinedChartRenderer.js +133 -0
  290. package/renderer/CombinedChartRenderer.js.map +1 -0
  291. package/renderer/DataRenderer.d.ts +103 -0
  292. package/renderer/DataRenderer.js +110 -0
  293. package/renderer/DataRenderer.js.map +1 -0
  294. package/renderer/HorizontalBarChartRenderer.d.ts +20 -0
  295. package/renderer/HorizontalBarChartRenderer.js +303 -0
  296. package/renderer/HorizontalBarChartRenderer.js.map +1 -0
  297. package/renderer/LegendRenderer.d.ts +54 -0
  298. package/renderer/LegendRenderer.js +336 -0
  299. package/renderer/LegendRenderer.js.map +1 -0
  300. package/renderer/LineChartRenderer.d.ts +100 -0
  301. package/renderer/LineChartRenderer.js +745 -0
  302. package/renderer/LineChartRenderer.js.map +1 -0
  303. package/renderer/LineRadarRenderer.d.ts +30 -0
  304. package/renderer/LineRadarRenderer.js +76 -0
  305. package/renderer/LineRadarRenderer.js.map +1 -0
  306. package/renderer/LineScatterCandleRadarRenderer.d.ts +20 -0
  307. package/renderer/LineScatterCandleRadarRenderer.js +45 -0
  308. package/renderer/LineScatterCandleRadarRenderer.js.map +1 -0
  309. package/renderer/PieChartRenderer.d.ts +86 -0
  310. package/renderer/PieChartRenderer.js +714 -0
  311. package/renderer/PieChartRenderer.js.map +1 -0
  312. package/renderer/RadarChartRenderer.d.ts +33 -0
  313. package/renderer/RadarChartRenderer.js +290 -0
  314. package/renderer/RadarChartRenderer.js.map +1 -0
  315. package/renderer/Renderer.d.ts +13 -0
  316. package/renderer/Renderer.js +11 -0
  317. package/renderer/Renderer.js.map +1 -0
  318. package/renderer/ScatterChartRenderer.d.ts +16 -0
  319. package/renderer/ScatterChartRenderer.js +147 -0
  320. package/renderer/ScatterChartRenderer.js.map +1 -0
  321. package/renderer/XAxisRenderer.d.ts +58 -0
  322. package/renderer/XAxisRenderer.js +458 -0
  323. package/renderer/XAxisRenderer.js.map +1 -0
  324. package/renderer/XAxisRendererHorizontalBarChart.d.ts +31 -0
  325. package/renderer/XAxisRendererHorizontalBarChart.js +264 -0
  326. package/renderer/XAxisRendererHorizontalBarChart.js.map +1 -0
  327. package/renderer/XAxisRendererRadarChart.d.ts +17 -0
  328. package/renderer/XAxisRendererRadarChart.js +51 -0
  329. package/renderer/XAxisRendererRadarChart.js.map +1 -0
  330. package/renderer/YAxisRenderer.d.ts +60 -0
  331. package/renderer/YAxisRenderer.js +379 -0
  332. package/renderer/YAxisRenderer.js.map +1 -0
  333. package/renderer/YAxisRendererHorizontalBarChart.d.ts +33 -0
  334. package/renderer/YAxisRendererHorizontalBarChart.js +258 -0
  335. package/renderer/YAxisRendererHorizontalBarChart.js.map +1 -0
  336. package/renderer/YAxisRendererRadarChart.d.ts +14 -0
  337. package/renderer/YAxisRendererRadarChart.js +180 -0
  338. package/renderer/YAxisRendererRadarChart.js.map +1 -0
  339. package/renderer/scatter/ChevronDownShapeRenderer.d.ts +11 -0
  340. package/renderer/scatter/ChevronDownShapeRenderer.js +15 -0
  341. package/renderer/scatter/ChevronDownShapeRenderer.js.map +1 -0
  342. package/renderer/scatter/ChevronUpShapeRenderer.d.ts +11 -0
  343. package/renderer/scatter/ChevronUpShapeRenderer.js +15 -0
  344. package/renderer/scatter/ChevronUpShapeRenderer.js.map +1 -0
  345. package/renderer/scatter/CircleShapeRenderer.d.ts +11 -0
  346. package/renderer/scatter/CircleShapeRenderer.js +31 -0
  347. package/renderer/scatter/CircleShapeRenderer.js.map +1 -0
  348. package/renderer/scatter/CrossShapeRenderer.d.ts +11 -0
  349. package/renderer/scatter/CrossShapeRenderer.js +15 -0
  350. package/renderer/scatter/CrossShapeRenderer.js.map +1 -0
  351. package/renderer/scatter/IShapeRenderer.d.ts +20 -0
  352. package/renderer/scatter/IShapeRenderer.js +2 -0
  353. package/renderer/scatter/IShapeRenderer.js.map +1 -0
  354. package/renderer/scatter/SquareShapeRenderer.d.ts +11 -0
  355. package/renderer/scatter/SquareShapeRenderer.js +31 -0
  356. package/renderer/scatter/SquareShapeRenderer.js.map +1 -0
  357. package/renderer/scatter/TriangleShapeRenderer.d.ts +12 -0
  358. package/renderer/scatter/TriangleShapeRenderer.js +43 -0
  359. package/renderer/scatter/TriangleShapeRenderer.js.map +1 -0
  360. package/renderer/scatter/XShapeRenderer.d.ts +11 -0
  361. package/renderer/scatter/XShapeRenderer.js +15 -0
  362. package/renderer/scatter/XShapeRenderer.js.map +1 -0
  363. package/utils/ColorTemplate.d.ts +34 -0
  364. package/utils/ColorTemplate.js +51 -0
  365. package/utils/ColorTemplate.js.map +1 -0
  366. package/utils/HorizontalViewPortHandler.d.ts +6 -0
  367. package/utils/HorizontalViewPortHandler.js +7 -0
  368. package/utils/HorizontalViewPortHandler.js.map +1 -0
  369. package/utils/MPPointD.d.ts +5 -0
  370. package/utils/MPPointF.d.ts +7 -0
  371. package/utils/MPSize.d.ts +7 -0
  372. package/utils/ObjectPool.d.ts +81 -0
  373. package/utils/ObjectPool.js +183 -0
  374. package/utils/ObjectPool.js.map +1 -0
  375. package/utils/Transformer.d.ts +175 -0
  376. package/utils/Transformer.js +356 -0
  377. package/utils/Transformer.js.map +1 -0
  378. package/utils/TransformerHorizontalBarChart.d.ts +14 -0
  379. package/utils/TransformerHorizontalBarChart.js +30 -0
  380. package/utils/TransformerHorizontalBarChart.js.map +1 -0
  381. package/utils/Utils.d.ts +203 -0
  382. package/utils/Utils.js +653 -0
  383. package/utils/Utils.js.map +1 -0
  384. package/utils/ViewPortHandler.d.ts +299 -0
  385. package/utils/ViewPortHandler.js +585 -0
  386. package/utils/ViewPortHandler.js.map +1 -0
  387. package/utils/colors/colorful.d.ts +1 -0
  388. package/utils/colors/colorful.js +2 -0
  389. package/utils/colors/colorful.js.map +1 -0
  390. package/utils/colors/joyful.d.ts +1 -0
  391. package/utils/colors/joyful.js +2 -0
  392. package/utils/colors/joyful.js.map +1 -0
  393. package/utils/colors/liberty.d.ts +1 -0
  394. package/utils/colors/liberty.js +2 -0
  395. package/utils/colors/liberty.js.map +1 -0
  396. package/utils/colors/material.d.ts +1 -0
  397. package/utils/colors/material.js +2 -0
  398. package/utils/colors/material.js.map +1 -0
  399. package/utils/colors/pastel.d.ts +1 -0
  400. package/utils/colors/pastel.js +2 -0
  401. package/utils/colors/pastel.js.map +1 -0
  402. package/utils/colors/vordiplom.d.ts +1 -0
  403. package/utils/colors/vordiplom.js +2 -0
  404. package/utils/colors/vordiplom.js.map +1 -0
@@ -0,0 +1,352 @@
1
+ import { Align, DashPathEffect } from '@nativescript-community/ui-canvas';
2
+ import { DefaultAxisValueFormatter } from '../formatter/DefaultAxisValueFormatter';
3
+ import { ComponentBase } from './ComponentBase';
4
+ /**
5
+ * Base-class of all axes (previously called labels).
6
+ *
7
+
8
+ */
9
+ export class AxisBase extends ComponentBase {
10
+ /**
11
+ * default constructor
12
+ */
13
+ constructor(chart) {
14
+ super();
15
+ /**
16
+ * the color of the grid lines for this axis (the horizontal lines
17
+ * coming from each label).
18
+ */
19
+ this.gridColor = 'gray';
20
+ /**
21
+ * the width of the grid lines that are drawn away from each axis
22
+ * label.
23
+ */
24
+ this.gridLineWidth = 1;
25
+ /**
26
+ * the color of the border surrounding the chart.
27
+ */
28
+ this.axisLineColor = 'gray';
29
+ /**
30
+ * the width of the border surrounding the chart in dp.
31
+ */
32
+ this.axisLineWidth = 1;
33
+ /**
34
+ * the actual array of entries
35
+ */
36
+ this.mEntries = [];
37
+ this.mLabels = [];
38
+ /**
39
+ * axis label entries only used for centered labels
40
+ */
41
+ this.mCenteredEntries = [];
42
+ /**
43
+ * the number of label entries the axis should have, default 6
44
+ */
45
+ this.labelCount = 6;
46
+ /**
47
+ * the labels text alignment of the axis labels.
48
+ */
49
+ this.labelTextAlign = Align.LEFT;
50
+ /**
51
+ * if true, the set number of y-labels will be forced
52
+ */
53
+ this.forceLabelsEnabled = false;
54
+ /**
55
+ * flag indicating if the grid lines for this axis should be drawn
56
+ */
57
+ this.drawGridLines = true;
58
+ /**
59
+ * flag that indicates if the line alongside the axis is drawn or not
60
+ */
61
+ this.drawAxisLine = true;
62
+ /**
63
+ * flag that indicates of the labels of this axis should be drawn or not
64
+ */
65
+ this.drawLabels = true;
66
+ /**
67
+ * Centers the axis labels instead of drawing them at their original position.
68
+ * This is useful especially for grouped BarChart.
69
+ */
70
+ this.centerAxisLabels = false;
71
+ this.ensureLastLabel = false;
72
+ this.allowLastLabelAboveMax = false;
73
+ /**
74
+ * the path effect of the axis line that makes dashed lines possible
75
+ */
76
+ this.axisLineDashPathEffect = null;
77
+ /**
78
+ * the path effect of the grid lines that makes dashed lines possible
79
+ */
80
+ this.gridDashPathEffect = null;
81
+ /**
82
+ * array of limit lines that can be set for the axis
83
+ */
84
+ this.mLimitLines = [];
85
+ /**
86
+ * flag indicating if the limit lines are drawn
87
+ */
88
+ this.drawLimitLines = true;
89
+ /**
90
+ * When enabled the LimitLines are drawn behind the actual data,
91
+ * otherwise on top. Default: false
92
+ *
93
+ * @param enabled
94
+ */
95
+ this.drawLimitLinesBehindData = false;
96
+ /**
97
+ * When enabled the limitlines will be clipped to contentRect,
98
+ * otherwise they can bleed outside the content rect.
99
+ */
100
+ this.clipLimitLinesToContent = true;
101
+ /**
102
+ * When enabled the labels are drawn behind the actual data,
103
+ * otherwise on top. Default: false
104
+ */
105
+ this.drawLabelsBehindData = false;
106
+ /**
107
+ * When enabled the grid lines are draw on top of the actual data,
108
+ * otherwise behind. Default: true
109
+ */
110
+ this.drawGridLinesBehindData = true;
111
+ /**
112
+ * flag indicating the mark ticks should be drawn
113
+ */
114
+ this.drawMarkTicks = false;
115
+ /**
116
+ * Extra spacing for `axisMinimum` to be added to automatically calculated `axisMinimum`
117
+ */
118
+ this.spaceMin = 0;
119
+ /**
120
+ * Extra spacing for `axisMaximum` to be added to automatically calculated `axisMaximum`
121
+ */
122
+ this.spaceMax = 0;
123
+ /**
124
+ * flag indicating that the axis-min value has been customized
125
+ */
126
+ this.mCustomAxisMin = false;
127
+ /**
128
+ * flag indicating that the axis-max value has been customized
129
+ */
130
+ this.mCustomAxisMax = false;
131
+ /**
132
+ * don't touch this direclty, use setter
133
+ */
134
+ this.mAxisMaximum = 0;
135
+ /**
136
+ * don't touch this directly, use setter
137
+ */
138
+ this.mAxisMinimum = 0;
139
+ /**
140
+ * the total range of values this axis covers
141
+ */
142
+ this.axisRange = 0;
143
+ /**
144
+ * the total range of values this axis covers
145
+ */
146
+ this.ignoreOffsets = false;
147
+ this.chart = chart;
148
+ }
149
+ /**
150
+ * Adds a new LimitLine to this axis.
151
+ *
152
+ * @param l
153
+ */
154
+ addLimitLine(l) {
155
+ this.mLimitLines.push(l);
156
+ }
157
+ /**
158
+ * Removes the specified LimitLine from the axis.
159
+ *
160
+ * @param l
161
+ */
162
+ removeLimitLine(l) {
163
+ const index = this.mLimitLines.indexOf(l);
164
+ if (index >= 0) {
165
+ this.mLimitLines.splice(index, 1);
166
+ }
167
+ }
168
+ /**
169
+ * Removes all LimitLines from the axis.
170
+ */
171
+ removeAllLimitLines() {
172
+ this.mLimitLines = [];
173
+ }
174
+ /**
175
+ * Returns the LimitLines of this axis.
176
+ */
177
+ get limitLines() {
178
+ return this.mLimitLines;
179
+ }
180
+ /**
181
+ * Returns the longest formatted label (in terms of characters), this axis
182
+ * contains.
183
+ */
184
+ get longestLabel() {
185
+ let longest = '';
186
+ const labels = this.mLabels;
187
+ for (let i = 0; i < this.mEntries.length; i++) {
188
+ const text = labels[i];
189
+ if (text && longest.length < text.length) {
190
+ longest = text;
191
+ }
192
+ }
193
+ return longest;
194
+ }
195
+ getFormattedLabel(index) {
196
+ // let label = this.mLabels[index];
197
+ // if (!label) {
198
+ // label = this.mLabels[index] = this.valueFormatter.getAxisLabel()
199
+ // }
200
+ return this.mLabels[index];
201
+ }
202
+ /**
203
+ * Sets the formatter to be used for formatting the axis labels. If no formatter is set, the
204
+ * chart will
205
+ * automatically determine a reasonable formatting (concerning decimals) for all the values
206
+ * that are drawn inside
207
+ * the chart. Use chart.defaultValueFormatter to use the formatter calculated by the chart.
208
+ *
209
+ * @param f
210
+ */
211
+ set valueFormatter(f) {
212
+ if (!f)
213
+ this.mAxisValueFormatter = new DefaultAxisValueFormatter(this.mDecimals);
214
+ else
215
+ this.mAxisValueFormatter = f;
216
+ }
217
+ /**
218
+ * Returns the formatter used for formatting the axis labels.
219
+ */
220
+ get valueFormatter() {
221
+ if (!this.mAxisValueFormatter || (this.mAxisValueFormatter instanceof DefaultAxisValueFormatter && this.mAxisValueFormatter.decimalDigits !== this.mDecimals)) {
222
+ this.mAxisValueFormatter = new DefaultAxisValueFormatter(this.mDecimals);
223
+ }
224
+ return this.mAxisValueFormatter;
225
+ }
226
+ /**
227
+ * Enables the grid line to be drawn in dashed mode, e.g. like this
228
+ * "- - - - - -". THIS ONLY WORKS IF HARDWARE-ACCELERATION IS TURNED OFF.
229
+ * Keep in mind that hardware acceleration boosts performance.
230
+ *
231
+ * @param lineLength the length of the line pieces
232
+ * @param spaceLength the length of space in between the pieces
233
+ * @param phase offset, in degrees (normally, use 0)
234
+ */
235
+ enableGridDashedLine(lineLength, spaceLength, phase) {
236
+ this.gridDashPathEffect = new DashPathEffect([lineLength, spaceLength], phase);
237
+ }
238
+ /**
239
+ * Enables the axis line to be drawn in dashed mode, e.g. like this
240
+ * "- - - - - -". THIS ONLY WORKS IF HARDWARE-ACCELERATION IS TURNED OFF.
241
+ * Keep in mind that hardware acceleration boosts performance.
242
+ *
243
+ * @param lineLength the length of the line pieces
244
+ * @param spaceLength the length of space in between the pieces
245
+ * @param phase offset, in degrees (normally, use 0)
246
+ */
247
+ enableAxisLineDashedLine(lineLength, spaceLength, phase) {
248
+ this.axisLineDashPathEffect = new DashPathEffect([lineLength, spaceLength], phase);
249
+ // this.axisLineDashPathEffect = parseDashEffect(`${lineLength} ${spaceLength} ${phase}`);
250
+ }
251
+ /**
252
+ * ###### BELOW CODE RELATED TO CUSTOM AXIS VALUES ######
253
+ */
254
+ /**
255
+ * By calling this method, any custom maximum value that has been previously set is reseted,
256
+ * and the calculation is
257
+ * done automatically.
258
+ */
259
+ resetAxisMaximum() {
260
+ this.mCustomAxisMax = false;
261
+ }
262
+ /**
263
+ * Returns true if the axis max value has been customized (and is not calculated automatically)
264
+ */
265
+ isAxisMaxCustom() {
266
+ return this.mCustomAxisMax;
267
+ }
268
+ /**
269
+ * By calling this method, any custom minimum value that has been previously set is reseted,
270
+ * and the calculation is
271
+ * done automatically.
272
+ */
273
+ resetAxisMinimum() {
274
+ this.mCustomAxisMin = false;
275
+ }
276
+ /**
277
+ * Returns true if the axis min value has been customized (and is not calculated automatically)
278
+ */
279
+ isAxisMinCustom() {
280
+ return this.mCustomAxisMin;
281
+ }
282
+ /**
283
+ * Set a custom minimum value for this axis. If set, this value will not be calculated
284
+ * automatically depending on
285
+ * the provided data. Use resetAxisMinValue() to undo this. Do not forget to call
286
+ * setStartAtZero(false) if you use
287
+ * this method. Otherwise, the axis-minimum value will still be forced to 0.
288
+ *
289
+ * @param min
290
+ */
291
+ set axisMinimum(min) {
292
+ this.mCustomAxisMin = true;
293
+ this.mAxisMinimum = min;
294
+ this.axisRange = Math.abs(this.mAxisMaximum - min);
295
+ }
296
+ get axisMinimum() {
297
+ return this.mAxisMinimum;
298
+ }
299
+ get axisMaximum() {
300
+ return this.mAxisMaximum;
301
+ }
302
+ /**
303
+ * Set a custom maximum value for this axis. If set, this value will not be calculated
304
+ * automatically depending on
305
+ * the provided data. Use resetAxisMaxValue() to undo this.
306
+ *
307
+ * @param max
308
+ */
309
+ set axisMaximum(max) {
310
+ this.mCustomAxisMax = true;
311
+ this.mAxisMaximum = max;
312
+ this.axisRange = Math.abs(max - this.mAxisMinimum);
313
+ }
314
+ /**
315
+ * Calculates the minimum / maximum and range values of the axis with the given
316
+ * minimum and maximum values from the chart data.
317
+ *
318
+ * @param dataMin the min value according to chart data
319
+ * @param dataMax the max value according to chart data
320
+ */
321
+ calculate(dataMin, dataMax) {
322
+ // if custom, use value as is, else use data value
323
+ let min = this.mCustomAxisMin ? this.mAxisMinimum : dataMin - this.spaceMin;
324
+ let max = this.mCustomAxisMax ? this.mAxisMaximum : dataMax + this.spaceMax;
325
+ if (this.axisSuggestedMinimum !== undefined) {
326
+ min = Math.min(min, this.axisSuggestedMinimum);
327
+ }
328
+ if (this.axisSuggestedMaximum !== undefined) {
329
+ max = Math.max(max, this.axisSuggestedMaximum);
330
+ }
331
+ // temporary range (before calculations)
332
+ let range = Math.abs(max - min);
333
+ // in case all values are equal
334
+ if (range === 0) {
335
+ max = max + 1;
336
+ min = min - 1;
337
+ }
338
+ if (!Number.isFinite(min)) {
339
+ min = 0;
340
+ }
341
+ if (!Number.isFinite(max)) {
342
+ max = 0;
343
+ }
344
+ // recalculate
345
+ range = Math.abs(max - min);
346
+ this.mAxisMinimum = min;
347
+ this.mAxisMaximum = max;
348
+ // actual range
349
+ this.axisRange = range;
350
+ }
351
+ }
352
+ //# sourceMappingURL=AxisBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AxisBase.js","sourceRoot":"","sources":["../../../src/ui-chart/components/AxisBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAGnF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD;;;;GAIG;AACH,MAAM,OAAgB,QAAS,SAAQ,aAAa;IAoNhD;;OAEG;IACH,YAAmB,KAAoC;QACnD,KAAK,EAAE,CAAC;QAlNZ;;;WAGG;QACH,cAAS,GAAG,MAAM,CAAC;QAEnB;;;WAGG;QACH,kBAAa,GAAG,CAAC,CAAC;QAElB;;WAEG;Q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,oBAAoB,KAAK,SAAS,EAAE,CAAC;YAC1C,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;QACnD,CAAC;QACD,wCAAwC;QACxC,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;QAEhC,+BAA+B;QAC/B,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YACd,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;YACd,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;QAClB,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,GAAG,GAAG,CAAC,CAAC;QACZ,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,GAAG,GAAG,CAAC,CAAC;QACZ,CAAC;QACD,cAAc;QACd,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;QAE5B,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC;QACxB,eAAe;QACf,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CACJ"}
@@ -0,0 +1,60 @@
1
+ import { Font } from '@nativescript/core/ui/styling/font';
2
+ /**
3
+ * This class encapsulates everything both Axis, Legend and LimitLines have in common.
4
+ *
5
+
6
+ */
7
+ export declare abstract class ComponentBase {
8
+ /**
9
+ * flag that indicates if this axis / legend is enabled or not
10
+ */
11
+ enabled: boolean;
12
+ /**
13
+ * the offset in pixels this component has on the x-axis
14
+ */
15
+ xOffset: number;
16
+ /**
17
+ * the offset in pixels this component has on the Y-axis
18
+ */
19
+ yOffset: number;
20
+ /**
21
+ * the typeface used for the labels
22
+ */
23
+ typeface: Font;
24
+ /**
25
+ * the text size of the labels
26
+ */
27
+ protected mTextSize: number;
28
+ /**
29
+ * the text color to use for the labels
30
+ */
31
+ textColor: string;
32
+ ComponentBase(): void;
33
+ /**
34
+ * returns the Typeface used for the labels, returns null if none is set
35
+ *
36
+ * @return {@link Font}
37
+ */
38
+ get font(): Font;
39
+ /**
40
+ * sets a specific Typeface for the labels
41
+ *
42
+ * @param tf
43
+ */
44
+ set font(tf: Font);
45
+ /**
46
+ * sets the size of the label text in density pixels min = 6f, max = 24f, default
47
+ * 10
48
+ *
49
+ * @param size the text size, in DP
50
+ */
51
+ set textSize(size: number);
52
+ /**
53
+ * returns the text size that is currently set for the labels, in pixels
54
+ */
55
+ get textSize(): number;
56
+ /**
57
+ * Defines if the renderer should ensure we always see the component fully
58
+ */
59
+ ensureVisible: boolean;
60
+ }
@@ -0,0 +1,77 @@
1
+ import { Font } from '@nativescript/core/ui/styling/font';
2
+ const DEFAULT_FONT = Font.default.withFontSize(10);
3
+ /**
4
+ * This class encapsulates everything both Axis, Legend and LimitLines have in common.
5
+ *
6
+
7
+ */
8
+ export class ComponentBase {
9
+ constructor() {
10
+ /**
11
+ * flag that indicates if this axis / legend is enabled or not
12
+ */
13
+ this.enabled = true;
14
+ /**
15
+ * the offset in pixels this component has on the x-axis
16
+ */
17
+ this.xOffset = 5;
18
+ /**
19
+ * the offset in pixels this component has on the Y-axis
20
+ */
21
+ this.yOffset = 5;
22
+ /**
23
+ * the typeface used for the labels
24
+ */
25
+ this.typeface = DEFAULT_FONT;
26
+ /**
27
+ * the text size of the labels
28
+ */
29
+ this.mTextSize = 10;
30
+ /**
31
+ * the text color to use for the labels
32
+ */
33
+ this.textColor = 'black';
34
+ /**
35
+ * Defines if the renderer should ensure we always see the component fully
36
+ */
37
+ this.ensureVisible = false;
38
+ }
39
+ ComponentBase() { }
40
+ /**
41
+ * returns the Typeface used for the labels, returns null if none is set
42
+ *
43
+ * @return {@link Font}
44
+ */
45
+ get font() {
46
+ return this.typeface;
47
+ }
48
+ /**
49
+ * sets a specific Typeface for the labels
50
+ *
51
+ * @param tf
52
+ */
53
+ set font(tf) {
54
+ if (tf.fontSize <= 0) {
55
+ tf = tf.withFontSize(this.textSize);
56
+ }
57
+ this.typeface = tf;
58
+ }
59
+ /**
60
+ * sets the size of the label text in density pixels min = 6f, max = 24f, default
61
+ * 10
62
+ *
63
+ * @param size the text size, in DP
64
+ */
65
+ set textSize(size) {
66
+ this.mTextSize = size;
67
+ // this bit is important to make sure we dont create crazy amount of native fonts on render
68
+ this.typeface = this.typeface.withFontSize(size);
69
+ }
70
+ /**
71
+ * returns the text size that is currently set for the labels, in pixels
72
+ */
73
+ get textSize() {
74
+ return this.mTextSize;
75
+ }
76
+ }
77
+ //# sourceMappingURL=ComponentBase.js.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,22 @@
1
+ import { ComponentBase } from './ComponentBase';
2
+ /**
3
+ * Created by Philipp Jahoda on 17/09/16.
4
+ */
5
+ export declare class Description extends ComponentBase {
6
+ /**
7
+ * the text used in the description
8
+ */
9
+ text: string;
10
+ /**
11
+ * the custom position of the description text
12
+ */
13
+ position: {
14
+ x: number;
15
+ y: number;
16
+ };
17
+ /**
18
+ * the alignment of the description text
19
+ */
20
+ textAlign: globalAndroid.graphics.Paint.Align;
21
+ constructor();
22
+ }
@@ -0,0 +1,21 @@
1
+ import { ComponentBase } from './ComponentBase';
2
+ import { Align } from '@nativescript-community/ui-canvas';
3
+ /**
4
+ * Created by Philipp Jahoda on 17/09/16.
5
+ */
6
+ export class Description extends ComponentBase {
7
+ constructor() {
8
+ super();
9
+ /**
10
+ * the text used in the description
11
+ */
12
+ this.text = 'Description Label';
13
+ /**
14
+ * the alignment of the description text
15
+ */
16
+ this.textAlign = Align.RIGHT;
17
+ // default size
18
+ this.textSize = 8;
19
+ }
20
+ }
21
+ //# sourceMappingURL=Description.js.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,39 @@
1
+ import { Highlight } from '../highlight/Highlight';
2
+ import { Entry } from '../data/Entry';
3
+ import { MPPointF } from '../utils/MPPointF';
4
+ import { Canvas } from '@nativescript-community/ui-canvas';
5
+ export interface IMarker {
6
+ /**
7
+ * @return The desired (general) offset you wish the IMarker to have on the x- and y-axis.
8
+ * By returning x: -(width / 2) you will center the IMarker horizontally.
9
+ * By returning y: -(height / 2) you will center the IMarker vertically.
10
+ */
11
+ readonly offset: MPPointF;
12
+ /**
13
+ * @return The offset for drawing at the specific `point`. This allows conditional adjusting of the Marker position.
14
+ * If you have no adjustments to make, return getOffset().
15
+ *
16
+ * @param posX This is the X position at which the marker wants to be drawn.
17
+ * You can adjust the offset conditionally based on this argument.
18
+ * @param posY This is the X position at which the marker wants to be drawn.
19
+ * You can adjust the offset conditionally based on this argument.
20
+ */
21
+ getOffsetForDrawingAtPoint(posX: any, posY: any): MPPointF;
22
+ /**
23
+ * This method enables a specified custom IMarker to update it's content every time the IMarker is redrawn.
24
+ *
25
+ * @param e The Entry the IMarker belongs to. This can also be any subclass of Entry, like BarEntry or
26
+ * CandleEntry, simply cast it at runtime.
27
+ * @param highlight The highlight object contains information about the highlighted value such as it's dataset-index, the
28
+ * selected range or stack-index (only stacked bar entries).
29
+ */
30
+ refreshContent(e: Entry, highlight: Highlight): any;
31
+ /**
32
+ * Draws the IMarker on the given position on the screen with the given Canvas object.
33
+ *
34
+ * @param canvas
35
+ * @param posX
36
+ * @param posY
37
+ */
38
+ draw(canvas: Canvas, posX: any, posY: any): any;
39
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IMarker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IMarker.js","sourceRoot":"","sources":["../../../src/ui-chart/components/IMarker.ts"],"names":[],"mappings":""}