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

Various fixes for SOS. #6059

Merged
merged 7 commits into from
Jan 5, 2022
Merged

Various fixes for SOS. #6059

merged 7 commits into from
Jan 5, 2022

Conversation

na9da
Copy link
Collaborator

@na9da na9da commented Dec 23, 2021

What this PR does

image

  • Temporary workaround for an app crash when rendering feature info chart. The actual cause is explained here App crash when duplicating a TableMixin type item. #6058
  • Fixes "ideal zoom" for table mixin items.
  • Removes clamping of min y-axis value to 0 in bottom panel chart. This resulted in the feature info panel chart looking very different from the bottom panel chart for scales >> 0. Not sure of the original reasoning but I think it is a harmless change.

Test link:
http://ci.terria.io/fix-sos/#clean&https://raw.githubusercontent.com/TerriaJS/saas-catalogs-public/main/neii/water/prod.json

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.

- Re-enables procedure and observable selectors
- Fixes feature info chart
- Fixes feature info table
Not sure why it was done before but this change should be harmless.
@@ -515,7 +515,7 @@ function calculateDomain(chartItems) {
const ymax = Math.max(...chartItems.map(c => c.domain.y[1]));
return {
x: [xmin, xmax],
y: [Math.min(0, ymin), ymax]
y: [ymin, ymax]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a suspicion that this is going to break some dataset, somewhere, that was depending on us clamping the min of the y domain to zero. But this is probably one of those situations where we tell people to fix their own data.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, i think so too, but this shouldn't be the default behavior. If we find that we need it somewhere we can add a flag to force it per item. The problem with clamping automatically is that the when displaying a single chart that has y value >>> 0 the chart line looks flat loosing all the bumps and details which is bad.

@KeyboardSounds KeyboardSounds merged commit 14e5d03 into main Jan 5, 2022
@KeyboardSounds KeyboardSounds deleted the fix-sos branch January 5, 2022 01:43
@na9da
Copy link
Collaborator Author

na9da commented Jan 5, 2022

Thanks for the merge @KeyboardSounds!

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

Successfully merging this pull request may close these issues.

NEII - Data missing frequency level dropdown
2 participants