How to show markers for one series and not another

First few days of using VBA, please tell me about me.

Part of my current assignment is that, once all the data has been calculated successfully (it is), a scatter should be plotted showing the height over time.

This plot requires two episodes. One for the start of the trajectory, and the other for the apogee display.

I was able to display the chart by specifying the scatter as xlXYScatterSmooth

. I would have preferred no markers in the full size series.

How should I do it?

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

      

+3


source to share


1 answer


You can use .MarkerStyle = xlMarkerStyleNone

for object DataSeries

.

Place it in the block of the With

desired series, for example:



With SeriesMAX
    .Values = MAXyaxis
    .XValues = MAXxaxis
    .MarkerStyle = xlMarkerStyleNone
End With

      

+2


source







All Articles