How to add data in TfrxChartVew by code
johnnix
Serrai, Greece
Greetings to all,
Can anyone please share some code on how to add data values on a Chart object by code?
Thank you very much for your time
Can anyone please share some code on how to add data values on a Chart object by code?
Thank you very much for your time
Comments
assuming you have created a series in the chart object and selected fixed data type
Chart completion from Script
leave empty XValues and YValues fields in chart editor. In report script obp event of chart object write the following:
begin
Chart1.SeriesData[0].XSource := 'January;February;Маrch;ÐÑ€ril';
Chart1.SeriesData[0].YSource := '31;28;31;30';
end.
SeriesData[0] in this case allows us to set parameters for the first series in the chart. If chart has several series, you can address them via SeriesData[data_number].