-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pie chart colors sporadically updating #13653
Comments
I've been trying to reproduce on master, to no avail. Do you know of specific steps to reproduce? |
I didn't do anything more than refresh the page :( I do have some changes checked out but they shouldn't interfere as it's just test stuff and some reporting changes. |
fwiw I've been running the reporting tests for awhile now and haven't seen the blue color show up for 0. I suspect it's still a legit issue, must just be difficult to repro. EDIT: I spoke too soon, it just happened again. Still must be difficult to repro though. |
I think I have a way to reproduce (btw looks like this has been around for while - #7561). I think the problem is that the colors aren't saved with the visualization and the mappedColors array will get wiped on a page refresh ( So say you open a dashboard and look at a pie chart for last 24 hours. The top slices get the default colors: Now switch to Then refresh the page. This will wipe out the mappedColors array and give the To fix it, I think we need to persist the colors on a saved visualization in their config, so it doesn't load up the defaults on a page refresh. cc @elastic/kibana-visualizations |
actually
This is wrong. The visualization could have been saved with an entirely different set of labels. So when we are just browsing data, how do you say - you viewed this label on this visualization at some point and it had color x, so from now on, always give it color x? We aren't saving the visualization during these steps at all, we're just exploring data on a dashboard. We also aren't saving the dashboard at all. Another possible complication - what if you have a pie chart that has a slew of colors, and in your data there are millions of possible values. As you explore data, if we persist this color mapping, it will grow and grow. For instance, what if a pie slice is filtered on time. As time goes on, your going to run out of unique colors to give the slices. |
i think this is expected behavior ... but i agree its confusing and probably not right ... each series name is mapped to a color. when a new series is found it gets the color from:
on refresh, as you noticed the series->color mapping is lost and is rebuild |
on dashboard:
|
Do we think this comment (#10148 (comment)) is related? Sounds like the same behavior. |
It's hard to tell. From what I can tell there are a couple issues - One is that the color mappings may change depending on which time range you load up first on a dashboard. This isn't really a bug, just how it works, and how to fix it is unclear. The second I think is that even during the same time range, a refresh sometimes drops the first default mapping green color and it goes to purple instead. I think this is a legit bug that is really hard to repro (but @kobelb ran into it during reporting tests as well, so I don't think I'm going crazy!). I'm not sure which version that person is referring to. I'd take a guess that it's the first since that's more prevalent, in which case, a solution is probably not around the corner. |
@stacey-gammon @alexfrancoeur I am working on kibana 5.6. If the color mapping change depending upon the time range, what is the case usability of giving the color selection option in the visualization. Hope I am on the same page with you guys. |
@vijaygoturi - if you select the legend colors manually, they should always map to that value (is that not the case for you? Maybe I misunderstood the bug you were seeing). If you don't manually select colors, or for legend values that you haven't selected colors for, they can change based on the time range. This is the flow for how that happens:
The color mapping grows as you browse through time so no legend color is ever repeated (or at least minimally, I imagine we run out of colors at some point), but when the page is refreshed, the mapping resets and starts over again. If you set the colors on the legend manually, and save it with the visualization or dashboard, that data will be saved in elasticsearch and load up. It's actually stored in the url too, so you can share and the colors should stay the same. Does that answer your question? |
@stacey-gammon I am trying to save the colors manually and show the visualization on a html page with the Iframe. But the color are not getting reflected instead it is taking the auto colors. |
Ah, gotcha, thanks for clarifying. In that case, I would open a new bug, if you don't mind. This issue doesn't cover the case for manually setting the colors (possible they are related, but should probably be filed separately). |
@stacey-gammon sure. I already opened a bug on this #14787 |
@stacey-gammon I think I'm seeing a similar issue on my line graph (Kibana 6.3.2). As per comment #7561 (comment) - I perform a hard refresh and the unpinned colours change. I have not updated any values nor have I changed timeframe. Is this expected behaviour? |
Hello! |
Hello, I'm running Kibana 7.5.2 and I'm facing the same issue. I found a way to reproduce this issue. I experienced this issue by missclicking on the Canvas icon and wanted to go back as quick as possible to the dashboard. Go into your dashboard, click on "Canvas" icon on the left, then before this appear, click on the Dashboard icon, whithout waiting for the Canvas page to appear. |
Yep I have same problem. I have a donut wit 2 slices shown from filters. The filters are generated from "now" so now - now-5m for example. Because "now" changes value on refresh (updates to current time) it is automatically refreshing the colours of my donut slices. This is really annoying. |
+1 |
I filed something similar awhile ago and closed it because I thought it was due to changing data. But this time I am sure the data is not changing. Nor am I making any color overrides in a dashboard. Simply refreshing the page on a pie chart, and the colors change.
Not sure if this is intentional, but it doesn't make sense in context. A person gets used to a color representing a label, and then refreshing the page changes it. In addition it's troublesome for reporting because then your generated report might not match what you saw in the dashboard.
Most of the time 0 is mapped to the green, but every now and then I see it mapped to the blue.
cc @elastic/kibana-visualizations
The text was updated successfully, but these errors were encountered: