Allow functional accessors on y, y0, mark and split #838
Labels
breaking change
:data
Data/series/scales related issue
enhancement
New feature or request
released
Issue released publicly
:xy
Bar/Line/Area chart related
Describe the solution you'd like
Allow
AccessorFn
type foryAccessors
,y0Accessors
,markSizeAccessor
andsplitSeriesAccessors
.This is currently allowed for the
xAccessor
Describe alternatives you've considered
Reformatting the data before passing it to elastic charts.
Additional context
We need to refactor the way that we track the accessors from the string of the accessor to the index order of the original accessor values.
One change is to update the split series map to use an array to match the provided
splitSeriesAccessors
array.elastic-charts/src/chart_types/xy_chart/utils/series.ts
Lines 288 to 299 in dcd7077
Secondly, we need to use the yAccessor index rather than the string itself to allow use of
AccessorFn
elastic-charts/src/chart_types/xy_chart/utils/series.ts
Lines 174 to 179 in dcd7077
which includes updating the
getSeriesKey
methodelastic-charts/src/chart_types/xy_chart/utils/series.ts
Lines 272 to 282 in dcd7077
Related to #808
The text was updated successfully, but these errors were encountered: