gpt4 book ai didi

charts - Flot - donut 饼图 - 自定义图例

转载 作者:行者123 更新时间:2023-12-02 06:30:15 25 4
gpt4 key购买 nike

我使用 Flot 创建了一个 donut 饼图.

example of my chart

有没有办法自定义“图例”?我想将 GFavorite、G2 和 G3 的字体设置为粗体。我补充道:

pie: { 
innerRadius: 0.5,
show: true,
formatter: function(label, series){
return '<div style="font-style:bold">';
}
}

但它没有做任何事情。

最佳答案

您想使用这个:

labelFormatter: function(label, series) {
// series is the series object for the label
return '<span style="font-style:bold">' + label + '</span>';
}

关于charts - Flot - donut 饼图 - 自定义图例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22876383/

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