@unovis/react 1.0.0-beta.8 → 1.0.0-beta.9
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.
- package/README.md +26 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,6 +13,7 @@ npm install -P @unovis/ts @unovis/react
|
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Quick Start
|
|
16
|
+
#### TypeScript
|
|
16
17
|
```typescript jsx
|
|
17
18
|
import React, { useCallback } from 'react'
|
|
18
19
|
import { VisXYContainer, VisLine, VisAxis } from '@unovis/react'
|
|
@@ -38,6 +39,31 @@ export function BasicLineChart (): JSX.Element {
|
|
|
38
39
|
}
|
|
39
40
|
```
|
|
40
41
|
|
|
42
|
+
#### JavaScript
|
|
43
|
+
```jsx
|
|
44
|
+
import React, { useCallback } from 'react'
|
|
45
|
+
import { VisXYContainer, VisLine, VisAxis } from '@unovis/react'
|
|
46
|
+
|
|
47
|
+
export const data = [
|
|
48
|
+
{ x: 0, y: 0 },
|
|
49
|
+
{ x: 1, y: 2 },
|
|
50
|
+
{ x: 2, y: 1 },
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
export function BasicLineChart () {
|
|
54
|
+
return (
|
|
55
|
+
<VisXYContainer data={data} height={600}>
|
|
56
|
+
<VisLine
|
|
57
|
+
x={useCallback(d => d.x, [])}
|
|
58
|
+
y={useCallback(d => d.y, [])}
|
|
59
|
+
></VisLine>
|
|
60
|
+
<VisAxis type="x"></VisAxis>
|
|
61
|
+
<VisAxis type="y"></VisAxis>
|
|
62
|
+
</VisXYContainer>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
41
67
|
## Documentation
|
|
42
68
|
https://unovis.dev/docs
|
|
43
69
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unovis/react",
|
|
3
3
|
"description": "Modular data visualization framework for React, Angular, Svelte, and vanilla TypeScript or JavaScript",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.9",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/f5/unovis.git",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@emotion/css": "^11.7.1",
|
|
39
|
-
"@unovis/ts": "1.0.0-beta.
|
|
39
|
+
"@unovis/ts": "1.0.0-beta.9",
|
|
40
40
|
"react": ">=16.8.0",
|
|
41
41
|
"react-dom": ">=16.8.0"
|
|
42
42
|
},
|