システムwiki

散布プロットのラベル付け

Nelson_ 受付中 最終更新日:2021-05-02 02:38

ここで散布図のラベルを示す方法に関するこのビットを見つけました. このリンク:JA-JP/ヘルプ/213750/使用方法A-macro-to-add-labels-to-a-XY散布チャートまたはインブブル-Chart-in-Excel

これは素晴らしいですが、誰もがこれを正確にする方法を知っていますが、テキストラベルの代わりにラベルとして画像がありますか?

マイクネルソン

返信リスト(回答:1)

1 #
Anonymous

画像のパスとファイル名が、シリーズ値の1列右側の対応するセルにあるとしましょう.置き換えてください...

For Counter=1 To Range(xVals).Cells.Count
ActiveChart.SeriesCollection(1).Points(Counter).HasDataLabel=_
True
ActiveChart.SeriesCollection(1).Points( Counter).DataLabel.Text=_
Range(xVals).Cells(Counter、1).Offset(0、-1).Value
次のカウンター

with

For Counter=1 To Range(xVals).Cells.Count
With ActiveChart.SeriesCollection(1).Points(Counter)
.HasDataLabel=True
With.DataLabel.Format.Fill
.UserPicture Range(xVals).Cells(Counter、1).Offset(0、1).Value
.Visible=msoTrue
End With
End With
Next Counter

これがお役に立てば幸いです!