Clear color-mix

pull/6156/head
tanerengiiin 2024-08-02 00:08:59 +03:00
parent 07c2dbb60b
commit 5f839cc5ae
1 changed files with 12 additions and 7 deletions

View File

@ -240,32 +240,37 @@ export default {
this.$refs.menu.toggle(event); this.$refs.menu.toggle(event);
}, },
setChartData(timeUnit) { setChartData(timeUnit) {
const documentStyle = getComputedStyle(document.documentElement);
const datasets = this.createDatasets(timeUnit) const datasets = this.createDatasets(timeUnit)
const documentStyle = getComputedStyle(document.documentElement);
const primary200=documentStyle.getPropertyValue('--p-primary-200')
const primary300=documentStyle.getPropertyValue('--p-primary-300')
const primary400=documentStyle.getPropertyValue('--p-primary-400')
const primary500=documentStyle.getPropertyValue('--p-primary-500')
const primary600=documentStyle.getPropertyValue('--p-primary-600')
return { return {
labels: datasets.labels, labels: datasets.labels,
datasets: [ datasets: [
{ {
type: 'bar', type: 'bar',
label: 'Personal Wallet', label: 'Personal Wallet',
backgroundColor: 'color-mix(in srgb, ' + documentStyle.getPropertyValue('--p-primary-400') + ' 100%, #fff)', backgroundColor: primary400,
hoverBackgroundColor: 'color-mix(in srgb, ' + documentStyle.getPropertyValue('--p-primary-600') + ' 100%, #fff)', hoverBackgroundColor: primary600,
data: datasets.data[0], data: datasets.data[0],
barThickness: 32 barThickness: 32
}, },
{ {
type: 'bar', type: 'bar',
label: 'Corporate Wallet', label: 'Corporate Wallet',
backgroundColor: 'color-mix(in srgb, ' + documentStyle.getPropertyValue('--p-primary-300') + ' 100%, transparent)', backgroundColor: primary300,
hoverBackgroundColor: 'color-mix(in srgb, ' + documentStyle.getPropertyValue('--p-primary-500') + ' 100%, #fff)', hoverBackgroundColor: primary500,
data: datasets.data[1], data: datasets.data[1],
barThickness: 32 barThickness: 32
}, },
{ {
type: 'bar', type: 'bar',
label: 'Investment Wallet', label: 'Investment Wallet',
backgroundColor: 'color-mix(in srgb, ' + documentStyle.getPropertyValue('--p-primary-200') + ' 100%, transparent)', backgroundColor: primary200,
hoverBackgroundColor: 'color-mix(in srgb, ' + documentStyle.getPropertyValue('--p-primary-400') + ' 100%, #fff)', hoverBackgroundColor: primary400,
data: datasets.data[2], data: datasets.data[2],
borderRadius: { borderRadius: {
topLeft: 8, topLeft: 8,