Page 1 of 1

Multiple Pies and Multiples Gauges ?

Posted: Mon Mar 02, 2009 3:15 pm
by 9341766
Hi,

I'm using TC Pro FullSource 7. I've some questions about pies and gauges.

* About Multiples Pies :
- Is this possible to add a "title" on each pie ? Or a text area which point out the meaning of each pie.

- How to specify spacing between two pies, or if they verticaly or horizontally stack ?

* About Gauges :
- Is this possible to draw multiples gauges (like pies) on the same chart ?
I've tried but they always appear at the same point and are stacked.



* Extra question :
On multi series charts, is this possible to have a non visible serie which stock all parameters and dispatch them on all my visibles series.


Thanks.

Posted: Mon Mar 02, 2009 4:09 pm
by narcis
Hi Wysu,
* About Multiples Pies :
- Is this possible to add a "title" on each pie ? Or a text area which point out the meaning of each pie.
Yes, this can be done as shown here.
- How to specify spacing between two pies, or if they verticaly or horizontally stack ?
It just depends on how you set ChartRect for each series as shown in the example above.
* About Gauges :
- Is this possible to draw multiples gauges (like pies) on the same chart ?
I've tried but they always appear at the same point and are stacked.
Yes, same as in the example above can be done.
* Extra question :
On multi series charts, is this possible to have a non visible serie which stock all parameters and dispatch them on all my visibles series.
I'm not sure to understand what do you mean here. Could you please give us some more details?

Thanks in advance.

Posted: Mon Mar 02, 2009 5:34 pm
by 9341766
Hi , many thanks for your answers.

About my extra question, it concerns ChartEditor :

If I have 4 series in my chart, when i use the Chart editor, i have to parameter each serie (marks or others properties.
For exemple :
Style : pyramid
size %bardepth 80
marks arrow length 0
marks arrows distance -25
... And I have to do for each series in chart editor)

My idea was to simplify chart editor : have an hidden serie on chart, but present in chart Editor, who can lead all my others series parameters.

Posted: Tue Mar 03, 2009 9:48 am
by narcis
Hi Wysu,

Yes, you can create such series in the chart editor, in the Chart -> Series tab use the "Clone" button for creating as many series as you wish with this series style and make this series not visible in the chart disabling its checkbox.

Hope this helps!

Posted: Wed Mar 04, 2009 1:31 pm
by 9341766
Hi, thanks for previous answers.

I've a again a question about multiple pies.
I've tried your solution it works fine but something annoys me. It's visible in your example application :

Image

It seems that the two first (top) pies are bottom aligned whereas the 2 last (botom) pies are top aligned.

My questions :
Is it possible to define alignement in Chartrect ?
What is used to draw pies in chartrect ? center or top-left of the pie?

My aim was to center pies in their chartrect and not crush Chart.Canvas.TextOut that I add after ...

Thanks

Posted: Wed Mar 04, 2009 4:23 pm
by yeray
Hi Wysu,

I think that this alignment is a visual effect, because is you set the chart to be 2D and you make the marks not visible, you can see how the 4 pies fill their whole defined ChartRect.

In any case, you always can change the ChartRect of each pie to look more "aligned" adding some "extra margin". For example:

Code: Select all

const extraMargin1 = 10;
extramargin2 = 30;
//...
procedure TPieMultiple.Series1BeforeDrawValues(Sender: TObject);
begin
  Chart1.ChartRect:=Rect(extraMargin1,extraMargin1,Chart1.Width div 2 - extraMargin1, Chart1.Height div 2 - extraMargin2);
end;

procedure TPieMultiple.Series2BeforeDrawValues(Sender: TObject);
begin
  Chart1.ChartRect:=Rect(Chart1.Width div 2 + extraMargin1, extraMargin1, Chart1.Width - extraMargin1, Chart1.Height div 2 - extraMargin2);
end;

procedure TPieMultiple.Series3BeforeDrawValues(Sender: TObject);
begin
  Chart1.ChartRect:=Rect(extraMargin1,Chart1.Height div 2 + extraMargin2,Chart1.Width div 2 - extraMargin1, Chart1.Height - extraMargin1);
end;

procedure TPieMultiple.Series4BeforeDrawValues(Sender: TObject);
begin
  Chart1.ChartRect:=Rect(Chart1.Width div 2 + extraMargin1, Chart1.Height div 2 + extraMargin2, Chart1.Width - extraMargin1, Chart1.Height - extraMargin1);
end;