Page 1 of 1

Custom Boxplot

Posted: Mon Apr 18, 2005 9:48 am
by 9525700
Hello

My understanding of UseCustomValues is that I can supply my own values and override any internal alogoritm.

What I am trying to achieve is to just supply the boxplot values(Mean ,Inner Quartile etc) without the need to provide an array of underlying data.

Is this possible ?

I have attempted it in the folowing code but nothing displays


AddSeries
BoxPlot


-----------------------------------------------------
Private Sub AddSeries()

With TChart1
.AddSeries scBox
.AddSeries scBox
.AddSeries scBox
End With
End Sub
------------------------------------------------------

Private Sub BoxPlot()
TChart1.Series(0).Name = "Box1"
TChart1.Series(0).Title = "Box1"
TChart1.Axis.Bottom.Labels.Add 0, "Box1"
With TChart1.Series(0).asBoxPlot
.UseCustomValues = True
.Position = 0

.Median = 15
.Quartile1 = 13
.Quartile3 = 17
.InnerFence1 = 12

.InnerFence3 = 18
.OuterFence1 = 10
.OuterFence3 = 20
'.AdjacentPoint1 = 0
'.AdjacentPoint3 = 7

End With
TChart1.Series(1).Name = "Box2"
TChart1.Series(1).Title = "Box2"
TChart1.Axis.Bottom.Labels.Add 1, "Box2"
With TChart1.Series(1).asBoxPlot
.Position = 1
.Box.Style = psDiamond
.UseCustomValues = True
.Median = 15
.Quartile1 = 13
.Quartile3 = 17
.InnerFence1 = 12
.InnerFence3 = 18
.OuterFence1 = 10
.OuterFence3 = 20
'.AdjacentPoint1 = 0
'.AdjacentPoint3 = 7

End With

TChart1.Series(2).Name = "Box3"
TChart1.Series(2).Title = "Box3"
TChart1.Axis.Bottom.Labels.Add 2, "Box3"
With TChart1.Series(2).asBoxPlot
.Position = 2
.Box.Style = psDiamond
.UseCustomValues = True
.Median = 15
.Quartile1 = 13
.Quartile3 = 17
.InnerFence1 = 12

.InnerFence3 = 18
.OuterFence1 = 10
.OuterFence3 = 20
'.AdjacentPoint1 = 0
'.AdjacentPoint3 = 7
End With
TChart1.Repaint

End Sub


I would be grateful for any assistance on this

regards
Andrew Dineen

Posted: Mon Apr 18, 2005 11:02 am
by narcis
Hello Andrew,

Which version are you using? It works fine here using v7.0.0.3 and the code as in the "Custom Values" example at the TeeChart features demo. You can find this example at the TeeChart program group, run the features demo and search for "custom values".

Posted: Mon Apr 18, 2005 2:34 pm
by 9525700
Thanks for your speedy response on this

I am using version 7.0.0.3 also

As you say the demo does work but only if the array vaues are submitted to the series using addarray.

If I remove this line

.Series(0).AddArray 8, MyArray

in the form_load event then the demo ceases to work for me.

It looks to me that I still need to provide the underlying data even though I am going to set the box values myself.

Forgive me if I am missing something very obvious here

regards
Andrew