dygraphs

After loading UTC data, Dygraph axis dates are too long and won't adjust

感情迁移 提交于 2019-12-24 03:42:48
问题 I'm feeding Dygraph some nice unix epoch data, and it's showing the axes like this: I can't get it to be more terse and dynamically adjusted, after much fiddling. Here's my code: var graph = new Dygraph( document.getElementById('plot' + formNum), fileURL, // path to CSV file { legend:'always', title: "Activity of " + station + ".BK." + fullChannel + dateString, valueParser: function(x){ return x*1000; }, ticker: Dygraph.dateTicker } Why are they so long? How can I change them and still take

After loading UTC data, Dygraph axis dates are too long and won't adjust

ⅰ亾dé卋堺 提交于 2019-12-24 03:42:38
问题 I'm feeding Dygraph some nice unix epoch data, and it's showing the axes like this: I can't get it to be more terse and dynamically adjusted, after much fiddling. Here's my code: var graph = new Dygraph( document.getElementById('plot' + formNum), fileURL, // path to CSV file { legend:'always', title: "Activity of " + station + ".BK." + fullChannel + dateString, valueParser: function(x){ return x*1000; }, ticker: Dygraph.dateTicker } Why are they so long? How can I change them and still take

how to add conditional `dySeries()` calls in a pipe based on shiny inputs

匆匆过客 提交于 2019-12-23 23:09:01
问题 I am building on a solution provided by @Jon_Spring. I want to change some parameters of the dygraph based on the selected disaggregation. Everything flows through a pipe, so I started to look for advice on conditional evaluation using pipes. My thought was to use the {if } approach within the pipe: {if(input$diss=="Total") dySeries("1", label = "All") else dySeries("man", label = "Male") %>% dySeries("woman", label = "Female") } This step comes after dygraph() is called. My idea was to say

Why is the page still caching even after the no-cache headers have been sent?

北城余情 提交于 2019-12-23 15:07:26
问题 I've done a ton of research on this and have asked many people with help and still no success. Here are the details... I'm involved in developing a website that pulls data from various data files, combines them in a temp .csv file, and then is graphed using a popular graphing library: dygraphs. The bulk of the website is written in PHP. The parameters that determine the data that is graphed are stored in the users session, the .csv is named after the users session and available for download,

Charting with Dygraphs: Data sampling depending on zoom

纵然是瞬间 提交于 2019-12-22 23:24:22
问题 Although Dygraphs performs very well compared to other solution, when viewing more and more data points, the performance inevitably slows. I already have all my data loaded locally. Is there a way for Dygraphs to intelligently display a lower resolution (in terms of number of data points) and then show more on zoom? 回答1: There's no built-in facility, but it is possible. See this thread for an example of one user who pulled it off: https://groups.google.com/forum/#!topic/dygraphs-users

Highlight Closest Series - but only show X/Y of highlighted series?

浪尽此生 提交于 2019-12-22 15:04:10
问题 I'm trying to adapt my graph to behave like the last 2 graphs on this page: http://dygraphs.com/tests/series-highlight.html where on mouse-hover, it only displays the X/Y coordinates of the specific highlighted series, not ALL of the coordinates for that X value. I can't seem to discern where in the javascript it specifies that, and it seems that all 4 of those graphs are set up the same, but behave differently. My code currently looks like this, and works well for highlighting the closest

Plotting `forecast` prediction using `dygraphs`

本小妞迷上赌 提交于 2019-12-22 08:44:16
问题 I want to plot a forecast package time series model's predictions using dygraphs . The documentation suggests the following approach for predictions with actuals: hw <- HoltWinters(ldeaths) p <- predict(hw, n.ahead = 36, prediction.interval = TRUE) all <- cbind(ldeaths, p) dygraph(all, "Deaths from Lung Disease (UK)") %>% dySeries("ldeaths", label = "Actual") %>% dySeries(c("p.lwr", "p.fit", "p.upr"), label = "Predicted") Resulting in: The interesting thing about the plotted object all is its

How can I get tooltips showing in dygraphs without annotation

孤街醉人 提交于 2019-12-20 10:23:41
问题 I am trying to use the R implementation of dygraphs The example provided is library(dygraphs) dygraph(presidents, main = "Presidential Approval") %>% dyAxis("y", valueRange = c(0, 100)) %>% dyAnnotation("1950-7-1", text = "A", tooltip = "Korea") %>% dyAnnotation("1965-1-1", text = "B", tooltip = "Vietnam") which results in the chart Hovering over the 'A' produces a tooltip with 'Korea' I am keen to have a tooltip for every point preferably dispensing entirely with the text requirement -

Shiny: calculate cumsum based on dygraphs' RangeSelector

蓝咒 提交于 2019-12-20 04:55:30
问题 I'm building a shiny app where I want to plot a dataset with one of the variables being a cumulative sum of another variable. The latter needs to be re-calculated every time the start date of dygraphs ' dyRangeSelector changes. Below is a basic code without cumsum calculations. Commented out code is what I tried, with no success. library(shinydashboard) library(stringr) library(zoo) library(dplyr) library(dygraphs) ui <-dashboardPage( dashboardHeader(), dashboardSidebar(), dashboardBody(

Scatter type graph in Dygraphs?

风流意气都作罢 提交于 2019-12-19 19:05:00
问题 How can I plot a scatter graph using dygraphs. Data would be line the following. X axis might have 5-20 values (catagories) Y values might be 1-10 values per value on the x-axis This is an example of what i need. Is this possible in Dygraphs? Thanks Michael 回答1: You can set { strokeWidth: 0.0 } in the options to simulate a scatter plot (see http://dygraphs.com/options.html#strokeWidth). You'll need the points as well: { drawPoints: true} These demos may be instructive: http://dygraphs.com