我当前任务的一部分是,一旦所有数据成功计算(它有),就是绘制一个显示高度与时间的散点图。
这个情节需要两个系列。一个用于轨迹开始完成,另一个用于显示远地点。
我设法通过将散布定义为xlXYScatterSmooth
来获取图表以显示此信息。我更喜欢全长系列没有标记。
我该怎么做?
Dim Chart1 As Chart
Dim xaxis As Range
Dim yaxis As Range
Dim MAXyaxis As Range
Dim Series As Series
Dim SeriesMAX As Series
Set yaxis = DisplayCorrectedAlt
Set xaxis = Range(Cells(1, 1), Cells(RowCount, 1))
Set MAXyaxis = Cells(1, 9)
Set MAXxaxis = Cells(1, 10)
Set Chart1 = Charts.Add
With Chart1
.ChartType = xlXYScatterSmooth
End With
Set Series = Chart1.SeriesCollection.NewSeries
With Series
.Values = yaxis
.XValues = xaxis
End With
Set SeriesMAX = Chart1.SeriesCollection.NewSeries
With SeriesMAX
.Values = MAXyaxis
.XValues = MAXxaxis
End With
答案 0 :(得分:2)
您可以对.MarkerStyle = xlMarkerStyleNone
对象使用DataSeries
。
将其放在所需系列的With
块内,如下所示:
With SeriesMAX
.Values = MAXyaxis
.XValues = MAXxaxis
.MarkerStyle = xlMarkerStyleNone
End With