Jump to content
Software FX Community

how to wordwrap axis labels


User (Legacy)

Recommended Posts

Hi Everyone:

I am working in javascript and was wondering if it is possible to wordwrap

axis labels that contain long descriptions.

myChart.Axis(2).Label = "Long Description";

I have tried to insert a "\n" between "Long" and "Description" but it still

puts the words on the same line.

Currently I am resorting to making the chart wider and reducing the font,

but the chart would look so much better if I can wordwrap.

Thank you,

Katherine

Link to comment
Share on other sites

  • 1 month later...

Hi,

You can't word-wrap on the axis as you can in a title. As a suggestion -

you can use the KeyLeg property (see API reference for details) to assign a

short "nick name" to the axis itself and reserve the longer names for the

legend box.

GF

SoftwareFX

"Katherine Yang" <kyang@cyveillance.com> wrote in message

news:#x4Or7exBHA.1412@webserver1.softwarefx.com...

> Hi Everyone:

>

> I am working in javascript and was wondering if it is possible to wordwrap

> axis labels that contain long descriptions.

>

> myChart.Axis(2).Label = "Long Description";

>

> I have tried to insert a "\n" between "Long" and "Description" but it

still

> puts the words on the same line.

>

> Currently I am resorting to making the chart wider and reducing the font,

> but the chart would look so much better if I can wordwrap.

>

> Thank you,

>

> Katherine

>

>

Link to comment
Share on other sites

I made a mistake.  it is possible to wrap if you set a certain flag:

' Assign X-Axis labels with a carriage return and line feed.

' This can be using done using either vbcrlf or (chr(13) + chr(10)

Chart.Legend(0) = "January" & vbcrlf & "1998"

' Assign series labels

Chart.SerLeg(0) = "ChartFX Internet package Sales"

Chart.SerLeg(1) = "ChartFX Client/Server package Sales"

'***********set this flag to use multi lines************

Chart.Axis(Axis_X).Style = Chart.Axis(Axis_X).Style And Not

AS_SingleLine

there is a sample on the support site at:

http://support.softwarefx.com/Samples/CfxIE/Labels/LineBreak.asp

GF

"SFX" <support@softwarefx.com> wrote in message

news:CSetU0L5BHA.1812@webserver1.softwarefx.com...

> Hi,

> You can't word-wrap on the axis as you can in a title. As a suggestion -

> you can use the KeyLeg property (see API reference for details) to assign

a

> short "nick name" to the axis itself and reserve the longer names for the

> legend box.

>

> GF

> SoftwareFX

> "Katherine Yang" <kyang@cyveillance.com> wrote in message

> news:#x4Or7exBHA.1412@webserver1.softwarefx.com...

> > Hi Everyone:

> >

> > I am working in javascript and was wondering if it is possible to

wordwrap

> > axis labels that contain long descriptions.

> >

> > myChart.Axis(2).Label = "Long Description";

> >

> > I have tried to insert a "\n" between "Long" and "Description" but it

> still

> > puts the words on the same line.

> >

> > Currently I am resorting to making the chart wider and reducing the

font,

> > but the chart would look so much better if I can wordwrap.

> >

> > Thank you,

> >

> > Katherine

> >

> >

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...