I am getting y-axis label text underlined with blue color in iphone for drawing highchart.
我在iphone中用蓝色下划线标出y轴标签文字,用于绘制高图。
Following is my code
以下是我的代码
$scope.chartConfig.options.yAxis.splice(dataset.id,0,{
id: dataset.id,
lineColor : dataset.pointColor,
lineWidth : 1,
title: {
text: null,
style: {
color: dataset.pointColor
}
},
labels: {
style: {
color: dataset.pointColor,
fontSize:'10px'
},
useHTML : true,
formatter: function() {
if(this.value > 99 || this.value < -99){
var yAxisValue = parseFloat(this.value);
var valueStringLength = (yAxisValue).toString().split(".")[0].length;
var labelValue = (this.value/Math.pow(10, valueStringLength-1)).toFixed(2);
labelValue = labelValue + "<span>×</span>10^"+(valueStringLength-1);
return labelValue ;
}else{
return Math.round(this.value);
}
},
align: 'center',
x: indexPositive?32:-32
},
opposite: indexPositive
});
When I return value from else part of formatter
function, I get the Label text underlined and in blue color. I have tried to insert textDecoration: 'none'
in style attribute but no effect on it. I tried with other way by adding line Highcharts.Tick.prototype.drilldown = function(){};
in the code but no effect.
当我从formatter函数的else部分返回值时,我得到带有下划线和蓝色的Label文本。我试图在style属性中插入textDecoration:'none'但对它没有影响。我尝试用其他方式添加行Highcharts.Tick.prototype.drilldown = function(){};在代码中但没有效果。
I am surprised with the behavior of label text. How internally it is applying style to text?
我对标签文本的行为感到惊讶。内部如何将样式应用于文本?
Please help..
请帮忙..
Thanks.
谢谢。
1 个解决方案
#1
1
Thanks friends for all your response, however my friend solved this problem by putting following code.
感谢各位朋友的回复,但我的朋友通过下面的代码解决了这个问题。
return "<div><span>"+Math.round(this.value)+"</span></div>";
in the place of
代替
return Math.round(this.value);
#1
1
Thanks friends for all your response, however my friend solved this problem by putting following code.
感谢各位朋友的回复,但我的朋友通过下面的代码解决了这个问题。
return "<div><span>"+Math.round(this.value)+"</span></div>";
in the place of
代替
return Math.round(this.value);