Skip to content

Commit 186f11a

Browse files
committed
issue #2151 has been fixed.
1 parent 3391eb5 commit 186f11a

File tree

1 file changed

+29
-17
lines changed

1 file changed

+29
-17
lines changed

packages/Webkul/Admin/src/Resources/views/dashboard/index/revenue.blade.php

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ class="w-full max-w-full items-end"
8989
<div class="flex justify-center gap-5">
9090
<div class="flex items-center gap-2">
9191
<span class="h-3.5 w-3.5 rounded-sm bg-green-500 opacity-80"></span>
92-
92+
9393
<p class="text-xs dark:text-gray-300">
9494
@lang('admin::app.dashboard.index.revenue.won-revenue')
9595
</p>
9696
</div>
97-
97+
9898
<div class="flex items-center gap-2">
9999
<span class="h-3.5 w-3.5 rounded-sm bg-red-500 opacity-80"></span>
100-
100+
101101
<p class="text-xs dark:text-gray-300">
102102
@lang('admin::app.dashboard.index.revenue.lost-revenue')
103103
</p>
@@ -118,7 +118,7 @@ class="w-full max-w-full items-end"
118118
report: [],
119119
120120
isLoading: true,
121-
121+
122122
chart: undefined,
123123
}
124124
},
@@ -151,15 +151,15 @@ class="w-full max-w-full items-end"
151151
})
152152
.catch(error => {});
153153
},
154-
154+
155155
prepare() {
156156
if (this.chart) {
157157
this.chart.destroy();
158158
}
159159
160160
this.chart = new Chart(document.getElementById(this.$.uid + '_chart'), {
161161
type: 'bar',
162-
162+
163163
data: {
164164
labels: [
165165
"@lang('admin::app.dashboard.index.revenue.won-revenue')",
@@ -178,27 +178,26 @@ class="w-full max-w-full items-end"
178178
'rgba(239, 68, 68, 0.8)',
179179
],
180180
181-
barThickness: [42,42],
182-
183-
borderWidth: 1
181+
barPercentage: 0.8,
182+
categoryPercentage: 0.7,
184183
}],
185184
},
186-
185+
187186
options: {
188-
aspectRatio: 7,
187+
aspectRatio: 5,
189188
190189
indexAxis: 'y',
191-
190+
192191
plugins: {
193192
legend: {
194193
display: false,
195194
},
196195
},
197-
196+
198197
scales: {
199198
x: {
200199
beginAtZero: true,
201-
200+
202201
ticks: {
203202
stepSize: 500,
204203
},
@@ -210,20 +209,33 @@ class="w-full max-w-full items-end"
210209
211210
y: {
212211
beginAtZero: true,
213-
212+
214213
ticks: {
215-
display: false,
214+
display: false,
216215
},
217216
218217
border: {
219218
dash: [8, 4],
220219
}
221220
}
221+
},
222+
223+
maintainAspectRatio: true,
224+
225+
responsive: true,
226+
227+
layout: {
228+
padding: {
229+
left: 0,
230+
right: 0,
231+
top: 0,
232+
bottom: 0
233+
}
222234
}
223235
}
224236
});
225237
}
226238
}
227239
});
228240
</script>
229-
@endPushOnce
241+
@endPushOnce

0 commit comments

Comments
 (0)