XEROF

 

xlsgen 4.0.0.85 : Mutiple trendlines


Build 4.0.0.85 of xlsgen makes it possible to add more than one trendline to a series of data. Before this build, for 3 series of data there could be at most 3 trendlines attached to them, so up to 6 lines in total.


One series of data and 4 trendlines attached to it (moving averages with different parameters)

This works for XLS and XLSX/XLSB files.

And here is how to code it :


xlsgen::IXlsWorkbookPtr wbk = engine->Open( L"input\\EURUSD1.csv", L"multiple_trendlines.xlsx" );

xlsgen::IXlsChartPtr chart = wbk->WorksheetByIndex[1]->NewChart(xlsgen::charttype_line2D,
1, //row1
2, //col1
28, //row2
15 //col2
);

xlsgen::IXlsChartDynamicDataSourcePtr datasource001s0 = chart->DynamicDataSource;

xlsgen::IXlsChartDynamicDataSourceSeriesPtr serie001s0ss0 = datasource001s0->AddSerie();
serie001s0ss0->SeriesValuesFormula = L"=R1C3:R100C3";
chart->SeriesByIndex[1]->TrendLines[1]->Show = xlsgen::charttrendline_movingaverage;
chart->SeriesByIndex[1]->TrendLines[1]->MovingAveragePeriods = 5;
chart->SeriesByIndex[1]->TrendLines[1]->Options->Type = xlsgen::chartbordertype_custom;
chart->SeriesByIndex[1]->TrendLines[1]->Options->Color = 0x4040C0;
chart->SeriesByIndex[1]->TrendLines[2]->Show = xlsgen::charttrendline_movingaverage;
chart->SeriesByIndex[1]->TrendLines[2]->MovingAveragePeriods = 10;
chart->SeriesByIndex[1]->TrendLines[2]->Options->Type = xlsgen::chartbordertype_custom;
chart->SeriesByIndex[1]->TrendLines[2]->Options->Color = 0xC04040;
chart->SeriesByIndex[1]->TrendLines[3]->Show = xlsgen::charttrendline_movingaverage;
chart->SeriesByIndex[1]->TrendLines[3]->MovingAveragePeriods = 20;
chart->SeriesByIndex[1]->TrendLines[3]->Options->Type = xlsgen::chartbordertype_custom;
chart->SeriesByIndex[1]->TrendLines[3]->Options->Color = 0x40C040;
chart->SeriesByIndex[1]->TrendLines[4]->Show = xlsgen::charttrendline_movingaverage;
chart->SeriesByIndex[1]->TrendLines[4]->MovingAveragePeriods = 40;
chart->SeriesByIndex[1]->TrendLines[4]->Options->Type = xlsgen::chartbordertype_custom;
chart->SeriesByIndex[1]->TrendLines[4]->Options->Color = 0xA040A0;


chart->XAxis[xlsgen::chartaxis_primary]->Scale->ItemsBetweenTickMarkLabels = 10;

wbk->Close();


Posted on 24-March-2017 11:38 | Category: xlsgen, Excel generator | comment[0] | trackback[0]

 

 

<-- previous page

< July >
0102030405
0607080910
1112131415
1617181920
2122232425
2627282930
31



 

 

This site
Home
Articles

DevTools
CPU-Z
EditPlus
ExplorerXP
Kill.exe
OllyDbg
DependencyWalker
Process Explorer
autoruns.exe
Araxis
COM Trace injection
CodeStats
NetBrute
FileMon/Regmon
BoundsChecker
AQTime profiler
Source monitor
GDI leaks tracking
Rootkit revealer
Rootkit removal
RunAsLimitedUser(1)
RunAsLimitedUser(2)

 

 

Liens
Le Plan B
Un jour à Paris
Meneame
Rezo.net (aggr)
Reseau voltaire
Cuba solidarity project
Le grand soir
L'autre journal
Le courrier suisse
L'Orient, le jour
Agoravox (aggr)