dygraphs

shinyapps.io crashes when getting point coordinates of a dygraph

孤街醉人 提交于 2020-02-26 00:54:27
问题 I'm trying to build an app, which is doing something similar to this post. I want point coordinates to be copied to a clipboard by every click. I've just copied it as an example with a small modification in observeEvent . library(shiny) library(dygraphs) library(clipr) ui = fluidPage( mainPanel( dygraphOutput("dygraph"), br(), textOutput("clicked", inline = TRUE) ) ) server = function(input, output) { output$dygraph <- renderDygraph({ dygraph(ldeaths) }) output$clicked <- renderText({

shinyapps.io crashes when getting point coordinates of a dygraph

丶灬走出姿态 提交于 2020-02-26 00:53:09
问题 I'm trying to build an app, which is doing something similar to this post. I want point coordinates to be copied to a clipboard by every click. I've just copied it as an example with a small modification in observeEvent . library(shiny) library(dygraphs) library(clipr) ui = fluidPage( mainPanel( dygraphOutput("dygraph"), br(), textOutput("clicked", inline = TRUE) ) ) server = function(input, output) { output$dygraph <- renderDygraph({ dygraph(ldeaths) }) output$clicked <- renderText({

How to format date and time in Dygraphs legend according to user locale

て烟熏妆下的殇ゞ 提交于 2020-01-23 12:28:44
问题 I have a graph that displays a device's power output over time and I'd like to format the legend so that it displays the timestamps in the style of where the current user is (for example, in the US it would show MM/DD/YY h:m:s am/pm , and in EU would show DD/MM/YYYY HH:MM:SS , etc.). Currently, it's set at default, as follows: I pass in a JS Date() object for the x-axis and I've found that you can modify the x-axis labels, but I can't find any info on changing the format of the legend when

Show average of dygraph points, which dynamically amends as the user zooms

安稳与你 提交于 2020-01-17 04:56:06
问题 I have seen this - Horizontal line to show average in dygraph - and it doesn't quite answer my question. I have the following simple dygraph: g2 = new Dygraph( document.getElementById("graphdiv2"), "../newDataFile.csv", { ... } ); where newDataFile.csv has two columns. What I would like to show is the average of the points plotted (as a line or just a number), and for this average to change as I zoom in to different parts of the graph. Any ideas? 回答1: var idx=1; //change this value if you

dygraph on mouse over date format

◇◆丶佛笑我妖孽 提交于 2020-01-15 11:24:34
问题 Is it possible to change the format on the onMouseOver event in Dygraph? Currently the format is: YYYY/MM/DD HH:MM:SS I would like it to display as MM/DD/YYYY HH:MM:SS Is it possible to change the current format? Thanks for your assistance. Jay 回答1: You want to set the valueFormatter option on the x-axis: http://dygraphs.com/options.html#valueFormatter For example, new Dygraph(div, data, { axes: { x: { valueFormatter: function(ms) { return new Date(ms).strftime("%m/%d/%y %H:%M:%S"); } } } });

100 labels in separate div with highlighted series in a box

為{幸葍}努か 提交于 2020-01-07 03:23:13
问题 I am trying to show labels div in a separate div with the highlighted series marked with a box , I am doing so because I have 100 labels and showing them above the graph will cover the graph. I want to do the same thing happening here , but with the labels in a separate div since 100 labels and each label name is long which will be too much for this area and cover the graph it self. I also found this one, but it put the labels in a separate div and no box around the highlighted point . This

Dygraph: zoom into last 1000

纵然是瞬间 提交于 2020-01-07 02:24:11
问题 I'm trying to dygraph to zoom into the last 1000 (or something) points of data. While running simulations, the graphs get more filled, and at some point its just too much. I've found on the website that using dateWindow: [min, max] works, but the problem is that I cannot retrieve the max value from the CSV file (it is probably stored somewhere, but i do not know where): document.getElementById("graph_prodnon"), "/population_dat/production_scaling.csv", // path to CSV file { title: 'Scaling

Setting the interaction model of a Dygraph in Shiny for R

孤者浪人 提交于 2020-01-05 08:23:11
问题 I am looking to add the custom interaction seen at http://dygraphs.com/gallery/#g/interaction under "Custom interaction model" into my Shiny web app. As far as I understand it, this requires attaching some JS to the page and setting the interaction model on the graph: interactionModel : { 'mousedown' : downV3, 'mousemove' : moveV3, 'mouseup' : upV3, 'click' : clickV3, 'dblclick' : dblClickV3, 'mousewheel' : scrollV3 } However, interactionModel does not seem to be listed as a parameter in the

more than 2 y axis in dygraphs

痴心易碎 提交于 2020-01-04 18:29:53
问题 Looking through the documentation, I haven't been able to determine if Dygraphs can support more than 2 y axis on the graph outputs? I need to graph a lot of curves with many different axis ranges. 回答1: It seems to be possible. This example seems to be using it by using axes and some other options ( 'labelName': { axis: {} } seems to create another Y-axis), altho I haven't found it in the docs. But when trying to use more than two Y-axes I saw this message in the log: dygraphs: Only two y

Shiny renderPlot within Interactive Document opens a new Browser Window with dygraph

巧了我就是萌 提交于 2020-01-04 09:29:10
问题 I have the following RMarkdown .Rmd document. When you run the following, the sliderInput is "reactive" and adjust the smoothing appropriately; however, the plot keeps generating in a new separate browser window rather than within the document itself. Any ideas why this is happening or how to fix this behavior? --- title: "Untitled" output: html_document runtime: shiny --- ```{r echo=FALSE} library(dygraphs) sliderInput("span", label = "Select Span", min=0.05, max=1, value=0.5, step=0.05)