Sign in to follow this  
Dhruva

How to show values definitely outside the plot columns (Bar 2D Chart)

Recommended Posts

Hi.

I'm trying to generate a chart with a number of horizontal columns with values for the columns. I use

placeValuesInside="0"

 attribute to put my values outside the columns but some values are being shown inside the columns when the columns are too big.

My problem is that column background color and font color for the values are the similar and values that displayed inside the columns are unreadable. So is it posible to forbid the values to move inside the columns? Maybe there are another decisions. Is it possible to set font color for individual columns? Or can I set the margin between my plot columns (but not values) and end of graph where values will be displayed? Unfortunately,

canvasRightMargin

works for both columns and values.

Thank you.

Edited by Guest

Share this post


Link to post
Share on other sites

Hello Tipe,

Welcome to the forum.

The placeValuesInside attribute does put the values of the columns outside. However, sometimes, if the column is so big that the value would be rendered outside the chart area, it is automatically rendered inside the column, to prevent the anomaly.

Since this is creating problems for you, you could consider using the yAxisMaxValue attribute in the <chart> element, and manually set a high enough value so that there will always be a sufficient gap between the column and the chart margin for the value to be displayed outside the column, yet inside the chart.

The general format for this is as follows:

<chart .. yAxisMaxValue='23' ..>

I hope this helps!

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
Sign in to follow this