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
why upper part is not red?
Continue reading...
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
why upper part is not red?
Continue reading...