Jump to content
Software FX Community

Re: ClearLabels property causes error


User (Legacy)

Recommended Posts

The data on the X-Axis is categorical, they are long strings of names. Using

the style property I was able to clear the labels but the chart seems to be

appearing with space on the left as in the graph below:

So I tried setting the LeftGap value to 0 pixels.

ChartFX1.LeftGap = 0;

Even that does not work.

Can you help ?

Thanks,

Sri

"Blair Allen" <Blair.Allen@infineon.com> wrote in message

news:<P$mKLlw7CHA.2576@webserver1.softwarefx.com>...

> Is the data that you use for the x-axis numerical or categorical?? I

> believe that the ClearLabels method only clears the categorical labels,

not

> the entire label itself. When you use ClearLabels on a categorical axis,

it

> prints numbers that represent the data number. If you want to get rid of

> any label entirely on a certain axis, use the Style property for the axis.

>

> ChartFX1.Axis(AXIS_X).Style = AS_HIDETEXT

>

> That will clear the labels from your x-axis. Then you'll have to also not

> show the tick marks if you don't want those either.

>

> Hope this helps.

>

> Blair Allen

>

>

> "Sripresanna Narayanasamy" <presannan@ARTHRITIS.ARIZONA.EDU> wrote in

> message news:NZBCWbw7CHA.2164@webserver1.softwarefx.com...

> > Hi,

> >

> > I do not want to diplay labels on the X-Axis in Gantt charts and so use

> >

> > ChartFX1.Axis(AXIS_X).ClearLabels;

> >

> > But a run time error occurs:

> >

> > Microsoft JScript runtime (0x800A01B6)

> > Object doesn't support this property or method

> >

> > Can you help ?

> > Thanks,

> > Sri

> >

> >

> >

> >

>

>

----------------------------------------------------------------------------

----

Link to comment
Share on other sites

A setting of 0 in the gap properties (LeftGap, TopGap, etc.) means

autocalculated gaps, you will need to set LeftGap to 1.

--

Regards,

JC

Software FX Support

"Sripresanna Narayanasamy" <presannan@ARTHRITIS.ARIZONA.EDU> wrote in

message news:xAcwg8w7CHA.2116@webserver1.softwarefx.com...

> The data on the X-Axis is categorical, they are long strings of names.

Using

> the style property I was able to clear the labels but the chart seems to

be

> appearing with space on the left as in the graph below:

> So I tried setting the LeftGap value to 0 pixels.

>

> ChartFX1.LeftGap = 0;

>

> Even that does not work.

>

> Can you help ?

>

> Thanks,

>

> Sri

>

>

>

>

>

>

>

> "Blair Allen" <Blair.Allen@infineon.com> wrote in message

> news:<P$mKLlw7CHA.2576@webserver1.softwarefx.com>...

>

> > Is the data that you use for the x-axis numerical or categorical?? I

>

> > believe that the ClearLabels method only clears the categorical labels,

> not

>

> > the entire label itself. When you use ClearLabels on a categorical axis,

> it

>

> > prints numbers that represent the data number. If you want to get rid of

>

> > any label entirely on a certain axis, use the Style property for the

axis.

>

> >

>

> > ChartFX1.Axis(AXIS_X).Style = AS_HIDETEXT

>

> >

>

> > That will clear the labels from your x-axis. Then you'll have to also

not

>

> > show the tick marks if you don't want those either.

>

> >

>

> > Hope this helps.

>

> >

>

> > Blair Allen

>

> >

>

> >

>

> > "Sripresanna Narayanasamy" <presannan@ARTHRITIS.ARIZONA.EDU> wrote in

>

> > message news:NZBCWbw7CHA.2164@webserver1.softwarefx.com...

>

> > > Hi,

>

> > >

>

> > > I do not want to diplay labels on the X-Axis in Gantt charts and so

use

>

> > >

>

> > > ChartFX1.Axis(AXIS_X).ClearLabels;

>

> > >

>

> > > But a run time error occurs:

>

> > >

>

> > > Microsoft JScript runtime (0x800A01B6)

>

> > > Object doesn't support this property or method

>

> > >

>

> > > Can you help ?

>

> > > Thanks,

>

> > > Sri

>

> > >

>

> > >

>

> > >

>

> > >

>

> >

>

> >

>

>

>

>

> --------------------------------------------------------------------------

--

> ----

>

>

>

Link to comment
Share on other sites

I can't get to work still. I tried using

ChartFX1.Axis(AXIS_X).KeyLabel(0) = "";

