Problem supressing x-axis labels
Posted: Wed Feb 22, 2012 6:19 am
I have a chart that trends some bar data by date and in addition i add an additional series of bars to represent some calendar dates of interest (myBarSeries). They show up just fine on the chart, but have a bottom x-axis label problem when these co-exist with the data in the the other series. Essentially i want to keep the dates (i.e. mm/dd/yyyy) on the bottom axis and label the calendar events on the bar itself which the code below does very nicely. The problem is I also end up getting bottom x-axis labels as well but instead of labeling with the date, i see the "label" as provided which when mixed with the dates, makes for a real mess. I can't seem to find the right options to suppress the x-axis labeling while keeping labels on the bar (marks on bar)? any ideas?
myBarSeries := TBarSeries.Create(nil);
myBarSeries.Title := 'Calendar Events';
myBarSeries.XValues.DateTime := true;
myBarSeries.Marks.Visible := true;
myBarSeries.BarPen.Width := 2;
myBarSeries.Color := clyellow;
myBarSeries.MarksOnBar := true;
myBarSeries.Marks.Angle := 90;
myBarSeries.Marks.Transparent := true;
myBarSeries[b].ShowInLegend := true;
yMax := chartData.Axes.Left.Maximum;
if yMax = 0 then
yMax := 1;
while not qryEventData.Eof do
begin
myBarSeries[b].AddXY(qryEventData['start_date'], yMax, qryEventData['event_type'] );
qryEventData.Next;
end;
chartData.AddSeries(myBarSeries[b]);
myBarSeries := TBarSeries.Create(nil);
myBarSeries.Title := 'Calendar Events';
myBarSeries.XValues.DateTime := true;
myBarSeries.Marks.Visible := true;
myBarSeries.BarPen.Width := 2;
myBarSeries.Color := clyellow;
myBarSeries.MarksOnBar := true;
myBarSeries.Marks.Angle := 90;
myBarSeries.Marks.Transparent := true;
myBarSeries[b].ShowInLegend := true;
yMax := chartData.Axes.Left.Maximum;
if yMax = 0 then
yMax := 1;
while not qryEventData.Eof do
begin
myBarSeries[b].AddXY(qryEventData['start_date'], yMax, qryEventData['event_type'] );
qryEventData.Next;
end;
chartData.AddSeries(myBarSeries[b]);