@softros/agulhao-charts-react 1.0.3 → 1.0.4
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 +61 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -37,6 +37,67 @@ export function MinhaTela() {
|
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
O componente aceita qualquer `DefinicaoGrafico` suportada pelo pacote `core`, incluindo `barra`, `linha`, `area`, `pizza`, `gauge` e `mapa`.
|
|
41
|
+
|
|
42
|
+
Exemplo com cor por série:
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
const graficoComCor: DefinicaoGrafico = {
|
|
46
|
+
tipo: 'linha',
|
|
47
|
+
titulo: 'Vendas por dia',
|
|
48
|
+
dataset: {
|
|
49
|
+
linhas: [
|
|
50
|
+
{ dia: 'Seg', valor: 150 },
|
|
51
|
+
{ dia: 'Ter', valor: 230 },
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
mapeamento: {
|
|
55
|
+
eixoX: 'dia',
|
|
56
|
+
eixoY: 'valor',
|
|
57
|
+
},
|
|
58
|
+
opcoes: {
|
|
59
|
+
serie: {
|
|
60
|
+
nome: 'Vendas',
|
|
61
|
+
cor: [
|
|
62
|
+
{ nome: 'Vendas', cor: '#0f766e' },
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Exemplo de gauge:
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
const graficoGauge: DefinicaoGrafico = {
|
|
73
|
+
tipo: 'gauge',
|
|
74
|
+
titulo: 'Meta atingida',
|
|
75
|
+
dataset: {
|
|
76
|
+
linhas: [
|
|
77
|
+
{ indicador: 'Conversão', percentual: 72 },
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
mapeamento: {
|
|
81
|
+
rotulo: 'indicador',
|
|
82
|
+
valor: 'percentual',
|
|
83
|
+
},
|
|
84
|
+
opcoes: {
|
|
85
|
+
mostrarLegenda: false,
|
|
86
|
+
serie: {
|
|
87
|
+
nome: 'Performance',
|
|
88
|
+
cor: [
|
|
89
|
+
{ nome: 'Performance', cor: '#0f766e' },
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
gauge: {
|
|
93
|
+
minimo: 0,
|
|
94
|
+
maximo: 100,
|
|
95
|
+
mostrarProgresso: true,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
40
101
|
## Props
|
|
41
102
|
|
|
42
103
|
```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softros/agulhao-charts-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Componente React para renderizar graficos a partir da definicao comum do Agulhao Charts.",
|
|
5
5
|
"homepage": "https://github.com/SOFTROS-SISTEMAS/agulhao-charts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"directory": "packages/react"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@softros/agulhao-charts-core": "^1.0.
|
|
35
|
+
"@softros/agulhao-charts-core": "^1.0.4",
|
|
36
36
|
"echarts-for-react": "^3.0.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
@@ -46,4 +46,4 @@
|
|
|
46
46
|
"typescript": "^5.8.3",
|
|
47
47
|
"vitest": "^3.2.4"
|
|
48
48
|
}
|
|
49
|
-
}
|
|
49
|
+
}
|