add pattern draw fix

This commit is contained in:
joseCorte-exe 2022-05-19 18:19:31 -03:00
parent a0ee136d04
commit 30f016c60b
2 changed files with 4 additions and 4 deletions

View File

@ -118,7 +118,7 @@ export function LineBarChart({ title, subtitle, data1, data2, data3, label, red,
type: 'bar' as const,
label: dataset2? dataset2 : 'Dataset 2',
backgroundColor: (value, ctx) => {
return hashurado? parseInt(value.dataIndex+1) <= currentTime.getMonth()? '#C2D5FB' : draw('diagonal', '#C2D5FB') : '#C2D5FB'
return hashurado? parseInt(value.dataIndex+1) <= currentTime.getMonth()? '#C2D5FB' : '#C2D5FB' : '#C2D5FB'
},
data: data3.map(value => value),
},
@ -127,7 +127,7 @@ export function LineBarChart({ title, subtitle, data1, data2, data3, label, red,
label: dataset3? dataset3 : 'Dataset 2',
// backgroundColor: '#255488',
backgroundColor: (value, ctx) => {
return hashurado? parseInt(value.dataIndex+1) <= currentTime.getMonth()? '#255488' : draw('diagonal', '#255488') : '#255488'
return hashurado? parseInt(value.dataIndex+1) <= currentTime.getMonth()? '#255488' : '#255488' : '#255488'
},
data: data2.map(value => value),
},

View File

@ -79,12 +79,12 @@ export function SingleBar({ title, subtitle, dataProps, label, dataset, dataset1
label: dataset,
data: dataProps.map(value => value),
backgroundColor: (value, ctx) => {
return year? label[value.dataIndex]<=currentTime.getFullYear().toString()? '#255488' : draw('diagonal', '#C2D5FB') : day? parseInt(label[value.dataIndex])<=currentTime.getDay()? '#255488' : draw('diagonal', '#C2D5FB') : null
return year? label[value.dataIndex]<=currentTime.getFullYear().toString()? '#255488' : '#C2D5FB' : day? parseInt(label[value.dataIndex])<=currentTime.getDay()? '#255488' : '#C2D5FB' : null
},
},
{
label: dataset1,
backgroundColor: draw('diagonal', '#C2D5FB')
backgroundColor: '#C2D5FB'
}
],
};