Skip to Content
0

For Column-MicroChartData I want to display a Unit using label property in a correct format.

Mar 05 at 12:28 PM

17

avatar image
Former Member

Hi All,

I want to display the Unit (% or EUR or h) in Micro Chart Data. So, I have used the "label" property. I'm getting the o/p but the format is not the one which is required.

Current O/P :-

EUR 6310119 Good

EUR 5642190 Warning

h 13.29 Good

Required O/P :-

6310119 EUR Good

5642190 EUR Warning

13.29 h Good

format.png

format.png (10.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Iftah Peretz
Mar 06 at 02:09 PM
0

Hi,

Can you share your code? Or better yet have a working example (like here) so that we can help with?

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member
Hi Iftah, 
Below is the code in Xml :-
<microchart:ColumnMicroChart width="144px" height="73px" visible="{ShowKPIChart}">
<microchart:columns>
<microchart:ColumnMicroChartData label="{Unit}" color="{PrePreStatus}" value="{path: 'PrePreValue', type: 'sap.ui.model.type.Float', formatOptions: { maxFractionDigits: 2 }}"/>
<microchart:ColumnMicroChartData label="{Unit}"
value="{path: 'PreValue', type: 'sap.ui.model.type.Float', formatOptions: { maxFractionDigits: 2 }}" color="{PreStatus}"/>
<microchart:ColumnMicroChartData label="{Unit}" value="{path: 'CurrentValue', type: 'sap.ui.model.type.Float', formatOptions: { maxFractionDigits: 2 }}" color="{CurrentStatus}"/>
</microchart:columns>
<microchart:leftTopLabel>
<microchart:ColumnMicroChartLabel label="2016"/>
</microchart:leftTopLabel>
<microchart:rightTopLabel>
<microchart:ColumnMicroChartLabel label="2018"/>
</microchart:rightTopLabel>
<microchart:leftBottomLabel/>
<microchart:rightBottomLabel/>
</microchart:ColumnMicroChart>
 

And Json :-

"PrePreValue": 6310119,
"Unit" : "EUR",
"PrePreStatus" : "Good"

Kindly, guide me with the same.

0