how to add series in run time into frxChartView
Hi,
I add series in run time and series count is also increased.
Finally there is a blank chart on report.
Is it possible to add series in run time into frxChartView on fast report?
Any help is highly appreciated.
void TFormMain::DisplayRptForceCurveChart(TfrxChartView *CtrlChart)
{
TFastLineSeries * series1;
series1 = new TFastLineSeries(this);
double dValue,dMax;
CtrlChart->Chart->AddSeries(series1);
if (iRptIndex >= 0)
{
qsData = (QSTATA_DATA *)OrdDataList->GetData(iRptIndex);
if (qsData)
{
top = qsData->TimeInterval.ToInt() / double(1000);
dMax = 0.0;
dValue = ValToAbsForce_2(qsData->PFSignature->Strings[0].ToInt(), (TForceUnit)fuN, fNCapacity, ADC_16_BITS, fFactor);
series1->AddXY(0,ConvertFUnit(dValue),"",(TColor)clTeeColor );
for (i=1; i<500; i++)
{
dValue = ValToAbsForce_2(qsData->PFSignature->Strings.ToInt(), (TForceUnit)fuN, fNCapacity, ADC_16_BITS, fFactor);
series1->AddXY(i*top,ConvertFUnit(dValue),"",(TColor)clTeeColor );
if (dValue > dMax)
dMax = dValue;
}
}
}
if (dTargetPF > dMax)
dMax = dTargetPF;
int m = dMax + dMax*0.05;
CtrlChart->Chart->LeftAxis->SetMinMax(0,m);
}
Best Regards,
Ni Ni
I add series in run time and series count is also increased.
Finally there is a blank chart on report.
Is it possible to add series in run time into frxChartView on fast report?
Any help is highly appreciated.
void TFormMain::DisplayRptForceCurveChart(TfrxChartView *CtrlChart)
{
TFastLineSeries * series1;
series1 = new TFastLineSeries(this);
double dValue,dMax;
CtrlChart->Chart->AddSeries(series1);
if (iRptIndex >= 0)
{
qsData = (QSTATA_DATA *)OrdDataList->GetData(iRptIndex);
if (qsData)
{
top = qsData->TimeInterval.ToInt() / double(1000);
dMax = 0.0;
dValue = ValToAbsForce_2(qsData->PFSignature->Strings[0].ToInt(), (TForceUnit)fuN, fNCapacity, ADC_16_BITS, fFactor);
series1->AddXY(0,ConvertFUnit(dValue),"",(TColor)clTeeColor );
for (i=1; i<500; i++)
{
dValue = ValToAbsForce_2(qsData->PFSignature->Strings.ToInt(), (TForceUnit)fuN, fNCapacity, ADC_16_BITS, fFactor);
series1->AddXY(i*top,ConvertFUnit(dValue),"",(TColor)clTeeColor );
if (dValue > dMax)
dMax = dValue;
}
}
}
if (dTargetPF > dMax)
dMax = dTargetPF;
int m = dMax + dMax*0.05;
CtrlChart->Chart->LeftAxis->SetMinMax(0,m);
}
Best Regards,
Ni Ni
Comments
I recently got send the code block
when I asked a similar question, I am currently trying to figure out the print/view part, but I hope this helps you get started