Watch, Follow, &
Connect with Us

Welcome, Guest
Guest Settings
Help

Thread: TChart and TVolumeSeries


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Jan 3, 2017 12:36 AM Last Post By: oleg palchik Threads: [ Previous | Next ]
oleg palchik

Posts: 2
Registered: 12/1/03
TChart and TVolumeSeries  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 28, 2016 4:52 AM
TVolumeSeries has a property Pointer is the same as for TPointSeries.
However, to individually set the width of the "stick" (size) failed. Whether a random artifact, or imperfection... or I'm not using.

If anybody had experience with TVolumeSeries?
Yeray Alonso

Posts: 60
Registered: 6/12/11
Re: TChart and TVolumeSeries  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 2, 2017 6:44 AM   in response to: oleg palchik in response to: oleg palchik
Hello,

oleg palchik wrote:
TVolumeSeries has a property Pointer is the same as for TPointSeries.

The TVolumeSeries has a Pointer property because it inherits from TCustomSeries and this class defines the Pointer property as public, but one of the things the TVolumeSeries does at its constructor is Pointer.Hide, so it isn't used in it.

oleg palchik wrote:
However, to individually set the width of the "stick" (size) failed. Whether a random artifact, or imperfection... or I'm not using.

This isn't supported by default with the TVolumeSeries. However, you can always inherit from it and override its DrawValue method to do what you wish in it. Ie:

type TMyVolumeSeries=class(TVolumeSeries)
  protected
    procedure DrawValue(ValueIndex:Integer); override;
end;
 
procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=False;
  Chart1.Legend.Visible:=False;
 
  with Chart1.AddSeries(TMyVolumeSeries) as TMyVolumeSeries do
  begin
    FillSampleValues(10);
    YOrigin:=0;
  end;
end;
 
procedure TMyVolumeSeries.DrawValue(ValueIndex:Integer);
begin
  ParentChart.Canvas.Pen.Width:=(ValueIndex+1) mod 3;
 
  inherited;
end;


--
Best Regards,

Yeray Alonso
Steema Software
Facebook, Twitter, GPlus, LinkedIn, YouTube, GitHub, RSS
Support Options
oleg palchik

Posts: 2
Registered: 12/1/03
Re: TChart and TVolumeSeries  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 3, 2017 12:36 AM   in response to: Yeray Alonso in response to: Yeray Alonso
Thank you for help
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02