Skip to content

Commit 0de5620

Browse files
committed
readme/doc
1 parent de1f96f commit 0de5620

144 files changed

Lines changed: 2837 additions & 931 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 199 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,72 @@
1-
<!-- ⚠️ This README has been generated from the file(s) "blueprint.md" ⚠️-->
2-
[![npm](https://img.shields.io/npm/v/@nativescript-community/ui-chart.svg)](https://www.npmjs.com/package/@nativescript-community/ui-chart)
3-
[![npm](https://img.shields.io/npm/dt/@nativescript-community/ui-chart.svg?label=npm%20downloads)](https://www.npmjs.com/package/@nativescript-community/ui-chart)
4-
[![GitHub forks](https://img.shields.io/github/forks/nativescript-community/ui-chart.svg)](https://github.com/nativescript-community/ui-chart/network)
5-
[![GitHub stars](https://img.shields.io/github/stars/nativescript-community/ui-chart.svg)](https://github.com/nativescript-community/ui-chart/stargazers)
1+
<!-- ⚠️ This README has been generated from the file(s) "blueprint.md" ⚠️--><!-- ⚠️ This README has been generated from the file(s) "blueprint.md" ⚠️-->
2+
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
DO NOT EDIT THIS READEME DIRECTLY! Edit "bluesprint.md" instead.
12+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
17+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
19+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
20+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
21+
<h1 align="center">@nativescript-community/ui-chart</h1>
22+
<p align="center">
23+
<a href="https://npmcharts.com/compare/@nativescript-community/ui-chart?minimal=true"><img alt="Downloads per month" src="https://img.shields.io/npm/dm/@nativescript-community/ui-chart.svg" height="20"/></a>
24+
<a href="https://www.npmjs.com/package/@nativescript-community/ui-chart"><img alt="NPM Version" src="https://img.shields.io/npm/v/@nativescript-community/ui-chart.svg" height="20"/></a>
25+
</p>
26+
27+
<p align="center">
28+
<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+
665

766

67+
[](#installation)
68+
69+
870
[](#installation)
971

1072
## Installation
@@ -14,6 +76,9 @@
1476
---
1577

1678

79+
[](#migration-to-2x)
80+
81+
1782
[](#migration-to-2x)
1883

1984
## Migration to 2.x
@@ -23,6 +88,9 @@ You can either to it manually and update them all (you should get tsc errors for
2388
Then use typings to fix potential name change
2489

2590

91+
[](#usage)
92+
93+
2694
[](#usage)
2795

2896
## Usage
@@ -37,6 +105,9 @@ install();
37105
You can also check [Wiki](https://github.com/nativescript-community/ui-chart/wiki) for any useful material.
38106

39107

108+
[](#plain-nativescript)
109+
110+
40111
[](#plain-nativescript)
41112

42113
## Plain NativeScript
@@ -88,6 +159,9 @@ export function onLineChartLoaded(args) {
88159
```
89160

90161

162+
[](#nativescript--vue)
163+
164+
91165
[](#nativescript--vue)
92166

93167
## NativeScript + Vue
@@ -142,6 +216,9 @@ onChartLoaded() {
142216
```
143217

144218

219+
[](#nativescript--angular)
220+
221+
145222
[](#nativescript--angular)
146223

147224
## NativeScript + Angular
@@ -196,6 +273,9 @@ onChartLoaded(args) {
196273
```
197274

198275

276+
[](#about)
277+
278+
199279
[](#about)
200280

201281
## About
@@ -221,14 +301,124 @@ That is because:
221301
- It can share the same data array between multiple datasets
222302
- 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)
223303

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+
224360

225-
[](#documentation)
361+
[](#contributing)
362+
363+
364+
[](#contributing)
226365

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+
```
228403

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
231420

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).
232422

233423
[](#demos-and-development)
234424

docs/assets/hierarchy.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)