xlsgen > overview > Chart options |
Most chart elements share a common set of formatting options. Those common options are exposed in xlsgen using a common interface, IXlsChartOptions. All specific options are exposed in a separate interface, IXlsChartCustomProperties, and is covered in more details here.
The properties managed by this interface are :
Virtually chart elements implement this interface, which provides a really quick way to customize a chart without having to learn a new interface for each chart element. In the remainder of this page, the underlying semantics of the options are going to be explained.
Options are automatically set by default. That is, unless you set new values, the chart engine will use automatic options.
To accomodate the arbitrary size of the chart, positions and width and height are expressed in percentage of the chart width and height. If you'd like to put a chart element right in the center, the following statements should be used :
Font options are regular options just like those used in cells. Font options are accessed using the Font
of the interface, which in turn is described here. There are two additional options specific to fonts used in charts :
AutoScale
property. Disabled by default, it makes the font size scale automatically based on the size of the chart.
BackgroundType
property. By default it's automatically set, which means depending on the chart element it will be set transparent or opaque by default.
Border style is automatically set, which often results in a black border of standard weight. The interface is defined here. When borders are customized, a number of properties can be changed, including :
RoundCorners
should be drawn, and if Shadows
should be drawn.
Marker style options apply to charts like scatter and lines. The interface is defined here. See enumerated types enumChartMarker and enumChartMarkerStyle.
Area style is automatically set. Area style options are very flexible : regular solid fill can be applied (just like for cells), but also gradient, textures, patterns and even a custom image can be defined. The interface is defined here.
In addition, the area style interface supports two properties : InverseIfNegative
and Bubble 3D effect
. The reason why these options are exposed in this interface is because Excel exposes those options in the area style options. The first property inverses the color when values are negative. The second property adds a 3D effect to bubbles and obviously only applies to bubble charts.
xlsgen documentation. © ARsT Design all rights reserved.