ManageIQ / manageiq-ui-classic

Classic UI of ManageIQ
Apache License 2.0
50 stars 358 forks source link

Shaking tooltips on Dashboard Charts #6216

Open romanblanco opened 5 years ago

romanblanco commented 5 years ago

Screencast from 2019-09-19 10-29-46

Sometimes, chart tooltips on Dashboard go a little bit crazy, at make it complicated to read them.

I've started looking at where do the values get stored and I can read the tooltips data in customizeChart.

diff --git a/app/assets/javascripts/miq_application.js b/app/assets/javascripts/miq_application.js
index 8458da85e8e..6f50466fc94 100644
--- a/app/assets/javascripts/miq_application.js
+++ b/app/assets/javascripts/miq_application.js
@@ -1655,6 +1655,9 @@ function customizeChart(data) {
     data.axis.y.tick.values = [0, max];
   }

+  //console.log(data.data.names);
+  //console.log(data.data.columns);
+
   if (data.miq.expand_tooltip) {
     data.tooltip.format.name = function(_name, _ratio, id, _index) {
       return data.miq.name_table[id];

This however doesn't seem to be the correct place to sort the labels and values.

(cc @PanSpagetka)

epwinchell commented 4 years ago

Confirmed in all browsers. This seems to be specific to stacked bar charts.

miq-bot commented 4 years ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the traige process documentation.