Jump to content
Software FX Community

Transparent bars


User (Legacy)

Recommended Posts

I'm converting an MFC application to use ChartFX 6.2.

We present data in bar charts, with multiple series. The X axis might be

Jan-Dec, the Z axis various performance metrics, such as CPU and Disk Usage.

When presenting averages for each item, we want to be able to present

maximum values as well. In the home grown version, we did this by drawing a

stacked bar on top of the average; this bar was only outlined, not filled.

I'd like to be able to do something similar with ChartFX, but haven't been

able to find a way to do this. I'd like to at least be able to specify that

a bar should only be outlined. Being able to specify a degree of

transparency would be even nicer.

Thanks,

Lee Bradshaw

CCSS (Europe) Ltd

Link to comment
Share on other sites

I'm converting an MFC application to use ChartFX 6.2.

We present data in bar charts, with multiple series. The X axis might be

Jan-Dec, the Z axis various performance metrics, such as CPU and Disk Usage.

When presenting averages for each item, we want to be able to present

maximum values as well. In the home grown version, we did this by drawing a

stacked bar on top of the average; this bar was only outlined, not filled.

I'd like to be able to do something similar with ChartFX, but haven't been

able to find a way to do this. I'd like to at least be able to specify that

a bar should only be outlined. Being able to specify a degree of

transparency would be even nicer.

Thanks,

Lee Bradshaw

CCSS (Europe) Ltd

Link to comment
Share on other sites

ChartFX 6.2 uses GDI+ so transparent or semi-transparent bars are supported.

The following code will draw transparent reddish bars on top of a line

chart.

Chart1.Gallery = Gallery_Bar

Chart1.series(0).Gallery = Gallery_Lines

Chart1.series(1).Color = Chart1.ColorFromArgb(128, 255, 0, 0)

If you want completely transparent bars you would need something like this

Chart1.Gallery = Gallery_Bar

Chart1.series(0).Gallery = Gallery_Lines

Chart1.series(1).Color = Chart1.ColorFromArgb(0, 255, 0, 0)

Chart1.series(1).BorderColor = RGB(0, 0, 0)

Chart1.series(1).BorderEffect = BorderEffect_None

Note that we need to set the BorderEffect to None because the default is

that we use a darker version of the series to draw the border.

--

JC

Software FX Support

"Lee Bradshaw" <lee@bigpond.net.au> wrote in message

news:7G0PiDn6FHA.2548@webserver3.softwarefx.com...

> I'm converting an MFC application to use ChartFX 6.2.

>

> We present data in bar charts, with multiple series. The X axis might be

> Jan-Dec, the Z axis various performance metrics, such as CPU and Disk

> Usage.

>

> When presenting averages for each item, we want to be able to present

> maximum values as well. In the home grown version, we did this by drawing

> a stacked bar on top of the average; this bar was only outlined, not

> filled.

>

> I'd like to be able to do something similar with ChartFX, but haven't been

> able to find a way to do this. I'd like to at least be able to specify

> that a bar should only be outlined. Being able to specify a degree of

> transparency would be even nicer.

>

> Thanks,

> Lee Bradshaw

> CCSS (Europe) Ltd

>

Link to comment
Share on other sites

ChartFX 6.2 uses GDI+ so transparent or semi-transparent bars are supported.

The following code will draw transparent reddish bars on top of a line

chart.

Chart1.Gallery = Gallery_Bar

Chart1.series(0).Gallery = Gallery_Lines

Chart1.series(1).Color = Chart1.ColorFromArgb(128, 255, 0, 0)

If you want completely transparent bars you would need something like this

Chart1.Gallery = Gallery_Bar

Chart1.series(0).Gallery = Gallery_Lines

Chart1.series(1).Color = Chart1.ColorFromArgb(0, 255, 0, 0)

Chart1.series(1).BorderColor = RGB(0, 0, 0)

Chart1.series(1).BorderEffect = BorderEffect_None

Note that we need to set the BorderEffect to None because the default is

that we use a darker version of the series to draw the border.

--

JC

Software FX Support

"Lee Bradshaw" <lee@bigpond.net.au> wrote in message

news:7G0PiDn6FHA.2548@webserver3.softwarefx.com...

> I'm converting an MFC application to use ChartFX 6.2.

>

> We present data in bar charts, with multiple series. The X axis might be

> Jan-Dec, the Z axis various performance metrics, such as CPU and Disk

> Usage.

>

> When presenting averages for each item, we want to be able to present

> maximum values as well. In the home grown version, we did this by drawing

> a stacked bar on top of the average; this bar was only outlined, not

> filled.

>

> I'd like to be able to do something similar with ChartFX, but haven't been

> able to find a way to do this. I'd like to at least be able to specify

> that a bar should only be outlined. Being able to specify a degree of

> transparency would be even nicer.

>

> Thanks,

> Lee Bradshaw

> CCSS (Europe) Ltd

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...