Questions tagged [dygraphs]
The dygraphs JavaScript library is for producing interactive time series charts. For the R package, use the tag [r-dygraphs] instead.
dygraphs
907
questions
0
votes
0
answers
12
views
I think I found a bug in shading when dygraphs data hits the upper limit of range
I use dygraphs to plot water tank levels measured by an ultrasonic probe and saved in CSV. I've noticed if the tank is full and the script records 5000L in the CSV (top of the default range) then the ...
0
votes
0
answers
47
views
Dygraph trying to change 2D y-axis limits
I am having trouble simply changing the y-axis minimum limit from the previous developers’ callback. Y-axis maximum limit seems to work OK.
$("#simpleGraphs,#detailedGraphs").on('change', '....
0
votes
0
answers
22
views
Remove dygraph vertical tick axis lines but keep opacity on series fill
I've got an old version of dygraph that was originally using just solid colors for the series, I applied rgba opacity instead.
Now, on the live update charts the fill color looks good, but each data ...
0
votes
0
answers
18
views
highlight x-axis on x value condition
High everybody!
I have a series with constant time step e.g:
2009/07/13,120
2009/07/14,120
2009/07/15,120
but sometimes some steps missed:
2009/07/16,120
2009/07/19,180
var inputdata = "2024/03/...
0
votes
1
answer
36
views
Arrange Multiple `dygraphs::dygraph()` Plots in Multiple Columns in a Figure in R
I know I can make a figure with 6 dygraph::dygraphs() plots arranged in 6 rows and one column.
library (dygraphs)
library (htmltools)
mdeaths <- structure(c(2134, 1863, 1877, 1877, 1492, 1249, 1280,...
1
vote
0
answers
23
views
dygraphs: Make X-Axis fit to element
how can i make the chart fit the parent element? So that Every Tick i specified in axes.x.ticker is visible. Not just when i pan. I want the whole thing resized to the parent element.
I cannot find an ...
0
votes
0
answers
53
views
Change the color of a whole line in Dygraph
unfortunately I can't provide code because of security reasons but I will ask my question nonetheless.
I wanted to know if it is possible to change the color of a whole point connection line in ...
1
vote
0
answers
49
views
How to change Mouse event and Keyboard Input In Dygraphs
How to change Mouse event and Keyboard Input In Dygraphs.
I want to change the Range selector or X Axis movement to keyboard and mouse combinations
Range Selector [Drag] --> Shift + Drag
X Axis ...
0
votes
1
answer
55
views
Dygraphs does not work with csv file. How to fix it?
I am learning Dygraphs and I am trying to test the sample code on https://dygraphs.com/tutorial.html. The first example with embedded data works perfectly just the same as the graph on the web page. ...
1
vote
1
answer
88
views
How do I generate a time series in php that includes 100th of a second?
I am trying to get the array of dates for graphing in dygraphs, but my data is at 100Hz so I need the time scale to be at 100ths of a second. I am generating the array of data in php first, so my loop ...
1
vote
1
answer
66
views
individual axis label color with Dygraphs 2.2.1 in multiple graphs
Using CSS setting up a color for y-label or y2-label as described at dygraphs CSS reference works very well, example:
.dygraph-ylabel{ color:green; } .dygraph-y2label{ color:blue; }
This setting seems ...
0
votes
0
answers
28
views
Avoid coarse sampling in Netdata custom dashboard Dygraphs charts
After upgrading from Netdata v1.37 to v1.44 I noticed that the Dygraphs charts on a custom dashboard were showing values older than 30 minutes with a straight line on data sampled at successive 30’ ...
0
votes
0
answers
31
views
can not set dateWindow on click
I use zoom example https://dygraphs.com/tests/zoom.html
in my project. Everything is working fine, when data inside dygraphs is look like:
"2023//18 09:30,2,6,6.00,0.98,0\n"+
"2023/1/18 ...
1
vote
0
answers
66
views
How to integrate OffscreenCanvas in dygraph with web worker
Pure canvas can handle with OffscreenCanvas and web worker technology.
<!-- index.html -->
<canvas id="mainCanvas" width="300" height="150"></canvas>
//...
0
votes
0
answers
47
views
Using Dygraphs in node red ui_template
I want to use Dygraph in the node red dashboard. I used dashboard template and placed the simplest example of dygraphs in the template.
<html>
<head>
<script type="text/javascript&...
2
votes
2
answers
68
views
Unknown option axisLabelColor - Dygraph v2.2.1
I have recently upgraded to Dygraph v2.2.1 from v1.1.1 and the option axisLabelColor to color the labels of the axis is not there anymore. Was it substituted by another option or this option is not ...
0
votes
1
answer
39
views
Dygraph javascript to PNG incorrect zoom
I have a question regarding dygraphs in javascript. I have created a graph and want to export it to a PNG image:
function drawChart() {
g = new Dygraph(document.getElementById("dg_div&...
2
votes
1
answer
89
views
R/dygraphs Error: Unsupported type passed to argument 'data'
I am working with the R programming language.
I am following the tutorial here https://rstudio.github.io/dygraphs/ to make the following graph:
I tried to simulate some data for this example:
library(...
0
votes
0
answers
19
views
use diffrnet color in dygraphs for simulation in R
I am using GBM mode for simulation with following code, I am trying to use dygraphs in R instead of ggplot, and wanted to achieve a different color for each simulation path, but I am just getting one ...
0
votes
0
answers
24
views
Collapsing the values of different rows into a single row based on a character variable? [duplicate]
I have some code in df laid out like the example, but obviously bigger. The dataframe only has 3 columns as shown below:
|quarters |source | n |
|2022 Q1 | NHS | 5 |
|2021 Q2 | Priv | 7 |
|2022 ...
0
votes
0
answers
73
views
Increasing the Thickness of a Horizontal Line and Bringing the Horizontal Line to the Front When Using the 'dygraphs::dyLimit()' Function in R?
I have the following data and the following plot.
library (dygraphs)
library (xts)
Time <- seq.POSIXt(as.POSIXct('2023-1-2 14:00:00'), as.POSIXct('2023-1-4 14:00:00'), by = '15 min')
Response <- ...
1
vote
1
answer
58
views
The `dygraphs::dyGroups()` and `dygraphs::dySeries()` Functions in R Don't Plot Point Shapes Correctly
I'm having some trouble using the dygraphs package to plot my time-series data. I'm trying to plot 6 response variable columns on the same graph, and I'm trying to split these 6 columns into 2 groups ...
1
vote
1
answer
726
views
minor grid lines in log chart with chartjs
Update: added a working fiddle online added a working code snippet :)
I am moving from dygraphs to chartsjs but am stuck with trying to show minor grid lines in a log scale chart. The chart with ...
0
votes
1
answer
35
views
change the language of the legend in dygraph in r
I have done this. Edited
the dygraph-combined.js changing the names of months and days, for example, replace text "Oct" with "Okt" and so on, to change the language of the date ...
0
votes
1
answer
48
views
Using Dygraph in Blazor Hybrid application
I'm searching a charting component for a Blazor Hybrid app.
So I wondering if Dygraphs can be used in this context using JSInterop?
One of the feature I'm looking for is the possibility to get the ...
1
vote
1
answer
44
views
Is there a way to include a watermark image in dygraphs?
Is it possible to add a background watermark image to a dygraphs chart?
I could not find this information anywhere.
0
votes
1
answer
60
views
Click on Graph empties the display - but only once
When Dygraph loads, i am seeing the graph as expected:
Initial
Now, when i click the graph the values all disappear. Moving the mouse also doesn't make anything show up in the legend overlay - so the ...
0
votes
1
answer
48
views
dygraphs: y2 axis opposite direction
I want the y2 axis:
only for visualisation (should not have any affects to the graph)
begins with 0 at the red line (the data are always the same for red line. See the example)
the count is opposite ...
2
votes
2
answers
262
views
JavaScript error when trying to build a hide/show feature into a dygraph (from an R markdown)
I'm creating a dygraph using this:
library(dygraphs)
library(htmlwidgets)
library(rgl)
knitr::opts_chunk$set(echo = TRUE)
knitr::knit_hooks$set(webgl = hook_webgl)
includeScript('...
2
votes
1
answer
89
views
dygraphs/highcharter highlighting on both plots - interactivity
I am trying to replicate the following plot in dyGraph or highcharter.
df %>%
ggplot(aes(x = mts2, y = price)) +
geom_point() +
geom_jitter() +
facet_wrap(~ type, scales = "free_y&...
1
vote
0
answers
121
views
Extracting axis limits from 'dygraphs::dygraph()' and 'plotly::plot_ly()' figures in R
I know how to extract axis limits after making a plot with base R functions.
plot(Sepal.Length ~ Sepal.Width, iris)
(Horizontal_Axis_Limits <- par('usr')[1:2])
(Vertical_Axis_Limits <- par('usr')...
1
vote
1
answer
74
views
How to access original numberValueFormatter in dygraph?
I have a simple dygraph with a valueFormatter like this
axes: {
y: {
valueFormatter: function(val, opts, seriesName, dygraph, row, col) {
if (seriesName === "Pass") {
...
1
vote
1
answer
209
views
csv file causing Dygraph to throw Cannot read properties of undefined (reading 'push') error
I'm using dygraph to show data from various sqlite3 databases and because I don't know better, I am using Python to create a csv file from the database, which dygraph then uses. Using the exact same ...
1
vote
1
answer
97
views
Dygraphs - error - CSV is out of order; order it correctly to speed loading
I get a graph generated from an external txt file that is properly rendered, but get this error in console.
CSV is out of order; order it correctly to speed loading.
Think this is slowing down the ...
6
votes
2
answers
213
views
Moving from a normal bar chart to a stacked bar on dygraphs
I've got an xts df of the following format:
structure(c("May 2022", "Jun 2022", "Jul 2022", "Aug 2022", "Sep 2022",
"Oct 2022", "Nov ...
1
vote
1
answer
448
views
Plot multiple series on a dygraph
I'm trying to plot multiple series on a dygraph line chart.
The df is of this structure:
structure(list(Date = structure(c(4216, 4216, 4217, 4217, 4218,
4218, 4219, 4219, 4220, 4220, 4221, 4221, 4222,...
0
votes
1
answer
83
views
How can I hide values on dygraphs?
In my dygraphs graph, I have data for three items, thus, three lines on the graph. But one of the lines did not start until sometime after the first two, so I want the graph to be blank for old dates ...
0
votes
0
answers
283
views
dygraph: how to change fill colour and transparency level
Dear Stackoverflow community,
I have been using Dygraph in R to plot diagrams, but the problem I am facing is that the plots are not solid colour but they are transparent (picture attached as dygraph ...
0
votes
1
answer
80
views
How to map data in dygraph by applying conditions based on the data?
I have this CSV data which I want to map in my dygraph time series graph.
_time value Id provider
2022-09-20T10:43:00Z 1 1 x
2022-09-20T10:43:15Z 2 1 x
2022-09-20T10:43:...
0
votes
1
answer
129
views
Finding the maximum in an xts column within the last X hrs
I have a dataset within a reactive dygraph that looks like this:
data()$data.o
date
data.o
2022-07-21 12:10 AM
400.1
2022-07-21 12:11 AM
33.9
2022-07-21 12:12 AM
32.5
2022-07-21 12:13 AM
35.1
...
3
votes
1
answer
88
views
How do I draw blocks with dygraphs
Instead of a typical time series line graph, I need to draw blocks as illustrated in the transition from diagram 1 to diagram 2 below. I have the drawCallback calculating the canvas coordinates for ...
3
votes
1
answer
361
views
timeseries of wind direction with dygraphs
JS library: dygraphs
I need help in customizing the points in a time-series plot of wind-directions (x-axis: date, y-axis: direction). My wind direction values are from 0 to 359 degrees.
How to ...
1
vote
1
answer
102
views
dygraphs values higher than 1000000 displayed as 1.00e+6. Is there any fix?
I have many sensors in home dashboard, one of them is the energy production, the values are grabbed from my MPP solar inverter, now the values are higher than 1 milion and unfortunately when I hover ...
0
votes
1
answer
109
views
Add secondary axis as a line chart to DY graphs in R
I was able to get the bar plots with the below code. However I am trying to add secondary axis to Semi-Final column as a line chart. Can we add this ?
mobility_aus_sum <- structure(list(Year = c(...
0
votes
0
answers
177
views
Dygraphs with Angular 13 and Ionic 6
I'm trying to use Dygraphs in a Ionic app, but I got a blank canvas without data and no errors.
Did someone make it works with recent angular/ionic versions ?
start.page.ts
import {AfterViewInit, ...
0
votes
1
answer
76
views
what is the sequence of palette color in dyRibbon?
Consider these questions around a reprex using dyRibbon function of dygraphs package in R.
Q1. Why do we need 4 colors for a 3 ribbon display? Why is the first one always ignored?
Q2. How is the ...
0
votes
1
answer
134
views
How do I print a dygraph graph?
I need to print a page that has 4 dygraphs on it. I found a previous post here about it, but it refers to this document which is 10 years old and for the life of me, I cannot get it to work.
For one ...
0
votes
1
answer
65
views
r dygraph plot not correctly displayed in right to left Shiny app
I have made a shiny app in Persian language which the Shiny admin css has been changed completely to rtl direction. I have only a problem with my dygraph plot which not displayed correctly. My ...
2
votes
1
answer
120
views
dygraphs doesn't show the line for more than 10,000 datapoints
I am trying to plot a graph using dygraph function for a dataset with more than 100,000 datapoints. As soon as I try it the graph appears empty. I tried to shorten the dataset and it turns out that ...
2
votes
1
answer
213
views
How to display all the months (axis ticks/breaks) on the following dygraph? (R)
Following R code and data provided, uses the dygraph library (R interface for the js dygraph)
library(xts)
library(htmlwidgets)
library(dygraphs)
date <- c("2015-01-01", "2015-02-01&...