Package io.jmix.charts.model.settings
Class LegendSettings
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.settings.LegendSettings
- All Implemented Interfaces:
Serializable
Common settings of legends. If there is no default value specified, default value of
See documentation for properties of LegendSettings JS object.
http://docs.amcharts.com/3/javascriptstockchart/LegendSettings
StockLegend
class
will be used.
See documentation for properties of LegendSettings JS object.
http://docs.amcharts.com/3/javascriptstockchart/LegendSettings
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAlign()
Sets alignment of legend entries.setEqualWidths
(Boolean equalWidths) Set equalWidths to true if each legend entry should take up much space as the longest legend entry.setHorizontalGap
(Integer horizontalGap) Sets horizontal space between legend item and left/right border.setLabelText
(String labelText) Sets the text which will be displayed in the legend.setMarginBottom
(Integer marginBottom) Sets space below the last row of the legend, in pixels.setMarginTop
(Integer marginTop) Sets space above the first row of the legend, in pixels.@Max(1L) @Min(0L) LegendSettings
setMarkerBorderAlpha
(Double markerBorderAlpha) Sets opacity of marker border.setMarkerBorderColor
(Color markerBorderColor) Sets marker border color.setMarkerBorderThickness
(Integer markerBorderThickness) Sets thickness of the legend border.setMarkerDisabledColor
(Color markerDisabledColor) Sets color of the disabled marker (when the graph is hidden).setMarkerLabelGap
(Integer markerLabelGap) Sets space between legend marker and legend text, in pixels.setMarkerSize
(Integer markerSize) Sets size of the legend marker (key).setMarkerType
(MarkerType markerType) Sets shape of the legend marker (key).setPosition
(LegendSettingsPosition position) Sets position of legend in panels.setReversedOrder
(Boolean reversedOrder) Set reversedOrder to true if legend entries should be placed in reversed order.setRollOverColor
(Color rollOverColor) Sets legend item text color on roll-over.setRollOverGraphAlpha
(Double rollOverGraphAlpha) Sets the opacity of the graphs.setSwitchable
(Boolean switchable) Set switchable to false if graphs shouldn't be shown/hidden by click on the legend marker.setSwitchColor
(Color switchColor) Sets legend switch color.setSwitchType
(SwitchType switchType) Sets legend switch type (in case the legend is switchable).setTextClickEnabled
(Boolean textClickEnabled) Set textClickEnabled to true if the legend text should be clickable.setUseMarkerColorForLabels
(Boolean useMarkerColorForLabels) Set useMarkerColorForLabels to true if legend labels should use the same color as corresponding markers.setValueTextComparing
(String valueTextComparing) Sets the text which will be displayed in the value portion of the legend when graph is comparable and at least one dataSet is selected for comparing.setValueTextRegular
(String valueTextRegular) Sets the text which will be displayed in the value portion of the legend.setValueWidth
(Integer valueWidth) Sets width of the value text.setVerticalGap
(Integer verticalGap) Sets vertical space between legend items, in pixels.
-
Constructor Details
-
LegendSettings
public LegendSettings()
-
-
Method Details
-
getAlign
- Returns:
- alignment of legend entries
-
setAlign
Sets alignment of legend entries. Possible values are: "left", "right" and "center".- Parameters:
align
- alignment of legend entries- Returns:
- legend settings
-
getEqualWidths
- Returns:
- true if each legend entry takes the same space as the longest legend entry
-
setEqualWidths
Set equalWidths to true if each legend entry should take up much space as the longest legend entry. If not set the default value is false.- Parameters:
equalWidths
- equalWidths option- Returns:
- legend settings
-
getHorizontalGap
- Returns:
- horizontal space between legend item and left/right border
-
setHorizontalGap
Sets horizontal space between legend item and left/right border.- Parameters:
horizontalGap
- horizontal gap- Returns:
- legend settings
-
getLabelText
- Returns:
- label text
-
setLabelText
Sets the text which will be displayed in the legend. Tag [[title]] will be replaced with the title of the graph.- Parameters:
labelText
- text- Returns:
- legend settings
-
getMarginBottom
- Returns:
- space below the last row of the legend, in pixels
-
setMarginBottom
Sets space below the last row of the legend, in pixels. If not set the default value is 0.- Parameters:
marginBottom
- margin bottom- Returns:
- legend settings
-
getMarginTop
- Returns:
- space above the first row of the legend, in pixels
-
setMarginTop
Sets space above the first row of the legend, in pixels. If not set the default value is 0.- Parameters:
marginTop
- margin top- Returns:
- legend settings
-
getMarkerBorderAlpha
- Returns:
- opacity of marker border
-
setMarkerBorderAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) LegendSettings setMarkerBorderAlpha(Double markerBorderAlpha) Sets opacity of marker border.- Parameters:
markerBorderAlpha
- opacity- Returns:
- legend settings
-
getMarkerBorderColor
- Returns:
- marker border color
-
setMarkerBorderColor
Sets marker border color.- Parameters:
markerBorderColor
- color- Returns:
- legend settings
-
getMarkerBorderThickness
- Returns:
- thickness of the legend border
-
setMarkerBorderThickness
Sets thickness of the legend border.- Parameters:
markerBorderThickness
- thickness- Returns:
- legend settings
-
getMarkerDisabledColor
- Returns:
- color of the disabled marker
-
setMarkerDisabledColor
@StudioProperty(type=OPTIONS) public LegendSettings setMarkerDisabledColor(Color markerDisabledColor) Sets color of the disabled marker (when the graph is hidden).- Parameters:
markerDisabledColor
- color- Returns:
- legend settings
-
getMarkerLabelGap
- Returns:
- space between legend marker and legend text, in pixels
-
setMarkerLabelGap
Sets space between legend marker and legend text, in pixels.- Parameters:
markerLabelGap
- marker label gap- Returns:
- legend settings
-
getMarkerSize
- Returns:
- size of the legend marker
-
setMarkerSize
Sets size of the legend marker (key).- Parameters:
markerSize
- marker size- Returns:
- legend settings
-
getMarkerType
- Returns:
- legend marker type
-
setMarkerType
Sets shape of the legend marker (key). Possible values are: square, circle, diamond, triangleUp, triangleDown, triangleLeft, triangleDown, bubble, none.- Parameters:
markerType
- marker type- Returns:
- legend settings
-
getReversedOrder
- Returns:
- true if legend entries placed in reversed order
-
setReversedOrder
Set reversedOrder to true if legend entries should be placed in reversed order.- Parameters:
reversedOrder
- reversedOrder option- Returns:
- legend settings
-
getRollOverColor
- Returns:
- legend item text color on roll-over
-
setRollOverColor
Sets legend item text color on roll-over.- Parameters:
rollOverColor
- color- Returns:
- legend settings
-
getRollOverGraphAlpha
- Returns:
- opacity of the graphs
-
setRollOverGraphAlpha
Sets the opacity of the graphs. When you roll-over the legend entry, all other graphs can reduce their opacity, so that the graph you rolled-over would be distinguished.- Parameters:
rollOverGraphAlpha
- opacity- Returns:
- legend settings
-
getSwitchable
- Returns:
- true if graphs are shown/hidden by click on the legend marker
-
setSwitchable
Set switchable to false if graphs shouldn't be shown/hidden by click on the legend marker.- Parameters:
switchable
- switchable option- Returns:
- legend settings
-
getSwitchColor
- Returns:
- legend switch color
-
setSwitchColor
Sets legend switch color.- Parameters:
switchColor
- color- Returns:
- legend settings
-
getSwitchType
- Returns:
- switch type
-
setSwitchType
Sets legend switch type (in case the legend is switchable). Possible values are: "x" and "v".- Parameters:
switchType
- switch type- Returns:
- legend settings
-
getTextClickEnabled
- Returns:
- true if the legend text is clickable
-
setTextClickEnabled
@StudioProperty(defaultValue="false") public LegendSettings setTextClickEnabled(Boolean textClickEnabled) Set textClickEnabled to true if the legend text should be clickable. Clicking on legend text can show/hide value balloons if they are enabled. If not set the default value is false.- Parameters:
textClickEnabled
- textClickEnabled option- Returns:
- legend settings
-
getUseMarkerColorForLabels
- Returns:
- true if legend labels use the same color as corresponding markers
-
setUseMarkerColorForLabels
Set useMarkerColorForLabels to true if legend labels should use the same color as corresponding markers.- Parameters:
useMarkerColorForLabels
- useMarkerColorForLabels option- Returns:
- legend settings
-
getValueTextComparing
- Returns:
- value text comparing
-
setValueTextComparing
Sets the text which will be displayed in the value portion of the legend when graph is comparable and at least one dataSet is selected for comparing. You can use tags like [[value]], [[open]], [[high]], [[low]], [[close]], [[percents]], [[description]].- Parameters:
valueTextComparing
- value text comparing- Returns:
- legend settings
-
getValueTextRegular
- Returns:
- value text regular
-
setValueTextRegular
Sets the text which will be displayed in the value portion of the legend. You can use tags like [[value]], [[open]], [[high]], [[low]], [[close]], [[percents]], [[description]].- Parameters:
valueTextRegular
- value text regular- Returns:
- legend settings
-
getValueWidth
- Returns:
- width of the value text
-
setValueWidth
Sets width of the value text. Increase this value if your values do not fit in the allocated space.- Parameters:
valueWidth
- width- Returns:
- legend settings
-
getVerticalGap
- Returns:
- vertical space between legend items, in pixels
-
setVerticalGap
Sets vertical space between legend items, in pixels.- Parameters:
verticalGap
- vertical gap- Returns:
- legend settings
-
getPosition
- Returns:
- position of legend in panels
-
setPosition
@StudioProperty(type=ENUMERATION) public LegendSettings setPosition(LegendSettingsPosition position) Sets position of legend in panels. Possible values are: "bottom" and "top".- Parameters:
position
- position- Returns:
- legend settings
-