dygraphs

dyGraphs DateWindow to parse from a date to the end of the CSV

三世轮回 提交于 2019-12-10 12:23:14
问题 I am using dygraphs with a CSV file that is constantly having data added to it. I would like to use dateWindow to have it auto zoom in on a range that is from a date I specify to the end of the file when it loads. I can't make it work. I've tried just leaving the "latest" value blank such as: dateWindow: [Date.parse("2017/07/01 12:00:00"),], dateWindow: [Date.parse("2017/07/01 12:00:00"), Date.parse("")], but nothing works. Is this possible and if so can someone point me to how to do it?

How to load down-sampled data while zooming in R dygraph?

£可爱£侵袭症+ 提交于 2019-12-10 10:55:53
问题 I created an R shiny application that has a dygraph based on a data table that is dynamically subsetted by a checkboxGroupInput. My problem is, when I attempt to load large amounts of data (millions of records), it loads very slowly and/or crashes. After doing some more research, I stumbled upon a "lazy-load" technique from here. Based on my understanding, this technique essentially downsamples the data by only loading the number of data points equal to the width of the dygraph window. As the

How to set x-axis in dygraphs for R to show just month

我与影子孤独终老i 提交于 2019-12-09 06:56:46
问题 I have the following time series ( data.in . that starts on 2012-01-01 and ends 2012-12-31): ts.rmean ts.rmax 2012-01-01 3.163478 5.86 2012-01-02 3.095909 4.67 2012-01-03 3.112000 6.01 2012-01-04 2.922800 5.44 2012-01-05 2.981154 5.21 2012-01-06 3.089167 5.26 and I am using dygraph for R for plotting: library(dplyr) library(digraphs) dygraph(data.in, main = "Title") %>% dySeries("ts.rmean", drawPoints = TRUE, color = "blue") %>% dySeries("ts.rmax", stepPlot = TRUE, fillGraph = TRUE, color =

Updating chart title according to zoom/pan

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 10:47:23
问题 I am trying to update the dygraph title according to the current visible window. Such information can be retrieved using graph.xAxisRange(), however checking the documentation shows that there is only a callback for zoom. The zoom callback works fine but won't get called after a pan is made. Also tried to use draw callback with lack of success. Is there any possible solutions for this? 回答1: drawCallback is what you want. You have to be careful to avoid loops with it, though — calling

Remove white Space on right side in Dygraphs

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 06:33:44
问题 I'm developing a chart without legend or axis. In this chart I'm also drawing via the 2d context and the underlayCallback option. The Problem I can not resolve is a mysterious white space on the right side of the chart (about 5px). I modified a jsFiddle to represent the Problem: http://jsfiddle.net/12magkox/ Dygraph Constructor for removing the legend and the axis: legend: 'never', axes: { x: {drawGrid: true, drawAxis: false}, y: {drawGrid: true, drawAxis: false} }, 回答1: Check out the

R Shiny: dygraphs series reacting to `date_window`

霸气de小男生 提交于 2019-12-08 03:31:21
问题 In this miniapp, the goal is to display raw series and it's average over the selected range: library(dygraphs) library(datasets) server <- function(input, output) { reacteddata <- reactive({ dt = cbind(as.xts(ldeaths),ave=NA) if (!is.null(input$dygraph_date_window)){ start=strftime(input$dygraph_date_window[[1]]) end=strftime(input$dygraph_date_window[[2]]) subset = window(as.xts(ldeaths), start=start, end=end) ave = rep(mean(subset), length(subset)) dt[index(as.xts(subset)),"ave"] = ave dt =

Browser crashes after 10-15 mins

狂风中的少年 提交于 2019-12-08 00:44:32
问题 In my app I'm displaying 10 charts (charts are from dygraphs.) to monitor data. For displaying charts I'm getting data from my sever by sending ajax request to 4 servlets on every 5 seconds. After 10-15 mins (don't know exact time.) my browser crashes saying "aw!! snap." What could be the reason? Is it javascript that is causing it? or is it because I'm sending request every 5 seconds? Browser tested: Firefox and Chorme. Note:- When I refresh the browser after crash it again works fine for 10

dygraph vertical line

喜欢而已 提交于 2019-12-07 22:57:05
问题 Is there a way to make a vertical line in the js graph library dygraph? I am loading data and would like to put vertical lines like graphite does to show events is there some special context to add vertical lines 回答1: You've probably figured this out by now, or stopped caring, but the way to do this is with a custom underlay (see http://dygraphs.com/tests/highlighted-region.html and http://dygraphs.com/tests/underlay-callback.html for examples). You provide an underlayCallback function when

Two `dygraphs` with synchronized crosshair

ぐ巨炮叔叔 提交于 2019-12-07 19:28:24
问题 I have implemented two dygraphs with custom option verticalCrosshair : true here: https://rawgit.com/danielkrizian/dygraphs/master/tests/synchronize-Crosshair.html When I hover over any of the graphs at a particular x point, I want all graphs to display the vertical crosshair at that point. So far I've been able to get this working on the top graph ( gs[0] ) like this: highlightCallback: function(e, x, pts, row) { var sel = gs[0].getSelection(); gs[1].setSelection(sel); }, Nothing happens

DYGraphs: Control multiple graphs with one RangeSelector

☆樱花仙子☆ 提交于 2019-12-07 16:49:51
问题 I have two graphs on one page, which zoom and pan I want to be able to control with the same RangeSelector. In other words when I move the RangeSelector both graphs should react simultaneously. The values in my first graph are small numbers between 2 and 20, and the numbers in my second graph have big values > 3000. This is the reason I don't want to put both lines in the same graph. Both graphs have the same date-time g1 = new Dygraph(document.getElementById("graph1"), // For possible data