Specifying legend settings for charts

When using the Specify Chart Settings dialog box to create and configure charts, these settings are all made on the Legend tab. In multi-series or combination charts, the name of each dataset is displayed in the legend of the chart, to link data to its description by color. The legend is not displayed for single-series charts.

This tab includes these groups for different types of legend settings.

  • Legend properties
  • Legend cosmetics

When modifying a chart by script, use the ChartSetProperty method or the ChartGetProperty method to make these settings. Use the ChartProperty enumeration.

Legend Properties group

This table lists the settings you can make in the Legend Properties group box of the Legend tab. ChartSetProperty and ChartGetProperty attribute names are also listed.

Legend tab Field / Option Attribute Name Description / Comments
Show Legend ShowLegend When selected (default), this option specifies that the legend is to be displayed.
Legend Caption LegendCaption Specify the caption to use for the legend.
Legend Position LegendPosition Specify where the legend is to be displayed. Options include BOTTOM or RIGHT.
Back Color LegendBgColor Specify the RGB value for the background color of the legend, as a hexadecimal value (000000-FFFFFF).

You can double-click to display the Color dialog box, where you can select a color or define a custom background color for the legend. The hexadecimal code displays after you click OK to exit the Color dialog box.

To use a gradient background fill, specify multiple hexadecimal values, separated by commas.

Back Alpha LegendBgAlpha For each color you specified for the background, specify the transparency, from 0 (transparent) to 100 (opaque). If you are using multiple values (for a gradient fill), separate the alpha values by commas.
Border Color LegendBorderColor Specify the RGB value for the color of the legend border, as a hexadecimal value (000000-FFFFFF).

You can double-click to display the Color dialog box, where you can select a color or define a custom color for the legend border. The hexadecimal code displays after you click OK to exit the Color dialog box.

Border Thickness LegendBorderThickness Specify, in pixels, the thickness of the legend border.
Border Alpha LegendBorderAlpha Specify the transparency of the legend border, from 0 (transparent) to 100 (opaque).
Show Legend Shadow LegendShadow When selected (default), this option specifies that the legend box is to be displayed with a drop shadow effect.
Reverse Legend ReverseLegend When selected, this option specifies that the order of the items in the legend is to be reversed. This can be useful in stacked charts.

Legend Cosmetics group

This table lists the settings you can make in the Legend Cosmetics group box of the Legend tab. ChartSetProperty and ChartGetProperty attribute names are also listed.

Legend tab Field / Option Attribute Name Description / Comments
Item Font LegendItemFont Specify the font or font family that is to be used for items listed in the legend.
Item Font Size LegendItemFontSize Specify the size, in points (8 to 72), for the font used to display items listed in the legend.
Item Font Color LegendItemFontColor Specify the RGB value for the color of legend item labels, as a hexadecimal value (000000-FFFFFF).

You can double-click to display the Color dialog box, where you can select a color or define a custom color for the legend item labels. The hexadecimal code displays after you click OK to exit the Color dialog box.

Item Hover Font Color LegendItemHoverFontColor Specify the RGB value for the color of the legend item text to display during mouseovers, as a hexadecimal value (000000-FFFFFF).

You can double-click to display the Color dialog box, where you can select a color or define a custom color for the legend item text. The hexadecimal code displays after you click OK to exit the Color dialog box.

Item Font Bold LegendItemFontBold When selected, this option specifies that the legend item labels are to be displayed using boldface.
Caption Font LegendCaptionFont Specify the font or font family that is to be used for the legend caption.
Caption Font Size LegendCaptionFontSize Specify the size, in points (8 to 72), for the font used to display the legend caption.
Caption Alignment LegendCaptionAlignment Specify how the caption is to be aligned within the legend box. Options include Left, Center, and Right.
Caption Bold LegendCaptionBold When selected (default), specifies that the legend caption is to be displayed using boldface.

For more information about these and other chart attributes, see the FusionCharts Developer help (www.fusioncharts.com/dev/).

相关主题