Skip to content

Instantly share code, notes, and snippets.

@timelyportfolio
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timelyportfolio/eb7b6760524cf7675615 to your computer and use it in GitHub Desktop.
Save timelyportfolio/eb7b6760524cf7675615 to your computer and use it in GitHub Desktop.
temporary solution for rCharts + dimple.js
library(rCharts)
df <- data.frame(x=1:10, y=rnorm(10)+1:10)
d1 <- dPlot(
data=df
, x='x'
, y='y'
, type='line'
, lineWeight=3
, width = 600
)
d1$yAxis( outputFormat = ".2f" )
d1$setTemplate(afterScript = "
<script>
myChart.series.forEach(function(s){s.lineMarkers = true;})
myChart.draw()
myChart.svg.selectAll('circle.markers')
.style('opacity',1)
myChart.svg.selectAll('circle.markerBacks')
.style('pointer-events','none')
</script>
"
)
d1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment