Recent

Author Topic: Always show last point Mark on BottomAxis  (Read 3398 times)

kapibara

  • Hero Member
  • *****
  • Posts: 610
Always show last point Mark on BottomAxis
« 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?
Lazarus trunk / fpc 3.2.2 / Kubuntu 22.04 - 64 bit

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: Always show last point Mark on BottomAxis
« Reply #1 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?

kapibara

  • Hero Member
  • *****
  • Posts: 610
Re: Always show last point Mark on BottomAxis
« Reply #2 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.  
Lazarus trunk / fpc 3.2.2 / Kubuntu 22.04 - 64 bit

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: Always show last point Mark on BottomAxis
« Reply #3 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