You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- ⚠️ This README has been generated from the file(s) "blueprint.md" ⚠️--><!-- ⚠️ This README has been generated from the file(s) "blueprint.md" ⚠️-->
<b>A powerful chart / graph plugin, supporting line, bar, pie, radar, bubble, and candlestick charts as well as scaling, panning and animations.</b></br>
29
+
<sub><sub>
30
+
</p>
31
+
32
+
<br />
33
+
34
+
35
+
36
+
[](#table-of-contents)
37
+
38
+
39
+
[](#table-of-contents)
40
+
41
+
## Table of Contents
42
+
43
+
*[Installation](#installation)
44
+
*[Migration to 2.x](#migration-to-2x)
45
+
*[Usage](#usage)
46
+
*[Plain NativeScript](#plain-nativescript)
47
+
* [XML](#xml)
48
+
* [TypeScript](#typescript)
49
+
*[NativeScript + Vue](#nativescript--vue)
50
+
*[NativeScript + Angular](#nativescript--angular)
51
+
*[About](#about)
52
+
* [Examples:](#examples)
53
+
*[Demos and Development](#demos-and-development)
54
+
* [Repo Setup](#repo-setup)
55
+
* [Build](#build)
56
+
* [Demos](#demos)
57
+
*[Contributing](#contributing)
58
+
* [Update repo ](#update-repo-)
59
+
* [Update readme ](#update-readme-)
60
+
* [Update doc ](#update-doc-)
61
+
* [Publish](#publish)
62
+
* [modifying submodules](#modifying-submodules)
63
+
*[Questions](#questions)
64
+
6
65
7
66
67
+
[](#installation)
68
+
69
+
8
70
[](#installation)
9
71
10
72
## Installation
@@ -14,6 +76,9 @@
14
76
---
15
77
16
78
79
+
[](#migration-to-2x)
80
+
81
+
17
82
[](#migration-to-2x)
18
83
19
84
## Migration to 2.x
@@ -23,6 +88,9 @@ You can either to it manually and update them all (you should get tsc errors for
23
88
Then use typings to fix potential name change
24
89
25
90
91
+
[](#usage)
92
+
93
+
26
94
[](#usage)
27
95
28
96
## Usage
@@ -37,6 +105,9 @@ install();
37
105
You can also check [Wiki](https://github.com/nativescript-community/ui-chart/wiki) for any useful material.
38
106
39
107
108
+
[](#plain-nativescript)
109
+
110
+
40
111
[](#plain-nativescript)
41
112
42
113
## Plain NativeScript
@@ -88,6 +159,9 @@ export function onLineChartLoaded(args) {
88
159
```
89
160
90
161
162
+
[](#nativescript--vue)
163
+
164
+
91
165
[](#nativescript--vue)
92
166
93
167
## NativeScript + Vue
@@ -142,6 +216,9 @@ onChartLoaded() {
142
216
```
143
217
144
218
219
+
[](#nativescript--angular)
220
+
221
+
145
222
[](#nativescript--angular)
146
223
147
224
## NativeScript + Angular
@@ -196,6 +273,9 @@ onChartLoaded(args) {
196
273
```
197
274
198
275
276
+
[](#about)
277
+
278
+
199
279
[](#about)
200
280
201
281
## About
@@ -221,14 +301,124 @@ That is because:
221
301
- It can share the same data array between multiple datasets
222
302
- It can still use the power of native arrays to NOT marshal arrays of positions while drawing lines with [@nativescript-community/ui-canvas](https://github.com/nativescript-community/ui-canvas)
223
303
304
+
### Examples:
305
+
306
+
-[Basic](demo-snippets/vue/Basic.vue)
307
+
-[Basic](demo-snippets/vue/BubbleChart.vue)
308
+
-[Basic](demo-snippets/vue/CandleStickChart.vue)
309
+
-[Basic](demo-snippets/vue/CombinedChart.vue)
310
+
-[Basic](demo-snippets/vue/NSChart.vue)
311
+
-[Basic](demo-snippets/vue/PieChart.vue)
312
+
-[Basic](demo-snippets/vue/Realtime.vue)
313
+
-[Basic](demo-snippets/vue/ScatterPlot.vue)
314
+
315
+
316
+
[](#demos-and-development)
317
+
318
+
319
+
[](#demos-and-development)
320
+
321
+
## Demos and Development
322
+
323
+
324
+
### Repo Setup
325
+
326
+
The repo uses submodules. If you did not clone with ` --recursive` then you need to call
327
+
```
328
+
git submodule update --init
329
+
```
330
+
331
+
The package manager used to install and link dependencies must be `pnpm` or `yarn`. `npm` wont work.
332
+
333
+
To develop and test:
334
+
if you use `yarn` then run `yarn`
335
+
if you use `pnpm` then run `pnpm i`
336
+
337
+
**Interactive Menu:**
338
+
339
+
To start the interactive menu, run `npm start` (or `yarn start` or `pnpm start`). This will list all of the commonly used scripts.
340
+
341
+
### Build
342
+
343
+
```bash
344
+
npm run build.all
345
+
```
346
+
WARNING: it seems `yarn build.all` wont always work (not finding binaries in `node_modules/.bin`) which is why the doc explicitly uses `npm run`
347
+
348
+
### Demos
349
+
350
+
```bash
351
+
npm run demo.[ng|react|svelte|vue].[ios|android]
352
+
353
+
npm run demo.svelte.ios # Example
354
+
```
355
+
356
+
Demo setup is a bit special in the sense that if you want to modify/add demos you dont work directly in `demo-[ng|react|svelte|vue]`
357
+
Instead you work in `demo-snippets/[ng|react|svelte|vue]`
358
+
You can start from the `install.ts` of each flavor to see how to register new demos
359
+
224
360
225
-
[](#documentation)
361
+
[](#contributing)
362
+
363
+
364
+
[](#contributing)
226
365
227
-
## Documentation
366
+
## Contributing
367
+
368
+
### Update repo
369
+
370
+
You can update the repo files quite easily
371
+
372
+
First update the submodules
373
+
374
+
```bash
375
+
npm run update
376
+
```
377
+
378
+
Then commit the changes
379
+
Then update common files
380
+
381
+
```bash
382
+
npm run sync
383
+
```
384
+
Then you can run `yarn|pnpm`, commit changed files if any
385
+
386
+
### Update readme
387
+
```bash
388
+
npm run readme
389
+
```
390
+
391
+
### Update doc
392
+
```bash
393
+
npm run doc
394
+
```
395
+
396
+
### Publish
397
+
398
+
The publishing is completely handled by `lerna` (you can add `-- --bump major` to force a major release)
399
+
Simply run
400
+
```shell
401
+
npm run publish
402
+
```
228
403
229
-
The NativeScript 'ui-chart' plugin is based on the [MPAndroidChart](https://github.com/PhilJay/MPAndroidChart) library.
230
-
In few words, its API is identical. The possibility to add API reference will be considered in the future.
404
+
### modifying submodules
405
+
406
+
The repo uses https:// for submodules which means you won't be able to push directly into the submodules.
407
+
One easy solution is t modify `~/.gitconfig` and add
408
+
```
409
+
[url "ssh://git@github.com/"]
410
+
pushInsteadOf = https://github.com/
411
+
```
412
+
413
+
414
+
[](#questions)
415
+
416
+
417
+
[](#questions)
418
+
419
+
## Questions
231
420
421
+
If you have any questions/issues/comments please feel free to create an issue or start a conversation in the [NativeScript Community Discord](https://nativescript.org/discord).
0 commit comments