vbscript 在PowerPoint中调整散点图的标签

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vbscript 在PowerPoint中调整散点图的标签相关的知识,希望对你有一定的参考价值。

Sub ScatterLabelsTweak()

Dim sld As Slide
Dim shp As Shape
Dim sr As Series
Dim chrt As Chart
Dim i, j, k, m As Long

    For Each sld In ActivePresentation.Slides
        For Each shp In sld.Shapes

            If shp.HasChart Then
                With shp.Chart.Axes(xlValue) 'Y-axis
                    .MinimumScale = 2
                    .MaximumScale = 7.5
                End With
                With shp.Chart.Axes(xlCategory) 'X-axis
                    .MinimumScale = 0
                    .MaximumScale = 1
                End With
                shp.Chart.HasLegend = False
                
                j = shp.Chart.FullSeriesCollection.Count
                Debug.Print j
                For i = 1 To j
                    k = shp.Chart.SeriesCollection(i).Points.Count
                    Debug.Print k
                    For m = 1 To k
                        shp.Chart.SeriesCollection(i).Points(m).DataLabel.Font.Size = 8
                    Next
                Next
                                
            End If
			
			 'If shp.HasChart Then
             '   shp.Chart.HasAxis(xlValue) = False
             '   shp.Chart.HasAxis(xlCategory) = False
             'End If
    Next shp
    Next sld

End Sub

以上是关于vbscript 在PowerPoint中调整散点图的标签的主要内容,如果未能解决你的问题,请参考以下文章

vbscript [在PowerPoint中调整图表大小]另一个在PowerPoint #PowerPoint中调整图表大小的示例

vbscript 调整PowerPoint图表的数据标签

vbscript 调整演示文稿[PowerPoint VBA]中的所有图表的大小和重新定位

vbscript [创建表格图例]在PowerPoint #PowerPoint中创建一行迷你表格图例

vbscript “扫描”PowerPoint中表格中所有单元格的颜色代码,然后在同一维度的另一个表格上“打印”相同的颜色。

vbscript 更改PowerPoint图表中散点图上所有点的颜色