Where are label_colour keys stored in apache-superset?

£可爱£侵袭症+ 提交于 2019-12-05 08:50:13

Shortly after offering a bounty I figured out the missing piece of the puzzle..

The code needed a slight edit as keys needed to be lower case so that became;

{
"filter_immune_slices": [],
"timed_refresh_immune_slices": [],
"filter_immune_slice_fields": {},
"expanded_slices": {},
"label_colors": {
"a": "#007F3D",
"b": "#2C9F29",
"c": "#9DCB3C",
"d": "#FFF200",
"e": "#F7AF1D",
"f": "#ED6823",
"g": "#E31D23"
},
"default_filters": "{}"
}

However this will still not show the intended colour scheme if you have set the chart colour scheme to anything over than the default option. Set the cahrt colour scheme back to the default and you should get what you want. Default on my build is;

To test this go to the example dashboard births and edit dashboard > edit dashboard metadata change the JSON Metadata as below;

{"filter_immune_slices": [], "timed_refresh_immune_slices": [], 
"filter_immune_slice_fields": {}, "expanded_slices": {}, "label_colors": 
{"boy": "#9DCB3C","girl": "#F7AF1D"}, 
"default_filters": "{}"}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!