Boxplot
Posted: Wed Jan 28, 2004 1:54 pm
I have attempted to use the UseCustomValues := True but the boxplots are never right (the whiskers are incorrectly drawn). Here is the code I used in simple tryouts (Delphi 6, & TeeChart version 6.01 pro):
I create a new application and stick a chart on Form1 with one boxplot series:
-------------------------------------------------------------------------------
unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TeEngine, Series, TeeBoxPlot, ExtCtrls, TeeProcs, Chart;
type
TForm1 = class(TForm)
Chart1: TChart;
Series1: TBoxSeries;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
With Series1 do
begin
Clear;
AddArray([10,12,13,15,17,23,26,35,50]);
UseCustomValues := True;
Median := 17;
Quartile1 := 13;
Quartile3 := 26;
InnerFence1 := -6.5;
InnerFence3 := 45.5;
OuterFence1 := -26;
OuterFence3 := 65;
AdjacentPoint1 := 10;
AdjacentPoint3 := 35;
end;
end;
end.
---------------------------------------------------------------
I would be very grateful if somewhat would indicate what is wrong here and how to correct it ... and end the frustration this is causing!
I create a new application and stick a chart on Form1 with one boxplot series:
-------------------------------------------------------------------------------
unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TeEngine, Series, TeeBoxPlot, ExtCtrls, TeeProcs, Chart;
type
TForm1 = class(TForm)
Chart1: TChart;
Series1: TBoxSeries;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
With Series1 do
begin
Clear;
AddArray([10,12,13,15,17,23,26,35,50]);
UseCustomValues := True;
Median := 17;
Quartile1 := 13;
Quartile3 := 26;
InnerFence1 := -6.5;
InnerFence3 := 45.5;
OuterFence1 := -26;
OuterFence3 := 65;
AdjacentPoint1 := 10;
AdjacentPoint3 := 35;
end;
end;
end.
---------------------------------------------------------------
I would be very grateful if somewhat would indicate what is wrong here and how to correct it ... and end the frustration this is causing!