Kibana: Bad color mapping with multiple split series

Created on 15 Oct 2020  路  4Comments  路  Source: elastic/kibana

Kibana version:
master (maybe other versions, not sure how far back it goes.)

Describe the bug:
When using any vislib chart type (pie, area, bar, line, etc.) and specifying more than one split series aggregation. The color mapping uses a black value instead of the correct color mapping.

Steps to reproduce:

  1. Open and load kibana with a sample dataset
  2. Open visualize and create a new bar visualization
  3. Select a x axis terms agg and single split series agg
  4. Notice the correct colors are shown
  5. Add another simple split series agg
  6. Notice some (usually the last few) or all the series colors are now black.

Sometimes the issue is corrected after refresh and sometimes not

Expected behavior:
Should show correct colors.

Screenshots (if relevant):

Bar Chart

Screen Recording 2020-10-15 at 04 08 PM

Pie Chart

Screen Recording 2020-10-15 at 04 02 PM

Any additional context:
Vislib gets it's color mappings from the createColorLookupFunction in the charts plugin. Likely a change in this plugin is the cause and not in vislib, nut just a hunch.

https://github.com/elastic/kibana/blob/2b380b658309e0022461a92c7bd4c63ba93cf1e4/src/plugins/charts/public/services/colors/colors.ts#L50-L73

This does not impact the custom set colors coming from uiState as shown in the screenshot.

Vislib KibanaApp blocker bug regression v7.10.0

All 4 comments

Pinging @elastic/kibana-app (Team:KibanaApp)

Just checked on 7.9 and it doesn't seem to be affected

I have nothing to back this, but one thing to investigate is this change: https://github.com/elastic/kibana/pull/78922/files#diff-deb7e80be32c71c952a5c13e1c7d798414ec8daa4aa51b063f083d5ad0a26908L20 (switching from d3 to the color package for color math for bundle size reasons). It would fit @markov00 s observation about affected versions.

Not sure whether related, but I noticed the same behavior in TSVB as well:
Screenshot 2020-10-16 at 09 39 51

I planned to open a separate issue for this, but let's check first whether it can be fixed together with the vislib issue

Was this page helpful?
0 / 5 - 0 ratings