cancel
Showing results for 
Search instead for 
Did you mean: 

Wrapping text in the legend of a graph

Former Member
0 Kudos

Hello,

I have a graph with the legend on the right side. As some of the single entries of the legend have rather long texts I was trying to wrap them so that they are displayed in two or more rows. I tried this with adjusting the text in the (BEx) Query (it gets displayed as desired in my crosstabs) but this did not help.

Is there any other way to format the legend?

Thank you,

Jan

Accepted Solutions (1)

Accepted Solutions (1)

TammyPowlas
Active Contributor
0 Kudos

Hello Jan - would you please take a look at the answers in this thread?

Could some of the replies (by David G.) help?

jeroenvandera
Contributor
0 Kudos

Hello Jan,

What we do most of the time is create a separate panel that hold the legend. This gives us more options in the layout.

The options in the other post are mostly covered now in the advanced properties pane of the graphs now.

Graphs are created in a SVG object using the D3 javascript library. If you see at what length people go to do word-wrapping (javascript - change SVG text to css word wrapping - Stack Overflow)

then it is easy to see that it will not be easy to do.

Jeroen

Former Member
0 Kudos

Hi Jeroen,

could you please elaborate further on that separate panel idea? I would assume you create the legend manually via a text box/formatted text view + CSS?

Thanks, Jan

jeroenvandera
Contributor
0 Kudos

I Use a panel component with a couple of text components. The result will look like this

The lines are text boxes 50px wide and 10 high with the following css

   background: #1B325F;

   -moz-border-radius: 70px;

   -webkit-border-radius: 70px;

   border-radius: 25px;

For the texts it is using the same color in their CSS.  This will work if you know in advance wat the categories are and can assign fixed colors to the data series.

you show it all the time or show it on a click event or even use a hover function.

Former Member
0 Kudos

Thank you, I will try that.

Answers (0)