cancel
Showing results for 
Search instead for 
Did you mean: 

Textwrapping in viz Frames

mantrishekar
Active Participant
0 Kudos

Hello All,

I am trying to prepare charts with vizFrame control.now when am trying to display the chart on x-axis am unable to display full text.

Could anybody please let me know how to display full text on x-axis.

Please refer the attached screen shot.I need to display text in cross fashion.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mantri,

you have to set category axis label rotation false like below:

this.VizFrame.setVizProperties({

          categoryAxis: {

            label: {

              rotation: "false",

              angle: "0",

              truncatedLabelRatio: "100"

            }

          }

});

For more details refer below link:

https://sapui5.netweaver.ondemand.com/docs/vizdocs/index.html#reference/chartProperty/Charts/Bar%20%...

mantrishekar
Active Participant
0 Kudos

Hello Naveen,

Yeah i set that properties but still no use.

I want to display text in below format.

Former Member
0 Kudos

Hi Mantri,

Then use below:

Here this.VizFrame = this.getView().byId("vizframe_id")

this.VizFrame.setVizProperties({

          categoryAxis: {

            label: {

              rotation: "true",

              angle: "45",

              truncatedLabelRatio: "100"

            }

          }

});

angle you can vary as much you want.

mantrishekar
Active Participant
0 Kudos

Naveen,

The text is not displaying in cross angle if i apply the above syntax.

Former Member
0 Kudos

Hi Mantri,

Check by applying truncatedLabelRatio: "0"

mantrishekar
Active Participant
0 Kudos

Naveen,

Now it is working but still am unable to see the full text

Former Member
0 Kudos

Hi Mantri,

Change truncatedLabelRatio value like 0.5,10,50 etc and try.If this does not works,then you have to define a custom formatter

mantrishekar
Active Participant
0 Kudos

Could you please let me know how to write a formatter function

Former Member
0 Kudos

Hi Mantri,

You need to implement a custom label render:

labelRenderer: function(obj){

// return obj;

          }

You need to implement your logic inside this function.

Answers (0)