Area.BackgroundColor

This property is read only.

Syntax Parameters Return value
- -

SVB Example

Changing the foreground and background colors of a graph.

Option Base 1
Sub Main
    Dim newanalysis As Analysis
    Set newanalysis = Analysis (sc2dHistograms, ActiveDataSet)
    With newanalysis.Dialog
        .Variables = "5"
        .GraphType = scHistogramRegularPlot
        .FitType = scHistoFitNormal
        .ShowingType = scStandard
        .BreakBetweenColumns = False
        .ShowPercentages = False
        .YAxisOption = scLeftNumber
        .DisplayDescriptiveStatistics = False
        .DisplayKolmogorovSmirnovTest = False
        .DisplayShapiroWilkTest = False
        .DisplayTotalCount = False
    End With
    Dim Grph As Graph
    'set the graph variable Grph to the graph produced by the analysis
    Set Grph =newanalysis.Dialog.Graphs(1)
    Dim L2D As Layout2D
    'set the Layout2D variable to the content of Grph
    Set L2D = Grph.Content
    Dim Plot2D As Plot2DHistogram
    'set the Plot2DHistogram variable to the first plot in the plots collection
    Set Plot2D = L2D.Plots(1)
    Dim BarHisto As Bar
    'set the Bar variable to Plot2D.Bar
    Set BarHisto = Plot2D.Bar
    Dim BarArea As Area
    'set the Area variable to the area property of the Bar
    Set BarArea = BarHisto.Area
    'change the background color of the Bar Area To Red
    BarArea.BackgroundColor.Color = RGB(255,0,0)
    'change the foreground color of the Bar Area to Green
    BarArea.ForegroundColor.Color = RGB(0,255,0)
    'display the graph
    Grph.Visible = True
End Sub