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
When using multiple y-axes and a single global x-axis. Each of the supplied series will use their respective y-axis per groupId and share the x-axis as a fallback.
However, the tick formatter for the x-axis is not associated to the global x-axis, and leaves the tooltip header values unformatted even though the series is using the global x-axis as a default.
Screenshot
Notice the x-axis time has ticks formatted given the tickFormat on the AxisSpec. However, the header value is not formatted.
Solution
The code below, chooses the x or y axis based on rotation or uses the explicit tooltipHeaderFormatter
When using multiple y-axes and a single global x-axis. Each of the supplied series will use their respective y-axis per
groupId
and share the x-axis as a fallback.However, the tick formatter for the x-axis is not associated to the global x-axis, and leaves the tooltip header values unformatted even though the series is using the global x-axis as a default.
Screenshot
Notice the x-axis time has ticks formatted given the
tickFormat
on theAxisSpec
. However, the header value is not formatted.Solution
The code below, chooses the x or y axis based on rotation or uses the explicit
tooltipHeaderFormatter
elastic-charts/src/chart_types/xy_chart/state/selectors/get_tooltip_values_highlighted_geoms.ts
Lines 180 to 185 in a79e899
However, given this configuration the
xAxis
will always beundefined
asgetAxesSpecForSpecId
will only associate axis to theirgroudId
.elastic-charts/src/chart_types/xy_chart/state/selectors/get_tooltip_values_highlighted_geoms.ts
Line 144 in a79e899
Currently, this is fixed by supplying the
tooltipHeaderFormatter
to the tooltip but this seems unnecessary.I think the fix, in this case, is to change
getAxesSpecForSpecId
to return global spec as a fallback possibly optionally based on an argument.The text was updated successfully, but these errors were encountered: