Value labels isValueContainedInElement breaks when value input is sent as number instead of string #786
Labels
:annotation
Annotation (line, rect, text) related issue
bug
Something isn't working
:xy
Bar/Line/Area chart related
Describe the bug
The
isValueContainedInElement
flag may crash the chart rendering in some scenarios.To Reproduce
Steps to reproduce the behavior:
Bar Chart with value label
storytickFormat
prop in theLeftAxis
component to return a number rather than a string (just remove the.toFixed(2)
from the function code)Expected behaviour
The chart is rendered and the value labels are shown on the chart.
Screenshots
Version (please complete the following information):
Additional context
The API says the return value of the
tickFormat
function should be astring
, but somehow TS managed to miss that and it happened to have a number output.Update: The same error happens when no yAxis is associated with the current series, therefore no
tickFormat
function is used.Not super important, but it would be helpful to be resilient to this kind of scenario, when possible.
Errors in browser console
Kibana Cross Issues
Add any Kibana related issues here: elastic/kibana#75426
The text was updated successfully, but these errors were encountered: