Adding custom contour levels

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
lilo
Newbie
Newbie
Posts: 62
Joined: Wed Sep 07, 2011 12:00 am

Adding custom contour levels

Post by lilo » Wed Sep 14, 2011 11:24 pm

I need to add custom contour levels to a contour chart.

I am using the following code:

For i = 0 To ContLevels
Dim ContLevelsVal2 = New Steema.TeeChart.Styles.ContourLevel(ContLevelsVal(i), i)
.Levels.Add(ContLevelsVal2)
Next i

or
.Levels.Add(20)
.Levels.Add(25)

This code does not work

lilo
Newbie
Newbie
Posts: 62
Joined: Wed Sep 07, 2011 12:00 am

Re: Adding custom contour levels

Post by lilo » Thu Sep 15, 2011 8:11 am

This code worked:

Dim i As Integer
With .Levels
.Capacity = ContLevels
For i = 0 To ContLevels - 1
.Item(i).UpToValue = ContLevelsVal(i)
Next i
End With

Thanks,

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Adding custom contour levels

Post by Sandra » Thu Sep 15, 2011 10:03 am

Hello lilo,

Ok. I am glad that you can find a solution for your problem. And also I recommend take a look in demo project, concretely in the example All Features\Welcome !\Chart styles\Extended\Contour\Custom Levels, so I think can help you, too.

Thanks,
Best Regards,
Sandra Pazos / 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