Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
anji-plus-report
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
鲁尚清
3 years ago
Commit
c5c7617b944e7730863eb7141f0bcef0b7571a1f
1 parent
7c3b0425
【876】柱线图增加数据视图功能,表格增加日期列
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
11 deletions
report-ui/src/views/report/bigscreen/designer/widget/monitor/customBarLineChart.vue
report-ui/src/views/report/bigscreen/designer/widget/monitor/customBarLineChart.vue
View file @
c5c7617
...
...
@@ -378,8 +378,24 @@ export default {
},
splitLine: {
show: false,
},
/* min:function (value){
if(Math.abs(value.max)>Math.abs(value.min)){
return (-Math.abs(value.max)*1.2).toFixed(2)
}else{
return (-Math.abs(value.min)*1.2).toFixed(2)
}
},
max:function (value){
if(Math.abs(value.max)>Math.abs(value.min)){
return (Math.abs(value.max)*1.2).toFixed(2)
}else{
return (Math.abs(value.min)*1.2).toFixed(2)
}
}*/
},
{
type: "value",
splitNumber: optionsSetup.splitNumberRight,// 均分
...
...
@@ -627,19 +643,21 @@ export default {
dataView: {
show: true, title: '数据视图', readOnly: true, optionToContent: function (opt) {
let series = opt.series;
console.log("***",opt)
let str='';
if(that.optionsSetup.download){
str+=`<div style="position: absolute;right: 10px;top: 6px;color:#1e9fff;cursor: pointer;">
<span id="handleButton" >导出</span>
</div>`;
}
let table =str+ '<table '+that.dataViewTable+' class="dataViewTable"><thead><tr class="dataViewTr">';
let table =str+ '<table '+that.dataViewTable+' class="dataViewTable"><thead>' +
'<tr class="dataViewTr"><td '+that.dataViewThead+'>日期</td>';
for(let i=0;i<series.length;i++){
table+='<td '+that.dataViewThead+' class="dataViewHead">' + (series[i].name?series[i].name:'') + '</td>';
}
table+= '</thead></tr><tbody '+that.dataViewTbody+'>';
for(let j=0;j<series[0].data.length;j++){
table += '<tr class="dataViewTr">';
table += '<tr class="dataViewTr">
<td '+that.dataViewTd+'>'+opt.xAxis[0].data[j]+'</td>
';
for(let i=0;i<series.length;i++){
table +='<td '+that.dataViewTd+' class="dataViewTd">' + series[i].data[j] + '</td>'
}
...
...
@@ -770,15 +788,15 @@ export default {
})
}
this.options.series=series;
let arr=[];
this.options.series.map(item=>{
arr.push(item.data)
})
let min=this.calMin(arr);
let max=this.calMax(arr);
if(min<0){
this.options.yAxis[1].min=-20;
}
// let arr=[];
// this.options.series.map(item=>{
// arr.push(item.data)
// })
// let min=this.calMin(arr);
// let max=this.calMax(arr);
// if(min<0){
// this.options.yAxis[1].min=-20;
// }
// this.options.yAxis[0].max=max;
// this.options.yAxis[0].min=min;
// this.options.yAxis[0].interval=(max-min)/7
...
...
Please
register
or
login
to post a comment