Hi,
I have an application that will be using up to 14 charts to display fast line series of data.
Setting them up isnt a problem, however, the same 14 charts will be used by several different users in my company. Each user represents a different customer with charts that may be similiar to anothers but maybe 1 or 2 charts may be different. So I was thinking it may be best to allow the user to add/delete charts to panel in my app. That user of course would be able to set the series info for each chart. Where one customer may have 14 charts another may only need 13. I guess everything would be done dynamically which is doable but Im not sure what my easiest and best approach would be to solve this problem. I dont really want to hardcode or bake the amount of charts and their respective series into each chart.
How doable is this?
Has anyone done something similiar?
Also, we are currently using Excel for the charts on 1 sheet and the data on the other. Working with excel can be problematic and slow especially when printing each chart sheet out and the data is about 6-7 mbs. Id really like to move away from excel and allow the customer to get the chart and its corresponding format similiar to what they get in excel now....all electronically and printed charts. Ive done some dynamic charting with TeeChart before and the quality is awesome and easy to use, however this issue kind of throws a wrench into the works.
What to use to add the charts to on a form? Ive used panels with scroll bars previously to display 7 charts at a time. Is this the best/easiest route?
Thanks for any help.
Tom
Need Advice on best approach
Hi Tom,
if I understood, it should not be very difficult to accomplish.
As you said the best way I can think of would be to use a Panel with scroll where you can add the created Charts. To generate the Charts dinamically you can use similar code to the following :
In the case you don't know the Chart you need to create dinamically you could use an Array of TChart components, in this way you will be able to identifty everyone.
If you still having any question please do not hesitate to post it here and we'll try to help you.
if I understood, it should not be very difficult to accomplish.
As you said the best way I can think of would be to use a Panel with scroll where you can add the created Charts. To generate the Charts dinamically you can use similar code to the following :
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
pchart : TChart;
MySeries: TLineSeries;
begin
// Create the chart
pchart := TChart.Create(self);
// Put the chart on the form
pchart.Parent := TWinControl(Panel1);
// Position
pchart.Top := 140;
pchart.Left := 10;
// Create the series
MySeries:=TLineSeries.Create(Self);
// Populate the series
pchart.AddSeries(MySeries);
MySeries.FillSampleValues(10);
end;
If you still having any question please do not hesitate to post it here and we'll try to help you.
Pep Jorge
http://support.steema.com
http://support.steema.com