Click to See Complete Forum and Search --> : AxMSChart rowlabel


YamMilkTea
July 9th, 2009, 02:17 AM
Hi,

Current code:
AxMSChart1.RowLabel = "aaa" & ", " & "bbb"

How to write the code, so it'll appear as

aaa
bbb

instead of aaa, bbb?

dglienna
July 9th, 2009, 11:34 AM
You'd have to split the string into values, then use this, to strip out the center value


Dim a as string = "aaa" : Dim b as string = "a, " : Dim c as string = "bbb"
String.Format({0}{1}{2}", a, Environment.NewLine, c)

YamMilkTea
July 9th, 2009, 07:53 PM
You'd have to split the string into values, then use this, to strip out the center value


Dim a as string = "aaa" : Dim b as string = "a, " : Dim c as string = "bbb"
String.Format({0}{1}{2}", a, Environment.NewLine, c)


You mean AxMSChart1.RowLabel = String.Format("{0}{1}{2}", a, Environment.NewLine, c) ?

i still get "aaabbb" instead of

aaa
bbb.

dglienna
July 9th, 2009, 10:52 PM
Try this:

AxMSChart1.RowLabel = String.Format("{0}{1}", a & Environment.NewLine, c) ?

or

AxMSChart1.RowLabel = String.Format("{0}{1}", a & vbCrLf, c) ?

or use Environment.NewLine as b, and print a,b,c

Is your label set to MultiLine? That's probably the answer, now that I think of it

YamMilkTea
July 10th, 2009, 01:15 AM
Try this:

AxMSChart1.RowLabel = String.Format("{0}{1}", a & Environment.NewLine, c) ?

or

AxMSChart1.RowLabel = String.Format("{0}{1}", a & vbCrLf, c) ?

or use Environment.NewLine as b, and print a,b,c

Is your label set to MultiLine? That's probably the answer, now that I think of it

Still cannot haha.. The AxMSChart don't have the multiline function. =x

dglienna
July 10th, 2009, 01:37 AM
Set the HEIGHT to double and try