Lazarus

Programming => Graphics and Multimedia => TAChart => Topic started by: kapibara on February 03, 2017, 10:51:34 pm

Title: Always show last point Mark on BottomAxis
Post by: kapibara on February 03, 2017, 10:51:34 pm
As in topic, how to make sure to always show the last point Mark/Label on BottomAxis?
Title: Re: Always show last point Mark on BottomAxis
Post by: wp on February 03, 2017, 11:28:44 pm
I think this is not possible in the most general case because the x label of the last data point will most probably overlap with the previous label. These questions come to my mind: What is the x range? Is it fixed, or can it change? Are the x values date/time numbers? Are the x values equally spaced?
Title: Re: Always show last point Mark on BottomAxis
Post by: kapibara on February 04, 2017, 07:45:38 am
The x range can change because you might zoom. X value is the integer in a loop so X is equally spaced. Bottomaxis marks are set manually with the aDateString variable below:

Code: Pascal  [Select][+][-]
  1. for i:=0 to Count -1 do
  2.   OHLCSeries.AddXOHLC(i, ylist[0], ylist[1], ylist[2], ylist[3], aDateString);
  3.  
Title: Re: Always show last point Mark on BottomAxis
Post by: wp on February 04, 2017, 11:06:52 am
Could you post a sample project for me to play with? Maybe also with an edited screenshot to show exactly what you want to achieve.
TinyPortal © 2005-2018