一些Raphael标签没有出现在Linechart Mouseover上

Some Raphael tags are not appearing on Linechart Mouseover

本文关键字:Linechart Mouseover Raphael 标签 一些      更新时间:2024-05-24

如图所示;第13个标签(Raphael语言中的标签)不会出现在它们各自图形点的鼠标悬停上(至少不在可视区域中)。你加的分数越多,问题就越严重。有人知道问题出在哪里吗?

var r = Raphael("holder"),
   txtattr = {
      font: "12px sans-serif"
   };
r.text(65, 25, "Basis Points").attr(txtattr);
lines = r.linechart(100, 40, 600, 260, [
   [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
], [
   [12, 32, 23, 15, 17, 27, 22, 12, 32, 23, 15, 17, 27]
],
{
   nostroke: false,
   axis: "0 0 1 1",
   symbol: "circle",
   smooth: true
}).hoverColumn(function ()
{
   this.tags = r.set();
   for (var i = 0, ii = this.y.length; i < ii; i++)
   {
      this.tags.push(
        r.tag(this.x, this.y[i], this.values[i], 160, 10).insertBefore(this)
        .attr([
        {
           fill: "#fff"
        },
        {
           fill: this.symbols[i].attr("fill")
        }]));
   }
}, function ()
{
   this.tags && this.tags.remove();
});
lines.symbols.attr(
{
   r: 3
});
r.width = 650;

jsfiddle

问题是由于悬停列宽计算正确,代码修复在下面的错误报告中描述:

折线图列宽错误