Jump to content
Software FX Community

Re: Points color and XAxis labels direction


User (Legacy)

Recommended Posts

Hi

First I want to aswer to previous reply from ChartFx support:

>> chart.Point[seriesIndex,PointIndex].Color = color;

I have ChartFX 5 Client Server Active X and I do not see the POINT property

there is .PointLabels .PointLabelsFont .PointLabelAlign and more as such

but

no chart.Point that you are reffering to.

So how to set the color for an specified point?

Question, ho to have XAxis labels in different direction?

I have tried some trick but unsucceful so far

Task is simple I want to have XAxis labels from 100 to 1

not from 1 to 100 on Bar chart.

How to do?

Sample code

With ChartFX1(NInteger)

.OpenDataEx COD_VALUES, 1, 100

With .Axis(AXIS_X)

.AutoScale = False

.PixPerUnit = 12

.Max = 100: .Min = 1

.STEP = 2

.MinorStep = 1

End With

.CloseData COD_VALUES

.LeftGap = 15: .RightGap = 8

End With

Thank for any help

George Aston

Sprintbit Software

www.sprintbit.com

contact@sprintbit.com

Link to comment
Share on other sites

OK We did not realize you are using the COM version.

What you need to do is a three step process

1) Chart.MulitpleColors = true

2) OpenData with COD_COLORS

3) chart.Color(myIndex)

4) CloseData with COD_COLORS

The critical step here is to set Chart.MultipleColors to true

When MultipleColors is set to TRUE, myIndex is a combination of the series

and the point indexes. i.e. if you want to set the color for the 4Th series

and the 7Th point, you use

myIndex = (3 + (6*nSeries))

Where nSeries is the total number of series (data sets) in the chart.

See the docs for the Color Property.

Hope this helps.

-CJS

"Sprintbit Software" <support@sprintbit.com> wrote in message

news:RT4WA%23QbEHA.3080@webserver3.softwarefx.com...

> Hi

> First I want to aswer to previous reply from ChartFx support:

> >> chart.Point[seriesIndex,PointIndex].Color = color;

>

> I have ChartFX 5 Client Server Active X and I do not see the POINT

property

> there is .PointLabels .PointLabelsFont .PointLabelAlign and more as

such

> but

> no chart.Point that you are reffering to.

> So how to set the color for an specified point?

>

> Question, ho to have XAxis labels in different direction?

>

> I have tried some trick but unsucceful so far

> Task is simple I want to have XAxis labels from 100 to 1

> not from 1 to 100 on Bar chart.

> How to do?

>

> Sample code

> With ChartFX1(NInteger)

> .OpenDataEx COD_VALUES, 1, 100

> With .Axis(AXIS_X)

> .AutoScale = False

> .PixPerUnit = 12

> .Max = 100: .Min = 1

> .STEP = 2

> .MinorStep = 1

>

> End With

> .CloseData COD_VALUES

> .LeftGap = 15: .RightGap = 8

> End With

>

>

> Thank for any help

> George Aston

> Sprintbit Software

> www.sprintbit.com

> contact@sprintbit.com

>

>

Link to comment
Share on other sites

Sorry George I forgot the second part

What you could do is use the Label property of the Axis object like this:

axisX.Max = 40

axisX.Min = 1

Dim axisX As ICfxAxis

Dim index As Integer

Dim i As Integer

Set axisX = ChartFX1.axis(AXIS_X)

index = axisX.Max

i = 0

Do While (index >= axisX.Min)

axisX.Label(i) = index

index = index - 1

i = i + 1

Loop

Hope this helps!

-cjs

"Sprintbit Software" <support@sprintbit.com> wrote in message

news:RT4WA%23QbEHA.3080@webserver3.softwarefx.com...

> Hi

> First I want to aswer to previous reply from ChartFx support:

> >> chart.Point[seriesIndex,PointIndex].Color = color;

>

> I have ChartFX 5 Client Server Active X and I do not see the POINT

property

> there is .PointLabels .PointLabelsFont .PointLabelAlign and more as

such

> but

> no chart.Point that you are reffering to.

> So how to set the color for an specified point?

>

> Question, ho to have XAxis labels in different direction?

>

> I have tried some trick but unsucceful so far

> Task is simple I want to have XAxis labels from 100 to 1

> not from 1 to 100 on Bar chart.

> How to do?

>

> Sample code

> With ChartFX1(NInteger)

> .OpenDataEx COD_VALUES, 1, 100

> With .Axis(AXIS_X)

> .AutoScale = False

> .PixPerUnit = 12

> .Max = 100: .Min = 1

> .STEP = 2

> .MinorStep = 1

>

> End With

> .CloseData COD_VALUES

> .LeftGap = 15: .RightGap = 8

> End With

>

>

> Thank for any help

> George Aston

> Sprintbit Software

> www.sprintbit.com

> contact@sprintbit.com

>

>

Link to comment
Share on other sites

Thank you

It helps, I just thought that reverse of label's caption might be an feature

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

news:nHgPj5ZbEHA.3888@webserver3.softwarefx.com...

> Sorry George I forgot the second part

> What you could do is use the Label property of the Axis object like this:

>

> axisX.Max = 40

> axisX.Min = 1

>

> Dim axisX As ICfxAxis

> Dim index As Integer

> Dim i As Integer

>

> Set axisX = ChartFX1.axis(AXIS_X)

> index = axisX.Max

> i = 0

> Do While (index >= axisX.Min)

> axisX.Label(i) = index

> index = index - 1

> i = i + 1

> Loop

>

> Hope this helps!

> -cjs

> "Sprintbit Software" <support@sprintbit.com> wrote in message

> news:RT4WA%23QbEHA.3080@webserver3.softwarefx.com...

> > Hi

> > First I want to aswer to previous reply from ChartFx support:

> > >> chart.Point[seriesIndex,PointIndex].Color = color;

> >

> > I have ChartFX 5 Client Server Active X and I do not see the POINT

> property

> > there is .PointLabels .PointLabelsFont .PointLabelAlign and more as

> such

> > but

> > no chart.Point that you are reffering to.

> > So how to set the color for an specified point?

> >

> > Question, ho to have XAxis labels in different direction?

> >

> > I have tried some trick but unsucceful so far

> > Task is simple I want to have XAxis labels from 100 to 1

> > not from 1 to 100 on Bar chart.

> > How to do?

> >

> > Sample code

> > With ChartFX1(NInteger)

> > .OpenDataEx COD_VALUES, 1, 100

> > With .Axis(AXIS_X)

> > .AutoScale = False

> > .PixPerUnit = 12

> > .Max = 100: .Min = 1

> > .STEP = 2

> > .MinorStep = 1

> >

> > End With

> > .CloseData COD_VALUES

> > .LeftGap = 15: .RightGap = 8

> > End With

> >

> >

> > Thank for any help

> > George Aston

> > Sprintbit Software

> > www.sprintbit.com

> > contact@sprintbit.com

> >

> >

>

>

ChartFXInheritance.zip

Link to comment
Share on other sites

I said it to soon, after implementation it in my code I just realized that

is

terribly slow

NValue=100

For NInteger = 0 To ChartFX1.Count - 1 ' 10 charts

With ChartFX1(NInteger)

For Nlong= 1 To 100

.Axis(AXIS_X).Label(Nlong) = NValue: NValue= NValue- 1

Next

End With

Next

On Pentium 4 2.4 GHZ it took almost 5 seconds to update the label captions

Any other workarounds?

"Sprintbit Software" <support@sprintbit.com> wrote in message

news:ISGfz%23dbEHA.3888@webserver3.softwarefx.com...

> Thank you

> It helps, I just thought that reverse of label's caption might be an

feature

>

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

> news:nHgPj5ZbEHA.3888@webserver3.softwarefx.com...

> > Sorry George I forgot the second part

> > What you could do is use the Label property of the Axis object like

this:

> >

> > axisX.Max = 40

> > axisX.Min = 1

> >

> > Dim axisX As ICfxAxis

> > Dim index As Integer

> > Dim i As Integer

> >

> > Set axisX = ChartFX1.axis(AXIS_X)

> > index = axisX.Max

> > i = 0

> > Do While (index >= axisX.Min)

> > axisX.Label(i) = index

> > index = index - 1

> > i = i + 1

> > Loop

> >

> > Hope this helps!

> > -cjs

> > "Sprintbit Software" <support@sprintbit.com> wrote in message

> > news:RT4WA%23QbEHA.3080@webserver3.softwarefx.com...

> > > Hi

> > > First I want to aswer to previous reply from ChartFx support:

> > > >> chart.Point[seriesIndex,PointIndex].Color = color;

> > >

> > > I have ChartFX 5 Client Server Active X and I do not see the POINT

> > property

> > > there is .PointLabels .PointLabelsFont .PointLabelAlign and more as

> > such

> > > but

> > > no chart.Point that you are reffering to.

> > > So how to set the color for an specified point?

> > >

> > > Question, ho to have XAxis labels in different direction?

> > >

> > > I have tried some trick but unsucceful so far

> > > Task is simple I want to have XAxis labels from 100 to 1

> > > not from 1 to 100 on Bar chart.

> > > How to do?

> > >

> > > Sample code

> > > With ChartFX1(NInteger)

> > > .OpenDataEx COD_VALUES, 1, 100

> > > With .Axis(AXIS_X)

> > > .AutoScale = False

> > > .PixPerUnit = 12

> > > .Max = 100: .Min = 1

> > > .STEP = 2

> > > .MinorStep = 1

> > >

> > > End With

> > > .CloseData COD_VALUES

> > > .LeftGap = 15: .RightGap = 8

> > > End With

> > >

> > >

> > > Thank for any help

> > > George Aston

> > > Sprintbit Software

> > > www.sprintbit.com

> > > contact@sprintbit.com

> > >

> > >

> >

> >

>

>

Link to comment
Share on other sites

Add the following code to improve performance (marked with ****)

NValue=100

For NInteger = 0 To ChartFX1.Count - 1 ' 10 charts

With ChartFX1(NInteger)

.Axis(AXIS_X).ClearLabels ' **** NEW CODE

For Nlong= 1 To 100

.Axis(AXIS_X).Label(Nlong) = NValue: NValue= NValue- 1

Next

End With

Next

If the performance is still a problem add the following:

NValue=100

For NInteger = 0 To ChartFX1.Count - 1 ' 10 charts

With ChartFX1(NInteger)

.Axis(AXIS_X).ClearLabels ' **** NEW CODE

.StyleEx = .StyleEx OR CSE_FASTLEGENDS ' **** NEW CODE

For Nlong= 1 To 100

.Axis(AXIS_X).Label(Nlong) = NValue: NValue= NValue- 1

Next

End With

Next

Using CSE_FASTLEGENDS will hinder some functionality in Chart FX. Check the

docs. (StyleEx property) for details.

--

FP

Software FX

Link to comment
Share on other sites

Okey thanks, thes second one worked great

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:bxNyDambEHA.3888@webserver3.softwarefx.com...

> Add the following code to improve performance (marked with ****)

>

> NValue=100

> For NInteger = 0 To ChartFX1.Count - 1 ' 10 charts

> With ChartFX1(NInteger)

> .Axis(AXIS_X).ClearLabels ' **** NEW CODE

> For Nlong= 1 To 100

> .Axis(AXIS_X).Label(Nlong) = NValue: NValue= NValue- 1

> Next

> End With

> Next

>

> If the performance is still a problem add the following:

>

> NValue=100

> For NInteger = 0 To ChartFX1.Count - 1 ' 10 charts

> With ChartFX1(NInteger)

> .Axis(AXIS_X).ClearLabels ' **** NEW CODE

> .StyleEx = .StyleEx OR CSE_FASTLEGENDS ' **** NEW CODE

> For Nlong= 1 To 100

> .Axis(AXIS_X).Label(Nlong) = NValue: NValue= NValue- 1

> Next

> End With

> Next

>

> Using CSE_FASTLEGENDS will hinder some functionality in Chart FX. Check

the

> docs. (StyleEx property) for details.

>

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...