Я отвечаю на этот вопрос, потому что у меня был тот же вопрос, и я не нашел здесь ответа.
Я использую массивы для хранения данных из словаря сценариев.Затем массивы предоставляют исходные данные для графика.
Sub DictToChart()
'Arrays for graph
Dim xinput As Variant
Dim yinput As Variant
'Example dictionary
Dim dict As Scripting.Dictionary
Set dict = New Scripting.Dictionary
'Populate dictionary
dict.Add 0, 0
dict.Add 10, 1
dict.Add 20, 2
dict.Add 30, 3
dict.Add 40, 4
'Populate arrays for graph
ReDim xinput(0 To dict.Count - 1)
ReDim yinput(0 To dict.Count - 1)
For i = 0 To dict.Count - 1
xinput(i) = dict.Keys(i)
yinput(i) = dict.Items(i)
Next i
'Create graph
ActiveSheet.Shapes.AddChart(xlColumnClustered).Select
ActiveChart.SeriesCollection.NewSeries
With ActiveChart
.SeriesCollection(1).xvalues = xinput
.SeriesCollection(1).Values = yinput
End With
End Sub