Set 'focus' area in nvd3.js lineWithFocusChart

后端 未结 2 1497
悲哀的现实
悲哀的现实 2020-12-15 11:03

I\'m usuing the lineWithFocusChart.js model shown in the nvd3 examples shown here: http://nvd3.org/ghpages/examples.html

I want to be able to choose a specific x ran

2条回答
  •  一向
    一向 (楼主)
    2020-12-15 11:55

    The solution provided here no longer works with the newest version of NVD3. Instead, you can use the following when you create the chart:

      chart = nv.models.lineWithFocusChart()
        .options({
          brushExtent: [10000,490000]
        });
    

    Or this after you've created it:

    chart.brushExtent([10000,490000]);
    

    See the documentation here: http://nvd3-community.github.io/nvd3/examples/documentation.html#lineWithFocusChart

提交回复
热议问题