Reputation: 316
Using C++Builder 10.2 (Tokyo), I'm creating an Area chart via TeeChart. Creating the chart however, is not the problem. The problems I'm trying to solve is
I cannot seem to find a way to stop the bottom axis from incrementing. By this, I mean that I have EXACT dates that I want to plot, not a range of dates. For example, point 1 might be 04/01/2017 and point 2 might be 06/01/2017, but the TeeChart automatically creates a point for 05/01/2017 - which I don't want. Also, it doesn't place a label for 06/01/2017.
Is there a way to add empty space between the area series?
Upvotes: 0
Views: 343
Reputation: 5039
I cannot seem to find a way to stop the bottom axis from incrementing. By this, I mean that I have EXACT dates that I want to plot, not a range of dates. For example, point 1 might be 04/01/2017 and point 2 might be 06/01/2017, but the TeeChart automatically creates a point for 05/01/2017 - which I don't want. Also, it doesn't place a label for 06/01/2017.
You can try setting the bottom axis LabelStyle
to talPointValue
:
Chart1->Axes->Bottom->LabelStyle = talPointValue;
Is there a way to add empty space between the area series?
You can add a dummy (empty) TAreaSeries
between two series to create that separation in the Depth axis. Ie, in Delphi:
procedure TForm1.FormCreate(Sender: TObject);
var i, j, n: Integer;
tmpSeries: TChartSeries;
begin
for i:=0 to 4 do
with Chart1.AddSeries(TAreaSeries) do
begin
Title:='Series' + IntToStr(i+1);
FillSampleValues;
end;
n:=Chart1.SeriesCount-1;
j:=1;
for i:=0 to n-1 do
begin
tmpSeries:=Chart1.AddSeries(TAreaSeries);
tmpSeries.ShowInLegend:=False;
while Chart1.SeriesList.IndexOf(tmpSeries) > j do
Chart1.SeriesUp(tmpSeries);
Inc(j, 2);
end;
end;
Upvotes: 0