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

Fallback scale should not use custom domain #756

Closed
nickofthyme opened this issue Jul 20, 2020 · 1 comment · Fixed by #757
Closed

Fallback scale should not use custom domain #756

nickofthyme opened this issue Jul 20, 2020 · 1 comment · Fixed by #757
Assignees
Labels
bug Something isn't working released Issue released publicly

Comments

@nickofthyme
Copy link
Collaborator

Describe the bug
With the newly added x scale ordinal fallback enhancement (#678), the xDomain prop should be ignored as the DomainRange object does not apply to ordinal scales.

To Reproduce
https://codesandbox.io/s/goofy-https-1vy9c?file=/src/App.tsx

Expected behaviour
A warning should be thrown that the custom domain is not valid. But no error should be thrown.

Version (please complete the following information):

  • OS: [e.g. iOS]
  • Browser: [e.g. chrome, safari]
  • Elastic Charts: 20.0.0, 19.5.1

Errors in browser console

Uncaught TypeError: xDomain for ordinal scale should be an array of values, not a DomainRange object
    at Object.mergeXDomain (x_domain.js:47)
    at Object.computeSeriesDomains (utils.js:134)
    at eval (compute_series_domains.js:14)
    at resultFuncWithRecomputations (index.js:77)
    at eval (index.js:60)
    at eval (index.js:29)
    at eval (index.js:68)
    at eval (index.js:29)
    at selector (index.js:105)
    at eval (index.js:66)
    at eval (index.js:29)
    at selector (index.js:105)
    at eval (index.js:66)
    at eval (index.js:29)
    at Object.selector [as getLegendItemsLabelsSelector] (index.js:105)
    at XYAxisChartState.getLegendItemsLabels (chart_state.js:55)
    at exports.getLegendItemsLabelsSelector (get_legend_items_labels.js:5)
    at eval (index.js:66)
    at eval (index.js:29)
    at selector (index.js:105)
    at eval (index.js:66)
    at eval (index.js:29)
    at selector (index.js:105)
    at eval (index.js:66)
    at eval (index.js:29)
    at selector (index.js:105)
    at eval (index.js:66)
    at eval (index.js:29)
    at selector (index.js:105)
    at eval (index.js:66)
    at eval (index.js:29)
    at selector (index.js:105)
    at eval (index.js:66)
    at eval (index.js:29)
    at selector (index.js:105)
    at XYAxisChartState.eval [as onElementOverCaller] (on_element_over_caller.js:56)
    at XYAxisChartState.eventCallbacks (chart_state.js:85)
    at eval (chart.js:106)
    at Object.dispatch (redux.js:144)
    at Object.e [as dispatch] (<anonymous>:1:40553)
    at dispatch (<anonymous>:1:28545)
    at Object.eval [as updateParentDimensions] (redux.js:297)
    at eval (chart_resizer.js:42)
@nickofthyme nickofthyme added the bug Something isn't working label Jul 20, 2020
@nickofthyme nickofthyme self-assigned this Jul 20, 2020
nickofthyme added a commit that referenced this issue Jul 21, 2020
Ignores `xDomain` prop when using a fallback ordinal scale.

fixes #756
markov00 pushed a commit that referenced this issue Jul 21, 2020
## [20.0.1](v20.0.0...v20.0.1) (2020-07-21)

### Bug Fixes

* custom domain error with fallback ordinal scale ([#757](#757)) ([142c3df](142c3df)), closes [#756](#756)
@markov00
Copy link
Member

🎉 This issue has been resolved in version 20.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Jul 21, 2020
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Issue released publicly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants