xlsgen > overview > Traffic lights |
Traffic lights need not much explanation, but how they can be programmed is obviously needed. They can be programmatically set to reflect levels or states that are part of business decision making. They have the following properties :
Here is the table of parameters :
Name | Type | Description |
SetGreenThreshold | integer or double | value below which traffic light signals green. Default value is 0. |
SetOrangeThreshold | integer or double | value around which traffic light signals orange. Default value is 50. |
SetRedThreshold | integer or double | value above which traffic light signals red. Default value is 100. |
SetVertical | boolean | force the orientation of the traffic light(s) |
SetValue | integer or double (or range of integers or doubles) | value itself or range of values. |
SetTitle | string (or range of strings) | title or range of titles. |
ResetValues | None | deletes current value(s). |
C/C++ code |
xlsgen::IXlsEnginePtr engine( __uuidof(xlsgen::CoXlsEngine) ); xlsgen::IXlsWorkbookPtr wbk = engine->New( L"trafficlights.xlsx" ); xlsgen::IXlsWorksheetPtr wksht = wbk->AddWorksheet( L"Sheet1" ); xlsgen::IXlsVisualComponentPtr comp = wksht->NewVisualComponent(L"TrafficLight.ARsTdesign.1", 2,5, // row1, col1 6,8, // row2, col2 0,0,0,0); // three traffic lights comp->ParameterByName[L"SetVertical"]->Formula = L"=TRUE"; comp->ParameterByName[L"SetValue"]->Formula = L"={80;50;70}"; comp->ParameterByName[L"SetTitle"]->Formula = L"={\"my title (80)\";\"2nd title\";\"3rd title\"}"; wbk->Close(); |
xlsgen documentation. © ARsT Design all rights reserved.