How do you use contour custom levels? I have looked at the example in
Contour_CustLev.cs and they way that it works seems messy. First it
draws a contour plot using automatic levels. Then to use custom levels
you turn off automatic levels then manually fill in the Levels values.
Is there a way to draw a contour plot straight off with custom levels
without drawing an automatic level plot first? The problem is that if you
try to assign your custom levels before drawing the plot the Levels
ArrayList has not been allocated. I have gotton this to work by setting
AutomaticLevels then changing the levels to custome levels in the
BeforeDrawValues event. That's extremely messy and cryptic. And I'm
not sure that my levels won't get overwritten anyway.
How do you use contour custom levels
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi -
The following code should be of help to you (the constructor in Contour_CustLev.cs):
This is because a number of important Contour/Custom3DPalette calculations are made internally as the chart is painted.First it
draws a contour plot using automatic levels. Then to use custom levels
you turn off automatic levels then manually fill in the Levels values.
Because of the above, the answer to this is yes and no. Yes a chart can be drawn straight off but no, it can't be done without painting the chart first.Is there a way to draw a contour plot straight off with custom levels without drawing an automatic level plot first?
The following code should be of help to you (the constructor in Contour_CustLev.cs):
Code: Select all
public Contour_Levels()
{
// This call is required by the Windows Form Designer.
InitializeComponent();
this.contour1.ColorEach = false;
this.contour1.FillSampleValues(20);
Bitmap bmp = tChart1.Bitmap; //do an "internal" repaint
this.contour1.AutomaticLevels = false;
AddCustomLevels();
}
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/