i would like to be able to control "when" bottom axis gridlines are drawn, such that they come out on "even" calendar intervals, eg 1st day of every month, Jan 1st of every year, etc. the particular "interval" would be controlled by user or application.
i am using TDateTime XValues, and BottomAxis.isDateTime = true.
thanks in advance.
BottomAxis gridlines at specific X-values?
Hi,
all grid lines are drawn automatically at specified chart axis increment. If you don't specify chart axis increment, TeeChart will internally calculate it and display axis labels (and grid lines) at every increment point.
Alternatively (if you're not happy with TChart's algorithm) you can use Chart OnGetAxisLabel and OnGetNextAxisLabel events to customize axis label values and axis label increment (and thus control gridlines), or add a custom axis labels on the bottom axis (there's an example of this in the TeeChart Pro v7 Demo Features project).
An alternative solution is to manually draw vertical gridlines in Chart OnAfterDraw event. Basically, use CalcPosValue method to calculate screen position for each line and then use MoveTo + LineTo combination to draw vertical line from ChartRect.Bottom to ChartRect.Top.
all grid lines are drawn automatically at specified chart axis increment. If you don't specify chart axis increment, TeeChart will internally calculate it and display axis labels (and grid lines) at every increment point.
Alternatively (if you're not happy with TChart's algorithm) you can use Chart OnGetAxisLabel and OnGetNextAxisLabel events to customize axis label values and axis label increment (and thus control gridlines), or add a custom axis labels on the bottom axis (there's an example of this in the TeeChart Pro v7 Demo Features project).
An alternative solution is to manually draw vertical gridlines in Chart OnAfterDraw event. Basically, use CalcPosValue method to calculate screen position for each line and then use MoveTo + LineTo combination to draw vertical line from ChartRect.Bottom to ChartRect.Top.
Pep Jorge
http://support.steema.com
http://support.steema.com