Skip to content

Chart disappears when rendering LineAnnotation in another Component #914

@cauemarcondes

Description

@cauemarcondes

Describe the bug
On APM I have multiple charts the use the same LineAnnotation, so I decided to create a new React component and place the logic to fetch and show the annotations. The problem is that the chart renders first without any annotation, because it's still fetching the data, when the data is available the Component re-renders and the annotations should be placed inside the chart, but instead it makes the whole chart to disappear.

To Reproduce
Steps to reproduce the behavior:
I put together a codesandbox simulating the problem.

Expected behaviour
The annotations should show with the chart.

Screenshots

Version (please complete the following information):

  • Elastic Charts: 24.0.0

Additional context

Errors in browser console

Kibana Cross Issues
elastic/kibana#84178

Checklist

Delete any items that are not applicable to this issue.

  • every related Kibana issue is listed under Kibana Cross Issues list
  • kibana cross issue tag is associated to the issue if any kibana cross issue is present

Metadata

Metadata

Assignees

Labels

:specsChart specifications related issue:xyBar/Line/Area chart relatedImpact:MediumbugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions