问题
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?
回答1:
In a line chart since all elements of a single series have one color. The series are assigned with styleclass series0
, series1
, series2
etc.
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.
来源:https://stackoverflow.com/questions/30074315/getting-series-color-from-linechart