Chart Types
xlChartType | Number | Vertical Axis | Horizontal Axis | Comments |
xlArea | 1 | xlValue | xlCategory | |
xlAreaStacked | 76 | xlValue | xlCategory | |
xlAreaStacked100 | 77 | xlValue | xlCategory | |
xlBarClustered | 57 | xlCategory | xlValue | |
xlBarStacked | 58 | xlCategory | xlValue | |
xlBarStacked100 | 59 | xlCategory | xlValue | |
xlBoxWhisker | 121 | |||
xlBubble | 15 | xlValue | xlCategory | |
xlColumnClustered | 51 | xlValue | xlCategory | |
xlColumnStacked | 52 | xlValue | xlCategory | |
xlColumnStacked100 | 53 | xlValue | xlCategory | |
xlDoughnut | -4120 | n/a | n/a | |
xlDoughnutExploded | 80 | n/a | n/a | |
xlFunnel (Added in 2019) | 123 | |||
xlHistogram (Added in 2016) | 118 | |||
xlLine | 4 | xlValue | xlCategory | |
xlLineMarkers | 65 | xlValue | xlCategory | |
xlLineMarkersStacked | 66 | xlValue | xlCategory | |
xlLineMarkersStacked100 | 67 | xlValue | xlCategory | |
xlLineStacked | 63 | xlValue | xlCategory | |
xlLineStacked100 | 64 | xlValue | xlCategory | |
xlPareto (Added in 2016) | 122 | |||
xlPie | 5 | n/a | n/a | |
xlPieExploded | 69 | n/a | n/a | |
xlPieOfPie | 68 | n/a | n/a | |
xlBarOfPie | 71 | n/a | n/a | |
xlRadar | -4151 | n/a | n/a | |
xlRadarFilled | 82 | n/a | n/a | |
xlRadarMarkers | 81 | n/a | n/a | |
xlRegionMap | 140 | |||
xlStockHLC | 88 | xlValue | xlCategory | |
xlStockOHLC | 89 | xlValue | xlCategory | |
xlStockVHLC | 90 | xlValue | xlCategory | |
xlStockVOHLC | 91 | xlValue | xlCategory | |
xlSunburst (Added in 2016) | 120 | |||
xlSurface | 83 | xlValue | xlCategory | Zaxis = xlSeriesAxis - This is a 3D chart |
xlSurfaceTopView | 85 | xlValue | xlCategory | Zaxis = xlSeriesAxis - This is a 3D chart |
xlSurfaceTopViewWireframe | 86 | xlValue | xlCategory | Zaxis = xlSeriesAxis - Contour |
xlSurfaceWireframe | 84 | xlValue | xlCategory | Zaxis = xlSeriesAxis - Contour |
xlTreemap (Added in 2016) | 117 | |||
xlWaterfall (Added in 2016) | 119 | |||
xlXYScatter | -4169 | xlValue | xlCategory | |
xlXYScatterLines | 74 | xlValue | xlCategory | |
xlXYScatterLinesNoMarkers | 75 | xlValue | xlCategory | |
xlXYScatterSmooth | 72 | xlValue | xlCategory | |
xlXYScatterSmoothNoMarkers | 73 | xlValue | xlCategory | |
xlConeBarClustered | 102 | |||
xlConeBarStacked | 103 | |||
xlConeBarStacked100 | 104 | |||
xlConeCol | 105 | |||
xlConeColClustered | 99 | |||
xlConeColStacked | 100 | |||
xlConeColStacked100 | 101 | |||
xlCylinderBarClustered | 95 | |||
xlCylinderBarStacked | 96 | |||
xlCylinderBarStacked100 | 97 | |||
xlCylinderCol | 98 | |||
xlCylinderColClustered | 92 | |||
xlCylinderColStacked | 93 | |||
xlCylinderColStacked100 | 94 | |||
xlPyramidBarClustered | 109 | |||
xlPyramidBarStacked | 110 | |||
xlPyramidBarStacked100 | 111 | |||
xlPyramidCol | 112 | |||
xlPyramidColClustered | 106 | |||
xlPyramidColStacked | 107 | |||
xlPyramidColStacked100 | 108 | |||
xl3DArea | -4098 | |||
xl3DAreaStacked | 78 | |||
xl3DAreaStacked100 | 79 | |||
xl3DBarClustered | 60 | |||
xl3DBarStacked | 61 | |||
xl3DBarStacked100 | 62 | |||
xlBubble3DEffect | 87 | |||
xl3DColumn | -4100 | |||
xl3DColumnClustered | 54 | |||
xl3DColumnStacked | 55 | |||
xl3DColumnStacked100 | 56 | |||
xl3DLine | -4101 | |||
xl3DPie | -4102 | |||
xl3DPieExploded | 70 |
objChart.ChartType = xlLine 'automatically changes objAxisBetweenCategories = True
objChart.ApplyCustomType(charttype, typename)
objChart.ApplyCustomType(xlChartType.xl3DLine
objChart.ApplyCustomType(xlChartGallery.xlBuiltIn, "Floating Bars")
objSeries.ApplyCustomType( )
ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, TypeName:="My Bar Chart"
ActiveChart.ApplyCustomType (ChartType:=xlUserDefines, TypeName:="MyChart")
ActiveSheet.ChartObjects("Chart 4").ChartType = xlLine
sets the default chart type added when programmatically adding a chart.
The FormatName parameter can be a built-in chart type or a custom chart type name.
Application.SetDefaultChart
ActiveChart.ChartGroups(1).Overlap = 100
ActiveChart.GapDepth = 50
ActiveChart.ChartGroup(1).GapWidth = 50
ActiveChart.DepthPercent = 50
ActiveChart.ChartGroups(1).HasSeriesLine = False
ActiveChart.ChartGroups(1).VaryByCategories = False
Chart Types - xlLine
SS
objSeries.Format.Line.Visible = msoTrue
objSeries.MarkerBackgroundColor = -1
objSeries.MarkerBackgroundColorIndex = 2
objSeries.MarkerForegroundColor = -1
objSeries.MarkerForegroundColorIndex = 2
objSeries.MarkerStyle = xlMarkerStyleNone
xlLineMarkers (with line + markers)
This type of chart may or maynot have a line displayed
SS
objSeries.Format.Line.Visible = msoTrue
xlLineMarkers (just markers)
SS
objSeries.Format.Line.Visible = msoFalse
Application.SetDefaultChart FormatName:="MonthlySales"
Application.SetDefaultChart FormatName:= xlChartType.xl3DArea ??
Dim objRange As Excel.Range
Dim objChart As Excel.Chart
Dim objChartSeries As Excel.Series
'this has been removed
ActiveChart.SetDefaultChart (XlChartGallery.xlAnyGallery)
ActiveChart.SetDefaultChart (XlChartGallery.xlBuiltIn)
ActiveChart.SetDefaultChart (XlChartGallery.xlUserDefined)
ActiveChart.ApplyChartTemplate ("filename.crtx")
ActiveChart.ApplyCustomType (xl3DAreaStacked)
ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, TypeName:="Line - Column on 2 Axes"
'investigate this further
'ActiveChart.ApplyCustomType(ChartType:= xlChartGallery.xlBuiltIn, TypeName:="my custom name")
Dim lcount As Long
objRange = objChartSeries.XValues
lcount = objRange.Count
'this is not valid ?
'objChart.Chart.Paste Type:=xlFormats
'??
objChart.Axes(XlAxisType.xlCategory, XlAxisGroup.xlPrimary).CategoryType
'this works in 2003 ?
ActiveChart.ChartGroups (1)
'you cannot rely on the default property
ActiveChart.ChartGroups(1).SeriesCollection (1)
ActiveChart.ChartGroups(1).SeriesCollection.Item (1)
'does not work ?
Dim sngValues As Single
sngValues = ActiveChart.ChartGroups(1).SeriesCollection(1).XValues.Count
'none of these are valid
'ActiveChart.BarGroups()
'ActiveChart.ColumnGroups()
'ActiveChart.PieGroups()
'Depreciated
'ChartFillFormat
'ChartColorFormat
'Properties depreciated include
'Border
'Caption
'Characters
'Fill
'Font
'HorizontalAlignment
'Interior
'Orientation
'ReadingOrder
'Shadow
'VerticalAlignment
'additions in 2007
ActiveChart.ApplyLayout (2)
ActiveChart.ChartStyle = 10
ActiveChart.SetElement (msoElementLegendBottom)
ActiveChart.SetElement (msoElementPrimaryCategoryAxisBillions)
ActiveChart.ChartArea.Format.Fill.ForeColor.RGB = RGB(12, 12, 12)
ActiveChart.AutoScaling = False
ActiveChart.BarShape = xlConeToMax
ActiveChart.Perspective = 60
Worksheets(1).ChartObjects(1).Chart.ProtectSelection = True
ActiveChart.ClearToMatchStyle
ActiveChart.ChartGroups(1).SeriesCollection(1).Interior.TintAndShade = 3
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext