Constructor
new SpotfirePieChart(pieChartProperties)
Parameters:
Name | Type | Description |
---|---|---|
[ pieChartProperties ]
|
Object | |
[ general ]
|
Object | |
title
|
String | The title of the visualization. |
description
|
String | The description of the visualization. |
showTitleBar
|
Boolean | Specifies whether or not to show the visualization title. |
[ data ]
|
VisualDataDescription | |
[ appearance ]
|
Object | |
useSeparateColorForMarkedItems
|
Boolean | Specifies whether or not the marking color should be used to distinguish marked items in the visualization. |
[ fonts ]
|
Object | |
legend
|
VisualFontDescription ▼ | To change the font settings of the legend. |
fontFamily
|
string | Specifies a specific font to use. |
size
|
number | Specifies a specific font size to use. |
bold
|
boolean | Specifies if the font style Bold should be used. |
italic
|
boolean | Specifies if the font style Italic should be used. |
detailsVisualizationMessage
|
VisualFontDescription ▼ | To change the font settings of the details visualization message. |
fontFamily
|
string | Specifies a specific font to use. |
size
|
number | Specifies a specific font size to use. |
bold
|
boolean | Specifies if the font style Bold should be used. |
italic
|
boolean | Specifies if the font style Italic should be used. |
[ legend ]
|
Object | |
visible
|
Boolean | Specifies whether or not the legend should be shown in the visualization. |
position
|
SpotfireLegendPositions ▼ | Specifies which side of the visualization the legend should be positioned: the right-hand side or the left-hand side. |
left
|
String | To place the legend on the left-hand side. Other available value: 'Left'. |
right
|
String | To place the legend on the right-hand side. Other available value: 'Right'. |
width
|
Number | Specifies the width, in pixels, of the legend as it is displayed in the user interface. |
legendItems
|
Array.<VisualLegendItemDescription> | Defines how the legend items should be displayed. The available options vary between legend items. |
[ showHideItemsRules ]
|
Array.<VisualShowHideItemsRuleDescription> | |
[ size ]
|
Object | |
sectorSizeBy
|
Array.<String> | Specifies a column or hierarchy whose categories will determine the size of the pie sectors. This is always an aggregated measure. |
pieSize
|
Number | Specifies the absolute pie size within the visualization area. |
pieSizeBy
|
String | Sizes the pies according to the values in the specified column. Only relevant when there are more than one pie available (via trellising). |
scaleRange
|
Object | Determines what scale to use for the size of the pie. Only relevant when there are more than one pie available (via trellising). |
min
|
Number | Minimum limit that should be mapped to the pie size. Leave null to set it to "Automatic". |
max
|
Number | Maximum limit that should be mapped to the pie size. Leave null to set it to "Automatic". |
[ colors ]
|
SpotfireColorAxis | |
[ labels ]
|
Object | |
showSectorPercentage
|
Boolean | Specifies whether ot not to display labels showing the percentage of the total that each sector represents. |
showSectorValue
|
Boolean | Specifies whether or not to display the value of the sector. For example, sum of sales for apples, if the sector size is defined by sum of sales and the color is defined by fruit or vegetable type. |
showSectorCategory
|
Boolean | Specifies whether or not to display the category defining the sector. For example, "apples", if the sector color is defined by fruit or vegetable type. |
labelPosition
|
SpotfireLabelPositions ▼ | Specifies whether the labels should be placed 'Inside pie' or 'Outside pie'. |
inside
|
String | The label is placed inside the marker. |
outside
|
String | The label is placed outside the marker. |
showLabelsFor
|
SpotfireLabelVisibilities | Determines whether to show labels for all pie sectors ('All'), pie sectors containing marked rows only ('Marked rows'), or not to show any labels at all ('None'). |
maxNumberOfLabels
|
Number | Specifies the maximum number of labels to be shown. |
sectorPercentageThreshold
|
Number | Excludes the labels for the sectors whose percentage falls below the specified threshold value. |
sectorPercentageDecimals
|
Number | Specifies the number of decimals to display for the percentage value. The number specified here will also affect the number of decimals shown for pie sectors in the tooltip. |
Methods
defaultAppearanceProperties()
Sets the default "Appearance" properties of the visualization.
getShowHideItemsRule()
Gets the "Show/Hide Items" rule, given its display name.
- Overrides:
getUniqueId() → {Number}
Gets a unique identifier for the visualization.
- Overrides:
The generated identifier.
getVisualTypeName() → {String}
Gets the type of the visualization.
- Overrides:
The type of the visualization.