Skip to content

Allow customization of sub series names #245

@emmacunningham

Description

@emmacunningham

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, not splitSeriesAccessors)
image

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 and colorValues 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 one name prop may not be the best.

The other possibility is that instead of adding the function as a type on splitSeriesAccessors and yAccessors, we could add it to name instead and ensure that if name 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

  • this request is checked against already exist requests
  • 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

:interactionsInteractions related issue:legendLegend related issuediscussTo be discussedenhancementNew feature or request

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