JustinGOSSES / wellioviz

d3.js v5 visualization of well logs
https://justingosses.github.io/wellioviz/#introduction
Apache License 2.0
49 stars 12 forks source link

each curve needs its own scale, otherwise cannot mix them #66

Closed kernant closed 4 years ago

kernant commented 4 years ago

currently when you select two different curves, say GR and RHOB, it takes only one max and min. It should plot each curve to its own max and min

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

JustinGOSSES commented 4 years ago

This also impacts the SVG header height and where xaxis gets placed.

Potential solution: Have a change to the field for svg_header_height:"4M" to be "auto" by default.

"auto" will use "4em" for curveboxes with a single curve but adds {number of curves over 1} X some value to get a new svg_header_height value. This will allow for an arbitrary number of curves to appear in the curvebox with different scales & each scale to be independent.

Potential downside of this is when someone wants a different size svg_header_height and is mostly working with single curves...and then once in a while has double curves in a curvebox. For that situation, they'd have to write their own code to catch when multiple curves are plotted in a single curvebo and change the svg_header_height. This is something to add to the list of potential confusion points!

However, this won't support the case where you want all the curves to be on the same scale. That will have to be done by using the same values for each curve in the key:value field here "curve_limits":[{"curve_name":"","min":-10000000,"max":3}],

JustinGOSSES commented 4 years ago

pushed code to npm & github repository & Observable demo page with bare bones working version.

need to handle CSS sizing better that resultes to how many scales. Also, don't like how ends of scales end.

Need to clean up code in curveBox function as well, so will continue to leave this open even though there is a mostly working solultion pushed.