| xlsgen > overview > Google charts |

Google charts are fixed representations calculated and rendered over an internet connection (which is therefore required). All Excel chart types are available. A number of formatting properties are made available through xlsgen.
Sometimes in the future, it is possible Google charts will replace today's Microsoft OWC chart controls used for rendering spreadsheets in xlsgen (print, preview, PDF, XPS, HTML, ...) so that the client application may be able to pick his preferred choice.
xlsgen exposes the Google charts to a client application through an ActiveX control. There are already two ActiveX controls distributed by xlsgen, Vu-meters and Sparklines. Technically speaking all three ActiveX controls are embedded in the same and unique file : Sparklines.ocx, which has all 3 APIs.
Properties are being passed general formulas. They can be as simple as literals, such as in =120, or cell references, such as in =$E$4, or "real" formulas such as in =SUM(B2:B10). It transfers a lot of value to the client application which can indeed implement complex scenarios and various dynamics.
| Property name | Description |
SetType(enumGoogleChartsType) | sets the Google chart type.
typedef enum
{
[helpstring("Chart type, vertical bars")] charttype_barsvertical = 0,
[helpstring("Chart type, vertical bars, stacked")] charttype_barsverticalstacked = 1,
[helpstring("Chart type, horizontal bars")] charttype_barshorizontal = 2,
[helpstring("Chart type, horizontal bars, stacked")] charttype_barshorizontalstacked = 3,
[helpstring("Chart type, lines")] charttype_lines = 4,
[helpstring("Chart type, lines with markers")] charttype_linesmarkers = 5,
[helpstring("Chart type, scatter, two series at least")] charttype_scatter = 6,
[helpstring("Chart type, bubbles, two series at least")] charttype_bubbles = 7,
[helpstring("Chart type, pie")] charttype_pie = 8,
[helpstring("Chart type, pie 3D")] charttype_pie3d = 9,
[helpstring("Chart type, donut")] charttype_donut = 10,
[helpstring("Chart type, radar")] charttype_radar = 11,
[helpstring("Chart type, areas")] charttype_areas = 12,
[helpstring("Chart type, stock, 4 series")] charttype_stockLowOpenCloseHigh = 13
} enumGoogleChartsType; |
SetTitle(BSTR) | sets the optional title to display. |
AddSeries(VARIANT) | sets an additional series of values. |
SetLabels(VARIANT) | sets labels. |
SetSeriesTitle(BSTR) | sets the current series title. |
SetSeriesColor(int rgb) | sets the current series color as a RGB value. |
SetShowLegend(BOOL) | sets whether the legend should show up. Default is : yes. |
SetAxisXTitle(BSTR) | sets the X axis title. |
SetAxisYTitle(BSTR) | sets the Y axis title. |
SetScale(int scale) | sets the chart scale, in percent. Default value is : 100. |
| Java code |
|
| VB code |
|
| C# code |
|
| C/C++ code |
|
| Java code |
|
| VB code |
|
| C# code |
|
| C/C++ code |
|
xlsgen documentation. © ARsT Design all rights reserved.