Even then the graph seems to be aligned to the left. Is there a way to

truncate the label names to empty?

I'm running out of ideas, could you suggest me ways to get around this

problem ?

Thanks,

Sri

"Software FX Support" <support@softwarefx.com> wrote in message

news:SkxY5Dx7CHA.2164@webserver1.softwarefx.com...

> A setting of 0 in the gap properties (LeftGap, TopGap, etc.) means

> autocalculated gaps, you will need to set LeftGap to 1.

>

> --

> Regards,

>

> JC

> Software FX Support

> "Sripresanna Narayanasamy" <presannan@ARTHRITIS.ARIZONA.EDU> wrote in

> message news:xAcwg8w7CHA.2116@webserver1.softwarefx.com...

> > The data on the X-Axis is categorical, they are long strings of names.

> Using

> > the style property I was able to clear the labels but the chart seems

to

> be

> > appearing with space on the left as in the graph below:

> > So I tried setting the LeftGap value to 0 pixels.

> >

> > ChartFX1.LeftGap = 0;

> >

> > Even that does not work.

> >

> > Can you help ?

> >

> > Thanks,

> >

> > Sri

> >

> >

> >

> >

> >

> >

> >

> > "Blair Allen" <Blair.Allen@infineon.com> wrote in message

> > news:<P$mKLlw7CHA.2576@webserver1.softwarefx.com>...

> >

> > > Is the data that you use for the x-axis numerical or categorical?? I

> >

> > > believe that the ClearLabels method only clears the categorical

labels,

> > not

> >

> > > the entire label itself. When you use ClearLabels on a categorical

axis,

> > it

> >

> > > prints numbers that represent the data number. If you want to get rid

of

> >

> > > any label entirely on a certain axis, use the Style property for the

> axis.

> >

> > >

> >

> > > ChartFX1.Axis(AXIS_X).Style = AS_HIDETEXT

> >

> > >

> >

> > > That will clear the labels from your x-axis. Then you'll have to also

> not

> >

> > > show the tick marks if you don't want those either.

> >

> > >

> >

> > > Hope this helps.

> >

> > >

> >

> > > Blair Allen

> >

> > >

> >

> > >

> >

> > > "Sripresanna Narayanasamy" <presannan@ARTHRITIS.ARIZONA.EDU> wrote in

> >

> > > message news:NZBCWbw7CHA.2164@webserver1.softwarefx.com...

> >

> > > > Hi,

> >

> > > >

> >

> > > > I do not want to diplay labels on the X-Axis in Gantt charts and so

> use

> >

> > > >

> >

> > > > ChartFX1.Axis(AXIS_X).ClearLabels;

> >

> > > >

> >

> > > > But a run time error occurs:

> >

> > > >

> >

> > > > Microsoft JScript runtime (0x800A01B6)

> >

> > > > Object doesn't support this property or method

> >

> > > >

> >

> > > > Can you help ?

> >

> > > > Thanks,

> >

> > > > Sri

> >

> > > >

> >

> > > >

> >

> > > >

> >

> > > >

> >

> > >

> >

> > >

> >

> >

> >

> >

>

> --------------------------------------------------------------------------

> --

> > ----

> >

> >

> >

>

>

Link to comment
Share on other sites

Try the following code.  It works perfectly when I test it:

ChartFX1.Axis(AXIS_X).TickMark = TS_NONE ' Remove tickmarks

ChartFX1.Axis(AXIS_X).Style = AS_HIDETEXT ' Remove labels

Chart.BottomGap = 1 ' Remove bottom gap

For i = 0 To (Chart.nValues - 1) ' Iterate through all labels and

remove them manually

ChartFX1.Axis(AXIS_X).Label(i) = ""

Next

When you do the ClearLabels method ChartFX replaces them with numerical

values, so that's why you need to manually clear them to ensure no space is

taken up.

If you are doing this on the Y-axis, you will have to replace the maximum

value in the For loop with some code to figure out the number of labels that

appear on the Y axis. You can do this by seeing how many times the y-axis

step divides into the difference between the min and max y values.

"Sripresanna Narayanasamy" <presannan@ARTHRITIS.ARIZONA.EDU> wrote in

message news:EFr5kSx7CHA.2164@webserver1.softwarefx.com...

> I can't get to work still. I tried using

> ChartFX1.Axis(AXIS_X).KeyLabel(0) = "";

> Even then the graph seems to be aligned to the left. Is there a way to

> truncate the label names to empty?

