Jump to content
Software FX Community

Help: Floating Stacked charts problem


User (Legacy)
 Share

Recommended Posts

I still can't resolve the following problem: The problem seems to occur when

the Yfrom and yvalue are different signs

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

Hi

Using your excellent previous suggestions I create floating stacked charts,

using YFrom and Yvalue. The problem is if the stacked values start below

zero.

See the code below. It produces the attached chart. (The data is just

duplicated). The problem is the second series values seems to get assigned

again to the third series, producing an error on the high side. The third

series should end at -900, below the y axis.

Any clues to what I'm doing wrong or is it a bug?

Many thanks

Paul

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

Option Explicit

Private Sub Form_Load()

Dim dblSeries1Cum As Double

Dim dblSeries2Cum As Double

dblSeries1Cum = 0

dblSeries2Cum = 0

With ChartFX1

.Chart3D = False

.ClearData CD_DATA

'.Cluster = True

With .Axis(AXIS_Y)

.ResetScale

.ForceZero = False

End With

.OpenDataEx COD_VALUES, 6, 1

.OpenDataEx COD_INIVALUES, 6, 1

.Series(0).YFrom(0) = -3000

.Series(0).Yvalue(0) = -2600

.Series(1).YFrom(0) = -2600

.Series(1).Yvalue(0) = 1600

.Series(2).YFrom(0) = -1000

.Series(2).Yvalue(0) = 100

' .Series(0).YFrom(0) = -3000

' .Series(0).Yvalue(0) = -2600

' dblSeries1Cum = .Series(0).Yvalue(0)

' .Series(1).YFrom(0) = dblSeries1Cum

' .Series(1).Yvalue(0) = 1600

' dblSeries1Cum = dblSeries1Cum + .Series(1).Yvalue(0)

' .Series(2).YFrom(0) = dblSeries1Cum

' .Series(2).Yvalue(0) = 0 '-300 ' -2191 - (-2609)

.Series(3).YFrom(0) = -3000

.Series(3).Yvalue(0) = -2600

.Series(4).YFrom(0) = -2600

.Series(4).Yvalue(0) = 1600

.Series(5).YFrom(0) = -1000

.Series(5).Yvalue(0) = 100

.CloseData COD_INIVALUES

.CloseData COD_VALUES

.Series(0).Gallery = BAR

.Series(1).Gallery = BAR

.Series(1).Stacked = True

.Series(2).Gallery = BAR

.Series(2).Stacked = True

.Series(3).Gallery = BAR

.Series(3).Stacked = False

.Series(4).Gallery = BAR

.Series(4).Stacked = True

.Series(5).Gallery = BAR

.Series(5).Stacked = True

.RecalcScale

With .Axis(AXIS_Y)

.Min = -4000

.Max = 2000

End With

End With

End Sub

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

Thanks

Paul

Link to comment
Share on other sites

Stacked charts handle positive/negative values in a different way than

regular charts.

All negative values are grouped and stacked downward while the positive

values are stacked upward.

YFrom however is taken "AS IS", no accumulation is done.

I don't know what you want to achieve but Chart FX is behaving as it should.

Attached is an image explaining this a little bit.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Thanks for your reply

I want to have three stacked series

One that runs from -3000 to -2600, one from -2600 to -1000, and one

from -1000 to +100. How would I would do this?

thanks very much

Paul

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

news:JuGyCfGUDHA.1776@WEBSERVER1...

> Stacked charts handle positive/negative values in a different way than

> regular charts.

>

> All negative values are grouped and stacked downward while the positive

> values are stacked upward.

>

> YFrom however is taken "AS IS", no accumulation is done.

>

> I don't know what you want to achieve but Chart FX is behaving as it

should.

>

> Attached is an image explaining this a little bit.

>

>

>

> --

> FP

> Software FX, Inc.

>

>

>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...