-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Labels
:LensKibana Lens related issueKibana Lens related issue:xyBar/Line/Area chart relatedBar/Line/Area chart relatedImpact:MediumbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomerskibana cross issueHas a Kibana issue counterpartHas a Kibana issue counterpart
Description
Describe the bug
When mixing two Bar series, with one Time and the other Linear X scales, leads to the charts area to crash (blank area) and an error appears in the console.
To Reproduce
Steps to reproduce the behavior:
- Create a duplicate of the
35_test_time.tsxstory - Add the following series to it:
<BarSeries
id="data2"
xScaleType={ScaleType.Linear}
yScaleType={ScaleType.Linear}
xAccessor={0}
yAccessors={[1]}
data={[
[2400, 1],
[500, 2],
[700, 3],
]}
/>- Add the new story in the
bars.stories.tsx - Start Storybook and navigate to the story page.
Expected behaviour
The two scales should be independent and just split the series as it happens when mixing a Time and an Ordinal scales together (try to change the xScaleType={ScaleType.Linear} to Ordinal to see the difference).
Screenshots
Additional context
In Lens the user could configure multiple "layers", without particular constraint on types, which could lead to this situation.
Errors in browser console
Uncaught RangeError: Invalid array length
at new ScaleContinuous (scale_continuous.ts:229)
at Object.computeXScale (scales.ts:111)
at getScaleForAxisSpec (axis_utils.ts:166)
at Object.computeAxisTicksDimensions (axis_utils.ts:99)
at compute_axis_ticks_dimensions.ts:71
at Array.forEach (<anonymous>)
at compute_axis_ticks_dimensions.ts:68
at resultFuncWithRecomputations (index.js:77)
at index.js:70
at index.js:30
The above error occurred in the <SpecsParserComponent> component:
in SpecsParserComponent (created by ConnectFunction)
in ConnectFunction (created by Chart)
in ErrorBoundary (created by Chart)
in div (created by Chart)
in Provider (created by Chart)
in Chart (created by storyFn)
in div (created by Story)
in Story (created by storyFn)
in storyFn
in ErrorBoundary
React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.
The above error occurred in the <SpecsParserComponent> component:
in SpecsParserComponent (created by ConnectFunction)
in ConnectFunction (created by Chart)
in ErrorBoundary (created by Chart)
in div (created by Chart)
in Provider (created by Chart)
in Chart (created by storyFn)
in div (created by Story)
in Story (created by storyFn)
in storyFn
in ErrorBoundary
React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.
Kibana Cross Issues
Add any Kibana Lens issue related issues here.
Checklist
- every related Kibana issue is listed under
Kibana Cross Issueslist -
kibana cross issuetag is associated to the issue if any kibana cross issue is present
Metadata
Metadata
Assignees
Labels
:LensKibana Lens related issueKibana Lens related issue:xyBar/Line/Area chart relatedBar/Line/Area chart relatedImpact:MediumbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomerskibana cross issueHas a Kibana issue counterpartHas a Kibana issue counterpart
