Multiple y-axis with different scaling

1,884 views
Skip to first unread message

R.Seco

unread,
Aug 11, 2011, 4:36:41 AM8/11/11
to dygraphs-users
Hello,

I would like to create a line chart with multiple series having the
respective number of y-axis. The goal is to represent various
variables on the same chart but with different y scales. Is this
possible in the current library? If not, can you indicate me an
alternative solution? Thanks.

R.Seco

lrobb

unread,
Aug 11, 2011, 6:00:32 AM8/11/11
to dygraphs-users

R.Seco

unread,
Aug 11, 2011, 6:06:28 AM8/11/11
to dygraphs-users
In this example only to y-axis are shown. Is it possible to show more
than 2 y-axis (e.g. 4 y-axis on left side) with different colors and
scales?

Neal Nelson

unread,
Aug 11, 2011, 6:11:35 AM8/11/11
to dygraphs-users
I added the capability to have as many independent axes as you like, which we use in production. Only one axis is currently displayed at a time, coloured to match the data series. Unfortunately my changes have not been accepted back into the project.

You could always use my branch if you like, but the main line has developed further since then.

Here's the link to my changes: https://github.com/danvk/dygraphs/pull/53

R.Seco

unread,
Aug 11, 2011, 9:09:30 AM8/11/11
to dygraphs-users
Thank you for your help Neal Nelson.

Dan Vanderkam

unread,
Aug 11, 2011, 4:06:41 PM8/11/11
to ricard...@gmail.com, dygraphs-users
I've always been reluctant to support >2 y-axes in dygraphs. If you
have three or more y-axes on a single chart, it's usually a sign that
you need to re-think what you're charting. This is a fairly common
restriction. Microsoft Excel only supports two y-axes, for instance.

If you need to do this, you can work around the restriction by
re-scaling your data and undoing the scaling in a valueFormatter. Or
at least you will be able to soon:
http://dygraphs.com/preview/tests/multi-scale.html

I'm hoping to integrate the changes to valueFormatter in the next week.

- Dan

R.Seco

unread,
Aug 17, 2011, 4:03:13 PM8/17/11
to dygraphs-users
Hi Neal,

I'm using the capability you developed and suggested. I would like to
know if it is possible to dynamically change the y-axes scales. In the
example you present, "3 plots, one Y axis shown (fixed scales)", you
predefine the y-axis max and min values. How could I dynamically
define the different axis limits with, for example, html text boxes?
Thank you for your help.

R.Seco

JohnV

unread,
Sep 14, 2016, 5:21:17 PM9/14/16
to dygraphs-users, katzen...@googlemail.com
Hi Neal.  We also have a need for multiple Y-axis support, and I wanted to try your solution.  I've downloaded your changes, but when I try to generate the dygraph-combined.js file by running generate-combined.sh, it just creates an empty file.  Any idea what I might be doing wrong?


vanessa

unread,
Feb 13, 2024, 7:36:49 AMFeb 13
to dygraphs-users
Hi everyone,
I am currently using Dygraph 2.2.1 and I need to have multiple y-axis (more then 2) as aked by R.Seco. 
I tried to perform the re-scaling suggested by Dan, but every time the y-axis range is changed (feature available to the user of my charts), I need to re-scale all the data in the chart.
Is there any another solution available that would not involve all these computations?
Thanks in advance for any help.

Konyu Godwin

unread,
Jun 9, 2024, 3:05:39 AMJun 9
to dygraphs-users

There is a growing number of people who wish to buy shrooms online. It is often hard to tell which form of products to buy since you cannot see it physically. This is sometimes peculiar to newbies who haven’t tried shrooms before. They just don’t know how to go about it. Shroom Edibles are not so popularly discussed as often as you think. A lot of experienced shroom users have not even had a taste of these Psilonauts Psilocybin Chocolate Bar goodness that offer a premium psychedelic trip.
https://t.me/trippyworld710/911
https://t.me/trippyworld710/908?single
https://t.me/trippyworld710/882?single
https://t.me/trippyworld710/879?single
https://t.me/trippyworld710/877
https://t.me/trippyworld710/872?single
https://t.me/trippyworld710/870
https://t.me/trippyworld710/865
https://t.me/trippyworld710/864
https://t.me/trippyworld710/863?single
https://t.me/trippyworld710/859?single
https://t.me/trippyworld710/848
https://t.me/trippyworld710/844
https://t.me/trippyworld710/841
https://t.me/trippyworld710/837
https://t.me/trippyworld710/833
https://t.me/trippyworld710/831?single
https://t.me/trippyworld710/829?single
https://t.me/trippyworld710/823?single
https://t.me/trippyworld710/821
https://t.me/trippyworld710/817
https://t.me/trippyworld710/816
https://t.me/trippyworld710/815
https://t.me/trippyworld710/811
https://t.me/trippyworld710/810
https://t.me/trippyworld710/808
https://t.me/trippyworld710/806
https://t.me/trippyworld710/803
https://t.me/trippyworld710/790
https://t.me/trippyworld710/783?single
https://t.me/trippyworld710/780
https://t.me/trippyworld710/779?single
https://t.me/trippyworld710/769
https://t.me/trippyworld710/754
https://t.me/trippyworld710/741
https://t.me/trippyworld710/737
https://t.me/trippyworld710/732
https://t.me/trippyworld710/730
https://t.me/trippyworld710/727
https://t.me/trippyworld710/724
https://t.me/trippyworld710/704
https://t.me/trippyworld710/679?single
https://t.me/trippyworld710/655
https://t.me/trippyworld710/649?single
https://t.me/trippyworld710/648
https://t.me/trippyworld710/647
https://t.me/trippyworld710/570?single
https://t.me/trippyworld710/557?single
https://t.me/trippyworld710/552?single
https://t.me/trippyworld710/547
https://t.me/trippyworld710/545?single
https://t.me/trippyworld710/537
https://t.me/trippyworld710/522
https://t.me/trippyworld710/519?single
https://t.me/trippyworld710/484?single
https://t.me/trippyworld710/448?single
https://t.me/trippyworld710/446
https://t.me/trippyworld710/211
https://t.me/trippyworld710/198
https://t.me/trippyworld710/183?single
https://t.me/trippyworld710/182

Konyu Godwin

unread,
Jun 9, 2024, 3:07:56 AMJun 9
to dygraphs-users

Konyu Godwin

unread,
Jun 9, 2024, 4:21:33 AMJun 9
to dygraphs-users
Reply all
Reply to author
Forward
0 new messages