Skip to Content
avatar image
Former Member

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

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 06 at 02:09 PM

    Hi,

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

    Add comment
    10|10000 characters needed 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.