PDF export screwed-up chart
-
- Newbie
- Posts: 10
- Joined: Thu Mar 06, 2014 12:00 am
PDF export screwed-up chart
Hi,
I try to export a TeeChart to a pdf-file. The chart is from the template gallerie, the Concentric Donuts. After export, the chart is screwed-up. At the pdf-file, there are only the marks from the chart but no chart. Please can you help me?
sincerely yours
Peter
I try to export a TeeChart to a pdf-file. The chart is from the template gallerie, the Concentric Donuts. After export, the chart is screwed-up. At the pdf-file, there are only the marks from the chart but no chart. Please can you help me?
sincerely yours
Peter
Re: PDF export screwed-up chart
Hi Peter,
The concentric Donuts Template doesn't look as the one you posted above for me here.
Here it is how it looks for me:
And here it is the pdf I get with this code:
As an alternative, you could print the chart with a virtual pdf printer:
The concentric Donuts Template doesn't look as the one you posted above for me here.
Here it is how it looks for me:
And here it is the pdf I get with this code:
Code: Select all
uses Series, TeePDFCanvas;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
Chart1.Title.Caption:='Concentric Donuts';
for i:=0 to 2 do
with Chart1.AddSeries(TPieSeries) as TPieSeries do
begin
FillSampleValues(4);
Marks.Hide;
MultiPie:=mpConcentric;
end;
TeeSaveToPDFFile(Chart1, 'C:\tmp\Chart1.pdf');
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 10
- Joined: Thu Mar 06, 2014 12:00 am
Re: PDF export screwed-up chart
Hi Yeray,
you are right, it looks a bit different but I use the concentric Donuts Template. I like to show the values as 100-perscent-columns, the middle of the circle is 100%. So I use the concentric Donuts and give all values the same width. Then I set the color of the values from outer (0%) to inner (100%) of the circle. What chart-type can I use as alternative to my solution? The new Rose Series show the values from inner circle to outer circle and use polar coordinates, but I need free scaling for the circle, not 360°.
Have you an idea what chart type better fit my needs?
Kind regards
Peter
you are right, it looks a bit different but I use the concentric Donuts Template. I like to show the values as 100-perscent-columns, the middle of the circle is 100%. So I use the concentric Donuts and give all values the same width. Then I set the color of the values from outer (0%) to inner (100%) of the circle. What chart-type can I use as alternative to my solution? The new Rose Series show the values from inner circle to outer circle and use polar coordinates, but I need free scaling for the circle, not 360°.
Have you an idea what chart type better fit my needs?
Kind regards
Peter
Re: PDF export screwed-up chart
Hello Peter,
I've been trying to do a demo using the Rose series. I found some issues but I one problem I can't find how to workaround: some circle labels seem not to be drawn depending on the number of values.
On the other hand, we'd be pleased to investigate the problem exporting the concentric pies, but we'd need a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
I've been trying to do a demo using the Rose series. I found some issues but I one problem I can't find how to workaround: some circle labels seem not to be drawn depending on the number of values.
On the other hand, we'd be pleased to investigate the problem exporting the concentric pies, but we'd need a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 10
- Joined: Thu Mar 06, 2014 12:00 am
Re: PDF export screwed-up chart
Hello Yeray,
here is al little sample projekt about my problem.
By the way, an other problem is the positioning of the marks. I set the Marks on the most outer series, but the width of the serie is so big, that some other series are covered. I use curious parameters for the marks-arrow as workaround. Is there an other way in my case to fix the width of the outer serie independently from the marks? Kind regards
Peter
here is al little sample projekt about my problem.
By the way, an other problem is the positioning of the marks. I set the Marks on the most outer series, but the width of the serie is so big, that some other series are covered. I use curious parameters for the marks-arrow as workaround. Is there an other way in my case to fix the width of the outer serie independently from the marks? Kind regards
Peter
Re: PDF export screwed-up chart
Hi Peter,
However, it seems to work fine if I print the chart using a virtual pdf printer, instead of exporting the chart to a pdf.
Exporting to a pdf file works better than with the TPieSeries, but not perfect: the labels in the main chart disappear. However, printing the chart with a virtual pdf printer also works fine:
I could reproduce the problem with your project when exporting the chart to a pdf.peterlepan wrote:here is al little sample projekt about my problem.
By the way, an other problem is the positioning of the marks. I set the Marks on the most outer series, but the width of the serie is so big, that some other series are covered. I use curious parameters for the marks-arrow as workaround. Is there an other way in my case to fix the width of the outer serie independently from the marks?
However, it seems to work fine if I print the chart using a virtual pdf printer, instead of exporting the chart to a pdf.
I've corrected the example above and this seems to work better.Yeray wrote:I've been trying to do a demo using the Rose series. I found some issues but I one problem I can't find how to workaround: some circle labels seem not to be drawn depending on the number of values.
Exporting to a pdf file works better than with the TPieSeries, but not perfect: the labels in the main chart disappear. However, printing the chart with a virtual pdf printer also works fine:
Code: Select all
uses TeePDFCanvas;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
with Chart1.AddSeries(TRoseSeries) as TRoseSeries do
begin
Pointer.Visible:=false;
Pen.Visible:=false;
Color:=clWhite;
CircleBackColor:=RGB(0,0,128);
GetHorizAxis.Grid.Visible:=false;
GetVertAxis.Grid.Visible:=false;
GetHorizAxis.MinorTicks.Visible:=false;
CircleLabelsRotated:=true;
LabelsMargin:=10;
OnGetCircleLabel:=roseGetCircleLabels;
end;
Chart1.Axes.Visible:=false;
TrackBar1.Max:=200;
TrackBar1.Min:=10;
TrackBar1.Position:=29;
TrackBar1.Frequency:=10;
end;
procedure TForm1.recalcAngles;
var i: Integer;
begin
with Chart1[0] as TRoseSeries do
begin
for i:=0 to Count-1 do
AngleValue[i]:=i*360/Count;
AngleIncrement:=(AngleValue[1]-AngleValue[0]) / 2;
end;
end;
procedure TForm1.roseGetCircleLabels(Sender:TCustomPolarSeries; const Angle:Double; Index:Integer;
var Text:String);
var i: Integer;
begin
Text:='';
with Chart1[0] as TRoseSeries do
for i:=0 to Count-1 do
if Round(Angle-AngleIncrement)=Round(AngleValue[i]) then
Text:=Labels[i];
end;
procedure TForm1.TrackBar1Change(Sender: TObject);
var i, tmpValue: Integer;
begin
with Chart1[0] as TRoseSeries do
begin
Clear;
for i:=0 to TrackBar1.Position-1 do
begin
tmpValue:=Round(random*100);
AddPolar(tmpValue, tmpValue, IntToStr(tmpValue));
end;
recalcAngles;
end;
Label1.Caption:='Num Values: ' + IntToStr(TrackBar1.Position);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 10
- Joined: Thu Mar 06, 2014 12:00 am
Re: PDF export screwed-up chart
Hi Yeray,
your sample works fine, but I have one problem. I need to show the values from outer to inner. The outer of the circle is 0% and the center of the circle stands for 100%. If I show the difference to 100% with the rose-serie, I see no chance to change the color for a single value from outer to inner. These color is set with the CircleBackColor.
Oh, I have an idea! I use a second rose-serie to set the color of my single values!
Thank your for your inspiration!
Best regards
Peter
your sample works fine, but I have one problem. I need to show the values from outer to inner. The outer of the circle is 0% and the center of the circle stands for 100%. If I show the difference to 100% with the rose-serie, I see no chance to change the color for a single value from outer to inner. These color is set with the CircleBackColor.
Oh, I have an idea! I use a second rose-serie to set the color of my single values!
Thank your for your inspiration!
Best regards
Peter
-
- Newbie
- Posts: 10
- Joined: Thu Mar 06, 2014 12:00 am
Re: PDF export screwed-up chart
Hi Yeray,
only one question, how can I put the labels in the foreground? I have the labels taken in the inner of the circle, but some of them are invisible because they are covered from the rose-serie.
Have you a solution for this problem? Best regards
Peter
only one question, how can I put the labels in the foreground? I have the labels taken in the inner of the circle, but some of them are invisible because they are covered from the rose-serie.
Have you a solution for this problem? Best regards
Peter
Re: PDF export screwed-up chart
Hi Peter,
I'm glad to be helpful!
Great!peterlepan wrote:Oh, I have an idea! I use a second rose-serie to set the color of my single values!
Thank your for your inspiration!
I'm glad to be helpful!
There's a property for that:peterlepan wrote:only one question, how can I put the labels in the foreground? I have the labels taken in the inner of the circle, but some of them are invisible because they are covered from the rose-serie.
Have you a solution for this problem?
Code: Select all
Series1.CircleLabelsInside:=false;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 10
- Joined: Thu Mar 06, 2014 12:00 am
Re: PDF export screwed-up chart
Hi Yeray,
the rose serie has a cleaner look then the concentric donuts. But I have one Problem. I like to put the labels inside the circle, to save some space around the chart. If the labels-text get a bit longer then 3 numbers, the labels on the left side are not symmetric positioned to the labels on the right side: The labels loose the assignment to its chart-values.
If I put the marks at the concentric donuts inside the circle, I nearly get a circle: Each segment get its right label.
Is there an option at the rose serie, to position the labels in the circle without loosing the assignment to the values?
Best regards
Peter
the rose serie has a cleaner look then the concentric donuts. But I have one Problem. I like to put the labels inside the circle, to save some space around the chart. If the labels-text get a bit longer then 3 numbers, the labels on the left side are not symmetric positioned to the labels on the right side: The labels loose the assignment to its chart-values.
If I put the marks at the concentric donuts inside the circle, I nearly get a circle: Each segment get its right label.
Is there an option at the rose serie, to position the labels in the circle without loosing the assignment to the values?
Best regards
Peter
Re: PDF export screwed-up chart
Hi Peter,
I've added a few new tickets to the public tracker:
- Rounded/Circled Segments in the TRoseSeries
- Improve labels in TRoseSeries
- White space between the slices in concentric Pie/Donut
I've added a few new tickets to the public tracker:
- Rounded/Circled Segments in the TRoseSeries
- Improve labels in TRoseSeries
- White space between the slices in concentric Pie/Donut
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 10
- Joined: Thu Mar 06, 2014 12:00 am
Re: PDF export screwed-up chart
Hi Yeray,
I see a new version of TeeChart, have you put some improvements to the rose-serie? (especially labels?)
Best regards
Peter
I see a new version of TeeChart, have you put some improvements to the rose-serie? (especially labels?)
Best regards
Peter
Re: PDF export screwed-up chart
I'm afraid not yet, Peter.peterlepan wrote:I see a new version of TeeChart, have you put some improvements to the rose-serie? (especially labels?)
I've incremented the priority of the ticket Improve labels in TRoseSeries
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: PDF export screwed-up chart
sorry for the minor threadjack, am not sure how to upvote for features, but would like to add an enthusiastic vote for moving "Rounded/Circled Segments in the TRoseSeries" up the priority list. thank you! (if it will be part of the Xamarin.Forms release, too...)
Re: PDF export screwed-up chart
Hello,
http://bugs.teechart.net/show_bug.cgi?id=1132
Feel free to add your mail to the CC list of any ticket to be automatically notified when an update arrives.
Added to .NET Xamarin.Forms:jdom wrote:sorry for the minor threadjack, am not sure how to upvote for features, but would like to add an enthusiastic vote for moving "Rounded/Circled Segments in the TRoseSeries" up the priority list. thank you! (if it will be part of the Xamarin.Forms release, too...)
http://bugs.teechart.net/show_bug.cgi?id=1132
Feel free to add your mail to the CC list of any ticket to be automatically notified when an update arrives.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |