How to draw Polar Series using Custom Axes
How to draw Polar Series using Custom Axes
I do not find any examples of Polar Series based on the Custom Axes, and I want to know how the Radius Axis and Angle Axis work. Could you help me, please?
Re: How to draw Polar Series using Custom Axes
Hello,
The Circled don't support Custom axes.
The Vertical Axis is used to draw the Circular Grid Rings, and the Horizontal Axis is used to draw the Angle lines, Ticks, MinorTicks and Labels.
The Circled don't support Custom axes.
The Vertical Axis is used to draw the Circular Grid Rings, and the Horizontal Axis is used to draw the Angle lines, Ticks, MinorTicks and Labels.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: How to draw Polar Series using Custom Axes
When the Polar Series are drawn using the Custom Axes, How to draw the cross axes from the center of circle area? Just like the default TChart using the LeftAxis, RightAxis, TopAxis and BottomAxis. Thanks!
Re: How to draw Polar Series using Custom Axes
Alternatively,is there an appropriate method to draw radius Labels?
Re: How to draw Polar Series using Custom Axes
Hello,
I'm not sure to understand you. Could you please arrange a simple example project showing what are you exactly doing and some screenshot showing what are you trying to achieve?
Thanks in advance.
I'm not sure to understand you. Could you please arrange a simple example project showing what are you exactly doing and some screenshot showing what are you trying to achieve?
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: How to draw Polar Series using Custom Axes
1. A PolarSeries Chart is drawn without radial labels (Fig.1). How to draw the titles and labels of LeftAxis, RightAxis, TopAxis and BottomAxis (Fig.2)?
2. Two PolarSeries Charts are drawn in pairs with one TeeCommander (Fig.3), and I can control one of the two Charts alternately by setting the TeeCommander.Panel. Is it possible to synchronously control both of them with one TeeCommander? I want to take the two Charts as one Chart, and zoom, copy, save them together.
Thanks.
2. Two PolarSeries Charts are drawn in pairs with one TeeCommander (Fig.3), and I can control one of the two Charts alternately by setting the TeeCommander.Panel. Is it possible to synchronously control both of them with one TeeCommander? I want to take the two Charts as one Chart, and zoom, copy, save them together.
Thanks.
- Attachments
-
- Fig3.jpg (253.63 KiB) Viewed 26947 times
-
- Fig2.jpg (165.28 KiB) Viewed 26947 times
-
- Fig1.jpg (83.97 KiB) Viewed 26946 times
Re: How to draw Polar Series using Custom Axes
Hello,
Re 1.
The Axis Labels ... Titles, may be shown by adding the text in this way:
The same for Top, Right and Bottom.
Re 2.
A TeeCommander can only control one Chart at a time. It can be changed at runtime by setting the teeCommander.Panel property. To copy zoom settings across charts it may be easiest to do that via the OnAfterDraw eventy of the Chart that the Commander is related to. You can use the Axes' SetMinMax method to copy new Axis Min and Max to the second Chart and can make other modifications in the same way.
To copy and save there are other techniques available, you can 'draw' charts to locations on a common canvas if you wish to drive two charts separately. Alternatively add subcharts to the first chart and the Chart Canvas will control the main chart and subcharts simultaneously for save & copy.
See the Chart Tools, SubChart tool examples in the TeeChart example demo for a visual demonstration.
Regards,
Marc Meumann
Re 1.
The Axis Labels ... Titles, may be shown by adding the text in this way:
Code: Select all
Chart1.Axes.Left.Title.Text := 'my left axis';
Re 2.
A TeeCommander can only control one Chart at a time. It can be changed at runtime by setting the teeCommander.Panel property. To copy zoom settings across charts it may be easiest to do that via the OnAfterDraw eventy of the Chart that the Commander is related to. You can use the Axes' SetMinMax method to copy new Axis Min and Max to the second Chart and can make other modifications in the same way.
To copy and save there are other techniques available, you can 'draw' charts to locations on a common canvas if you wish to drive two charts separately. Alternatively add subcharts to the first chart and the Chart Canvas will control the main chart and subcharts simultaneously for save & copy.
See the Chart Tools, SubChart tool examples in the TeeChart example demo for a visual demonstration.
Regards,
Marc Meumann
Steema Support
Re: How to draw Polar Series using Custom Axes
Thank you for your advice. I use the TSubChartTool, and it works. However, the first chart always locates at the center of the Panel, although I try to set its Width, ChartRect.SetLocation and (ChartRect.Left, ChartRect.Right).
I hope that the two charts would be horizontally arranged, do not overlap, and have the same sizes. Could you please help me?
Best Regards.
I hope that the two charts would be horizontally arranged, do not overlap, and have the same sizes. Could you please help me?
Best Regards.
- Attachments
-
- PolarChart.zip
- (6.74 KiB) Downloaded 1106 times
Re: How to draw Polar Series using Custom Axes
Hello,
You can set the ChartRect before rendering the Series. For example, using this event for the first Chart Series would move it over to the left half:
The ChartRect has left space for labels (30 pixels each side) within the 500x500 half chart area.
The second series could be set in a subchart as you have done and positioned as discussed here: http://www.teechart.net/support/viewtop ... =3&t=16773. For my test project I added the second Polar Series to the main chart at designtime to make it easier to setup the BeforeDrawValues at designtime, then assigned the Series to the SubChart.
Designtime image with two series in chart plus subchart: At runtime it looks like this: I attach the modified project.
Regards,
Marc
You can set the ChartRect before rendering the Series. For example, using this event for the first Chart Series would move it over to the left half:
Code: Select all
procedure TForm1.Series1BeforeDrawValues(Sender: TObject);
begin
TheChart.ChartRect:=Rect( 30, 30, 470, 470);
end;
The second series could be set in a subchart as you have done and positioned as discussed here: http://www.teechart.net/support/viewtop ... =3&t=16773. For my test project I added the second Polar Series to the main chart at designtime to make it easier to setup the BeforeDrawValues at designtime, then assigned the Series to the SubChart.
Designtime image with two series in chart plus subchart: At runtime it looks like this: I attach the modified project.
Regards,
Marc
- Attachments
-
- PolarChartSubChart.zip
- (54.16 KiB) Downloaded 1045 times
Steema Support
Re: How to draw Polar Series using Custom Axes
Yes, Your modified project works fine. However, how to use the BeforeDrawValues procedure to set the ChartRect’s properties, if the PolarSeries are dynamically created?
Re: How to draw Polar Series using Custom Axes
Hello,
You can assign the dynamic series' event dynamically to the existing event method if you've already created it for an existing series and it's generic (ie. how it acts upon 'sender') or to a new method of your own (with the same parameters).
eg.
Regards,
Marc
You can assign the dynamic series' event dynamically to the existing event method if you've already created it for an existing series and it's generic (ie. how it acts upon 'sender') or to a new method of your own (with the same parameters).
eg.
Code: Select all
procedure TForm2.Button3Click(Sender: TObject);
begin
mySeries.BeforeDrawValues := Series1BeforeDrawValues;
end;
procedure TForm2.Series1BeforeDrawValues(Sender: TObject);
begin
//my code .. do something with Sender
end;
Marc
Steema Support
Re: How to draw Polar Series using Custom Axes
There are two Charts (Original Chart and TSubChartTool.Charts[0].Chart) and a TeeCommander. The TeeCommander always handles with the Original Chart. In order to move and zoom the two Charts, respectively, how to make the TeeCommander to alternately control one of the two Charts?
- Attachments
-
- PolarChart.zip
- (7.35 KiB) Downloaded 1038 times
Re: How to draw Polar Series using Custom Axes
Hello,
As noted here ,http://www.teechart.net/support/viewtop ... 764#p74584, You need to direct the TeeCommander to the Chart you require to modify at the moment you wish to do so.
ie.
You can then switch it back to the first Chart by resetting the Panel property. Alternatively, use two TeeCommanders.
Regards,
Marc
As noted here ,http://www.teechart.net/support/viewtop ... 764#p74584, You need to direct the TeeCommander to the Chart you require to modify at the moment you wish to do so.
ie.
Code: Select all
TeeCommander1.Panel := ChartTool1.Charts[0].Chart;
Regards,
Marc
Steema Support