从LineChart获取系列颜色 [英] Getting series color from LineChart

查看:120
本文介绍了从LineChart获取系列颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

LineChart的系列默认情况下具有不同的颜色.如何将获得的颜色设置为与指定系列相关的其他文本?

LineChart has series which have different color by default. How can I get it to set obtained color to other text connected with the specified series?

推荐答案

在折线图中,因为单个系列的所有元素都具有一种颜色.该系列分配有样式类series0series1series2等.

In a line chart since all elements of a single series have one color. The series are assigned with styleclass series0, series1, series2 etc.

这些系列中的每个系列均分配有相应的颜色样式类,例如default-color0default-color1default-color2等.您可以直接将样式类用于文本/标签.

Each of these series are assigned with corresponding colors styleclass i.e. default-color0, default-color1, default-color2 etc. You can directly use the styleclass for your text/labels.

这篇关于从LineChart获取系列颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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