Comments (4)
shiny support is a must nowadays
from highcharter.
Hi everyone!
- Maybe if you can trasform your intraday POSIXct object into a "datetime" and "numeric" value, you can use the
hc_add_serie_ts
like http://jkunst.com/highcharter/#time-series, but I'm not so sure. Can you send me and reproducible example of this type of data to test? what package have this type of data? - Well, every widget based on htmlwidgets is shiny ready ;) so yes, the package have shiny integration. Please check https://jbkunst.shinyapps.io/highcharter/ for minimal example.
- WHOA! No by now. I didn't know about this module. My only concern is about the experimental status. Anyway I'll test the boost module in the next version of this package. Thanks!
(Highcharter shiny app code: https://github.com/jbkunst/shiny-apps/tree/master/highcharter)
from highcharter.
Thanks for the swift response and the shiny example.
Here is a reproducible example of plotting an xts object with dygraphs, highchart (rcharts) and highcharter.
require(dygraphs)
require(rCharts)
ProdData <- xts(runif(100,0,1), seq(as.POSIXct("2016-01-04 08:00:00"),
as.POSIXct("2016-01-04 08:01:00"), length = 100),tz="GMT")
names(ProdData)<-"Price"
CombData=data.frame(Time=as.numeric(index(ProdData))*1000,coredata(ProdData))
HCGraph <- Highcharts$new()
HCGraph$series(data = toJSONArray2(CombData, json = F, names = F),type = "line")
HCGraph$xAxis(type = "datetime");
HCGraph$chart(zoomType = "x");
HCGraph
highchart() %>% hc_add_serie_ts(CombData$Price, CombData$Time,name = "Data")
highchart() %>% hc_add_serie_ts(ProdData$Price, index(ProdData),name = "Data")
Note, for highcharter, I tried passing the intraday time directly and converting the intraday time to numeric, neither work.
from highcharter.
Ok, Internaly what we need to do is convert the datetime to timestamps and then create the data put in the serie
object.
This will be the code to create the hc_add_serie_xts(xtsobject)
. So thanks ;).
By now you can do something like the next code until I add the funcionality to plot xts objects.
library("xts")
library("highcharter")
library("magrittr")
ProdData <- xts(runif(100,0,1), seq(as.POSIXct("2016-01-04 08:00:00"),
as.POSIXct("2016-01-04 08:01:00"),
length = 100),tz="GMT")
timestamps <- time(ProdData) %>%
as.POSIXct() %>%
as.numeric()
values <- as.numeric(ProdData)
ds <- list.parse2(data.frame(timestamps, values))
highchart() %>%
hc_xAxis(type = "datetime") %>%
hc_add_serie(marker = list(enabled = FALSE),
data = ds, name = "data")
I will close this issue and I'll add plot xts object in the issue #7
from highcharter.
Related Issues (20)
- Bugs in highcharter maps HOT 6
- defs to define gradient zones in styledmode
- Charts with `highchartOutput2` not rendering
- Feature Request: Add TiledWebMap module functionality / Upgrade Highcharter Version
- Drilldown breadcrumbs
- Installation issues witth the package highcharter HOT 4
- Timezone adjustment via time object, using hchart()
- deprecated function unite_()
- Upgarde to HighchartsJS 11.2.0
- Output valid JSON only
- hc_exporting converts plot to dark mode HOT 2
- Docker build fail HOT 2
- Different scales for different variables in polar charts HOT 1
- Highcharter under r-shinylive HOT 1
- hcaes_string() doesn't work due to conflicts with other packages HOT 1
- Pie chart onPoint option not working as expected on hcmap/Feature request: update highcharts
- Create wordcloud output like wordcloud2 output style
- Add title to `hw_grid`
- Feature: enable color sea / oceans option - hc_add_series
- in Maps, the dashed borders have a scaling issue when zooming in and which only disappears if you hover your mouse over the lines.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from highcharter.