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 1922 - rotated axis labels mis-place axis title
Summary: rotated axis labels mis-place axis title
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Axes (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-25 06:47 EDT by christopher ireland
Modified: 2018-04-09 11:33 EDT (History)
1 user (show)

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


Attachments
NET result (13.95 KB, image/png)
2017-09-25 06:47 EDT, christopher ireland
Details
VCL result (19.02 KB, image/png)
2017-09-25 06:51 EDT, christopher ireland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description christopher ireland 2017-09-25 06:47:56 EDT
Created attachment 784 [details]
NET result

compare this code:

    private void InitializeChart()
    {
      Bar series = new Bar(tChart1.Chart);
      tChart1.Legend.Visible = false;

      for (int i = 0; i < 3; i++)
      {
        if(i == 2)
          series.Add(i, "Quite Long Category threethreethree");
        else 
          series.Add(i, "Quite Long Category " + i.ToString());
      }

      int degrees = 10;
      tChart1.Axes.Bottom.Labels.Angle = degrees;
      tChart1.Axes.Bottom.Title.Text = $"X-Axis labels with Angle of {degrees} degrees";
    }

to the equivalent in TeeChart.VCL:

procedure TForm1.InitChart;
var series:TBarSeries;
    t:Integer;
begin
  Chart.View3D:=false;
  series:=TBarSeries.Create(Self);
  series.ParentChart:=Chart;
  Chart.Legend.Visible:=false;

  for t:=0 to 2 do
  begin
    if t=2 then
      series.AddBar(t, 'Quite Long Category ' + 'threethreethreethree', clBlue)
    else
      series.AddBar(t, 'Quite Long Category ' + IntToStr(t), clBlue);
  end;

  Chart.Axes.Bottom.LabelsAngle:=10;
  Chart.Axes.Bottom.Title.Text:='X-Axis labels with Angle of 10 degrees';
end;

(see attachment for difference in result - in .NET the axis title is placed at a unnecessarily large distance from the bottom axis labels)
Comment 1 christopher ireland 2017-09-25 06:51:28 EDT
Created attachment 785 [details]
VCL result