Override the name

We have a kreport with the text field, it could have three values A,B & C. In visualize, we have Bar Chart & it is displaying the A, B & C as legend values & on the x-axis instead of that we want to display Apple, Banana & Coconut in the legend or axis.

@maretval How to do it?

Will this work, if we put this in the customFunction of the field?

CASE {t}.{f}
WHEN ‘A’ THEN ‘Apple’
WHEN ‘B’ THEN ‘Banana’
WHEN ‘C’ THEN ‘Coconut’
ELSE {t}.{f}
END

Or is there any other way to do it?

I think this will update labels for the axis. But how to update the label of Legends too?

Is there any way to do this?

@rsp Your text field shall be defined as an enum field. Then you will have the label for the x -axis.
Here an example with opportunity stages

Regarding the legend:
It uses the label of the field set in “dataseries” in a 1-dimensional chart

To get enum labels there you will need a 2 dimensional report.
User HighCharts for stacked bar chart.
Here an example of Opportunites by country (dimension 1) and sales stage (dimension 2)

1 Like