3

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!

Joe Jansen
  • 741
  • 6
  • 9

1 Answers1

5

Just add

risk$chart(showControls = FALSE)

to turn off controls, that include magnification.

Ramnath
  • 54,439
  • 16
  • 125
  • 152
  • Thanks Ramnath! I was hoping that would address the tooltip issue also, but it looks like that bug is still there. – Joe Jansen Jan 08 '14 at 21:50