-
Notifications
You must be signed in to change notification settings - Fork 25
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
rCharts, polyCharts #1
Comments
Can you post a reproducible example of the chart you are trying to reproduce? |
Hi: Here it is: require(fImport)
require(rCharts)
fff.raw <- fredImport('BAMLH0A2HYB')
fff.df <- fff.raw@data
fff.df <- data.frame(obsdate=as.Date(rownames(fff.raw@data)),fff.raw@data)
p <- rPlot(BAMLH0A2HYB ~ obsdate, data=fff.df)
p$show() I get " Listening on port 8100 .." and a redirect to the browser - but nothing displays. My sessionInfo is below: > sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.0.0 |
You need to specify chart type. The following code works for me p1 <- rPlot(BAMLH0A2HYB ~ obsdate, data=fff.df, type = 'line')
p1 For time series charts, I would recommend NVD3, which has a nice fff.df2 <- transform(fff.df,
obsdate = as.double(as.POSIXct(as.Date(obsdate, origin="1970-01-01")))*1000
)
n1 <- nPlot(BAMLH0A2HYB ~ obsdate, data=fff.df2, type = 'lineWithFocusChart')
n1$xAxis(tickFormat = "#! function(d){
return d3.time.format('%x')(new Date(d))
}
!#")
n1 You can also try out fff.df3 <- transform(fff.df, obsdate = as.character(obsdate))
m1 <- mPlot(x = 'obsdate', y = list('BAMLH0A2HYB'), data = fff.df3, type = 'Line')
m1$set(pointSize = 0)
m1 |
Did you manage to check this? |
Hi Ramnath:
You are doing great work in this area. Quick question for you - i installed the rCharts package and tried a test plot but 'printChart' sets up the server at port 8100 but the web browser is unable to display anything.
Do I need to install anything else, like the polyCharts library in addition to rCharts, or is it all self-contained and there's something else going on.
Thanks
The text was updated successfully, but these errors were encountered: