I have built a scatterChart in rCharts using nvd3.js and would like to turn off the magnify feature. Is this possible?
Here is the code:
output$riskChart <- renderChart({
risk <- nPlot(Return ~ Risk, group = 'Names', data = RiskData(),
type = "scatterChart", dom = 'riskChart', width = 1000, height=400)
risk$chart(size = '#! function(d){return d.Size} !#')
risk$chart(color = c('#c66631', '#317cc6', '#32743a', '#c4c631'),
tooltipContent = "#!function(key, y, e, graph) {
return '<h4>' + key + '</h4>' +
'<p><strong>Risk: </strong>' + y + '<br><strong>Return: </strong>' + e + '</p>';
}!#")
risk$xAxis(axisLabel = 'Risk')
risk$yAxis(axisLabel = 'Return')
return(risk)
})
Thanks in advance for the help!
Just add
risk$chart(showControls = FALSE)
to turn off controls, that include magnification.