You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks Joe, yep, this can definitely be improved a lot
We can probably also call the value formatting only when showing the tooltip, without having a precomputed value saved
Describe the issue
In https://github.com/elastic/elastic-charts/blob/master/packages/charts/src/chart_types/xy_chart/rendering/bars.ts#L92 the provided formatter is called for each data point in the series, but it's only used in special circumstances:
https://github.com/elastic/elastic-charts/blob/master/packages/charts/src/chart_types/xy_chart/rendering/bars.ts#L96
In case of charts with lots of series and slow formatting functions provided this can have a noticable performance impact.
E.g. in the following chart it's spending 44ms in
getConvertedValue
(out of ~360ms total blocking rendering time):To Reproduce
Configure a bar chart without labels on the bars and observe the provided formatter being called.
Expected behaviour
Formatter should only be called if necessary to render the chart correctly
The text was updated successfully, but these errors were encountered: