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

Demo Issue / Millisecond Plotting / Integration with Shiny #2

Closed
TonyDIRL opened this issue May 29, 2014 · 7 comments
Closed

Demo Issue / Millisecond Plotting / Integration with Shiny #2

TonyDIRL opened this issue May 29, 2014 · 7 comments

Comments

@TonyDIRL
Copy link

Hi,

First off, cheers for working on this package - great for someone like myself with R exposure but little JS experience to get access to the plotting power of dygraph.

With regards the initial demo - the new branch resolves some of the issues. Specifically, dygraph1 and dygraph2 will now both individually render correctly, However, layout produces a blank page and layout_dygraphs seems to skip Rstudio and goes directly to the browser with the same effect. Strangely, either function does not produce a html output.

On a different note, how would I go about plotting millisecond resolution on the x-axis?
I'm aware for other rchart libraries such as highcharts the following is required
paste("#!", as.numeric(....timestamps....)"!#")
However, this does not seem to work for dygraph?

Finally, is it possible to integrate dygraph with Shiny? I'm aware that for other rchart libraries renderChart2 can be used but this does not seem to support dygraph as of yet - would be really cool if it did.

Thanks again and happy to help out anyway I can.

@TonyDIRL
Copy link
Author

Thank you for the suggestion timelyportfolio.
I tested the demo on a linux box with a clean rstudio install (R: 3.1.0 - newest versions of all packets) and it worked without issue.

Amazing speed - plotted 500k points instantly without an issue. If this can be integrated within shiny it would be very useful.

@danielkrizian
Copy link
Owner

Yeah, authors of the dygraphs designed it with speed in mind. Good feedback, @TonyDIRL, any comparative experience with the same dataset for Highcharts/Hightstock?

@TonyDIRL , how did you solve the milliseconds part of the question?

There is definitely a plan to use dygraphs in Shiny; @timelyportfolio , I can record that plan separately in GitHub issue tracking system with enhancement tag (best if we merge our repository forks)

@timelyportfolio
Copy link
Collaborator

go ahead with your repo and let' s use that as primary. I'll try to work on the shiny integration by implementing what is in rCharts and maybe improving by having a look at ggvis. The amount of data that I would expect (given rCharts_dygraphs by design for bigger data) is potentially a stumbling block, but I think we can overcome.

@danielkrizian
Copy link
Owner

@timelyportfolio, added you as collaborator to this repository (allows you to do all the ops on it). Just in case, @ramnathv added too.
Created separate Github issue/feature request/enhancement around Shiny integration:
#4

This one can be closed after @TonyDIRL gets a chance to reply to my last two follow-up questions above

@TonyDIRL
Copy link
Author

With regards the millisecond issue - I haven't ironed out the formatting and display issues yet.
Essentially, I think the most straightforward solution to avoid date-time formatting issues would be to use the xValueParser parameter of dygraphs and then pass it the timestamps as integers, scaling by 1000 for milliseconds. Details are discussed here:
https://groups.google.com/forum/#!topic/dygraphs-users/qAKQndJvkRE and
http://dygraphs.com/data.html

I'm a novice when it comes to efficient utilization of highcharts - with that said given the same dataset the chart fails to load in a reasonable time. However, there are numerous workarounds to this which could be explored:
http://www.highcharts.com/stock/demo/lazy-loading

If I can get it working I'll post an R example of dygraph in milli's.

@danielkrizian
Copy link
Owner

thanks @TonyDIRL for insights and links (highcharts demo acts indeed slow), We can try & isolate the comparable test in the dygraphs library alone first (see the above link), if you had nice millisec dataset to share that would be great!
Once that's running in JavaScript alone, we can build on top of that an R wrapper that would detect the dataset resolution and automagically switch between the parser modes ;)

@danielkrizian
Copy link
Owner

Isolated the feature request here #7 and closed.

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

No branches or pull requests

3 participants