Allow customization of sub series names #245
Labels
discuss
To be discussed
enhancement
New feature or request
:interactions
Interactions related issue
:legend
Legend related issue
Is your feature request related to a problem? Please describe.
Currently the name for a sub series is automatically created by concatenating the split series values and yAccessors. This leads to issues in both the legend and element hover tooltip when the split series values need to be formatted.
(in the example below, the UUIDs are defined as
yAccessors
, notsplitSeriesAccessors
)Describe the solution you'd like
This is related to the request in #241 though not completely the same as with that request, the user may want to do more than just the series name formatting.
For this enhancement, we could do something similar to how @nickofthyme is extending the Accessor type for colorAccessors so that we can define either a string field accessor as we do now (in which case the series name would be the default concatenation) or a function which has
specId
andcolorValues
params that can be used to return a custom formatted string.Describe alternatives you've considered
We already have the
name
prop on a series and could use that; the problem there is that for a split series, we may want different custom names per split series and so just using the onename
prop may not be the best.The other possibility is that instead of adding the function as a type on
splitSeriesAccessors
andyAccessors
, we could add it toname
instead and ensure that ifname
is defined, it always takes precedence over the default.Additional context
related to #241
Kibana Cross Issues
Add any Kibana related issues/feature requests here.
Checklist
Kibana Cross Issues
listkibana cross issue
tag is associated to the issue if any kibana cross issue is presentThe text was updated successfully, but these errors were encountered: