@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,198 @@
1
+ import { ComponentBase } from './ComponentBase';
2
+ import { LegendEntry } from './LegendEntry';
3
+ import { DashPathEffect, Paint } from '@nativescript-community/ui-canvas';
4
+ export declare enum LegendForm {
5
+ /**
6
+ * Avoid drawing a form
7
+ */
8
+ NONE = 0,
9
+ /**
10
+ * Do not draw the a form, but leave space for it
11
+ */
12
+ EMPTY = 1,
13
+ /**
14
+ * Use default (default dataset's form to the legend's form)
15
+ */
16
+ DEFAULT = 2,
17
+ /**
18
+ * Draw a square
19
+ */
20
+ SQUARE = 3,
21
+ /**
22
+ * Draw a circle
23
+ */
24
+ CIRCLE = 4,
25
+ /**
26
+ * Draw a horizontal line
27
+ */
28
+ LINE = 5
29
+ }
30
+ export declare enum LegendHorizontalAlignment {
31
+ LEFT = 0,
32
+ CENTER = 1,
33
+ RIGHT = 2
34
+ }
35
+ export declare enum LegendVerticalAlignment {
36
+ TOP = 0,
37
+ CENTER = 1,
38
+ BOTTOM = 2
39
+ }
40
+ export declare enum LegendOrientation {
41
+ HORIZONTAL = 0,
42
+ VERTICAL = 1
43
+ }
44
+ export declare enum LegendDirection {
45
+ LEFT_TO_RIGHT = 0,
46
+ RIGHT_TO_LEFT = 1
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
+ */
55
+ export declare class Legend extends ComponentBase {
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
+ */
126
+ constructor(entries?: 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
+ */
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
+ */
141
+ getMaximumEntryHeight(p: Paint): number;
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
+ */
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
+ */
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
+ */
163
+ resetCustom(): void;
164
+ /**
165
+ * @return true if a custom legend entries has been set default
166
+ * false (automatic legend)
167
+ */
168
+ isLegendCustom(): boolean;
169
+ /**
170
+ * the total width of the legend (needed width space)
171
+ */
172
+ mNeededWidth: number;
173
+ /**
174
+ * the total height of the legend (needed height space)
175
+ */
176
+ mNeededHeight: number;
177
+ mTextHeightMax: number;
178
+ mTextWidthMax: number;
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
+ */
197
+ calculateDimensions(labelpaint: Paint, viewPortHandler: any): void;
198
+ }
@@ -0,0 +1,386 @@
1
+ import { ComponentBase } from './ComponentBase';
2
+ import { LegendEntry } from './LegendEntry';
3
+ import { Utils } from '../utils/Utils';
4
+ import { ColorTemplate } from '../utils/ColorTemplate';
5
+ export var LegendForm;
6
+ (function (LegendForm) {
7
+ /**
8
+ * Avoid drawing a form
9
+ */
10
+ LegendForm[LegendForm["NONE"] = 0] = "NONE";
11
+ /**
12
+ * Do not draw the a form, but leave space for it
13
+ */
14
+ LegendForm[LegendForm["EMPTY"] = 1] = "EMPTY";
15
+ /**
16
+ * Use default (default dataset's form to the legend's form)
17
+ */
18
+ LegendForm[LegendForm["DEFAULT"] = 2] = "DEFAULT";
19
+ /**
20
+ * Draw a square
21
+ */
22
+ LegendForm[LegendForm["SQUARE"] = 3] = "SQUARE";
23
+ /**
24
+ * Draw a circle
25
+ */
26
+ LegendForm[LegendForm["CIRCLE"] = 4] = "CIRCLE";
27
+ /**
28
+ * Draw a horizontal line
29
+ */
30
+ LegendForm[LegendForm["LINE"] = 5] = "LINE";
31
+ })(LegendForm || (LegendForm = {}));
32
+ export var LegendHorizontalAlignment;
33
+ (function (LegendHorizontalAlignment) {
34
+ LegendHorizontalAlignment[LegendHorizontalAlignment["LEFT"] = 0] = "LEFT";
35
+ LegendHorizontalAlignment[LegendHorizontalAlignment["CENTER"] = 1] = "CENTER";
36
+ LegendHorizontalAlignment[LegendHorizontalAlignment["RIGHT"] = 2] = "RIGHT";
37
+ })(LegendHorizontalAlignment || (LegendHorizontalAlignment = {}));
38
+ export var LegendVerticalAlignment;
39
+ (function (LegendVerticalAlignment) {
40
+ LegendVerticalAlignment[LegendVerticalAlignment["TOP"] = 0] = "TOP";
41
+ LegendVerticalAlignment[LegendVerticalAlignment["CENTER"] = 1] = "CENTER";
42
+ LegendVerticalAlignment[LegendVerticalAlignment["BOTTOM"] = 2] = "BOTTOM";
43
+ })(LegendVerticalAlignment || (LegendVerticalAlignment = {}));
44
+ export var LegendOrientation;
45
+ (function (LegendOrientation) {
46
+ LegendOrientation[LegendOrientation["HORIZONTAL"] = 0] = "HORIZONTAL";
47
+ LegendOrientation[LegendOrientation["VERTICAL"] = 1] = "VERTICAL";
48
+ })(LegendOrientation || (LegendOrientation = {}));
49
+ export var LegendDirection;
50
+ (function (LegendDirection) {
51
+ LegendDirection[LegendDirection["LEFT_TO_RIGHT"] = 0] = "LEFT_TO_RIGHT";
52
+ LegendDirection[LegendDirection["RIGHT_TO_LEFT"] = 1] = "RIGHT_TO_LEFT";
53
+ })(LegendDirection || (LegendDirection = {}));
54
+ /**
55
+ * Class representing the legend of the chart. The legend will contain one entry
56
+ * per color and DataSet. Multiple colors in one DataSet are grouped together.
57
+ * The legend object is NOT available before setting data to the chart.
58
+ *
59
+
60
+ */
61
+ export class Legend extends ComponentBase {
62
+ /**
63
+ * Constructor. Provide entries for the legend.
64
+ *
65
+ * @param entries
66
+ */
67
+ constructor(entries) {
68
+ super();
69
+ /**
70
+ * The legend entries array
71
+ */
72
+ this.entries = [];
73
+ /**
74
+ * Are the legend labels/colors a custom value or auto calculated? If false,
75
+ * then it's auto, if true, then custom. default false (automatic legend)
76
+ */
77
+ this.mIsLegendCustom = false;
78
+ this.horizontalAlignment = LegendHorizontalAlignment.LEFT;
79
+ this.verticalAlignment = LegendVerticalAlignment.BOTTOM;
80
+ this.orientation = LegendOrientation.HORIZONTAL;
81
+ this.drawInside = false;
82
+ /**
83
+ * the text direction for the legend
84
+ */
85
+ this.direction = LegendDirection.LEFT_TO_RIGHT;
86
+ /**
87
+ * the shape/form the legend colors are drawn in
88
+ */
89
+ this.form = LegendForm.SQUARE;
90
+ /**
91
+ * the size of the legend forms/shapes
92
+ */
93
+ this.formSize = 8;
94
+ /**
95
+ * the size of the legend forms/shapes
96
+ */
97
+ this.formLineWidth = 3;
98
+ /**
99
+ * Line dash path effect used for shapes that consist of lines.
100
+ */
101
+ this.formLineDashEffect = null;
102
+ /**
103
+ * the space between the legend entries on a horizontal axis, default 6f
104
+ */
105
+ this.xEntrySpace = 6;
106
+ /**
107
+ * the space between the legend entries on a vertical axis, default 5f
108
+ */
109
+ this.yEntrySpace = 0;
110
+ /**
111
+ * the space between the legend entries on a vertical axis, default 2f
112
+ * private float this.mYEntrySpace = 2f; /** the space between the form and the
113
+ * actual label/text
114
+ */
115
+ this.formToTextSpace = 5;
116
+ /**
117
+ * the space that should be left between stacked forms
118
+ */
119
+ this.stackSpace = 3;
120
+ /**
121
+ * The maximum relative size out of the whole chart view. / If the legend is
122
+ * to the right/left of the chart, then this affects the width of the
123
+ * legend. / If the legend is to the top/bottom of the chart, then this
124
+ * affects the height of the legend. / If the legend is the center of the
125
+ * piechart, then this defines the size of the rectangular bounds out of the
126
+ * size of the "hole". / default: 0.95f (95%)
127
+ */
128
+ this.maxSizePercent = 0.95;
129
+ /**
130
+ * the total width of the legend (needed width space)
131
+ */
132
+ this.mNeededWidth = 0;
133
+ /**
134
+ * the total height of the legend (needed height space)
135
+ */
136
+ this.mNeededHeight = 0;
137
+ this.mTextHeightMax = 0;
138
+ this.mTextWidthMax = 0;
139
+ /**
140
+ * Should the legend word wrap? / this is currently supported only for:
141
+ * BelowChartLeft, BelowChartRight, BelowChartCenter. / note that word
142
+ * wrapping a legend takes a toll on performance. / you may want to set
143
+ * maxSizePercent when word wrapping, to set the point where the text wraps.
144
+ * / default: false
145
+ */
146
+ this.wordWrapEnabled = false;
147
+ this.calculatedLabelSizes = [];
148
+ this.calculatedLabelBreakPoints = [];
149
+ this.calculatedLineSizes = [];
150
+ this.enabled = false;
151
+ this.textSize = 10;
152
+ this.xOffset = 5;
153
+ this.yOffset = 5;
154
+ if (entries) {
155
+ this.entries = entries;
156
+ }
157
+ }
158
+ /**
159
+ * returns the maximum length in pixels across all legend labels + formsize
160
+ * + formtotextspace
161
+ *
162
+ * @param p the paint object used for rendering the text
163
+ * @return
164
+ */
165
+ getMaximumEntryWidth(p) {
166
+ let max = 0;
167
+ let maxFormSize = 0;
168
+ const formToTextSpace = this.formToTextSpace;
169
+ for (const entry of this.entries) {
170
+ const formSize = isNaN(entry.formSize) ? this.formSize : entry.formSize;
171
+ if (formSize > maxFormSize)
172
+ maxFormSize = formSize;
173
+ const label = entry.label;
174
+ if (!label)
175
+ continue;
176
+ const length = Utils.calcTextWidth(p, label);
177
+ if (length > max)
178
+ max = length;
179
+ }
180
+ return max + maxFormSize + formToTextSpace;
181
+ }
182
+ /**
183
+ * returns the maximum height in pixels across all legend labels
184
+ *
185
+ * @param p the paint object used for rendering the text
186
+ * @return
187
+ */
188
+ getMaximumEntryHeight(p) {
189
+ let max = 0;
190
+ for (const entry of this.entries) {
191
+ const label = entry.label;
192
+ if (!label)
193
+ continue;
194
+ const length = Utils.calcTextHeight(p, label);
195
+ if (length > max)
196
+ max = length;
197
+ }
198
+ return max;
199
+ }
200
+ /**
201
+ * Entries that will be appended to the end of the auto calculated
202
+ * entries after calculating the legend.
203
+ * (if the legend has already been calculated, you will need to call notifyDataSetChanged()
204
+ * to let the changes take effect)
205
+ */
206
+ setExtra(colors, labels) {
207
+ const entries = [];
208
+ for (let i = 0; i < Math.min(colors.length, labels.length); i++) {
209
+ const entry = new LegendEntry(labels[i], colors[i]);
210
+ // entry.formColor = colors[i];
211
+ // entry.label = labels[i];
212
+ if (entry.formColor === ColorTemplate.COLOR_SKIP || !entry.formColor)
213
+ entry.form = LegendForm.NONE;
214
+ else if (entry.formColor === ColorTemplate.COLOR_NONE)
215
+ entry.form = LegendForm.EMPTY;
216
+ entries.push(entry);
217
+ }
218
+ this.extraEntries = entries;
219
+ }
220
+ /**
221
+ * Sets a custom legend's entries array.
222
+ * * A null label will start a group.
223
+ * This will disable the feature that automatically calculates the legend
224
+ * entries from the datasets.
225
+ * Call resetCustom() to re-enable automatic calculation (and then
226
+ * notifyDataSetChanged() is needed to auto-calculate the legend again)
227
+ */
228
+ setCustom(entries) {
229
+ this.entries = entries;
230
+ this.mIsLegendCustom = true;
231
+ }
232
+ /**
233
+ * Calling this will disable the custom legend entries (set by
234
+ * setCustom(...)). Instead, the entries will again be calculated
235
+ * automatically (after notifyDataSetChanged() is called).
236
+ */
237
+ resetCustom() {
238
+ this.mIsLegendCustom = false;
239
+ }
240
+ /**
241
+ * @return true if a custom legend entries has been set default
242
+ * false (automatic legend)
243
+ */
244
+ isLegendCustom() {
245
+ return this.mIsLegendCustom;
246
+ }
247
+ /**
248
+ * Calculates the dimensions of the Legend. This includes the maximum width
249
+ * and height of a single entry, as well as the total width and height of
250
+ * the Legend.
251
+ *
252
+ * @param labelpaint
253
+ */
254
+ calculateDimensions(labelpaint, viewPortHandler) {
255
+ const defaultFormSize = this.formSize;
256
+ const stackSpace = this.stackSpace;
257
+ const formToTextSpace = this.formToTextSpace;
258
+ const xEntrySpace = this.xEntrySpace;
259
+ const yEntrySpace = this.yEntrySpace;
260
+ const wordWrapEnabled = this.wordWrapEnabled;
261
+ const entries = this.entries;
262
+ const entryCount = entries.length;
263
+ this.mTextWidthMax = this.getMaximumEntryWidth(labelpaint);
264
+ this.mTextHeightMax = this.getMaximumEntryHeight(labelpaint);
265
+ switch (this.orientation) {
266
+ case LegendOrientation.VERTICAL: {
267
+ let maxWidth = 0, maxHeight = 0, width = 0;
268
+ const labelLineHeight = Utils.getLineHeight(labelpaint);
269
+ let wasStacked = false;
270
+ for (let i = 0; i < entryCount; i++) {
271
+ const e = entries[i];
272
+ const drawingForm = e.form !== LegendForm.NONE;
273
+ const formSize = isNaN(e.formSize) ? defaultFormSize : e.formSize;
274
+ const label = e.label;
275
+ if (!wasStacked)
276
+ width = 0;
277
+ if (drawingForm) {
278
+ if (wasStacked)
279
+ width += stackSpace;
280
+ width += formSize;
281
+ }
282
+ // grouped forms have null labels
283
+ if (label) {
284
+ // make a step to the left
285
+ if (drawingForm && !wasStacked)
286
+ width += formToTextSpace;
287
+ else if (wasStacked) {
288
+ maxWidth = Math.max(maxWidth, width);
289
+ maxHeight += labelLineHeight + yEntrySpace;
290
+ width = 0;
291
+ wasStacked = false;
292
+ }
293
+ width += Utils.calcTextWidth(labelpaint, label);
294
+ if (i < entryCount - 1)
295
+ maxHeight += labelLineHeight + yEntrySpace;
296
+ }
297
+ else {
298
+ wasStacked = true;
299
+ width += formSize;
300
+ if (i < entryCount - 1)
301
+ width += stackSpace;
302
+ }
303
+ maxWidth = Math.max(maxWidth, width);
304
+ }
305
+ this.mNeededWidth = maxWidth;
306
+ this.mNeededHeight = maxHeight;
307
+ break;
308
+ }
309
+ case LegendOrientation.HORIZONTAL: {
310
+ const labelLineHeight = Utils.getLineHeight(labelpaint);
311
+ const labelLineSpacing = Utils.getLineSpacing(labelpaint) + yEntrySpace;
312
+ const contentWidth = viewPortHandler.contentRect.width() * this.maxSizePercent;
313
+ // Start calculating layout
314
+ let maxLineWidth = 0;
315
+ let currentLineWidth = 0;
316
+ let requiredWidth = 0;
317
+ let stackedStartIndex = -1;
318
+ this.calculatedLabelBreakPoints = [];
319
+ this.calculatedLabelSizes = [];
320
+ this.calculatedLineSizes = [];
321
+ for (let i = 0; i < entryCount; i++) {
322
+ const e = entries[i];
323
+ const drawingForm = e.form !== LegendForm.NONE;
324
+ const formSize = isNaN(e.formSize) ? defaultFormSize : e.formSize;
325
+ const label = e.label;
326
+ this.calculatedLabelBreakPoints.push(false);
327
+ if (stackedStartIndex === -1) {
328
+ // we are not stacking, so required width is for this label
329
+ // only
330
+ requiredWidth = 0;
331
+ }
332
+ else {
333
+ // add the spacing appropriate for stacked labels/forms
334
+ requiredWidth += stackSpace;
335
+ }
336
+ // grouped forms have null labels
337
+ if (label) {
338
+ this.calculatedLabelSizes.push(Utils.calcTextSize(labelpaint, label));
339
+ requiredWidth += drawingForm ? formToTextSpace + formSize : 0;
340
+ requiredWidth += this.calculatedLabelSizes[i].width;
341
+ }
342
+ else {
343
+ this.calculatedLabelSizes.push({ x: 0, y: 0 });
344
+ requiredWidth += drawingForm ? formSize : 0;
345
+ if (stackedStartIndex === -1) {
346
+ // mark this index as we might want to break here later
347
+ stackedStartIndex = i;
348
+ }
349
+ }
350
+ if (label || i === entryCount - 1) {
351
+ const requiredSpacing = currentLineWidth === 0 ? 0 : xEntrySpace;
352
+ if (!wordWrapEnabled || // No word wrapping, it must fit.
353
+ // The line is empty, it must fit
354
+ currentLineWidth === 0 ||
355
+ // It simply fits
356
+ contentWidth - currentLineWidth >= requiredSpacing + requiredWidth) {
357
+ // Expand current line
358
+ currentLineWidth += requiredSpacing + requiredWidth;
359
+ }
360
+ else {
361
+ // It doesn't fit, we need to wrap a line
362
+ // Add current line size to array
363
+ this.calculatedLineSizes.push({ x: currentLineWidth, y: labelLineHeight });
364
+ maxLineWidth = Math.max(maxLineWidth, currentLineWidth);
365
+ // Start a new line
366
+ this.calculatedLabelBreakPoints[stackedStartIndex > -1 ? stackedStartIndex : i] = true;
367
+ currentLineWidth = requiredWidth;
368
+ }
369
+ if (i === entryCount - 1) {
370
+ // Add last line size to array
371
+ this.calculatedLineSizes.push({ x: currentLineWidth, y: labelLineHeight });
372
+ maxLineWidth = Math.max(maxLineWidth, currentLineWidth);
373
+ }
374
+ }
375
+ stackedStartIndex = label ? -1 : stackedStartIndex;
376
+ }
377
+ this.mNeededWidth = maxLineWidth;
378
+ this.mNeededHeight = labelLineHeight * this.calculatedLineSizes.length + labelLineSpacing * (this.calculatedLineSizes.length === 0 ? 0 : this.calculatedLineSizes.length - 1);
379
+ break;
380
+ }
381
+ }
382
+ this.mNeededHeight += this.yOffset;
383
+ this.mNeededWidth += this.xOffset;
384
+ }
385
+ }
386
+ //# sourceMappingURL=Legend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Legend.js","sourceRoot":"","sources":["../../../src/ui-chart/components/Legend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,CAAN,IAAY,UA8BX;AA9BD,WAAY,UAAU;IAClB;;OAEG;IACH,2CAAI,CAAA;IAEJ;;OAEG;IACH,6CAAK,CAAA;IAEL;;OAEG;IACH,iDAAO,CAAA;IAEP;;OAEG;IACH,+CAAM,CAAA;IAEN;;OAEG;IACH,+CAAM,CAAA;IAEN;;OAEG;IACH,2CAAI,CAAA;AACR,CAAC,EA9BW,UAAU,KAAV,UAAU,QA8BrB;AAED,MAAM,CAAN,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACjC,yEAAI,CAAA;IACJ,6EAAM,CAAA;IACN,2EAAK,CAAA;AACT,CAAC,EAJW,yBAAyB,KAAzB,yBAAyB,QAIpC;AAED,MAAM,CAAN,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IAC/B,mEAAG,CAAA;IACH,yEAAM,CAAA;IACN,yEAAM,CAAA;AACV,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,QAIlC;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IACzB,qEAAU,CAAA;IACV,iEAAQ,CAAA;AACZ,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,uEAAa,CAAA;IACb,uEAAa,CAAA;AACjB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AACD;;;;;;GAMG;AACH,MAAM,OAAO,MAAO,SAAQ,aAAa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C,CAAC,CAAC,GAAG,IAAI,CAAC;4BACvF,gBAAgB,GAAG,aAAa,CAAC;wBACrC,CAAC;wBAED,IAAI,CAAC,KAAK,UAAU,GAAG,CAAC,EAAE,CAAC;4BACvB,8BAA8B;4BAC9B,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,gBAAgB,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC;4BAC3E,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;wBAC5D,CAAC;oBACL,CAAC;oBAED,iBAAiB,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC;gBACvD,CAAC;gBAED,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;gBACjC,IAAI,CAAC,aAAa,GAAG,eAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,GAAG,gBAAgB,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBAE9K,MAAM;YACV,CAAC;QACL,CAAC;QAED,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,OAAO,CAAC;QACnC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,OAAO,CAAC;IACtC,CAAC;CACJ"}
@@ -0,0 +1,50 @@
1
+ import { LegendForm } from './Legend';
2
+ import { DashPathEffect } from '@nativescript-community/ui-canvas';
3
+ import { Color } from '@nativescript/core/color';
4
+ export declare class LegendEntry {
5
+ /**
6
+ *
7
+ * @param label The legend entry text. A `null` label will start a group.
8
+ * @param form The form to draw for this entry.
9
+ * @param formSize Set to NaN to use the legend's default.
10
+ * @param formLineWidth Set to NaN to use the legend's default.
11
+ * @param formLineDashEffect Set to nil to use the legend's default.
12
+ * @param formColor The color for drawing the form.
13
+ */
14
+ constructor(label: string, form: LegendForm, formSize?: any, formLineWidth?: any, formLineDashEffect?: DashPathEffect, formColor?: string | number | Color);
15
+ /**
16
+ * The legend entry text.
17
+ * A `null` label will start a group.
18
+ */
19
+ label: string;
20
+ /**
21
+ * The form to draw for this entry.
22
+ *
23
+ * `NONE` will avoid drawing a form, and any related space.
24
+ * `EMPTY` will avoid drawing a form, but keep its space.
25
+ * `DEFAULT` will use the Legend's default.
26
+ */
27
+ form: LegendForm;
28
+ /**
29
+ * Form size will be considered except for when .None is used
30
+ *
31
+ * Set as NaN to use the legend's default
32
+ */
33
+ formSize: number;
34
+ /**
35
+ * Line width used for shapes that consist of lines.
36
+ *
37
+ * Set as NaN to use the legend's default
38
+ */
39
+ formLineWidth: number;
40
+ /**
41
+ * Line dash path effect used for shapes that consist of lines.
42
+ *
43
+ * Set to null to use the legend's default
44
+ */
45
+ formLineDashEffect: DashPathEffect;
46
+ /**
47
+ * The color for drawing the form
48
+ */
49
+ formColor: string | number | Color;
50
+ }