Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduction of a right y axis #113

Open
sewillia opened this issue Nov 13, 2012 · 66 comments
Open

Introduction of a right y axis #113

sewillia opened this issue Nov 13, 2012 · 66 comments
Milestone

Comments

@sewillia
Copy link

It would be great if Morris was capable of plotting multiple lines, some on the traditional left y axis and others on the right. Data spanning varying orders of magnitude can be viewed on the same graph.

@tiraeth
Copy link
Contributor

tiraeth commented Dec 13, 2012

This is difficult. We have two cases:

  1. Both data collections contain same xkey values (same categories).
  2. Each collection has it's own set of categories (different xkey values).

Of course case number 1 is easier to implement. Also, we will need to handle grid drawing in such way that right axis is properly scaled using left axis' grid lines. Please also remember that hovering is per category not per series' point.

@sewillia
Copy link
Author

Thank you for taking a look. When I suggested this feature, I was thinking more of scenario 1) where both series are measured against the same x axis values - they only have the potential to differ in their orders of magnitude. My specific use case is graphing daily word counts and a running count of words written on the same graph. See here for an example : http://bit.ly/WhCBqB .

@oesmith
Copy link
Contributor

oesmith commented Jan 25, 2013

This is a useful idea, but it'll need some serious work. Delaying until a v0.6 release.

@noeltock
Copy link

Came here looking for this 👍 Thanks for all the great work so far...

@shred444
Copy link

interested in this as well. thanks

@davesherratt
Copy link

Exactly what I was looking for, guess highcharts will have to do for now.

@drhenner
Copy link

👍 What can the community do to help out with this? I like morrisJS but want the added features. 😄

@oesmith
Copy link
Contributor

oesmith commented Jul 15, 2013

Things that could be done to help:

Non-developers: draw up some comprehensive mocks and discuss them with the community. This gives us a spec that should be relatively easy for a developer-contributor from.

Developers: Pull requests! I can't promise any code myself, but I will review any new pull requests and work constructively with you to get them merged. Strong contributors will be granted write access to the repo.

Thanks!

Olly

On 14 Jul 2013, at 20:25, "D. R. Henner" notifications@github.com wrote:

What can the community do to help out with this? I like morrisJS but want the added features.


Reply to this email directly or view it on GitHub.

@mmahalwy
Copy link

mmahalwy commented Jun 7, 2014

Any update on this?

@dilshaneq
Copy link

This is a really a gating issue. so many charts have very different value ranges.

See graph below. At this point, we're stuck with how to proceed with morris.

morris-2axis-fail

@mmahalwy
Copy link

Yeah I am having the same problem and considering of switching to D3 for everything if we cannot get this working soon although I love morrisjs!

@edmundluong
Copy link

Also would love to see this option with morris.js! Would be a very useful tool!

@andrefrcastro
Copy link

Will this happen ?

@SystemZ
Copy link

SystemZ commented Jan 20, 2015

+1 for this function req.

@paulmaszlik
Copy link

+1 👍

@DavidBennettPIO
Copy link

+1

1 similar comment
@tristartechgroup
Copy link

+1

@DavidBennettPIO
Copy link

I really needed this for my project, so I hacked it in (with a chainsaw and baseball bat) ... but the code it really ugly, only works for bar chars and It probably breaks other functionality.

If I cleaned it up, got it working for line charts, and tested it well. What's the chances that it would get merged?

This is what it looks like currently:

feed_wedge

@JelteF
Copy link
Contributor

JelteF commented Feb 2, 2015

Pretty big, this is a feature a lot of people want.

@csatisfaction
Copy link

+1

@jaminellis
Copy link
Contributor

nice one!

@DavidBennettPIO
Copy link

Currently I added in a new rykeys option that enable this functionality. But I'm not sold that's the best way to do it.

Does anyone else have a better idea?

@DavidBennettPIO
Copy link

And what about other functions like goals, would you need to be able add them using the right axis?

I think I will just keep it separate from the other functions for now... sounds like it might double the code-base if I make it too flexible.

@JelteF
Copy link
Contributor

JelteF commented Feb 4, 2015

