Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nvd3 controls issue #393

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

jarmo-kauko
Copy link

Fixes #392, including following issues with nvd3 plots with controls

  1. Adding controls creates html with indent, which pandoc interprets as preformatted code block.
  2. <div id='...' class='rChart'> is generated twice: once by template$chartDiv and once from lib/controls/script.html.
  3. Having multiple charts with controls doesn't work, as all angular controllers have the same name (DemoCtrl).

@ramnathv
Copy link
Owner

ramnathv commented Apr 7, 2014

Thanks for the pull request. I am a little behind on some reorganization of code in the repo. Once I am done with that I will take a closer look at your pull request and merge the changes.

@pierduemila
Copy link

Hi, I still have the same problem with the controllers when I try to embed the plot in an html file. It works fine in the R-studio viewer, though. Any update since?

@pierduemila
Copy link

You can try with this code example

  '''{r results = 'asis', comment = NA}

  require(rCharts)
  require(datasets)

   p2 <- nPlot(mpg ~ cyl, group = 'wt', 
        data = mtcars, type = 'scatterChart')

   p2$xAxis(axisLabel = 'Log2')
   p2$yAxis(axisLabel = 'Log2')
   p2$chart(tooltipContent = "#! function(key, x, y, e){ 
        return  '<b>Name:</b>  ' + e.point.GeneID
      } !#")
   p2$chart(color = c('red', 'green'))
   p2$addControls("x", value = 'mpg', values = names(mtcars))
   p2$addControls("y", value = 'cyl', values = names(mtcars))
   p2$print('chart2', include_assets = TRUE)
   '''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants