Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Tchart - How to draw marks every X point ?


This question is answered.


Permlink Replies: 2 - Last Post: Oct 16, 2017 7:08 AM Last Post By: Jose Silva Threads: [ Previous | Next ]
Jose Silva

Posts: 18
Registered: 11/1/11
Tchart - How to draw marks every X point ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 15, 2017 4:50 PM
Hi , I'm using Tchart V2016. 17.160129. 32bit VCL in Dephi Tokyo 10.2 update 1, I need to draw marks for the Series[1] of Tline chart , at every X point according to the number of total points.

I know in advance the total number of X values that the bottom axis (X) will have, lets call this N .

I want to set up during run-time the series[1] "draw every" property .

Given "N" as above , I want to determine draweverypoint := Round(N / "certain number") ;

Could you help me on that ?

Thanks in advance !

JRG
Yeray Alonso

Posts: 68
Registered: 6/12/11
Re: Tchart - How to draw marks every X point ?
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 16, 2017 6:26 AM   in response to: Jose Silva in response to: Jose Silva
Hello Jose,

Jose Silva wrote:
Hi , I'm using Tchart V2016. 17.160129. 32bit VCL in Dephi Tokyo 10.2 update 1, I need to draw marks for the Series[1] of Tline chart , at every X point according to the number of total points.

I know in advance the total number of X values that the bottom axis (X) will have, lets call this N .

I want to set up during run-time the series[1] "draw every" property .

Given "N" as above , I want to determine draweverypoint := Round(N / "certain number") ;

Could you help me on that ?

Have you tried using the Marks.DrawEvery property? Ie:

var N: Integer;
const nMarks=5;
begin
  Series1.Marks.Visible:=True;
 
  N:=Series1.Count;
  Series1.Marks.DrawEvery:=N div nMarks;
end;


--
Best Regards,

Yeray Alonso
Steema Software
Facebook, Twitter, GPlus, LinkedIn, YouTube, GitHub, RSS
Support Options
Jose Silva

Posts: 18
Registered: 11/1/11
Re: Tchart - How to draw marks every X point ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 16, 2017 7:08 AM   in response to: Yeray Alonso in response to: Yeray Alonso
Hi Yeray,

great ! It has helped a lot , solved my issue.

Thank you .

Yeray Alonso wrote:
Hello Jose,

Jose Silva wrote:
Hi , I'm using Tchart V2016. 17.160129. 32bit VCL in Dephi Tokyo 10.2 update 1, I need to draw marks for the Series[1] of Tline chart , at every X point according to the number of total points.

I know in advance the total number of X values that the bottom axis (X) will have, lets call this N .

I want to set up during run-time the series[1] "draw every" property .

Given "N" as above , I want to determine draweverypoint := Round(N / "certain number") ;

Could you help me on that ?

Have you tried using the Marks.DrawEvery property? Ie:

var N: Integer;
const nMarks=5;
begin
  Series1.Marks.Visible:=True;
 
  N:=Series1.Count;
  Series1.Marks.DrawEvery:=N div nMarks;
end;


--
Best Regards,

Yeray Alonso
Steema Software
Facebook, Twitter, GPlus, LinkedIn, YouTube, GitHub, RSS
Support Options
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02