refactor(dashboard,history): replace ViewModels with Pinia stores and improve backend
This commit is contained in:
@@ -29,6 +29,7 @@ export interface PricePoint {
|
||||
|
||||
const props = defineProps<{
|
||||
data: PricePoint[];
|
||||
color?: string;
|
||||
}>();
|
||||
|
||||
const chartData = computed(() => ({
|
||||
@@ -36,8 +37,10 @@ const chartData = computed(() => ({
|
||||
datasets: [
|
||||
{
|
||||
data: props.data.map((d) => d.value),
|
||||
borderColor: '#4ba66a',
|
||||
backgroundColor: 'rgba(75, 166, 106, 0.1)',
|
||||
borderColor: props.color || '#4ba66a',
|
||||
backgroundColor: props.color
|
||||
? `${props.color}1a`
|
||||
: 'rgba(75, 166, 106, 0.1)',
|
||||
fill: true,
|
||||
tension: 0.4,
|
||||
pointRadius: 2,
|
||||
|
||||
Reference in New Issue
Block a user