提交 d7580a3f 编写于 作者: N Nicky Chan 提交者: daminglu

Expand Chart should have same padding as non expand chart otherwise t… (#324)

上级 90e31230
......@@ -89,10 +89,10 @@ export default {
setChartOptions(visData, tag, chartType) {
let grid = {
left: '15%',
top: '15%',
right: '10%',
bottom: '8%'
left: 45,
top: 60,
right: 40,
bottom: 36
};
let title = {
text: tag,
......@@ -185,9 +185,9 @@ export default {
let ecChart = this.myChart;
let maxStep = -Infinity;
let minStep = Infinity;
grid.top = '42%';
grid.left = '4%';
grid.right = '10%';
grid.top = 126;
grid.left = 16;
grid.right = 40;
chartData.forEach(function (dataItem) {
let lineData = [];
maxStep = Math.max(dataItem.step, maxStep);
......
......@@ -220,19 +220,20 @@ export default {
},
legend: {
data: legendOptions,
top: '13%'
top: 39
},
grid: {
left: '12%',
top: '25%',
right: '10%',
bottom: '12%'
left: 48,
top: 75,
right: 40,
bottom: 36
},
xAxis: {
type: 'value',
axisLabel: {
fontSize: '11'
}
},
splitNumber: this.isExpand ? 10 : 5
},
yAxis: {
type: 'value',
......@@ -427,19 +428,30 @@ export default {
let horizontalToxAxisOptions = {
step: {
xAxis: {
type: 'value'
type: 'value',
axisLabel: {
fontSize: '11'
},
splitNumber: this.isExpand ? 10 : 5
},
series: stepSeries
},
relative: {
xAxis: {
type: 'value'
type: 'value',
axisLabel: {
fontSize: '11'
},
splitNumber: this.isExpand ? 10 : 5
},
series: relativeSeries
},
wall: {
xAxis: {
type: 'time'
type: 'time',
axisLabel: {
fontSize: '11'
},
},
series: wallSeries
}
......@@ -468,6 +480,12 @@ export default {
height: 300
});
}
this.myChart.setOption({
xAxis: {
splitNumber: this.isExpand ? 10 : 5
}
});
},
toggleSelectZoom(enable) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册