我需要你的帮助来更改此图形代码的背景和侧边距。我该如何在图片中的示例格式中执行此操作?
Set EMAChart = Sheets("Parameters").ChartObjects.Add(Left:=Range("a18").Left, Width:=700, Top:=Range("a18").Top, Height:=500)
With EMAChart.Chart
'EMA_A Grafik
.Parent.Name = "EMA Chart"
With .SeriesCollection.NewSeries
.ChartType = xlLine
.Values = Sheets("data").Range("e2:e" & numRows)
.XValues = Sheets("data").Range("a2:a" & numRows)
.Format.Line.Weight = 1
.Border.ColorIndex = 1
.Name = "Price"
End With
With .SeriesCollection.NewSeries
.ChartType = xlLine
.AxisGroup = xlPrimary
.Values = Sheets("data").Range("h2:h" & numRows)
.Name = "EMA_A"
.Border.ColorIndex = 44
.Format.Line.Weight = 1
End With
'EMA_B Grafik
With .SeriesCollection.NewSeries
.ChartType = xlLine
.AxisGroup = xlPrimary
.Values = Sheets("data").Range("ı2:ı" & numRows)
.Name = "EMA_B"
.Border.ColorIndex = 26
.Format.Line.Weight = 1
End With
'EMA_c Grafik
With .SeriesCollection.NewSeries
.ChartType = xlLine
.AxisGroup = xlPrimary
.Values = Sheets("data").Range("j2:j" & numRows)
.Name = "EMA_C"
.Border.ColorIndex = 17
.Format.Line.Weight = 1
End With
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Price"
.Axes(xlValue, xlPrimary).MaximumScale = WorksheetFunction.Max(Sheets("Data").Range("e2:e" & numRows))
.Axes(xlValue, xlPrimary).MinimumScale = Int(WorksheetFunction.Min(Sheets("Data").Range("e2:e" & numRows)))
.Legend.Position = xlLegendPositionBottom
.SetElement (msoElementChartTitleAboveChart)
.ChartTitle.Text = " "
End With