C
Craigm
I have the code running to create the pie chart.
I am would like to breakout all categories with 4% or less into the bar
in a Bar of Pie Chart.
I am completly stumped? Craigm
----------------------------------------------
Sub chrtTire()
Dim chrtTires As Chart
Sheets("Data").Select
Range("C3").Select
'DELETE ALL CHARTS ON THE DATA
WORKSHEET
ActiveSheet.ChartObjects.Delete
Set chrtTires = Charts.Add
Set chrtTires = chrtTires.Location(Where:=xlLocationAsObject,
Name:="Data")
With chrtTires
ChartType = xlPie
SetSourceData Source:=Sheets("TiresSum").Range("C121"),
PlotBy:=xlCol
HasTitle = True
ChartTitle.Text = "Tire Usage by Department"
With .ChartTitle.Font
Size = 16
Background = xlBackgroundTransparent
End With
ChartArea.Shadow = True 'Outer edge of entire chart
HasLegend = False
HasDataTable = True
ApplyDataLabels xlDataLabelsShowLabel
ApplyDataLabels xlDataLabelsShowValue
ApplyDataLabels xlDataLabelsShowPercent
With .Parent
Top = Range("B2").Top 'With Charts("chrtTires").ChartArea
Left = Range("A1").Left
Height = ("350")
Width = ("500")
Name = "TiresSum"
RoundedCorners = True
End With
End With
Worksheets("Data").ChartObjects(1).Chart.ChartArea.Interior.Pattern =
xlLightDown
With chrtTires.PlotArea.Fill 'Just the pie area
Visible = msoFalse 'Makes are transparent
msoFalse
End With
With chrtTires.PlotArea 'Just the pie area
Border.LineStyle = xlLineStyleNone
End With
With chrtTires.ChartArea.Fill 'The entire chart area
Visible = True
ForeColor.SchemeColor = 15
BackColor.SchemeColor = 17
TwoColorGradient Style:=msoGradientHorizontal, Variant:=1
End With
End Sub
I am would like to breakout all categories with 4% or less into the bar
in a Bar of Pie Chart.
I am completly stumped? Craigm
----------------------------------------------
Sub chrtTire()
Dim chrtTires As Chart
Sheets("Data").Select
Range("C3").Select
'DELETE ALL CHARTS ON THE DATA
WORKSHEET
ActiveSheet.ChartObjects.Delete
Set chrtTires = Charts.Add
Set chrtTires = chrtTires.Location(Where:=xlLocationAsObject,
Name:="Data")
With chrtTires
ChartType = xlPie
SetSourceData Source:=Sheets("TiresSum").Range("C121"),
PlotBy:=xlCol
HasTitle = True
ChartTitle.Text = "Tire Usage by Department"
With .ChartTitle.Font
Size = 16
Background = xlBackgroundTransparent
End With
ChartArea.Shadow = True 'Outer edge of entire chart
HasLegend = False
HasDataTable = True
ApplyDataLabels xlDataLabelsShowLabel
ApplyDataLabels xlDataLabelsShowValue
ApplyDataLabels xlDataLabelsShowPercent
With .Parent
Top = Range("B2").Top 'With Charts("chrtTires").ChartArea
Left = Range("A1").Left
Height = ("350")
Width = ("500")
Name = "TiresSum"
RoundedCorners = True
End With
End With
Worksheets("Data").ChartObjects(1).Chart.ChartArea.Interior.Pattern =
xlLightDown
With chrtTires.PlotArea.Fill 'Just the pie area
Visible = msoFalse 'Makes are transparent
msoFalse
End With
With chrtTires.PlotArea 'Just the pie area
Border.LineStyle = xlLineStyleNone
End With
With chrtTires.ChartArea.Fill 'The entire chart area
Visible = True
ForeColor.SchemeColor = 15
BackColor.SchemeColor = 17
TwoColorGradient Style:=msoGradientHorizontal, Variant:=1
End With
End Sub