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]);
Problem supressing x-axis labels
Re: Problem supressing x-axis labels
Hi,
If I understood well, you probably achieve it setting your bottom axis LabelStyle to talValue:
Or maybe with talPointValue, depending on the exact configuration. If this doesn't help, please try to arrange a simple example project we can run as-is to reproduce the situation here.
If I understood well, you probably achieve it setting your bottom axis LabelStyle to talValue:
Code: Select all
Chart1.Axes.Bottom.LabelStyle:=talValue;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Problem supressing x-axis labels
mine was set to "auto". I changed it to Value and it seems to look right now... i'll do more testing, but this looks like the piece i missed. thanks!
Re: Problem supressing x-axis labels
Hi,
I'm glad to hear it solved the problem!
I'm glad to hear it solved the problem!
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |