Jump to content
Software FX Community

Aligning remaining series after using CHART_HIDDEN


User (Legacy)

Recommended Posts

What I'm trying to do is display two distinct series across a set of x

values. However, for each x, a value is contained in either the first

series or the second series BUT NOT BOTH. The following is sample data:

X-Value Series 1 Series 2

1 3

2 4

3 1

4 3

5 2

6 3

......

The problem is even when I set the blank points to hidden, when ChartFX goes

to generate the image (not using the ActiveX control), it still reserves

space for the hidden value. When two series per x value are drawn as bars,

the tick mark for the x-value is located in the middle on the edge between

to two bars. When the second value is hidden, the first bar is still drawn

to the left of the tick mark. When the first value is hiddden, the second

bar is still drawn to the right of the tick mark. What I would like is that

when one is hidden, it draws the remaining bar as if it is the only value

there. Is this possible?

Chris

gantt.bmp

Link to comment
Share on other sites

This is not possible (hidden values will always "take" space in a bar

chart). An alternative would be to create your chart with 1 series and set

the colors so that all bars for series 1 are red and all bars for series 2

are blue.

--

Regards

JC

Software FX Support

"Chris Taylor" <ctaylor@belltechlogix.com> wrote in message

news:vf6XyyXuBHA.1412@webserver1.softwarefx.com...

> What I'm trying to do is display two distinct series across a set of x

> values. However, for each x, a value is contained in either the first

> series or the second series BUT NOT BOTH. The following is sample data:

>

> X-Value Series 1 Series 2

> 1 3

> 2 4

> 3 1

> 4 3

> 5 2

> 6 3

> ......

>

> The problem is even when I set the blank points to hidden, when ChartFX

goes

> to generate the image (not using the ActiveX control), it still reserves

> space for the hidden value. When two series per x value are drawn as

bars,

> the tick mark for the x-value is located in the middle on the edge between

> to two bars. When the second value is hidden, the first bar is still

drawn

> to the left of the tick mark. When the first value is hiddden, the second

> bar is still drawn to the right of the tick mark. What I would like is

that

> when one is hidden, it draws the remaining bar as if it is the only value

> there. Is this possible?

>

> Chris

>

>

Link to comment
Share on other sites

Actually, I was able to kind of "hack" it to get it to work exactly like I

wanted. Here is the code that I used:

'Recalced the scale BEFORE doing any stacking to keep original min/max - I

had to move this before setting the series to stack.

'Otherwise, it wasn't scaling how I wanted it to.

cfxChart.RecalcScale

'Set the two series to stacked - this only works because there is a single

value for any given x so it stacks a value with nothing

cfxChart.Series(0).Stacked = True

cfxChart.Series(1).Stacked = True

cfxChart.Series(CS_ALL).Border = True

'Since the bars are considered stacked now, they are a little fatter than I

desired, so I trimmed them down

cfxChart.Volume = 50

'Get the image tag

CreateGraph = cfxChart.GetHTMLTag("450", "275", "image")

This took a little playing and creativeness, but it generates the graph

exactly like I was describing in my original email.

Chris

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

news:U2qA2OauBHA.1412@webserver1.softwarefx.com...

> This is not possible (hidden values will always "take" space in a bar

> chart). An alternative would be to create your chart with 1 series and set

> the colors so that all bars for series 1 are red and all bars for series 2

> are blue.

>

> --

> Regards

>

> JC

> Software FX Support

>

> "Chris Taylor" <ctaylor@belltechlogix.com> wrote in message

> news:vf6XyyXuBHA.1412@webserver1.softwarefx.com...

> > What I'm trying to do is display two distinct series across a set of x

> > values. However, for each x, a value is contained in either the first

> > series or the second series BUT NOT BOTH. The following is sample data:

> >

> > X-Value Series 1 Series 2

> > 1 3

> > 2 4

> > 3 1

> > 4 3

> > 5 2

> > 6 3

> > ......

> >

> > The problem is even when I set the blank points to hidden, when ChartFX

> goes

> > to generate the image (not using the ActiveX control), it still reserves

> > space for the hidden value. When two series per x value are drawn as

> bars,

> > the tick mark for the x-value is located in the middle on the edge

between

> > to two bars. When the second value is hidden, the first bar is still

> drawn

> > to the left of the tick mark. When the first value is hiddden, the

second

> > bar is still drawn to the right of the tick mark. What I would like is

> that

> > when one is hidden, it draws the remaining bar as if it is the only

value

> > there. Is this possible?

> >

> > Chris

> >

> >

>

>

post-2107-13922387712876_thumb.jpg

Link to comment
Share on other sites

There could be another way to get the same chart by setting the cluster

property to true.

--

Regards

JC

Software FX Support

"Chris Taylor" <ctaylor@belltechlogix.com> wrote in message

news:Wvo37zhuBHA.1412@webserver1.softwarefx.com...

> Actually, I was able to kind of "hack" it to get it to work exactly like I

> wanted. Here is the code that I used:

>

> 'Recalced the scale BEFORE doing any stacking to keep original min/max - I

> had to move this before setting the series to stack.

> 'Otherwise, it wasn't scaling how I wanted it to.

> cfxChart.RecalcScale

>

> 'Set the two series to stacked - this only works because there is a single

> value for any given x so it stacks a value with nothing

> cfxChart.Series(0).Stacked = True

> cfxChart.Series(1).Stacked = True

> cfxChart.Series(CS_ALL).Border = True

>

> 'Since the bars are considered stacked now, they are a little fatter than

I

> desired, so I trimmed them down

> cfxChart.Volume = 50

>

> 'Get the image tag

> CreateGraph = cfxChart.GetHTMLTag("450", "275", "image")

>

> This took a little playing and creativeness, but it generates the graph

> exactly like I was describing in my original email.

>

> Chris

>

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

> news:U2qA2OauBHA.1412@webserver1.softwarefx.com...

> > This is not possible (hidden values will always "take" space in a bar

> > chart). An alternative would be to create your chart with 1 series and

set

> > the colors so that all bars for series 1 are red and all bars for series

2

> > are blue.

> >

> > --

> > Regards

> >

> > JC

> > Software FX Support

> >

> > "Chris Taylor" <ctaylor@belltechlogix.com> wrote in message

> > news:vf6XyyXuBHA.1412@webserver1.softwarefx.com...

> > > What I'm trying to do is display two distinct series across a set of x

> > > values. However, for each x, a value is contained in either the first

> > > series or the second series BUT NOT BOTH. The following is sample

data:

> > >

> > > X-Value Series 1 Series 2

> > > 1 3

> > > 2 4

> > > 3 1

> > > 4 3

> > > 5 2

> > > 6 3

> > > ......

> > >

> > > The problem is even when I set the blank points to hidden, when

ChartFX

> > goes

> > > to generate the image (not using the ActiveX control), it still

reserves

> > > space for the hidden value. When two series per x value are drawn as

> > bars,

> > > the tick mark for the x-value is located in the middle on the edge

> between

> > > to two bars. When the second value is hidden, the first bar is still

> > drawn

> > > to the left of the tick mark. When the first value is hiddden, the

> second

> > > bar is still drawn to the right of the tick mark. What I would like

is

> > that

> > > when one is hidden, it draws the remaining bar as if it is the only

> value

> > > there. Is this possible?

> > >

> > > Chris

> > >

> > >

> >

> >

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...