openmet

Value font color in bar2d charts

Recommended Posts

Hi;

I'm creating a bar2d chart where the bars are filled with a dark color. 

When the bars are small the value is displayed at the right of the bar (which is great). But for larger bars the value is displayed inside the bar (which is also great to avoid clipping) but the text is difficult to read (see the attached image).

My question is: Is there a way to display a bar chart that automatically uses a dark color to draw the value when it is out of the bar and uses a brighter color (white) when the value text is displayed inside the bar?

Could you please help me find a solution that makes the "100%" values of the attached bar charts (the last 4 items) be drawn using white color and the "50%" values (the first 2 items) drawn unsing black color as they are right now?

Thanks for your help,

      Jordi

 

Capture.JPG

Share this post


Link to post
Share on other sites

Hi Jordi,

 

All the plot values on the chart could have only a single font color set by default or by setting "valueFontColor" explicitly. So, whether the value is placed inside or outside the plots in a bar chart, it will be of the same font color, as FusionCharts supports a single valueFontColor for all the plots as of now. A compatible color which goes well with both dark and light background would help to increase readability.

Alternatively, to show varying color of data plot value fonts, you can use Text annotations, but that would be static since you need to define the position(x and y) in pixels accordingly.

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now