nvd3 ghaph中的点不清楚

Mau*_*umi 3 jquery graph nvd3.js

我使用nvd3.js来显示带有3个不同键的图形.在那些3,1中有这么多的坐标,其余的2 s只有一个坐标.现在这些单一的坐标是不正确的.我的代码是这样的:

nv.addGraph(function () {
    var chart = nv.models.lineChart().margin({
        top: 30,
        right: 20,
        bottom: 50,
        left: 45
    }).showLegend(true).tooltipContent(function (key, y, e, graph) {
        return '<h3>' + key + '</h3>' + '<p>' + e + '% at ' + y + '</p>'
    });

    chart.xAxis.tickFormat(function (d) {
        return d3.time.format('%x')(new Date(d))
    });

    d3.select('#lineChart svg')
        .datum(data)
        .transition().duration(500)
        .call(chart);

    nv.utils.windowResize(chart.update);
    return chart;
});

data = [{
    "values": [{
        "x": 1025409600000 ,
            "y": 2
    }, {
        "x": 1028088000000 ,
            "y": 4
    }, {
        "x": 1030766400000 ,
            "y": 1
    }, {
        "x": 1033358400000 ,
            "y": 3
    }, {
        "x": 1036040400000  ,
            "y": 0
    }, {
        "x": 1038632400000  ,
            "y": 3
    }],
        "key": "Cool"
},{
"values": [{
        "x": 1025409600000 ,
        "y": 2
           }],
 "key":hot
    }
]
Run Code Online (Sandbox Code Playgroud)

认为hot点出如果我鼠标光标,但它是不可见的位置.如果密钥只有一个坐标,请指导我如何使其可见.提前致谢.

更新图像 在此输入图像描述 在此输入图像描述

Wol*_*des 6

您需要从0增加不透明度.

.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point {
  fill-opacity: .7;
}
Run Code Online (Sandbox Code Playgroud)

您可以使用增加圆的大小 chart.size(300)

这是一个有效的例子:http://plnkr.co/edit/fFqSny?p = preview