cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a line break to a VizFrames "dataLabel"

kulu
Explorer
0 Kudos

Hello, I am using the VizFrame with a custom renderer for the dataLabel.

How can I make the label into two lines?

I have the following code:

dataLabel: {
   visible: true,
   type: "value",
   showTotal: true,
   renderer: function (oEvent) {
               oEvent.text = "Some Text";
            }
         }
      }
   }

},

And this works, but how could I display this in two lines? I tired inserting line breaks into the string but that does not work:

oEvent.text = "Some \r\n Text"
or
oEvent.text = "Some \u000d\u000a Text"

I also tried to set the oEvent.text to a FormattedText field with HTML but that also does not work.

Is there any way to do this? Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

load the text from i18n file, it may help.

kulu
Explorer
0 Kudos

I can't do that, the text comes from an API.