import-bot (20212) [Avatar] Offline
#1
[Originally posted by rapture]

How does one put line breaks in the axis labels in GD::Graph::bars?
import-bot (20212) [Avatar] Offline
#2
Re: very long x-axis labels with GD::Graph::bars
[Originally posted by mgjv]

> How does one put line breaks in the axis labels in GD::Graph::bars?

(I am assuming you are talking about the labels that go with the axes, and not
the ones that go with the ticks.)

That isn't possible at the moment, since the labels are currently drawn as
GD::Text::Align objects, and they don't have line breaks. One of the things
todo for GD::Graph is to allow the use of GD::Text::Wrap objects there.

If the label is too long to fit in the image, you should probably consider
doing some other things, like leaving some space with the various *_margin
attributes, and drawing a GD::Text::Wrap object explicitly.

If the label is too long to fit in the position where you want it, consider
moving it to another spot, or doing something with the alignment of the text
in the label. There are various alignment options available for this.

Martien
import-bot (20212) [Avatar] Offline
#3
Re: very long x-axis labels with GD::Graph::bars
[Originally posted by rapture]

Thanks for the reply(ies), but actually my problem is that my tick labels are
very long (I am creating bar graphs and the ticks are descriptive). Is this
possible?

Thanks again,
Chris

> > How does one put line breaks in the axis labels in GD::Graph::bars?
>
> (I am assuming you are talking about the labels that go with the axes, and not
> the ones that go with the ticks.)
>
> That isn't possible at the moment, since the labels are currently drawn as
> GD::Text::Align objects, and they don't have line breaks. One of the things
> todo for GD::Graph is to allow the use of GD::Text::Wrap objects there.
>
> If the label is too long to fit in the image, you should probably consider
> doing some other things, like leaving some space with the various *_margin
> attributes, and drawing a GD::Text::Wrap object explicitly.
>
> If the label is too long to fit in the position where you want it, consider
> moving it to another spot, or doing something with the alignment of the text
> in the label. There are various alignment options available for this.
>
> Martien
import-bot (20212) [Avatar] Offline
#4
Re: very long x-axis labels with GD::Graph::bars
[Originally posted by mgjv]

> Thanks for the reply(ies), but actually my problem is that my tick labels are
> very long (I am creating bar graphs and the ticks are descriptive). Is this
> possible?

This really is more or less the same problem. At the moment, tick labels are
drawn with GD::Text::Align objects, which don't allow line breaks.

The only thing I can advise is to make the labels shorter in some way, and use
a legend or something like that. I'll think about some way to get line breaks
in GD::Text Align objects that will accomodate this. You'd still have to put
them in yourself, though..

Martien