How to set line's color to black?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Chris.CHWU
Newbie
Newbie
Posts: 57
Joined: Wed Jan 30, 2008 12:00 am

How to set line's color to black?

Post by Chris.CHWU » Wed Jul 02, 2008 3:20 am

When I add one line to TChart,and set it color with black.
It will looks like the orange color.

But, if set series.Color = Color.Red . It will show the red color.

Code: Select all

        Dim series As New Steema.TeeChart.Styles.Line
        Dim dMin, dMax As Double
        Me.TChart1.Axes.Left.CalcMinMax(dMin, dMax)
        series.Add(5, dMin)
        series.Add(5, dMax)
        series.Color = Color.Black
        Me.TChart1.Series.Add(series)
How to set line's color to black?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jul 02, 2008 8:44 am

Hi Chris,

You should try creating series like this:

Code: Select all

        Dim series As New Steema.TeeChart.Styles.Line(TChart1.Chart)
And comment in this line:

Code: Select all

        'Me.TChart1.Series.Add(series)
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Chris.CHWU
Newbie
Newbie
Posts: 57
Joined: Wed Jan 30, 2008 12:00 am

Post by Chris.CHWU » Wed Jul 02, 2008 9:40 am

Thanks for your quick response.

Code: Select all

        Dim series As New Steema.TeeChart.Styles.Line(TChart1.Chart)
        'Dim series As New Steema.TeeChart.Styles.Line
        Dim dMin, dMax As Double
        Me.TChart1.Axes.Left.CalcMinMax(dMin, dMax)
        series.Add(5, dMin)
        series.Add(5, dMax)
        series.Color = Color.Black
        'Me.TChart1.Series.Add(series)
The line's color is black. But, if add some codes below.

Code: Select all

        Dim series As New Steema.TeeChart.Styles.Line(TChart1.Chart)
        'Dim series As New Steema.TeeChart.Styles.Line
        Dim dMin, dMax As Double
        Me.TChart1.Axes.Left.CalcMinMax(dMin, dMax)
        series.Add(5, dMin)
        series.Add(5, dMax)
        series.Color = Color.Black
        'Me.TChart1.Series.Add(series)
        TChart1.Series.Groups.Add("GRP1")
        TChart1.Series.Groups.FindByName("GRP1", True).Series.Add(series)
It shows the orange.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jul 02, 2008 9:45 am

Hi Chris,

In that case you can use this:

Code: Select all

        Dim series As New Steema.TeeChart.Styles.Line(TChart1.Chart)
        'Dim series As New Steema.TeeChart.Styles.Line
        Dim dMin, dMax As Double
        dMin = 5
        dMax = 15
        Me.TChart1.Axes.Left.CalcMinMax(dMin, dMax)
        series.Add(5, dMin)
        series.Add(15, dMax)
        'series.Color = Color.Black
        'Me.TChart1.Series.Add(series)
        TChart1.Series.Groups.Add("GRP1")
        TChart1.Series.Groups.FindByName("GRP1", True).Series.Add(series)
        TChart1.Series.Groups.FindByName("GRP1", True).Series.Item(0).Color = Color.Black
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply