Hi
I'm trying to create a boxplot using some of the code from the examples.
But it causes me some problems. For sure just because I'm plain stupid )
Here is my code that does not give any box at all. I just get an empty teechart. It's VB:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Box1 As Steema.TeeChart.Styles.Box = New Steema.TeeChart.Styles.Box
Box1.UseCustomValues = True
Box1.Median = 50
Box1.Quartile1 = 30
Box1.Quartile3 = 60
' adjacent points are related with whisker lines
Box1.AdjacentPoint1 = 10 ' // lower whisker at 37
Box1.AdjacentPoint3 = 100 '; // upper whisker at 43
' using this all added points will be extreme outliers
Box1.InnerFence1 = 1
Box1.InnerFence3 = 5
Box1.OuterFence1 = 110
Box1.OuterFence3 = 130
TChart1.Series.Add(Box1)
TChart1.Legend.Visible = True
End Sub
What am I missing?
Thanks in advance
Lars Iversen
Boxplot How?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Lars,
This is because you need to add some points to the box-plot as shown in the All Features\Welcome !\Chart styles\Statistical\Box-Plot\Custom Values example at the features demo. You'll find the demo at TeeChart's program group.
Even you don't want to add any outliers to the box-plot you should, at least, add a null point to the series, for example:
BTW: You may be interested on reading a couple of recent threads about Box-Plot series, this may help you understanding better how this series works in TeeChart.
http://www.teechart.net/support/viewtopic.php?t=2599
http://www.teechart.net/support/viewtopic.php?t=5645
This is because you need to add some points to the box-plot as shown in the All Features\Welcome !\Chart styles\Statistical\Box-Plot\Custom Values example at the features demo. You'll find the demo at TeeChart's program group.
Even you don't want to add any outliers to the box-plot you should, at least, add a null point to the series, for example:
Code: Select all
Steema.TeeChart.Styles.Box box1 = new Steema.TeeChart.Styles.Box(tChart1.Chart);
box1.Clear();
box1.UseCustomValues = true;
box1.Median = 38;
box1.Quartile1 = 37.25;
box1.Quartile3 = 40.75;
// adjacent points are related with whisker lines
box1.AdjacentPoint1 = 37; // lower whisker at 37
box1.AdjacentPoint3 = 43; // upper whisker at 43
// using this all added points will be extreme outliers
box1.InnerFence1 = 39;
box1.InnerFence3 = 39;
box1.OuterFence1 = 39;
box1.OuterFence3 = 39;
// add outliers
//box1.Add(new float[4] { 35, 36, 44, 61 });
box1.Add();
http://www.teechart.net/support/viewtopic.php?t=2599
http://www.teechart.net/support/viewtopic.php?t=5645
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 |