@bildvitta/quasar-ui-asteroid 3.15.0-beta.14 → 3.15.0-beta.15
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/package.json
CHANGED
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
import { Bar as BarChart, Doughnut as DoughnutChart, Line as LineChart } from 'vue-chartjs'
|
|
48
48
|
|
|
49
49
|
// Configurações padrões
|
|
50
|
-
import { charts, colors, font } from './config'
|
|
50
|
+
import { charts, colors as defaultColors, font } from './config'
|
|
51
51
|
|
|
52
52
|
// Plugins
|
|
53
53
|
import zoomPlugin from 'chartjs-plugin-zoom'
|
|
@@ -79,6 +79,11 @@ export default {
|
|
|
79
79
|
type: Function
|
|
80
80
|
},
|
|
81
81
|
|
|
82
|
+
colorsList: {
|
|
83
|
+
type: Array,
|
|
84
|
+
default: () => []
|
|
85
|
+
},
|
|
86
|
+
|
|
82
87
|
entity: {
|
|
83
88
|
required: true,
|
|
84
89
|
type: String
|
|
@@ -161,6 +166,7 @@ export default {
|
|
|
161
166
|
|
|
162
167
|
const [dataset] = this.data
|
|
163
168
|
const labels = this.getXAxisData(dataset.data.map(item => item.x))
|
|
169
|
+
const colors = this.colorsList.length ? this.colorsList : defaultColors
|
|
164
170
|
|
|
165
171
|
const datasets = this.data.map(({ label, data }, index) => {
|
|
166
172
|
const backgroundColor = this.isDoughnut ? colors : colors.at(index)
|
|
@@ -10,6 +10,12 @@ props:
|
|
|
10
10
|
type: Function
|
|
11
11
|
examples: ['beforeFetch({ payload, resolve, done })']
|
|
12
12
|
|
|
13
|
+
colors-list:
|
|
14
|
+
desc: Lista de cores personalizadas para utilizar nos gráficos
|
|
15
|
+
default: []
|
|
16
|
+
type: Array,
|
|
17
|
+
examples: ['#34B53A', '#016DD9', '#FFB200', '#F62D1B']
|
|
18
|
+
|
|
13
19
|
entity:
|
|
14
20
|
desc: Entidade da store, por exemplo se tiver que trabalhar com modulo de usuários, teremos o model "users" na store, que vai ser nossa "entity".
|
|
15
21
|
required: true
|