VBA Excel - alterando os Tipos de um Gráfico - ChartType Property

Inline image 2

Alguns dos Dashboards desenvolvidos no MS Excel, permitem que os usuários mudem o tipo de gráfico visualizado. Isso é muito produtivo quando contribui para a compreensão dos dados. Mas, é importante lembar que alguns tipos de gráficos não ficam disponíveis para as PivotChart Report.

Seria útil saber quais são as propriedades (do tipo constantes), que ChartType do objeto ChartObjects suporta:


xlLine. Line
xlLineMarkersStacked. Stacked Line with Markers
xlLineStacked. Stacked Line
xlPie. Pie
xlPieOfPie. Pie of Pie
xlPyramidBarStacked. Stacked Pyramid Bar
xlPyramidCol. 3D Pyramid Column
xlPyramidColClustered. Clustered Pyramid Column
xlPyramidColStacked. Stacked Pyramid Column
xlPyramidColStacked100. 100% Stacked Pyramid Column
xlRadar. Radar
xlRadarFilled. Filled Radar
xlRadarMarkers. Radar with Data Markers
xlStockHLC. High-Low-Close
xlStockOHLC. Open-High-Low-Close
xlStockVHLC. Volume-High-Low-Close
xlStockVOHLC. Volume-Open-High-Low-Close
xlSurface. 3D Surface
xlSurfaceTopView. Surface (Top View)
xlSurfaceTopViewWireframe. Surface (Top View wireframe)
xlSurfaceWireframe. 3D Surface (wireframe)
xlXYScatter. Scatter
xlXYScatterLines. Scatter with Lines.
xlXYScatterLinesNoMarkers. Scatter with Lines and No Data Markers
xlXYScatterSmooth. Scatter with Smoothed Lines
xlXYScatterSmoothNoMarkers. Scatter with Smoothed Lines and No Data Markers
xl3DArea. 3D Area
xl3DAreaStacked. 3D Stacked Area
xl3DAreaStacked100. 100% Stacked Area
xl3DBarClustered. 3D Clustered Bar
xl3DBarStacked. 3D Stacked Bar
xl3DBarStacked100. 3D 100% Stacked Bar
xl3DColumn. 3D Column
xl3DColumnClustered. 3D Clustered Column
xl3DColumnStacked. 3D Stacked Column
xl3DColumnStacked100. 3D 100% Stacked Column
xl3DLine. 3D Line
xl3DPie. 3D Pie
xl3DPieExploded. Exploded 3D Pie
xlArea. Area
xlAreaStacked. Stacked Area
xlAreaStacked100. 100% Stacked Area
xlBarClustered. Clustered Bar
xlBarOfPie. Bar of Pie
xlBarStacked. Stacked Bar
xlBarStacked100. 100% Stacked Bar
xlBubble. Bubble
xlBubble3DEffect. Bubble with 3D effects
xlColumnClustered. Clustered Column
xlColumnStacked. Stacked Column
xlColumnStacked100. 100% Stacked Column
xlConeBarClustered. Clustered Cone Bar
xlConeBarStacked. Stacked Cone Bar
xlConeBarStacked100. 100% Stacked Cone Bar
xlConeCol. 3D Cone Column
xlConeColClustered. Clustered Cone Column
xlConeColStacked. Stacked Cone Column
xlConeColStacked100. 100% Stacked Cone Column
xlCylinderBarClustered. Clustered Cylinder Bar
xlCylinderBarStacked. Stacked Cylinder Bar
xlCylinderBarStacked100. 100% Stacked Cylinder Bar
xlCylinderCol. 3D Cylinder Column
xlCylinderColClustered. Clustered Cone Column
xlCylinderColStacked. Stacked Cone Column
xlCylinderColStacked100. 100% Stacked Cylinder Column
xlDoughnut. Doughnut
xlDoughnutExploded. Exploded Doughnut
xlLineMarkers. Line with Markers
xlLineMarkersStacked100. 100% Stacked Line with Markers
xlLineStacked100. 100% Stacked Line
xlPieExploded. Exploded Pie
xlPyramidBarClustered. Clustered Pyramid Bar
xlPyramidBarStacked100. 100% Stacked Pyramid Bar

Segue exemplo de como usar essas constantes:


Este exemplo define o tamanho do gráfico de Bolhas num grupo com 200% do tamanho padrão, caso o gráfico esteja no padrão Bolhas 2D.

With Worksheets(1).ChartObjects(1).Chart      If .ChartType = xlBubble Then          .ChartGroups(1).BubbleScale = 200      End If  End With

Reference:

Tags: VBA, Excel, chart, dynamic, Chart Object, Series, Type, Property, chart, Gráfico, tipo, série, objeto , Bolhas, Bubbles

Nenhum comentário:

Postar um comentário

diHITT - Notícias