The axis labelling algorithm of TAChart is highly automatic and sometimes hard to understand, in particular if you have particular requirements of the axis labels. There is some control by modifiying the Intervals subproperties of the axis. But all these modifications will not work in general, only under certain condtions: taazz suggested that increasing the Intervals.MaxLength avoids the fractional labels. This is true, but if you increase the chart, or if you zoom into the chart, the decimals places will be back.
In my experience the automatic label finding routine does not work if you have special requirments in mind. In these cases I would provide a TListChartsource which contains only the values at which labels will be drawn. Then you can put the logics of how you want the labels to be placed into the code populating the ListChartsource.
This ChartSource must be linked to the Marks.Source of the axis.
You say you count some quantities, and you want the labels to be at integers only. Then you could populate the ListChartSource (named "LabelsSource") like this:
procedure TForm1.PopulateAxisLabels;
var
ex: TDoubleRect;
y, y1, dy: Integer;
begin
// Erase old labels
LabelsSource.Clear;
// Get axis range
ex := Chart1.LogicalExtent;
// "small" axis range --> Place labels at every integer
if (ex.b.y - ex.a.y < 20) then // the value 20 is just a guess
dy := 1 // label distance = 1
else
if (ex.b.y - ex.a.y < 40) then
dy := 2 // label every other integer
else
if (ex.b.y - ex.a.y < 100) then
dy := 5 // label every 5th integer
else
dy := 10;
// Calculate first label to "fit" to the label distance, i.e. if label increment
// dy is 5 then the first label should be a multiple of 5 to avoid labels such
// as 1, 6, 11, 16...
y1 := (trunc(ex.a.y) div dy) * dy;
// Now create the labels:
// Begin at the first label
y := y1;
while y < ex.b.y + dy do begin // ex.b.y is the axis maximum
// Add label to ListChartSource
LabelsSource.Add(y,y);
// Add labels increment the current label position to find the next label
y := y + dy;
end;
end;
This procedure takes care of the axis range and selects a small label increment at a small axis range and increases it when the axis extent increases. Call this in the Chart's OnExtentChange or OnExtentChanging event.
In the attachment there's a worked-out example of this idea.