Jump to content
JChartFX Community
  • 0
roberthow

How to set different point label text color with different series?

Question

my code has no effect

// 

var series1=chart.getSeries().getItem(0); 

var series2=chart.getSeries().getItem(1);  

series1.getPointLabels().setTextColor("#FF0000"); 

series2.getPointLabels().setTextColor("#00FF00");  

//
So I need help.
Thanks. 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Now I found the css setting in jchartfx.css has override the api PointLabel.setTextColor().

the css code in jchartfx.css about PointLabel is ".jchartfx .PointLabel" & ".jchartfx .PointLabelBorder".

How to write the css code to get different point label text color with different series?

Share this post


Link to post
Share on other sites
  • 0

In the current build we do not generate CSS classes for pointLabels with specific series indexes, the only workaround would be to not include the jchartfx.css so that the API changes are used.

JuanC

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...