Commit 7151831e by ChenXiHi

css修改

parent 8163651c
...@@ -1197,6 +1197,15 @@ body { ...@@ -1197,6 +1197,15 @@ body {
flex-direction: column; flex-direction: column;
height: auto; height: auto;
} }
.echarts-title-content {
display: flex;
flex-direction: column;
align-items: center;
}
.chart-desc-two {
margin-left: 10%;
}
.echarts-title-top1{ .echarts-title-top1{
margin-left: 0; margin-left: 0;
} }
......
...@@ -604,7 +604,14 @@ ...@@ -604,7 +604,14 @@
}, },
] ]
} }
const getEchartsDataPadding = () => {
if (windowWidth > 768) {
return [0,0,0,65]
}
return [
0,0,0,25
]
}
//用电趋势 //用电趋势
const getEcharts = () => { const getEcharts = () => {
let option = { let option = {
...@@ -823,7 +830,7 @@ ...@@ -823,7 +830,7 @@
var option = { var option = {
grid: { grid: {
left: '1%', left: '2%',
right: '5%', right: '5%',
bottom: '6%', bottom: '6%',
top: 30, top: 30,
...@@ -882,7 +889,7 @@ ...@@ -882,7 +889,7 @@
color: 'rgba(255, 255, 255, 1)', color: 'rgba(255, 255, 255, 1)',
}, },
// align: 'center', // align: 'center',
padding: [0, 0, 0, 65] padding: getEchartsDataPadding()
}, },
// offset:5, // offset:5,
axisTick: { axisTick: {
...@@ -1433,7 +1440,7 @@ ...@@ -1433,7 +1440,7 @@
axisLabel: { axisLabel: {
interval: 0, interval: 0,
textStyle: { textStyle: {
fontSize: 14, //更改坐标轴文字大小 fontSize: 12, //更改坐标轴文字大小
color: "#fff", color: "#fff",
padding: [0, 0, 0, 0], padding: [0, 0, 0, 0],
}, },
...@@ -1941,7 +1948,7 @@ ...@@ -1941,7 +1948,7 @@
const getBarEcharts = () => { const getBarEcharts = () => {
let option = { let option = {
grid: { grid: {
left: "3%", left: "4%",
right: "1%", right: "1%",
bottom: "3%", bottom: "3%",
containLabel: true, containLabel: true,
...@@ -2284,7 +2291,7 @@ ...@@ -2284,7 +2291,7 @@
grid: { grid: {
top: 50, top: 50,
left: "1%", left: "1%",
right: "1%", right: -30,
bottom: 20, bottom: 20,
containLabel: true, containLabel: true,
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论