Commit 7a8d619c authored by xinzhedeai's avatar xinzhedeai

detail markerline color

parent a3c4e519
......@@ -408,6 +408,7 @@
chartsOption.xAxis.data = result.xData.data
var colors = ['#7CB5EC', '#90ED7D', '#F7A35C', '#8085E9'];
var marklineColors = ['red','orange', 'yellow', 'blue'];
chartsOption.series = result.yData.map((item, index) => {
var tempObj = JSON.parse(JSON.stringify(yAxisOption));
tempObj.data = item.data
......@@ -415,7 +416,14 @@
tempObj.itemStyle.color = colors[index];
tempObj.markLine.data = item.alarm
tempObj.markLine.data = item.alarm.map((item1, index1)=>{
item1.lineStyle = {
color: marklineColors[index1]
}
return item1
})
delete tempObj['markLine']
return tempObj
})
......
......@@ -33,9 +33,9 @@ let jessibucaPlayer = {};
}
);
var host = location.protocol + '//' + (location.hostname === '192.168.3.38' ? '192.168.3.37' : '192.168.13.200') + ':8013';
var host = location.protocol + '//' + (location.hostname === '192.168.2.11' ? '192.168.2.37' : '192.168.13.200') + ':8013';
var selfHost = location.hostname === '192.168.3.38' ? 'http://192.168.3.38:8057' : location.protocol + '//' + window.location.host;
var selfHost = location.hostname === '192.168.2.11' ? 'http://192.168.2.11:8057' : location.protocol + '//' + window.location.host;
// 请求 token 用
......
......@@ -330,11 +330,20 @@
const result = res.data.body;
if (result) {
chartsOption.xAxis.data = result.xData.data
var marklineColors = ['red','orange', 'yellow', 'blue'];
chartsOption.series = result.yData.map((item, index) => {
var tempObj = JSON.parse(JSON.stringify(yAxisOption));
tempObj.data = item.data
tempObj.name = item.name
tempObj.markLine.data = item.alarm
tempObj.markLine.data = item.alarm.map((item1, index1)=>{
item1.lineStyle = {
color: marklineColors[index1]
}
return item1
})
delete tempObj['markLine']
return tempObj
})
......
......@@ -320,11 +320,22 @@
const result = res.data.body;
if (result) {
chartsOption.xAxis.data = result.xData.data
var marklineColors = ['red','orange', 'yellow', 'blue'];
chartsOption.series = result.yData.map((item, index) => {
var tempObj = JSON.parse(JSON.stringify(yAxisOption));
tempObj.data = item.data
tempObj.name = item.name
tempObj.markLine.data = item.alarm
tempObj.markLine.data = item.alarm.map((item1, index1)=>{
item1.lineStyle = {
color: marklineColors[index1]
}
return item1
})
delete tempObj['markLine']
return tempObj
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment