I'm learning nvd3.js to draw charts. From a sample from the site, I pick following simple code to test:
chart = nv.models.lineChart()
.margin({ left: 100, right: 100 }) //Adjust chart margins to give the x-axis some breathing room.
.useInteractiveGuideline(true) //We want nice looking tooltips and a guideline!
.transitionDuration(350) //how fast do you want the lines to transition?
.showLegend(true) //Show the legend, allowing users to turn on/off line series.
.showYAxis(true) //Show the y-axis
.showXAxis(true) //Show the x-axis
But when I'm running the code it says that transitionDuration
doesn't exist. If I remove that line everything works fine.
Question: Why this function doesn't exist? Am I wrong somewhere or is there any additional library required to be loaded?
transitionDuration
option is deprecated. Useduration
instead. e.g.duration: 300
nottransitionDuration: 300
. – Karisakarissa