TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
hansw
- Newbie
- Posts: 3
- Joined: Tue Jul 26, 2016 12:00 am
Post
by hansw » Mon Aug 08, 2016 12:25 pm
Hello,
when the chart title position is left justified or right justified then the position on print is wrong. If the position is left justified then the chart title text is not readable (truncated).
For example: Use the following code
Code: Select all
Chart1->Title->Alignment = taLeftJustify;
Chart1->Title->TextAlignment = taLeftJustify;
Chart1->Title->Text->Clear();
Chart1->Title->Text->Add(L"Chart Title Line 1");
Chart1->Title->Text->Add(L"Chart Title Line 2");
to have two chart title lines which are left justified. Then use the ChartPreviewer component to print the chart => only small parts of the chart title is printed.
- Screenshot of the chart printed to a PDF
- TChart-Test2.png (38.21 KiB) Viewed 15459 times
The attached project is for C++Builder 10.1 Berlin using TeeChart Pro 2016.18.
Is there a workaround for this bug?
With best regards
Hans
-
Attachments
-
- TChart-Test2.zip
- Example project to reproduce the issue
- (6.83 KiB) Downloaded 663 times
-
Sandra
- Site Admin
- Posts: 3132
- Joined: Fri Nov 07, 2008 12:00 am
Post
by Sandra » Tue Aug 09, 2016 10:50 am
Hello Hans,
The problem is caused so the Text aren't drawn in the print area, therefore I would like suggest you modify the print area margins, so the titles can be drawn without problems.
To do this, you should add the lines below in the Print button:
Code: Select all
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Chart1->PrintProportional =false;
Chart1->PrintMargins =Rect(2, 5, 2, 5);
ChartPreviewer1->Execute();
}
Also, I have attached the project you sent me, with the modified code.
Hoping this helps you
Thanks in advance,
-
hansw
- Newbie
- Posts: 3
- Joined: Tue Jul 26, 2016 12:00 am
Post
by hansw » Tue Aug 09, 2016 12:49 pm
Hello Sandra,
thank you for the quick reply. Your solution works also for the real application. However, I would see the solution as workaround because in the print preview the title is always displayed within the margins. And the chart title left position is in line with the left axis title. So there is no reason for the chart title text to be truncated in the print output.
With best regards
Hans
-
Sandra
- Site Admin
- Posts: 3132
- Joined: Fri Nov 07, 2008 12:00 am
Post
by Sandra » Wed Aug 10, 2016 12:38 pm
Hello Hans,
Seems the problem is caused for the print Orientation. We're investigating where is the problem. Meanwhile, I would suggest you modify the print area margins or enable the Smoothed options before print.
Thanks in advance
-
hansw
- Newbie
- Posts: 3
- Joined: Tue Jul 26, 2016 12:00 am
Post
by hansw » Thu Aug 11, 2016 7:31 am
Hello Sandra,
I will stay with the modification of the print area margins, the print output looks "pixelated" if the "Smoothed" option is turned on.
Regards
Hans
-
Sandra
- Site Admin
- Posts: 3132
- Joined: Fri Nov 07, 2008 12:00 am
Post
by Sandra » Thu Aug 11, 2016 11:35 am
Good afternoon Hans,
Finally, after doing some test, I have decided add the problem you are experiencing in the
TeeChartVCL bugzilla tracker to fix the problem to upcoming versions. Here's the problem:
http://bugs.teechart.net/show_bug.cgi?id=1595
Feel free to add your mail to the CC list of the other tickets to be automatically notified when they'll be updated.
Thanks in advance,
-
JRadke
- Newbie
- Posts: 10
- Joined: Mon Oct 31, 2016 12:00 am
Post
by JRadke » Wed Jan 04, 2017 2:02 pm
Hi Sandra,
is there meanwhile a solution available ?
I have the same problem with printing my charts:
The ChartPreview is oK, but on the printer the title text will be truncated in case the alignment of the title is taLeftJustify.
Even if I change it to taRightJustify the position of the text seems not to be exactly on the right side.
Kind regards
Juergen
-
Yeray
- Site Admin
- Posts: 9614
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Thu Jan 05, 2017 10:10 am
Hello Juergen,
Have you tried the workaround Sandra suggested
above?
-
JRadke
- Newbie
- Posts: 10
- Joined: Mon Oct 31, 2016 12:00 am
Post
by JRadke » Thu Jan 12, 2017 9:15 am
Hello Yeray,
sorry for my late answer.
Yes, the workaround solves the problem.
Accidentally I've tried it with
instead of
That was the reason it seemed not working.
Thank you.