candle width scaling

TeeChart FireMonkey (Windows,OSX,iOS & Android) for Embarcadero RAD Studio, Delphi and C++ Builder (XE5+)
Post Reply
n2n
Newbie
Newbie
Posts: 19
Joined: Mon Nov 23, 2015 12:00 am

candle width scaling

Post by n2n » Wed Dec 09, 2015 8:14 am

Two Questions:

1. We are having candle series (or any other series) which users are able to zoom in and out, the problem is when user is zooming for example in candle series CandleWidth property will not scale to the correct value, Please have a look at screenshot, we need to scale candles to be smaller when we are zooming out and bigger when zoom in, any idea how?

2. each of our series types need to be associated with a volume series, but volume Y values are much higher than the main series, at first we used custom axis to achieve this the problem was we wanted our main series and volume series to be in same axis not different, so we thinking we can use BeforeDrawValues of volume series to manipulate Y values of volume before drawing to scale them correctly with our main series Y values. any other better approach?

3. when we compile our project in Windows its fairly fast when it comes to drawing charts, but the performance is not very good in osx, even an empty chart is very slow and not smooth for even resizing and quite laggy. how can we increase chart performance on osx?
Attachments
candle.PNG
candle.PNG (5.01 KiB) Viewed 13475 times

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

Re: candle width scaling

Post by Yeray » Wed Dec 09, 2015 11:57 am

Hello,
n2n wrote:1. We are having candle series (or any other series) which users are able to zoom in and out, the problem is when user is zooming for example in candle series CandleWidth property will not scale to the correct value, Please have a look at screenshot, we need to scale candles to be smaller when we are zooming out and bigger when zoom in, any idea how?
Have you tried to manually calculate and change the candle width at the OnZoom/OnUndoZoom events?
n2n wrote:2. each of our series types need to be associated with a volume series, but volume Y values are much higher than the main series, at first we used custom axis to achieve this the problem was we wanted our main series and volume series to be in same axis not different, so we thinking we can use BeforeDrawValues of volume series to manipulate Y values of volume before drawing to scale them correctly with our main series Y values. any other better approach?
I understand you have two series with a very different range of values, but I'm not sure to understand how would you like to represent them.
Could you please arrange a simple example project we can run as-is to reproduce the problem here and some screenshot indicating what would you expect to obtain?
n2n wrote:3. when we compile our project in Windows its fairly fast when it comes to drawing charts, but the performance is not very good in osx, even an empty chart is very slow and not smooth for even resizing and quite laggy. how can we increase chart performance on osx?
The simple example below seems to respond well to zoom and scroll operations in a Mac OSX X 10.11.1:

Code: Select all

uses FMXTee.Series.Candle;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=false;
  Chart1.Legend.Visible:=false;

  Chart1.AddSeries(TCandleSeries).FillSampleValues();
end;
Could you please arrange a simple example project we can run as-is to reproduce the problem here?

Thanks in advance.
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

n2n
Newbie
Newbie
Posts: 19
Joined: Mon Nov 23, 2015 12:00 am

Re: candle width scaling

Post by n2n » Thu Dec 10, 2015 8:15 am

for the candlewidth on zoom i already handle it in OnZoom event, i was looking for a better way though ...
about the multiple series with different Y values, i have Series A which is candlesticks and maximum Y is 100, and i have Series B which is Volume series and Y values can go up to 1000000, normally TChart will scale my Y axis to highest value, which in this case is too much, and i want my volume series to be scaled down to be visible at the bottom of my chart like image attached, i tried using a different axis to achieve this which works but i want them both in same y axis.
Attachments
scale.PNG
scale.PNG (4.83 KiB) Viewed 13416 times

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

Re: candle width scaling

Post by Yeray » Thu Dec 10, 2015 8:29 am

Hello,
n2n wrote:i have Series A which is candlesticks and maximum Y is 100, and i have Series B which is Volume series and Y values can go up to 1000000, normally TChart will scale my Y axis to highest value, which in this case is too much, and i want my volume series to be scaled down to be visible at the bottom of my chart like image attached, i tried using a different axis to achieve this which works but i want them both in same y axis.
Have you tried assigning one of the series to use the right axis? Ie:

Code: Select all

Series2.VertAxis:=aRightAxis;
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

n2n
Newbie
Newbie
Posts: 19
Joined: Mon Nov 23, 2015 12:00 am

Re: candle width scaling

Post by n2n » Thu Dec 10, 2015 9:21 am

I just rather to use a custom axis for that then, i could do it like this, but i wanted to be able to have them both on same axis which it seems to be impossible. thanks anyway

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

Re: candle width scaling

Post by Yeray » Thu Dec 10, 2015 11:23 am

Hi,
n2n wrote:I just rather to use a custom axis for that then, i could do it like this, but i wanted to be able to have them both on same axis which it seems to be impossible. thanks anyway
Having two series, A with values between 0-100 and B with values between 0-1000000, both linked to a unique vertical axis, how would you expect to be represented? An image could help to understand it.
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