File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/plugins/vis_types/xy/public/convert_to_lens/configurations Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,6 @@ pageLoadAssetSize:
140
140
visTypeTimeseries : 55203
141
141
visTypeVega : 153573
142
142
visTypeVislib : 242838
143
- visTypeXy : 31300
143
+ visTypeXy : 31600
144
144
visualizations : 90000
145
145
watcher : 43598
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ function getDataLayers(
111
111
series : SeriesParam [ ] ,
112
112
vis : Vis < VisParams >
113
113
) : XYDataLayerConfig [ ] {
114
+ const overwriteColors : Record < string , string > = vis . uiState . get ( 'vis.colors' , { } ) ;
114
115
return layers . map ( ( layer ) => {
115
116
const xColumn = layer . columns . find ( ( c ) => c . isBucketed && ! c . isSplit ) ;
116
117
const splitAccessor = layer . columns . find (
@@ -133,6 +134,7 @@ function getDataLayers(
133
134
isHorizontal ,
134
135
isPercentage
135
136
) ;
137
+
136
138
return {
137
139
layerId : layer . layerId ,
138
140
accessors : layer . metrics ,
@@ -150,6 +152,8 @@ function getDataLayers(
150
152
return {
151
153
forAccessor : metricId ,
152
154
axisMode : getYAxisPosition ( yAxis ?. position ?? 'left' ) ,
155
+ color :
156
+ ! splitAccessor && serie ?. data . label ? overwriteColors [ serie ?. data . label ] : undefined ,
153
157
} ;
154
158
} ) ,
155
159
xScaleType : getXScaleType ( xColumn ) ,
You can’t perform that action at this time.
0 commit comments