> I'm running out of ideas, could you suggest me ways to get around this

> problem ?

>

> Thanks,

> Sri

>

>

> "Software FX Support" <support@softwarefx.com> wrote in message

> news:SkxY5Dx7CHA.2164@webserver1.softwarefx.com...

> > A setting of 0 in the gap properties (LeftGap, TopGap, etc.) means

> > autocalculated gaps, you will need to set LeftGap to 1.

> >

> > --

> > Regards,

> >

> > JC

> > Software FX Support

> > "Sripresanna Narayanasamy" <presannan@ARTHRITIS.ARIZONA.EDU> wrote in

> > message news:xAcwg8w7CHA.2116@webserver1.softwarefx.com...

> > > The data on the X-Axis is categorical, they are long strings of names.

> > Using

> > > the style property I was able to clear the labels but the chart seems

> to

> > be

> > > appearing with space on the left as in the graph below:

> > > So I tried setting the LeftGap value to 0 pixels.

> > >

> > > ChartFX1.LeftGap = 0;

> > >

> > > Even that does not work.

> > >

> > > Can you help ?

> > >

> > > Thanks,

> > >

> > > Sri

> > >

> > >

> > >

> > >

> > >

> > >

> > >

> > > "Blair Allen" <Blair.Allen@infineon.com> wrote in message

> > > news:<P$mKLlw7CHA.2576@webserver1.softwarefx.com>...

> > >

> > > > Is the data that you use for the x-axis numerical or categorical?? I

> > >

> > > > believe that the ClearLabels method only clears the categorical

> labels,

> > > not

> > >

> > > > the entire label itself. When you use ClearLabels on a categorical

> axis,

> > > it

> > >

> > > > prints numbers that represent the data number. If you want to get

rid

> of

> > >

> > > > any label entirely on a certain axis, use the Style property for the

> > axis.

> > >

> > > >

> > >

> > > > ChartFX1.Axis(AXIS_X).Style = AS_HIDETEXT

> > >

> > > >

> > >

> > > > That will clear the labels from your x-axis. Then you'll have to

also

> > not

> > >

> > > > show the tick marks if you don't want those either.

> > >

> > > >

> > >

> > > > Hope this helps.

> > >

> > > >

> > >

> > > > Blair Allen

> > >

> > > >

> > >

> > > >

> > >

> > > > "Sripresanna Narayanasamy" <presannan@ARTHRITIS.ARIZONA.EDU> wrote

in

> > >

> > > > message news:NZBCWbw7CHA.2164@webserver1.softwarefx.com...

> > >

> > > > > Hi,

> > >

> > > > >

> > >

> > > > > I do not want to diplay labels on the X-Axis in Gantt charts and

so

> > use

> > >

> > > > >

> > >

> > > > > ChartFX1.Axis(AXIS_X).ClearLabels;

> > >

> > > > >

> > >

> > > > > But a run time error occurs:

> > >

> > > > >

> > >

> > > > > Microsoft JScript runtime (0x800A01B6)

> > >

> > > > > Object doesn't support this property or method

> > >

> > > > >

> > >

> > > > > Can you help ?

> > >

> > > > > Thanks,

> > >

> > > > > Sri

> > >

> > > > >

> > >

> > > > >

> > >

> > > > >

> > >

> > > > >

> > >

> > > >

> > >

> > > >

> > >

> > >

> > >

> > >

> >

>

> --------------------------------------------------------------------------

> > --

> > > ----

> > >

> > >

> > >

> >

> >

>

>

Link to comment
Share on other sites

Thanks a bunch. It worked. Only I had to use KeyLabel(i) instead of Label(i)

Sri

"Blair Allen" <Blair.Allen@infineon.com> wrote in message

news:lNp7qdx7CHA.1564@webserver1.softwarefx.com...

> Try the following code. It works perfectly when I test it:

>

> ChartFX1.Axis(AXIS_X).TickMark = TS_NONE ' Remove tickmarks

> ChartFX1.Axis(AXIS_X).Style = AS_HIDETEXT ' Remove labels

> Chart.BottomGap = 1 ' Remove bottom gap

> For i = 0 To (Chart.nValues - 1) ' Iterate through all labels and

> remove them manually

> ChartFX1.Axis(AXIS_X).Label(i) = ""

> Next

>

> When you do the ClearLabels method ChartFX replaces them with numerical

> values, so that's why you need to manually clear them to ensure no space

is

> taken up.

>

> If you are doing this on the Y-axis, you will have to replace the maximum

