This commit is contained in:
2020-11-03 17:45:33 +00:00
parent c32cb44b50
commit 9f26c8cc67
4 changed files with 41 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
<template> <template>
<v-sheet color="white" elevation="4" height="300" style="overflow: hidden;"> <v-sheet color="white" elevation="4" height="300px" style="overflow: hidden;">
<slot name="dash-title"> <slot name="dash-title">
<v-toolbar flat dense> <v-toolbar flat dense>
<template v-if="hasUrl"> <template v-if="hasUrl">

View File

@@ -7,19 +7,31 @@
v-bind="$attrs" v-bind="$attrs"
> >
<template slot="main"> <template slot="main">
<div class="ml-4 mt-1"> <gz-chart-bar-horizontal
<gz-chart-bar-horizontal :width="400"
:chartData="obj" :height="240"
:options="{ :chartData="obj"
responsive: true, :options="{
legend: { display: false }, maintainAspectRatio: false,
scales: { responsive: true,
xAxes: [{ gridLines: { display: true } }], legend: { display: false },
yAxes: [{ gridLines: { display: true } }] scales: {
} xAxes: [
}" {
></gz-chart-bar-horizontal> gridLines: { display: true },
</div> ticks: {
beginAtZero: true
}
}
],
yAxes: [
{
gridLines: { display: false }
}
]
}
}"
></gz-chart-bar-horizontal>
</template> </template>
</gz-dash> </gz-dash>
</template> </template>
@@ -46,16 +58,22 @@ export default {
"Head office", "Head office",
"Service", "Service",
"Non Service", "Non Service",
"Subcontractor" "Subcontractor",
"Six",
"Seven",
"eight",
"nine",
"ten"
], ],
datasets: [ datasets: [
{ {
label: "", label: "",
data: [2, 4, 6, 8, 10], data: [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],
backgroundColor: getPalette(5), backgroundColor: getPalette(10)
minBarLength: 5, // ,
barThickness: 6, // minBarLength: 5,
categoryPercentage: 0.2 // barThickness: 6,
// categoryPercentage: 0.2
} }
] ]
} }
@@ -66,7 +84,7 @@ export default {
computed: {}, computed: {},
methods: { methods: {
loadData: function() { loadData: function() {
console.log("GzDashTestBarWidgetCountByUserType::loadData"); //console.log("GzDashTestBarWidgetCountByUserType::loadData");
} }
} }
}; };

View File

@@ -27,7 +27,7 @@ export default {
computed: {}, computed: {},
methods: { methods: {
loadData: function() { loadData: function() {
console.log("GzDashTestDayCalendarWidget::loadData"); //console.log("GzDashTestDayCalendarWidget::loadData");
} }
} }
}; };

View File

@@ -27,7 +27,7 @@ export default {
computed: {}, computed: {},
methods: { methods: {
loadData: function() { loadData: function() {
console.log("GzDashTestLineWidgetMonthlyTotalPrice::loadData"); //console.log("GzDashTestLineWidgetMonthlyTotalPrice::loadData");
} }
} }
}; };