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

[Heatmap] Time scale type with a single row of data breaks the chart #1184

Closed
darnautov opened this issue Jun 3, 2021 · 2 comments
Closed
Assignees
Labels
bug Something isn't working good first issue Good for newcomers :heatmap Heatmap/Swimlane chart related issue Impact:High

Comments

@darnautov
Copy link
Contributor

darnautov commented Jun 3, 2021

Describe the bug
Passing a single row of data with a time scale on the X-axis breaks the chart.

To Reproduce
Go to https://codesandbox.io/s/cool-sound-8j9m7?file=/src/App.tsx

Notice by not setting the xDomain with a single values, causes the error below.

Expected behaviour
The chart is rendered with a single row of data

Version (please complete the following information):

  • OS: [e.g. iOS] macOS
  • Browser: [e.g. chrome, safari] Chrome
  • Elastic Charts: [e.g. 1.0.1] latest

Errors in browser console

quantize.js:18 Uncaught RangeError: Invalid array length
    at rescale (quantize.js:18)
    at Function.scale.range (quantize.js:28)
    at Object.shapeViewModel (viewmodel.js:81)
    at Object.render (scenegraph.js:30)
    at geometries.js:42
    at resultFuncWithRecomputations (index.js:77)
    at index.js:70
    at index.js:30
    at index.js:84
    at index.js:30
@darnautov darnautov added bug Something isn't working :heatmap Heatmap/Swimlane chart related issue labels Jun 3, 2021
@nickofthyme nickofthyme added the good first issue Good for newcomers label Jun 7, 2021
@rshen91 rshen91 self-assigned this Jul 19, 2021
@rshen91 rshen91 removed their assignment Jul 19, 2021
@markov00
Copy link
Member

I've lowered the priority because this issue has a workaround (set the minInterval in the xDomain)

@nickofthyme nickofthyme self-assigned this Aug 9, 2021
nickofthyme added a commit to nickofthyme/elastic-charts that referenced this issue Aug 10, 2021
@markov00
Copy link
Member

Starting from v39.0.0 the Heatmap has a new set of APIs that fix and cover this issue #1462 by explicitly requiring the internal parameter when using a time scale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers :heatmap Heatmap/Swimlane chart related issue Impact:High
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants