fix:修改explore的堆叠显示中文的问题
This commit is contained in:
@@ -164,6 +164,8 @@
|
||||
|
||||
if(this.chartType == 'line' || this.chartType == 'overviewLine'){
|
||||
this.option.xAxis.axisLabel.formatter=this.defaultXAxisFormatter;
|
||||
this.option.toolbox.tooltip.formatter=this.defaultToolBoxFormatter;
|
||||
|
||||
if(this.yAxisFormatter){
|
||||
this.option.yAxis.axisLabel.formatter=this.yAxisFormatter;
|
||||
}else{
|
||||
@@ -351,6 +353,12 @@
|
||||
return [ month, day].join('-') + "\n"
|
||||
+ [hour, minute].join(':');
|
||||
},
|
||||
defaultToolBoxFormatter(params){
|
||||
if(params.name==='stack'){
|
||||
return this.$t('overall.toolBox.stack')
|
||||
}
|
||||
return params.title
|
||||
},
|
||||
defaultTooltipFormatter:function(params){
|
||||
let str = `<div>`;
|
||||
params.forEach((item, i) => {
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
show:false,
|
||||
top:'0',
|
||||
right:'18',
|
||||
showTitle:true,
|
||||
showTitle:false,
|
||||
tooltip:{
|
||||
show:false,
|
||||
show:true,
|
||||
},
|
||||
feature:{
|
||||
dataZoom:{
|
||||
@@ -54,6 +54,20 @@
|
||||
title:{}
|
||||
},
|
||||
// restore: {},
|
||||
},
|
||||
tooltip: { // 和 option.tooltip 的配置项相同
|
||||
show: true,
|
||||
position:'top',
|
||||
formatter: function (param) {
|
||||
debugger
|
||||
return param.title; // 自定义的 DOM 结构
|
||||
},
|
||||
backgroundColor:'rgba(255,255,255,0)',
|
||||
borderColor :'rgba(255,255,255,0)',
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color : '#439AC6'
|
||||
},
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
|
||||
Reference in New Issue
Block a user