如何在字符串的末尾添加工具提示轴标签使用jQuery海军报
问题描述:
我创建海军报图与jQuery海军报,但现在,我有X轴长的标签,并将其与截断......。如何在字符串的末尾添加工具提示轴标签使用jQuery海军报
我需要添加x轴标签上的提示来查看完整的标签。
我们已经附上截图。
还是有办法自定义绘制轴标签(HTML)?
感谢
答
类似的问题已经被answerd:Mark 在Question
下面是使用CSS,使一些在飞行中调整,这样的事情将适合的尝试:
// push the labels down half their width
// while we are at it find longest label height
var longest = -1;
$('#flot_chart .xAxis .tickLabel').each(function(){
var self = $(this);
var width = self.width();
self.css('top',parseInt(self.css('top')) + width/2 - 5);
if (width > longest){
longest = width;
}
});
// now adjust the chart height so we don't overflow
$("#flot_chart").height($("#flot_chart").height() + longest - $('#flot_chart .xAxis .tickLabel').height() + 5);
答
我已经解决了这个由路过HTML字符串中添加滴答选项。
JQuery的FLOT注入浮法-X#-label容器的HTML字符串。
我已经解决了这个由路过HTML字符串中的蜱选择添加。 –