dygraphs icon indicating copy to clipboard operation
dygraphs copied to clipboard

Vertical graphing (swap X and Y axis)

Open ngrishanov opened this issue 8 years ago • 2 comments

Hello!

I want to use Dygraphs for vertical graphing (basically, swap X and Y axis).

I've seen similar question on StackOverflow: http://stackoverflow.com/questions/26577180/vertical-graphing-in-dygraph, and there is a working solution (http://www.ransomchristofferson.com/flipped_dygraph/) in the answer. However, it seems to be outdated, e.g. interaction model code doesn't work with current Dygraphs version because there are no mouseup / mousemove event handlers anymore. How can I adapt this solution for the latest version?

Also, is overriding default DataHandler or Plotter a possible solution? If so, how time-consuming will it be and what should I be looking for?

Thanks!

ngrishanov avatar May 25 '16 12:05 ngrishanov

+1 We could really use this feature! In oceanography we commonly plot ocean depth profiles, where depth is on the vertical axis and the measured physical parameters like water temperature are on the horizontal axis. While I've attempted assigning these to the y and x axes, respectively, Dygraphs currently complains that the CSV is "out of order". I presume this is because the x axis (e.g. water temperature) is not monotonic. It re-orders the water temperature values so they are always increasing, but this is not the desired effect. Actually, if I could just stop Dygraphs from enforcing and re-ordering the x axis values to be monotonic, that could also be a solution for vertical graphing. I could not find an option for this so I presume it's not currently possible?

Here is an example of ocean depth profiles of currents (speed and direction) that illustrates what I'm trying to achieve with Dygraphs:

ocean_vertical_profiles

Mahalo!, John Maurer

pacioos avatar Jun 29 '16 00:06 pacioos

I'm here with another use case for this: We plot drill core scanning results for geological analysis/interpretation. In this field vertical plotting with the (down-hole direction going downward) is a must, since it's the industry standard.

estan avatar May 01 '19 08:05 estan