> value in the For loop with some code to figure out the number of labels

that

> appear on the Y axis. You can do this by seeing how many times the y-axis

> step divides into the difference between the min and max y values.

>

>

> "Sripresanna Narayanasamy" <presannan@ARTHRITIS.ARIZONA.EDU> wrote in

> message news:EFr5kSx7CHA.2164@webserver1.softwarefx.com...

> > I can't get to work still. I tried using

> > ChartFX1.Axis(AXIS_X).KeyLabel(0) = "";

> > Even then the graph seems to be aligned to the left. Is there a way to

> > truncate the label names to empty?

> > I'm running out of ideas, could you suggest me ways to get around this

> > problem ?

> >

> > Thanks,

> > Sri

> >

> >

> > "Software FX Support" <support@softwarefx.com> wrote in message

> > news:SkxY5Dx7CHA.2164@webserver1.softwarefx.com...

> > > A setting of 0 in the gap properties (LeftGap, TopGap, etc.) means

> > > autocalculated gaps, you will need to set LeftGap to 1.

> > >

> > > --

> > > Regards,

> > >

> > > JC

> > > Software FX Support

> > > "Sripresanna Narayanasamy" <presannan@ARTHRITIS.ARIZONA.EDU> wrote in

> > > message news:xAcwg8w7CHA.2116@webserver1.softwarefx.com...

> > > > The data on the X-Axis is categorical, they are long strings of

names.

> > > Using

> > > > the style property I was able to clear the labels but the chart

seems

> > to

> > > be

> > > > appearing with space on the left as in the graph below:

> > > > So I tried setting the LeftGap value to 0 pixels.

> > > >

> > > > ChartFX1.LeftGap = 0;

> > > >

> > > > Even that does not work.

> > > >

> > > > Can you help ?

> > > >

> > > > Thanks,

> > > >

> > > > Sri

> > > >

> > > >

> > > >

> > > >

> > > >

> > > >

> > > >

> > > > "Blair Allen" <Blair.Allen@infineon.com> wrote in message

> > > > news:<P$mKLlw7CHA.2576@webserver1.softwarefx.com>...

> > > >

> > > > > Is the data that you use for the x-axis numerical or categorical??

I

> > > >

> > > > > believe that the ClearLabels method only clears the categorical

> > labels,

> > > > not

> > > >

> > > > > the entire label itself. When you use ClearLabels on a categorical

> > axis,

> > > > it

> > > >

> > > > > prints numbers that represent the data number. If you want to get

> rid

> > of

> > > >

> > > > > any label entirely on a certain axis, use the Style property for

the

> > > axis.

> > > >

> > > > >

> > > >

> > > > > ChartFX1.Axis(AXIS_X).Style = AS_HIDETEXT

> > > >

> > > > >

> > > >

> > > > > That will clear the labels from your x-axis. Then you'll have to

> also

> > > not

> > > >

> > > > > show the tick marks if you don't want those either.

> > > >

> > > > >

> > > >

> > > > > Hope this helps.

> > > >

> > > > >

> > > >

> > > > > Blair Allen

> > > >

> > > > >

> > > >

> > > > >

> > > >

> > > > > "Sripresanna Narayanasamy" <presannan@ARTHRITIS.ARIZONA.EDU> wrote

> in

> > > >

> > > > > message news:NZBCWbw7CHA.2164@webserver1.softwarefx.com...

> > > >

> > > > > > Hi,

> > > >

> > > > > >

> > > >

> > > > > > I do not want to diplay labels on the X-Axis in Gantt charts and

> so

> > > use

> > > >

> > > > > >

> > > >

> > > > > > ChartFX1.Axis(AXIS_X).ClearLabels;

> > > >

> > > > > >

> > > >

> > > > > > But a run time error occurs:

> > > >

> > > > > >

> > > >

> > > > > > Microsoft JScript runtime (0x800A01B6)

> > > >

> > > > > > Object doesn't support this property or method

> > > >

> > > > > >

> > > >

> > > > > > Can you help ?

> > > >

> > > > > > Thanks,

> > > >

> > > > > > Sri

> > > >

> > > > > >

> > > >

> > > > > >

> > > >

> > > > > >

> > > >

> > > > > >

> > > >

> > > > >

> > > >

> > > > >

> > > >

> > > >

> > > >

> > > >

> > >

> >

>

> --------------------------------------------------------------------------

> > > --

> > > > ----

> > > >

> > > >

> > > >

> > >

> > >

> >

> >

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...