Incorrect axis area size when title using html

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Technicon
Newbie
Newbie
Posts: 43
Joined: Thu Aug 11, 2016 12:00 am
Contact:

Incorrect axis area size when title using html

Post by Technicon » Wed Jul 05, 2017 12:06 pm

Hello

Incorrect axis area size (height) when title using html (Build 2017.22.170619)

Here Is a simple example

Code: Select all

__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
	Chart1->View3D = false;

	TLineSeries* pTLineSeries1 = new TLineSeries(Chart1);
	Chart1->AddSeries(pTLineSeries1);
	pTLineSeries1->FillSampleValues(50);
	pTLineSeries1->XValues->DateTime=true;

	Chart1->BottomAxis->Title->Text = "Line 1<BR>Line 2";
	Chart1->BottomAxis->Title->TextFormat = ttfHtml;
	Chart1->BottomAxis->Title->Transparent = false;
	Chart1->BottomAxis->Title->Angle = 0;
	Chart1->BottomAxis->DateTimeFormat = "c";
	Chart1->BottomAxis->LabelsMultiLine = true;
	Chart1->BottomAxis->ExactDateTime = true;
	Chart1->BottomAxis->Increment = DateTimeStep[dtFifteenMinutes];
	Chart1->BottomAxis->ResizeChart = true;

	TChartAxis* pTChartAxis = Chart1->CustomAxes->Add();
	pTChartAxis->Horizontal = true;
	pTChartAxis->Title->Text = "Line 1<BR>Line 2";
	pTChartAxis->Title->TextFormat = ttfHtml;
	pTChartAxis->Title->Transparent = false;
	pTChartAxis->Title->Angle = 0;
	pTChartAxis->DateTimeFormat = "c";
	pTChartAxis->LabelsMultiLine = true;
	pTChartAxis->ExactDateTime = true;
	pTChartAxis->Increment = DateTimeStep[dtFifteenMinutes];
	pTChartAxis->ResizeChart = true;

	TLineSeries* pTLineSeries2 = new TLineSeries(Chart1);
	Chart1->AddSeries(pTLineSeries2);
	pTLineSeries2->FillSampleValues(50);
	pTLineSeries2->XValues->DateTime=true;
	pTLineSeries2->HorizAxis = aCustomHorizAxis;
	pTLineSeries2->CustomHorizAxis = pTChartAxis;
}
View before zoom
beforeZoom.png
beforeZoom.png (19.98 KiB) Viewed 5553 times
View after zoom
AfterZoom.png
AfterZoom.png (14.86 KiB) Viewed 5553 times
I also have question how to get regular and custom axis areas size when one have to manage axis position from code (ResizeChart = false)).

Best Regards,
Grzegorz

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Incorrect axis area size when title using html

Post by Yeray » Tue Jul 11, 2017 12:49 pm

Hello Grzegorz,

I've reproduced the problem so I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1889

Thanks for reporting it.
Technicon wrote:I also have question how to get regular and custom axis areas size when one have to manage axis position from code (ResizeChart = false)).
Take a look a the PlaceAxes method I implemented for a customer some time ago here.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply