echart样式

This commit is contained in:
花有清香月有阴
2021-12-22 11:53:04 +08:00
parent 7896d20f35
commit cb1b3d9f5a

View File

@@ -44,12 +44,12 @@
</div> </div>
<div class="items"> <div class="items">
<span class="items2">{{ chartsList.increase }}</span> <span class="items3">0</span>
<span>今日新增</span> <span>今日新增</span>
</div> </div>
<div class="items"> <div class="items">
<span class="items4">{{ chartsList.decrease }}</span> <span class="items4">0</span>
<span>今日流失</span> <span>今日流失</span>
</div> </div>
</div> </div>
@@ -282,6 +282,13 @@ export default {
initEcharts1(data) { initEcharts1(data) {
var option = { var option = {
grid: {
top: '9%',
left: '6%',
right: '8%',
bottom: '6%',
containLabel: true,
},
xAxis: { xAxis: {
type: 'category', type: 'category',
data: Object.keys(data).map((e) => e.substring(e.length - 5, e.length)), data: Object.keys(data).map((e) => e.substring(e.length - 5, e.length)),
@@ -328,8 +335,14 @@ export default {
}, },
initEcharts2(data) { initEcharts2(data) {
console.log(data)
var options = { var options = {
grid: {
top: '9%',
left: '6%',
right: '8%',
bottom: '6%',
containLabel: true,
},
xAxis: { xAxis: {
type: 'category', type: 'category',
data: data.map((v) => v.v1), data: data.map((v) => v.v1),