Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 1233 - Histogram series with a single values makes wrong axis range
Summary: Histogram series with a single values makes wrong axis range
Status: RESOLVED NOTABUG
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- critical
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-10 06:14 EDT by christopher ireland
Modified: 2016-04-07 05:45 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description christopher ireland 2015-06-10 06:14:28 EDT
Use the following code to reproduce:

procedure TForm1.InitializeChart;
var t : Integer;
var tmp : TChartValue;
begin
   Chart1.View3D:=false;
   Chart1.AddSeries(THistogramSeries);
   Chart1.AddSeries(THistogramSeries);

   For t:=0 To 24 do
      Chart1[0].Add(t);
   begin
   end;

   tmp:= Chart1[0].MaxYValue + 1;
   Chart1[0].Add(tmp);
   Chart1[1].Add(tmp);
end;

this is similar, but not identical to, the .NET ticket:
http://bugs.teechart.net/show_bug.cgi?id=1232
Comment 1 narcís calvet 2016-04-07 05:45:44 EDT
This issue can be fixed by the addition of null points, e.g.:

uses StatChar;

procedure TForm1.FormCreate(Sender: TObject);
var t : Integer;
var tmp : TChartValue;
begin
   Chart1.View3D:=false;
   Chart1.AddSeries(THistogramSeries);
   Chart1.AddSeries(THistogramSeries);

   For t:=0 To 24 do
   begin
      Chart1[0].Add(t);
      Chart1[1].AddNull('');
   end;

   tmp:= Chart1[0].MaxYValue + 1;
   Chart1[0].Add(tmp);
   Chart1[1].Add(tmp);
end;