Draw a circle at a point on an NVD3 line chart

半腔热情 提交于 2019-12-14 03:57:23

问题


how to draw a circle on a peak point in line chart nvd3 e.x:

 nv.addGraph(function() {
  var chart = nv.models.lineChart()
    .useInteractiveGuideline(true)
    ;

  chart.xAxis
    .axisLabel('Time (ms)')
    .tickFormat(d3.format(',r'))
    ;

  chart.yAxis
    .axisLabel('Voltage (v)')
    .tickFormat(d3.format('.02f'))
    ;

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

  nv.utils.windowResize(chart.update);

  return chart;
});

this is an example of line chart and i want to show a circle on average peak points like (10%) is it possible to add circle to the charts after the charts is draw?

  • can i add circle to the existing chart in nvd3?
  • is it possible to draw another chart on the existing chart to meet this requirement in nvd3?

来源:https://stackoverflow.com/questions/28449394/draw-a-circle-at-a-point-on-an-nvd3-line-chart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!