splinearea colors not change

  • Thread starter Thread starter Vergassivellaunus
  • Start date Start date
V

Vergassivellaunus

Guest
In this example:
Imports System.Math
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

Dim n As Integer
Dim f As Single

Chart1.ChartAreas(0).AxisX.Minimum = 0
Chart1.ChartAreas(0).AxisX.Maximum = 100
Chart1.ChartAreas(0).AxisY.Minimum = -100
Chart1.ChartAreas(0).AxisY.Maximum = 100
Chart1.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.SplineArea

For n = 0 To 100
f = 20 * Sin(0.1 * n)
If f > 0 Then
Me.Chart1.Series(0).Color = Color.Red
Else
Me.Chart1.Series(0).Color = Color.Blue
End If
Me.Chart1.Series(0).Points.AddXY(n, f)
Next

End Sub
End Class

1546017.pngwhy upper part is not red?

Continue reading...
 

Similar threads

V
Replies
0
Views
114
Vergassivellaunus
V
V
Replies
0
Views
152
Vergassivellaunus
V
V
Replies
0
Views
148
Vergassivellaunus
V
V
Replies
0
Views
92
Vergassivellaunus
V
V
Replies
0
Views
90
Vergassivellaunus
V
Back
Top