Is an NVD3 Line Plot with Markers Possible?

前端 未结 5 1296
野趣味
野趣味 2020-12-14 02:52

I\'m making an NVD3 line plot that will have significantly improved clarity if I can get markers to show for each data point instead of just the line itself. Unfortunately,

5条回答
  •  一向
    一向 (楼主)
    2020-12-14 03:02

    Selectively enable points to some series using the following logic in nvd3.

    //i is the series number; starts with 0
    
    var selector = 'g.nv-series-'+i+' circle';
    d3.selectAll(selector).classed("hover",true);
    

    However an additional parameter( like say 'enable_points':'true') in the data would make better sense. I will hopefully push some changes to nvd3 with this idea.

提交回复
热议问题