Chart Types

xlChartTypeNumberVertical AxisHorizontal AxisComments
xlArea1xlValuexlCategory 
xlAreaStacked76xlValuexlCategory 
xlAreaStacked10077xlValuexlCategory 
xlBarClustered57xlCategoryxlValue 
xlBarStacked58xlCategoryxlValue 
xlBarStacked10059xlCategoryxlValue 
xlBoxWhisker121   
xlBubble15xlValuexlCategory 
xlColumnClustered51xlValuexlCategory 
xlColumnStacked52xlValuexlCategory 
xlColumnStacked10053xlValuexlCategory 
xlDoughnut-4120n/an/a 
xlDoughnutExploded80n/an/a 
xlFunnel (Added in 2019)123   
xlHistogram (Added in 2016)118   
xlLine4xlValuexlCategory 
xlLineMarkers65xlValuexlCategory 
xlLineMarkersStacked66xlValuexlCategory 
xlLineMarkersStacked10067xlValuexlCategory 
xlLineStacked63xlValuexlCategory 
xlLineStacked10064xlValuexlCategory 
xlPareto (Added in 2016)122   
xlPie5n/an/a 
xlPieExploded69n/an/a 
xlPieOfPie68n/an/a 
xlBarOfPie71n/an/a 
xlRadar-4151n/an/a 
xlRadarFilled82n/an/a 
xlRadarMarkers81n/an/a 
xlRegionMap140   
xlStockHLC88xlValuexlCategory 
xlStockOHLC89xlValuexlCategory 
xlStockVHLC90xlValuexlCategory 
xlStockVOHLC91xlValuexlCategory 
xlSunburst (Added in 2016)120   
xlSurface83xlValuexlCategoryZaxis = xlSeriesAxis - This is a 3D chart
xlSurfaceTopView85xlValuexlCategoryZaxis = xlSeriesAxis - This is a 3D chart
xlSurfaceTopViewWireframe86xlValuexlCategoryZaxis = xlSeriesAxis - Contour
xlSurfaceWireframe84xlValuexlCategoryZaxis = xlSeriesAxis - Contour
xlTreemap (Added in 2016)117   
xlWaterfall (Added in 2016)119   
xlXYScatter-4169xlValuexlCategory 
xlXYScatterLines74xlValuexlCategory 
xlXYScatterLinesNoMarkers75xlValuexlCategory 
xlXYScatterSmooth72xlValuexlCategory 
xlXYScatterSmoothNoMarkers73xlValuexlCategory 
xlConeBarClustered102   
xlConeBarStacked103   
xlConeBarStacked100104   
xlConeCol105   
xlConeColClustered99   
xlConeColStacked100   
xlConeColStacked100101   
xlCylinderBarClustered95   
xlCylinderBarStacked96   
xlCylinderBarStacked10097   
xlCylinderCol98   
xlCylinderColClustered92   
xlCylinderColStacked93   
xlCylinderColStacked10094   
xlPyramidBarClustered109   
xlPyramidBarStacked110   
xlPyramidBarStacked100111   
xlPyramidCol112   
xlPyramidColClustered106   
xlPyramidColStacked107   
xlPyramidColStacked100108   
xl3DArea-4098   
xl3DAreaStacked78   
xl3DAreaStacked10079   
xl3DBarClustered60   
xl3DBarStacked61   
xl3DBarStacked10062   
xlBubble3DEffect87   
xl3DColumn-4100   
xl3DColumnClustered54   
xl3DColumnStacked55   
xl3DColumnStacked10056   
xl3DLine-4101   
xl3DPie-4102   
xl3DPieExploded70   

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