Coming back to your program: Did you follow the input with the unitialized FdubDTTime[0]? This originates in the line "for n:=1 to Ffutmaxbars do ..." of Tstdchartfrm.SetGraphXaxisArray22 where n := 0 is not used.
Moreover, there is another missing assignment for the index 0 in TForm1.makeXaxarray. Here "mm" is set to 0, and later incremented by 1 ("mmm:=mmm+1") before a value is assigned to "FDTXAxarr1[mmm]", i.e. FDTXAxarr1[0] is never touched. And in the before-mentioned SetGraphXaxisArray22 this array serves as the source for FdubDTTime.
I had discovered this also and corrected it.The testproject must be completely in line with the application i am developing .It could easily be that these issues may be the reason for the strange errors i got there.I must check that first and otherwise rewrite the test project.
with regard to the very special requirements i have an idea.
In the way you normally would set up an x-axis it is likely very compllicated.
But you already showed a way to come around it by having an overlap and a delta calculation procedure(see your code in the former thread).
I am thinking of extending the use of the xaxisarrays in my setXaxisarray procedure.There we could prepare label arrays for Timechartsource and Datechartsource per "nice step".This done once per session.
We know which labels we want and and where they need to be located.
Irregular opening times are now taken already care of , because the arrays are based on the real minutes.
The total theoretical pixel length of of all the labels together can be calculated .Together with the current extent of the chart we can calculate max number of minutes( xaxisarrays are minutes) per "nice step ",which are allowed to be shown on the xaxis .( datelabels are to be based on the smallest day in the arrays)
ps instead of having separate arrays may be you can have Timechartsource1,Timechartsource2,...etc,. I don't know what is easier.
This could also be a general approach like with histograms were you can have arbitrary text per bar( i don't know how that is done in lazarus)
But for the moment leave it,because i cannot react in the coming days and i will check my program first
frederic