MrExcel Publishing
Your One Stop for Excel Tips & Solutions

making area of graph semi-transparent?

Posted by sean on January 15, 2002 9:47 AM

hi there,

I have created a 3-d area chart in excel 2000 that contains 4 data series. Viewing the graph, some of the data is hidden by a data series in front. I need the data series in order, so changing series order will not work. I tried different orientations but some data is still hidden.

A solution would be to have the fill of one data series semi-transparent to allow viewing of the hidden series. Is there any way to do this in excel?


Posted by Mike on January 15, 2002 7:43 PM

I couldn't figure out any way to make the bars semitransparent but if you add this code to the Mouse_Down event it will let you toggle off the fill colors of the bars.

Dim ElementID As Long
Dim d As Long
Dim e As Long

'Find out where the mouse was when the left button was pressed
ActiveChart.GetChartElement x, y, ElementID, d, e

'Make sure user clicked on one of the bars...
If ElementID <> 3 Then Exit Sub

If ActiveChart.Legend.LegendEntries(d).LegendKey.Interior.ColorIndex = xlColorIndexAutomatic Then
ActiveChart.Legend.LegendEntries(d).LegendKey.Interior.ColorIndex = 0
ActiveChart.Legend.LegendEntries(d).LegendKey.Interior.ColorIndex = xlColorIndexAutomatic
End If