xlsgen > overview > Smooth

 


Example : Input (blue) and Output (yellow) signals

 

Chart smooth is a unique chart in xlsgen for reducing rapid changes in data.

xlsgen recalculates the data by using a low-pass filter, that is, by filtering out high frequencies.

The low-pass filter has an alpha parameter, exposed in the xlsgen object model as a custom chart property, whose default value is 0,7. The value of this parameter governs how smooth is the output. The value must be between 0 and 1. It gets smoother with a value towards 1.

It is very simple to create such a chart :

C++ code
xlsgen::IXlsChartPtr chart = worksheet->NewChart(xlsgen::charttype_smooth, 4, 3, 18, 8);
xlsgen::IXlsChartDynamicDataSourceSeriesPtr serie001 = chart->DynamicDataSource->AddSerie();
serie001->SeriesValuesFormula = L"Sheet1!$C$3:$C$99";
chart->CustomProperties->LowPassFilterAlpha = 0.7;
chart->CustomProperties->ReplaceSeries = FALSE;

 

xlsgen documentation. © ARsT Design all rights reserved.