dygraphs

Scatter type graph in Dygraphs?

余生颓废 提交于 2019-12-19 19:03:13
问题 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

Create a barplot in R using dygraphs package

天涯浪子 提交于 2019-12-18 13:24:59
问题 Is there a way to use different kinds of plots with dygraphs in R like on the dygraphs website itself http://dygraphs.com/tests/plotters.html? Is there a way to access these when using R? A simple example taken from the dygraphs for R website would look like: library(dygraphs) library(dplyr) lungDeaths <- cbind(mdeaths, fdeaths) dygraph(lungDeaths) # How to choose a different type of plot? /edit. So I found out that you can use custom plotters with dygraphs like on here: http://blog.dygraphs

Set one showRangeSelector for two DyGraph?

泄露秘密 提交于 2019-12-17 21:35:32
问题 I am using DyGraph from https://smartadmin-ng2.github.io/#/graphs/dygraphs. I want to control two dygraph with one showRangSelector. Right now both dygraph has own rang selector. But I want to control with one rang selector, Because both rang selector has same work. Show I want to show one screen shot for more understanding. dygraphsNoRollTimestamp.js angular.module('app.xyz').directive('dygraphsNoRollTimestamp', function (DygraphsDataDemo) { return { restrict: 'A', compile: function () {

How do you create a bar and line plot with R dygraphs?

有些话、适合烂在心里 提交于 2019-12-17 16:39:25
问题 I would like to create a bar and line chart using dygraphs, which seems like it should be possible based on the "Bar & Line Chart" dygraphs example here, and the dyBarChart() custom plotter provided in the dygraphs package. Using the custom wrapper, I can create a barplot, so I think that code is working: library(dygraphs) dyBarChart <- function(dygraph) { dyPlotter( dygraph = dygraph, name = "BarChart", path = system.file("examples/plotters/barchart.js",package = "dygraphs") ) } lungDeaths <

For loop over dygraph does not work in R

随声附和 提交于 2019-12-17 04:02:24
问题 There is some strange behavior on dygraph . When using a for loop for dygraph i get no result. library(dygraphs) lungDeaths <- cbind(mdeaths, fdeaths) for(i in 1:2){ dygraph(lungDeaths[, i]) } On the other hand when i use lapply i do get the expected result lapply(1:2, function(i) dygraph(lungDeaths[, i])) I actually want to use the for loop in R Markdown on my own data set and iterate over the different columns, but even when i use the lapply "workaround", it does not plot the dygraphs R

dynamically add events to dygraph r

拈花ヽ惹草 提交于 2019-12-13 18:16:37
问题 I have a dataframe with selected dates from a time series that are outliers. I want to dynamically add them to my dygraph as event lines. My data looks like this > head(data) Group Date 1 g1 2013-08-26 2 g1 2013-08-27 3 g2 2013-08-29 4 g2 2013-12-31 5 g3 2014-01-08 df_sub <- data[data$Group=='g1',] I'm trying to create a function that takes in a group name and created a dygraph with outliers as event lines. In my eg. for g1, there are two dates with outliers. Since the basic function looks

How do I do a scatter plot with dygraph in R, including mouseover date?

核能气质少年 提交于 2019-12-13 05:58:45
问题 I have 3 set of data, both in the same time series, however I want to plot data set 1 as x axis and data set 2 and 3 as y axis. I would like data set 2 and 3 to be in a separate plot. In addition, when I mouse over the data point, I would like to see the date of the data point as well. I would like to use dygraph/tauchart in R to do this. Another point would be to zooming of the graph as well. This is the example of my data points in xts format. Series 1 Series 2 Series 3 Jan 2006 28397 7.55

Embedding Dygraphs in html

送分小仙女□ 提交于 2019-12-13 04:22:48
问题 I am plotting some csv data using a java applet embedded in my simple html code. Things run fine when I plot the data without any frill; if I add labels and title I don't see the graphs anymore. What should I change in the html code, reported below? <html> <head> <script type="text/javascript" src="dygraph-combined.js"></script> </head> <body> <div id="graphdiv" style="width:1000px; height:600px;"></div><br> <script type="text/javascript"> g2 = new Dygraph( document.getElementById("graphdiv")

R: more flexible annotations in dygraphs + shiny

帅比萌擦擦* 提交于 2019-12-13 03:02:21
问题 I'm using dygraphs in my Shiny app to visualise quite complex time-series. I want to be able to: 1) plot multiple annotations with two labels@ 'buy' and 'sell'. ideally using icons and/or different colours and 2) control which time-series it's going to be plotted on. Re point 1, I found this SO answer, which works, but it is rather clunky. Is there a better (more tidy) way of achieving the same effect? Re point 2, see code below - how could I plot annotations on Y time-series, instead?

Does jQuery's $.getScript behave differently in Firefox ? It's not executing the script after loading it, Chrome is doing fine

这一生的挚爱 提交于 2019-12-13 00:18:36
问题 The following code $.getScript("/js/dygraph-combined.js") .done(function(script, textStatus) { console.log(Dygraph); }) .fail(function(jqxhr, settings, exception) { console.error('it failed to load'); }); yields Dygraph is not defined in Firefox 11.0, and [Dygraph 1.2] on Chrome 17.0.963.83. So it seems that the script loads on both browsers but doesn't get executed in Firefox 11... Why would that be ? How do I get this behaving like it should ? This script is Dygraph and from it's website it