* [task#135805 doing 0.1h 2h] modify the display of graphic.
This commit is contained in:
@@ -46,17 +46,17 @@ window.initBcgModel = function()
|
||||
const minX = Math.min(...data.basicXAxis);
|
||||
const maxY = Math.max(...data.basicYAxis);
|
||||
const minY = Math.min(...data.basicYAxis);
|
||||
const minXAxis = markLineX <= minX ? Number(markLineX.toFixed(2)) : 0;
|
||||
const maxXAxis = markLineX >= maxX ? Number(markLineX.toFixed(2)) : 0;
|
||||
const minYAxis = markLineY <= minY ? Number(markLineY.toFixed(2)) : 0;
|
||||
const maxYAxis = markLineY >= maxY ? Number(markLineY.toFixed(2)) : 0;
|
||||
const minXAxis = markLineX <= minX ? markLineX : 0;
|
||||
const maxXAxis = markLineX >= maxX ? markLineX : 0;
|
||||
const minYAxis = markLineY <= minY ? markLineY : 0;
|
||||
const maxYAxis = markLineY >= maxY ? markLineY : 0;
|
||||
|
||||
/* 划分的区域名称的展示。*/
|
||||
/* A display of the names of the zones delineated. */
|
||||
const graphicData = [];
|
||||
for(let i = 0; i < 4; i++)
|
||||
{
|
||||
let position = (i % 2 == 0) ? { left: '7%' } : { right: '14%' };
|
||||
let position = (i % 2 == 0) ? { left: '9%' } : { right: '14%' };
|
||||
position[(i < 2) ? 'top' : 'bottom'] = (i < 2) ? '4%' : '10%';
|
||||
|
||||
graphicData.push({
|
||||
@@ -190,14 +190,12 @@ window.initBcgModel = function()
|
||||
inverse: configureDimension.xAxisOrder == 1,
|
||||
type: 'value',
|
||||
min: function(value) {
|
||||
const minValue = Number(value.min.toFixed(2));
|
||||
const threshold = minXAxis < -1000 ? 500 : 90;
|
||||
return minValue - minXAxis - threshold;
|
||||
return value.min - minXAxis - threshold;
|
||||
},
|
||||
max: function(value) {
|
||||
const maxValue = Number(value.max.toFixed(2));
|
||||
const threshold = maxXAxis > 1000 ? 500 : 90;
|
||||
return maxValue + maxXAxis + threshold;
|
||||
return value.max + maxXAxis + threshold;
|
||||
},
|
||||
splitLine: {
|
||||
show: false,
|
||||
@@ -214,7 +212,7 @@ window.initBcgModel = function()
|
||||
fontSize: 16,
|
||||
color: '#64758B',
|
||||
formatter: function(params) {
|
||||
return (`${params}`).slice(0, 4);
|
||||
return params.toFixed(2);
|
||||
}
|
||||
},
|
||||
axisLine: {
|
||||
@@ -237,14 +235,12 @@ window.initBcgModel = function()
|
||||
inverse: configureDimension.yAxisOrder == 1,
|
||||
type: 'value',
|
||||
min: function(value) {
|
||||
const minValue = Number(value.min.toFixed(2));
|
||||
const threshold = minYAxis < -1000 ? 500 : 90;
|
||||
return minValue - minYAxis - threshold;
|
||||
return value.min - minYAxis - threshold;
|
||||
},
|
||||
max: function(value) {
|
||||
const maxValue = Number(value.max.toFixed(2));
|
||||
const threshold = maxYAxis > 1000 ? 500 : 90;
|
||||
return maxValue + maxYAxis + threshold;
|
||||
return value.max + maxYAxis + threshold;
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
@@ -268,7 +264,10 @@ window.initBcgModel = function()
|
||||
axisLabel: {
|
||||
show: true,
|
||||
fontSize: 16,
|
||||
color: '#64758B'
|
||||
color: '#64758B',
|
||||
formatter: function(params) {
|
||||
return params.toFixed(2);
|
||||
}
|
||||
}
|
||||
},
|
||||
series: series
|
||||
|
||||
Reference in New Issue
Block a user