I would call it rightYkeys, but it sounds like a good way to implement it.
Implementing goals and other stuff would only male it way to complex I
think.
On Feb 4, 2015 4:17 AM, "David Bennett" notifications@github.com wrote:

And what about other functions like goals, would you need to be able add
them using the right axis?

I think I will just keep it separate from the other functions for now...
sounds like it might double to code-base if I make it too flexible.


Reply to this email directly or view it on GitHub
#113 (comment).

@JelteF
Copy link
Contributor

JelteF commented Feb 4, 2015

I'm just thinking of a better way. You should probably make an array like
for shown or colors that tells in for which axis the series is. That way it
keeps the data in one place.
On Feb 4, 2015 8:31 AM, "Jelte Fennema" me@jeltef.nl wrote:

I would call it rightYkeys, but it sounds like a good way to implement it.
Implementing goals and other stuff would only male it way to complex I
think.
On Feb 4, 2015 4:17 AM, "David Bennett" notifications@github.com wrote:

And what about other functions like goals, would you need to be able add
them using the right axis?

I think I will just keep it separate from the other functions for now...
sounds like it might double to code-base if I make it too flexible.


Reply to this email directly or view it on GitHub
#113 (comment).

@paulm-jones
Copy link

+1

3 similar comments
@joan16v
Copy link

joan16v commented May 12, 2015

+1

@endercrest
Copy link

+1

@oss92
Copy link

oss92 commented Jun 4, 2015

+1

@WoitiX
Copy link

WoitiX commented Feb 4, 2016

+10

@egesu
Copy link

egesu commented Feb 16, 2016

+1

@joenorton
Copy link

Awesome, this has been something I've needed!

On Tue, Feb 16, 2016, 6:51 AM Ege notifications@github.com wrote:

+1


Reply to this email directly or view it on GitHub
#113 (comment).

@alesdvorakcz
Copy link

I really miss the function too...

@zon7
Copy link

zon7 commented Apr 12, 2016

+1

1 similar comment
@ranjithsiji
Copy link

+1

@pedrodevoto
Copy link

+1000

@MartinPerrie
Copy link

+1

@riconeitzel
Copy link

Someone mentioned +1 yet?!

@artcz
Copy link

artcz commented Nov 23, 2016

+1

@hiten247
Copy link

hiten247 commented Dec 5, 2016

+10K

@radoslavius
Copy link

+1

6 similar comments
@thiagolcmelo
Copy link

+1

@mikicz
Copy link

mikicz commented Apr 24, 2017

+1

@bglacial
Copy link

+1

@oOoHoCo
Copy link

oOoHoCo commented Jun 22, 2017

+1

@jordivandijk
Copy link

+1

@jayixl
Copy link

jayixl commented Sep 26, 2017

+1

@robin1990
Copy link

I really think this feature will help.
Thanks! +1

@TRTL4LIFE
Copy link

+1

@pierresh
Copy link

pierresh commented Jan 9, 2018

I also needed this feature so that I finally made a fork of Morris.js. For those who might be interested, you can get it here: https://pierresh.github.io/morris.js/ Just need to set the option nbYkeys2 with a number corresponding to the number of series to be displayed on the right axis (from the end of ykeys array, default is 0).

@mickey9801
Copy link

+1

1 similar comment
@Woodehh
Copy link

Woodehh commented Aug 3, 2018

+1

@Pionell
Copy link

Pionell commented Oct 3, 2018

Any news about this?

@theFra985
Copy link

+1

1 similar comment
@artemlv
Copy link

artemlv commented Mar 23, 2020

+1

@pierresh
Copy link

pierresh commented Mar 24, 2020

Just use my fork, that is built-in :).

https://pierresh.github.io/morris.js/

@artemlv
Copy link

artemlv commented Mar 24, 2020

Just use my fork, that is built-in :).

https://pierresh.github.io/morris.js/

nice try, but it must work like canvasjs with data...axisYIndex

@pierresh
Copy link

Just use my fork, that is built-in :).
https://pierresh.github.io/morris.js/

nice try, but it must work like canvasjs with data...axisYIndex

Such a way is very complicated and would make Morris.js very verbose, which is not its philosophy.

@mudassar791
Copy link

any final idea to use rykeys?rightyaxis? how to set 2nd y axis?can we do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests