HighCharts:根据饼图的颜色,标签的颜色 [英] HighCharts: Color of label according to the color of pie slice

查看:1230
本文介绍了HighCharts:根据饼图的颜色,标签的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题的标题说一切。我只找到了如何改变连接器的颜色。如果我删除 color:选项,它们都是灰色的。

Title of this questions says everything. I only found out how to change the color of connectors. If I delete the color: option, they´re all grey. I tried to put in the field with stored colors in hex, with no result, stayed black.

推荐答案

dataLabels.formatter ,您可以访问 this.point.color 。对于dataLabels,简单设置 useHTML:true ,并创建指定颜色的span。

In dataLabels.formatter you have access to this.point.color. So simple set useHTML: true for dataLabels, and create spans with specified colors.

这篇关于HighCharts:根据饼图的颜色,标签的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