Skip to content

issue #2151 has been fixed. #2218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 2.1
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ class="w-full max-w-full items-end"
<div class="flex justify-center gap-5">
<div class="flex items-center gap-2">
<span class="h-3.5 w-3.5 rounded-sm bg-green-500 opacity-80"></span>

<p class="text-xs dark:text-gray-300">
@lang('admin::app.dashboard.index.revenue.won-revenue')
</p>
</div>

<div class="flex items-center gap-2">
<span class="h-3.5 w-3.5 rounded-sm bg-red-500 opacity-80"></span>

<p class="text-xs dark:text-gray-300">
@lang('admin::app.dashboard.index.revenue.lost-revenue')
</p>
Expand All @@ -118,7 +118,7 @@ class="w-full max-w-full items-end"
report: [],

isLoading: true,

chart: undefined,
}
},
Expand Down Expand Up @@ -151,15 +151,15 @@ class="w-full max-w-full items-end"
})
.catch(error => {});
},

prepare() {
if (this.chart) {
this.chart.destroy();
}

this.chart = new Chart(document.getElementById(this.$.uid + '_chart'), {
type: 'bar',

data: {
labels: [
"@lang('admin::app.dashboard.index.revenue.won-revenue')",
Expand All @@ -178,27 +178,26 @@ class="w-full max-w-full items-end"
'rgba(239, 68, 68, 0.8)',
],

barThickness: [42,42],

borderWidth: 1
barPercentage: 0.8,
categoryPercentage: 0.7,
}],
},

options: {
aspectRatio: 7,
aspectRatio: 5,

indexAxis: 'y',

plugins: {
legend: {
display: false,
},
},

scales: {
x: {
beginAtZero: true,

ticks: {
stepSize: 500,
},
Expand All @@ -210,20 +209,33 @@ class="w-full max-w-full items-end"

y: {
beginAtZero: true,

ticks: {
display: false,
display: false,
},

border: {
dash: [8, 4],
}
}
},

maintainAspectRatio: true,

responsive: true,

layout: {
padding: {
left: 0,
right: 0,
top: 0,
bottom: 0
}
}
}
});
}
}
});
</script>
@endPushOnce
@endPushOnce
Loading