Please try below the code
the point chart color should be blue right?
but is showing red color.
TChart.Series.Add(New Steema.TeeChart.Styles.Bar)
TChart.Series(0).FillSampleValues(6)
TChart.Series(0).Color = Color.Blue
TChart.Series(0).ColorEach = False
Dim objChartStyle As New Steema.TeeChart.Styles.Points
TChart.Series(0).ChangeType(TChart.Series(0), objChartStyle.GetType)
Point sytle color problem
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Cliven,
You should use the code below to achieve what you request. Notice that using next TeeChart for .NET v2 releases you will be able to remove the last line as commented.
You should use the code below to achieve what you request. Notice that using next TeeChart for .NET v2 releases you will be able to remove the last line as commented.
Code: Select all
Private Bar1 As Steema.TeeChart.Styles.Bar
Private Points1 As Steema.TeeChart.Styles.Points
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Bar1 = New Steema.TeeChart.Styles.Bar(TChart.Chart)
For i As Integer = 0 To 10
Bar1.Add(Rnd(100), Color.Blue)
Next
Bar1.Color = Color.Blue
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim S As Steema.TeeChart.Styles.Series = Bar1
Dim T As System.Type = GetType(Steema.TeeChart.Styles.Points)
Steema.TeeChart.Styles.Series.ChangeType(S, T)
Points1 = TChart.Series(0)
Points1.Color = Bar1.Color 'this line won't be necessary in the next v2 release.
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |