hrbrmstr / metricsgraphics

:chart_with_upwards_trend: htmlwidget interface to the MetricsGraphics.js D3 chart library
http://hrbrmstr.github.io/metricsgraphics/
Other
132 stars 35 forks source link

gh-pages for this package #12

Closed jjallaire closed 9 years ago

jjallaire commented 9 years ago

Found the blog post introducing metricsgraphics (http://rud.is/b/2015/01/08/new-r-package-metricsgraphics/) to be excellent. Perhaps this could be combined with the existing README.md examples to create a gh-pages site for the repo. I'm interested in this primarily because it would be great to link to metricsgraphics from the htmlwidgets showcase page (http://www.htmlwidgets.org/showcase_leaflet.html) and it would be so much nicer for it to be to a documentation page rather than the raw github repo.

hrbrmstr commented 9 years ago

roger that. i should get them incorporated today.

jjallaire commented 9 years ago

Another thing which would be lovely to incorporate would be the automagic creation of time-series plots from XTS objects. You can steal some of the important bits of this from dygraphs:

(1) Here's where I normalize input data: https://github.com/rstudio/dygraphs/blob/master/R/dygraph.R#L31-L48

Your implementation would likely be based on inherits for "xts", "mts", "ts", "zoo", etc. (all of those types signal a time series and can be converted to xts with as.xts. You'll also need to copy the asISO8601Time function: https://github.com/rstudio/dygraphs/blob/master/R/dygraph.R#L31-L48

(2) Here's where I convert the asISO8601Time created vector to an array of JS dates: https://github.com/rstudio/dygraphs/blob/master/inst/htmlwidgets/dygraphs.js#L486-L498

timelyportfolio commented 9 years ago

regarding xts probably should cross ref #4

hrbrmstr commented 9 years ago

gh pages are up http://hrbrmstr.github.io/metricsgraphics/ and I'll be incorporating the xts stuff next week

jjallaire commented 9 years ago

Okay, just added you to the showcase: http://www.htmlwidgets.org/showcase_metricsgraphics.html