Hello,
I have a chartgrid connected to a chart. When I show the grid for the first time I only see one line with y values without any x values.
When I use a chart editor connected to the chart and go to the data tab and change any value in the grid then the chartgrid updates to the grid shown in the chart editor.
Another thing that's not working : If I clear the series of the chart en reload them with new values, the chartgrid doesn't change to the new values.
If I use the chart editor again en change a value in the grid then the chartgrid changes also.
How can I solve this strange behaviour.
Regards,
Marcel Horsthuis
Chartgrid doesn't change after reloading series.
-
- Newbie
- Posts: 7
- Joined: Tue May 10, 2016 12:00 am
Re: Chartgrid doesn't change after reloading series.
Hello Marcel,
However, it gets updated if I force it to recalculate its rows&columns with RecalcDimensions:
You can force the XValues to be shown in the TChartGrid:Marcel Horsthuis wrote: I have a chartgrid connected to a chart. When I show the grid for the first time I only see one line with y values without any x values.
Code: Select all
ChartGrid1.ShowXValues:=cgsYes;
Isn't this the behaviour to expect?Marcel Horsthuis wrote:When I use a chart editor connected to the chart and go to the data tab and change any value in the grid then the chartgrid updates to the grid shown in the chart editor.
I see the ChartGrid isn't updated when I clear the series values or when I add values to the series:Marcel Horsthuis wrote:Another thing that's not working : If I clear the series of the chart en reload them with new values, the chartgrid doesn't change to the new values.
If I use the chart editor again en change a value in the grid then the chartgrid changes also.
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
Chart1[0].Clear;
end;
procedure TForm1.Button2Click(Sender: TObject);
var i: Integer;
begin
for i:=0 to 2 do
Chart1[0].Add(100 + (random*100));
end;
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
Chart1[0].Clear;
ChartGrid1.RecalcDimensions;
end;
procedure TForm1.Button2Click(Sender: TObject);
var i: Integer;
begin
for i:=0 to 2 do
Chart1[0].Add(100 + (random*100));
ChartGrid1.RecalcDimensions;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 7
- Joined: Tue May 10, 2016 12:00 am
Re: Chartgrid doesn't change after reloading series.
Hello Yeray
Thank you for your solution It works!
I couldn't find it in the documentation.
Marcel
Thank you for your solution It works!
I couldn't find it in the documentation.
Marcel