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

all-null series incorrectly accumulate log scales to min: 1, max: 10 #910

Closed
leeoniya opened this issue Jan 9, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@leeoniya
Copy link
Owner

leeoniya commented Jan 9, 2024

need to figure out how to set fallback values after accumulating min/max from all series, rather than per-series.

@leeoniya leeoniya added the bug Something isn't working label Jan 9, 2024
@leeoniya
Copy link
Owner Author

leeoniya commented Jan 9, 2024

uPlot/src/utils.js

Lines 81 to 84 in 28fb438

return [
_min == inf ? 1 : _min,
_max == -inf ? 10 : _max,
];

@leeoniya
Copy link
Owner Author

leeoniya commented Jan 9, 2024

https://jsfiddle.net/q73vxrpe/

let data = [
  [0, 1, 2],
  [100, 200, 1000],
  [null, null, null]
];

const opts = {
  width: 800,
  height: 400,
  scales: {
    x: {
      time: false,
    },
    y: {
      distr: 3
    }
  },
  series: [
    {},
    {
      stroke: "red"
    },
    {
      stroke: "blue"
    },
  ],
};

let u = new uPlot(opts, data, document.body);

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant