Answered Using Area3DStyle.LightStyle

  • 2012年3月9日 9:04
     
     

    Hi,

    I am using the

    MSChartControl.ChartAreas(0).Area3DStyle.LightStyle = LightStyles.Realistic

    But the chart gets automatic a level of gray added.

    Is there a way to change this color????

すべての返信

  • 2012年3月23日 6:44
    モデレータ
     
     

    hi Willie

    you can change the ChartArea BackColor

    however, depending on the rotation there will still be an area of gray on the side which I don't believe you can change

  • 2012年3月23日 9:31
     
     

    Hi,

    i tried setting the

            MSChartControl.ChartAreas(0).BackColor = System.Drawing.Color.Red

    But it does not show up in the chart. It stays gray...
  • 2012年3月23日 9:48
    モデレータ
     
     回答済み コードあり

    well, try this in an app with a chart control on the form

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim rndm As New Random
            For i As Integer = 1 To 5
                Chart1.Series(0).Points.AddY(rndm.Next(1, 11))
            Next
    
            Chart1.ChartAreas(0).Area3DStyle.Enable3D = True
            Chart1.ChartAreas(0).Area3DStyle.LightStyle = DataVisualization.Charting.LightStyle.Realistic
            Chart1.ChartAreas(0).BackColor = Color.Red
        End Sub

    • 回答としてマーク Willie007 2012年3月29日 14:14
    •