Page 1 of 1

AreaBrush bug

Posted: Fri Apr 20, 2007 7:35 pm
by 9531332
Using TChart ActiveX 7.0.1.3

If you set the AreaBrush property to the enumeration value "80% Fill" (aka 8 ) or some other enum value above that, then if you try to set it to something below "80% fill", like "solid", it doesn't work. Now only the values above 8 (aka "80% fill") will be shown.

The following VB code shows the problem:

Dim i As Long

Private Sub Command1_Click()
i = i + 1
TChart1.Series(0).asArea.AreaBrush = i
If i > 10 Then
i = 0
End If
End Sub

When you click on the button associated with this handler, you cycle through the first 10 fill types, then the fill doesn't change for 7 clicks, then you cycle through the last 3, and repeat.

Is this indeed a bug, or am I missing something?

Posted: Mon Apr 23, 2007 3:09 pm
by narcis
Hi thatnerdyguy,

This problem is because some of the brush options are bitmaps. Since AreaChartBrush doesn't exist, its image couldn't be cleared and thus brushes not being bitmaps couldn't be reassigned.

AreaChartBrush has been added for v7.0.1.4 so that you will be able to do something like this:

Code: Select all

If i > 10 Then
     i = 0
     TChart1.Series(0).asArea.AreaChartBrush.ClearImage
End If
All being well, we expect v7.0.1.4 being out tomorrow.