gpt4 book ai didi

css - apache-superset 中的 label_colour 键存储在哪里?

转载 作者:技术小花猫 更新时间:2023-10-29 11:36:19 24 4
gpt4 key购买 nike

版本: 来自 here 的 Docker 实例

根据docs我可以根据标签编辑颜色;

It is possible on a per-dashboard basis by providing a mapping of labels to colors in the JSON Metadata attribute using the label_colors key.

通过调整找到的JSON如下;

enter image description here

enter image description here

我的 JSON 代码在哪里;

{
"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": "{}"
}

最佳答案

在提供赏金后不久,我找到了缺失的那 block 拼图..

代码需要稍微修改,因为键需要小写,这样就变成了;

{
"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": "{}"
}

但是,如果您将图表配色方案设置为高于默认选项的任何值,这仍然不会显示预期的配色方案。将 cahrt 配色方案设置回默认值,你应该得到你想要的。我构建的默认设置是;

enter image description here

要对此进行测试,请转到示例仪表板 births 并编辑仪表板 > 编辑仪表板元数据,如下所示更改 JSON 元数据;

{"filter_immune_slices": [], "timed_refresh_immune_slices": [], 
"filter_immune_slice_fields": {}, "expanded_slices": {}, "label_colors":
{"boy": "#9DCB3C","girl": "#F7AF1D"},
"default_filters": "{}"}

关于css - apache-superset 中的 label_colour 键存储在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54326962/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com