Quantcast
Channel: SCN : All Content - SAP BusinessObjects Design Studio
Viewing all articles
Browse latest Browse all 4216

Labels on chart vertical axis - decimals

$
0
0

Hello experts,

 

a topic that has been started several times and never closed is the question of decimal display of charts vertical axis labels.

I have searched and tried several workarounds but couldn't find any solution.

The selection of decimal places in the datasource initial view modifies correctly the display in the chart tooltips but has no effect on vertical axis labels.

 

For information, I'm testing using DS 1.4 SP1.

 

Sometimes presented as a missing feature, my opinion is that it is also a bug which should be easy to correct. It would at least become a missing feature if the displayed labels are not wrong.

 

This is an example of the chart I obtain:

chartlabels.PNG

I can definitely not show this chart to the final user. 0 is correct, the first 1 is 0.5, then 1 and 2 is 1.5. That's why I say it is a bug and not a missing feature.

 

The easy way to correct it, and the way I manage it sometimes when developing charting applications using C++ or C#, is that I do not draw the axis labels (and ticked lines) at the theoretical labels position, but I performe a double conversition (from float to text and then from text to float) of the label value before drawing, using the function already developed for label text handling.

 

In this case, 0.5 label is first converted to text "1", then back to float 1.0 and the 1 label is displayed twice at the same position, still without any decimal, but at the right position! In my sample, the "2" label would not appear as out of chart clipping area.  Usually this change can be done modifying only one single line of code and has no side effects.

 

In any case, I'm very interested in any solution or workaround that could allow me to display a correct vertical axis.

 

Christian


Viewing all articles
Browse latest Browse all 4216

Trending Articles