Page 1 of 1

TRANSPARENCY AND AXIS GRID LINES

Posted: Mon Aug 31, 2009 11:48 am
by 13051218
I'm using transparency so that I can see axis grid lines behind area series. There are 2 problems associated with that I would like to correct

1: Can I use non transparent colors for area series and put the axis grid lines in front? I'd rather use non transparent colors if I could see the axis lines on top
2: Transparency is not interpreted by the clipboard capture or export (emf,jpg..), the transparent colors become solid and they look very different from what you get on the original graph (I lose the axis lines other than the colors).

Thanks for your reply

Re: TRANSPARENCY AND AXIS GRID LINES

Posted: Mon Aug 31, 2009 2:04 pm
by narcis
Hi Yacu,
1: Can I use non transparent colors for area series and put the axis grid lines in front? I'd rather use non transparent colors if I could see the axis lines on top

Yes, you can use line below for that.

Code: Select all

    TChart1.Axis.DrawAxesBeforeSeries = False
2: Transparency is not interpreted by the clipboard capture or export (emf,jpg..), the transparent colors become solid and they look very different from what you get on the original graph (I lose the axis lines other than the colors).
You can set BufferedDisplay to false, save the chart to the clipboard and set it back to true, for example:

Code: Select all

Private Sub Form_Load()
    TChart1.AddSeries scArea
    TChart1.Series(0).FillSampleValues 10
    TChart1.Series(0).asArea.Transparency = 50
    
    TChart1.Axis.DrawAxesBeforeSeries = False
        
    TChart1.BufferedDisplay = False
    TChart1.Export.CopyToClipboardBitmap
    TChart1.BufferedDisplay = True
End Sub

Re: TRANSPARENCY AND AXIS GRID LINES

Posted: Mon Aug 31, 2009 3:42 pm
by 13051218
Thank you very much for your reply. It worked beautifully