Class SlicedChartImpl<T extends SlicedChart,M extends SlicedChartModelImpl>
- All Implemented Interfaces:
Chart<T>
,SlicedChart<T>
,HasStartEffect<T>
,ChartModel<T>
,SlicedChartModel<T>
,HasColors<T>
,HasMargins<T>
,AttachNotifier
,Component
,Component.BelongToFrame
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
FunnelChartImpl
,PieChartImpl
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.charts.component.Chart
Chart.AbstractChartClickEvent, Chart.AbstractChartEvent, Chart.AbstractClickEvent, Chart.AbstractCursorEvent, Chart.AbstractGraphItemClickEvent, Chart.AbstractItemEvent, Chart.AbstractSliceClickEvent, Chart.AxisZoomEvent, Chart.ChartClickEvent, Chart.ChartRightClickEvent, Chart.CursorPeriodSelectEvent, Chart.CursorZoomEvent, Chart.GraphClickEvent, Chart.GraphItemClickEvent, Chart.GraphItemRightClickEvent, Chart.LegendItemClickEvent, Chart.LegendItemEvent, Chart.LegendItemHideEvent, Chart.LegendItemShowEvent, Chart.LegendMarkerClickEvent, Chart.RollOutGraphEvent, Chart.RollOutGraphItemEvent, Chart.RollOverGraphEvent, Chart.RollOverGraphItemEvent, Chart.SliceClickEvent, Chart.SlicePullInEvent, Chart.SlicePullOutEvent, Chart.SliceRightClickEvent, Chart.ZoomEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected SliceClickListener
protected SlicePullInListener
protected SlicePullOutListener
protected SliceRightClickListener
Fields inherited from class io.jmix.charts.component.impl.ChartImpl
chartLocaleHelper, clickHandler, currentAuthentication, formatStringsRegistry, legendItemHideHandler, legendItemShowHandler, legendLabelClickHandler, legendMarkerClickHandler, messages, rightClickHandler
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds colors.addGradientRatio
(Double... ratios) Adds gradient ratios.addSliceClickListener
(Consumer<Chart.SliceClickEvent> listener) Adds a listener for a slice.addSlicePullInListener
(Consumer<Chart.SlicePullInEvent> listener) Adds a listener for a slice.Adds a listener for a slice.Adds a listener for a slice.getAlpha()
protected void
protected void
protected void
protected void
setAccessibleLabel
(String accessibleLabel) Sets accessible label text.Sets opacity of all slices.setAlphaField
(String alphaField) Sets alpha field name from data provider which holds slice's alpha.setBaseColor
(Color baseColor) Sets color of the first slice.setClassNameField
(String classNameField) Sets field name from your data provider which holds CSS class name.setColorField
(String colorField) Sets name of the field from data provider which holds slice's color.Sets the list of colors.setDescriptionField
(String descriptionField) Sets name of the field from data provider which holds a string with description.setGradientRatio
(List gradientRatio) Sets the list of gradient ratio.setGroupedAlpha
(Double groupedAlpha) Sets opacity of the group slice.setGroupedColor
(Color groupedColor) Sets the color of the group slice.setGroupedDescription
(String groupedDescription) Sets description of the group slice.setGroupedPulled
(Boolean groupedPulled) If groupedPulled set to true, the group slice will be pulled out when the chart loads.setGroupedTitle
(String groupedTitle) Sets title of the group slice.setGroupPercent
(Double groupPercent) Sets group percent.setHideLabelsPercent
(Double hideLabelsPercent) Sets hide labels percent.setHoverAlpha
(Double hoverAlpha) Sets opacity of a hovered slice.setLabelColorField
(Color labelColorField) Sets a field from your data provider which holds color value for the tick.setLabelFunction
(JsFunction labelFunction) Sets label function that can format data labels in any way you want.setLabelsEnabled
(Boolean labelsEnabled) Set labelsEnabled to true if data labels should be visible.setLabelTickAlpha
(Double labelTickAlpha) Setslabel
tick opacity.setLabelTickColor
(Color labelTickColor) Setslabel
tick color.setMarginBottom
(Integer marginBottom) Sets bottom spacing.setMarginLeft
(Integer marginLeft) Sets left-hand spacing.setMarginRight
(Integer marginRight) Sets right-hand spacing.setMarginTop
(Integer marginTop) Sets top spacing.setMaxLabelWidth
(Integer maxLabelWidth) Sets maximum label width.setOutlineAlpha
(Double outlineAlpha) Sets outline opacity.setOutlineColor
(Color outlineColor) Sets outline color.setOutlineThickness
(Integer outlineThickness) Sets pie outline thickness.setPatternField
(String patternField) Sets field name from your data provider which holds pattern information.setPulledField
(String pulledField) Sets name of the field in chart's data provider which holds a boolean value telling the chart whether this slice must be pulled or not.setPullOutDuration
(Integer pullOutDuration) Sets pull out duration in seconds.setPullOutEffect
(AnimationEffect pullOutEffect) Sets pull out effect.setPullOutOnlyOne
(Boolean pullOutOnlyOne) If pullOutOnlyOne set to true, only one slice can be pulled out at a time.setSequencedAnimation
(Boolean sequencedAnimation) Specifies whether the animation should be sequenced or all slices should appear at once.setShowZeroSlices
(Boolean showZeroSlices) Set showZeroSlices to true if you want the chart should display outlines (if visible) and labels for slices even if their value is 0.setStartAlpha
(Double startAlpha) Sets initial opacity of all slices.setStartDuration
(Double startDuration) Sets duration of the animation, in seconds.setStartEffect
(AnimationEffect startEffect) Sets animation effect.setTabIndex
(Integer tabIndex) In case you set it to some number, the chart will set focus on a slice (starting from first) when user clicks tab key.setTitleField
(String titleField) Sets name of the field from data provider which holds slice's title.setUrlField
(String urlField) Sets name of the field from data provider which holds URL which would be accessed if the user clicks on a slice.setUrlTarget
(String urlTarget) If URL is specified for a slice, it will be opened when user clicks on it.setValueField
(String valueField) Sets name of the field from data provider which holds slice's value.setVisibleInLegendField
(String visibleInLegendField) Use this field to selectively specify which slice is shown in legend.Methods inherited from class io.jmix.charts.component.impl.ChartImpl
addAdditionalFields, addClickListener, addData, addLabels, addLegendItemHideListener, addLegendItemShowListener, addLegendLabelClickListener, addLegendMarkerClickListener, addPrefixesOfBigNumbers, addPrefixesOfSmallNumbers, addRightClickListener, addTitles, afterPropertiesSet, createChartConfiguration, createChartSerializer, createComponent, getAccessible, getAccessibleDescription, getAccessibleTitle, getAddClassNames, getAdditionalFields, getAllLabels, getAutoDisplay, getAutoResize, getAutoTransform, getBackgroundAlpha, getBackgroundColor, getBalloon, getBorderAlpha, getBorderColor, getClassNamePrefix, getColor, getCreditsPosition, getDataProvider, getDecimalSeparator, getDefs, getExport, getFontFamily, getFontSize, getHandDrawn, getHandDrawScatter, getHandDrawThickness, getHideBalloonTime, getLanguage, getLegend, getModel, getNativeJson, getPanEventsEnabled, getPath, getPathToImages, getPercentPrecision, getPrecision, getPrefixesOfBigNumbers, getPrefixesOfSmallNumbers, getProcessCount, getProcessTimeout, getResponsive, getSvgIcons, getTapToActivate, getTheme, getThousandsSeparator, getTitles, getTouchClickDuration, getUsePrefixes, initLocale, onChartClick, onChartRightClick, onLegendItemHide, onLegendItemShow, onLegendLabelClick, onLegendMarkerClick, repaint, setAccessible, setAccessibleDescription, setAccessibleTitle, setAddClassNames, setAdditionalFields, setAllLabels, setAutoDisplay, setAutoResize, setAutoTransform, setBackgroundAlpha, setBackgroundColor, setBalloon, setBorderAlpha, setBorderColor, setChartLocaleHelper, setClassNamePrefix, setColor, setCreditsPosition, setCurrentAuthentication, setDataProvider, setDecimalSeparator, setDefs, setExport, setFontFamily, setFontSize, setFormatStringsRegistry, setHandDrawn, setHandDrawScatter, setHandDrawThickness, setHideBalloonTime, setLanguage, setLegend, setMessages, setNativeJson, setPanEventsEnabled, setPath, setPathToImages, setPercentPrecision, setPrecision, setPrefixesOfBigNumbers, setPrefixesOfSmallNumbers, setProcessCount, setProcessTimeout, setResponsive, setSvgIcons, setTapToActivate, setTheme, setThousandsSeparator, setTitles, setTouchClickDuration, setupChartLocale, setupDefaults, setUsePrefixes
Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setParent, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.charts.component.Chart
addClickListener, addLegendItemHideListener, addLegendItemShowListener, addLegendLabelClickListener, addLegendMarkerClickListener, addRightClickListener, getDataProvider, getNativeJson, repaint, setDataProvider, setNativeJson
Methods inherited from interface io.jmix.charts.model.chart.ChartModel
addAdditionalFields, addData, addLabels, addPrefixesOfBigNumbers, addPrefixesOfSmallNumbers, addTitles, getAccessible, getAccessibleDescription, getAccessibleTitle, getAddClassNames, getAdditionalFields, getAllLabels, getAutoDisplay, getAutoResize, getAutoTransform, getBackgroundAlpha, getBackgroundColor, getBalloon, getBorderAlpha, getBorderColor, getClassNamePrefix, getColor, getCreditsPosition, getDecimalSeparator, getDefs, getExport, getFontFamily, getFontSize, getHandDrawn, getHandDrawScatter, getHandDrawThickness, getHideBalloonTime, getLanguage, getLegend, getPanEventsEnabled, getPath, getPathToImages, getPercentPrecision, getPrecision, getPrefixesOfBigNumbers, getPrefixesOfSmallNumbers, getProcessCount, getProcessTimeout, getResponsive, getSvgIcons, getTapToActivate, getTheme, getThousandsSeparator, getTitles, getTouchClickDuration, getUsePrefixes, setAccessible, setAccessibleDescription, setAccessibleTitle, setAddClassNames, setAdditionalFields, setAllLabels, setAutoDisplay, setAutoResize, setAutoTransform, setBackgroundAlpha, setBackgroundColor, setBalloon, setBorderAlpha, setBorderColor, setClassNamePrefix, setColor, setCreditsPosition, setDecimalSeparator, setDefs, setExport, setFontFamily, setFontSize, setHandDrawn, setHandDrawScatter, setHandDrawThickness, setHideBalloonTime, setLanguage, setLegend, setPanEventsEnabled, setPath, setPathToImages, setPercentPrecision, setPrecision, setPrefixesOfBigNumbers, setPrefixesOfSmallNumbers, setProcessCount, setProcessTimeout, setResponsive, setSvgIcons, setTapToActivate, setTheme, setThousandsSeparator, setTitles, setTouchClickDuration, setUsePrefixes
Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
-
Field Details
-
sliceClickHandler
-
sliceRightClickHandler
-
slicePullInHandler
-
slicePullOutHandler
-
-
Constructor Details
-
SlicedChartImpl
public SlicedChartImpl()
-
-
Method Details
-
getAlpha
- Specified by:
getAlpha
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- opacity of all slices
-
setAlpha
Description copied from interface:SlicedChartModel
Sets opacity of all slices. If not set the default value is 1.- Specified by:
setAlpha
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
alpha
- opacity of all slices- Returns:
- sliced chart model
-
getAlphaField
- Specified by:
getAlphaField
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- alpha field name
-
setAlphaField
Description copied from interface:SlicedChartModel
Sets alpha field name from data provider which holds slice's alpha.- Specified by:
setAlphaField
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
alphaField
- alpha field string- Returns:
- sliced chart model
-
getBaseColor
- Specified by:
getBaseColor
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- color of the first slice
-
setBaseColor
Description copied from interface:SlicedChartModel
Sets color of the first slice. All the other will be colored with darker or brighter colors. Use brightnessStep to set intensity of color change for each subsequent slice. If not set the default value is 20.- Specified by:
setBaseColor
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
baseColor
- color of the first slice- Returns:
- sliced chart model
-
getColorField
- Specified by:
getColorField
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- color field
-
setColorField
Description copied from interface:SlicedChartModel
Sets name of the field from data provider which holds slice's color.- Specified by:
setColorField
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
colorField
- color field string- Returns:
- sliced chart model
-
getColors
- Specified by:
getColors
in interfaceHasColors<T extends SlicedChart>
- Returns:
- List of colors
-
setColors
Description copied from interface:HasColors
Sets the list of colors.If you use charts based on
SlicedChartModelImpl
it specifies the colors of the slices, if the slice color is not set. If there are more slices than colors in this array, the chart picks random color.If you use charts based on
CoordinateChartModelImpl
orStockChartModel
it specifies the colors of the graphs if the lineColor of a graph is not set. If there are more graphs then colors in this array, the chart picks a random color. If not set the default value is["#FF6600", "#FCD202", "#B0DE09", "#0D8ECF", "#2A0CD0", "#CD0D74", "#CC0000", "#00CC00", "#0000CC", "#DDDDDD", "#999999", "#333333", "#990000"]
If you use chart based on
SlicedChartModelImpl
(PieChart, FunnelChart). Specifies the colors of the slices, if the slice color is not set. If there are more slices than colors in this array, the chart picks random color. If not set default value is["#FF0F00", "#FF6600", "#FF9E01", "#FCD202", "#F8FF01", "#B0DE09", "#04D215", "#0D8ECF", "#0D52D1", "#2A0CD0", "#8A0CCF", "#CD0D74", "#754DEB", "#DDDDDD", "#999999", "#333333", "#000000", "#57032A", "#CA9726", "#990000", "#4B0C25"]
- Specified by:
setColors
in interfaceHasColors<T extends SlicedChart>
- Parameters:
list
- list of colors- Returns:
- chart
-
addColors
Description copied from interface:HasColors
Adds colors.- Specified by:
addColors
in interfaceHasColors<T extends SlicedChart>
- Parameters:
colors
- list of colors- Returns:
- chart
-
getDescriptionField
- Specified by:
getDescriptionField
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- description field
-
setDescriptionField
Description copied from interface:SlicedChartModel
Sets name of the field from data provider which holds a string with description.- Specified by:
setDescriptionField
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
descriptionField
- description field string- Returns:
- sliced chart model
-
getGradientRatio
- Specified by:
getGradientRatio
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- list of gradient ratio
-
setGradientRatio
Description copied from interface:SlicedChartModel
Sets the list of gradient ratio. Will make slices to be filled with color gradients. Negative value means the color will be darker than the original, and positive number means the color will be lighter.- Specified by:
setGradientRatio
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
gradientRatio
- list of gradient ratio- Returns:
- sliced chart model
-
addGradientRatio
Description copied from interface:SlicedChartModel
Adds gradient ratios.- Specified by:
addGradientRatio
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
ratios
- the ratios- Returns:
- sliced chart model
-
getGroupedAlpha
- Specified by:
getGroupedAlpha
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- opacity of the group slice
-
setGroupedAlpha
Description copied from interface:SlicedChartModel
Sets opacity of the group slice. Value range is 0 - 1. If not set the default value is 1.- Specified by:
setGroupedAlpha
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
groupedAlpha
- opacity of the group slice- Returns:
- sliced chart model
-
getGroupedColor
- Specified by:
getGroupedColor
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- grouped color
-
setGroupedColor
Description copied from interface:SlicedChartModel
Sets the color of the group slice. The default value is not set - this means the next available color from "colors" list will be used.- Specified by:
setGroupedColor
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
groupedColor
- grouped color- Returns:
- sliced chart model
-
getGroupedDescription
- Specified by:
getGroupedDescription
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- grouped description
-
setGroupedDescription
Description copied from interface:SlicedChartModel
Sets description of the group slice.- Specified by:
setGroupedDescription
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
groupedDescription
- grouped description string- Returns:
- sliced chart model
-
getGroupedPulled
- Specified by:
getGroupedPulled
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- true if grouped pulled is enabled
-
setGroupedPulled
Description copied from interface:SlicedChartModel
If groupedPulled set to true, the group slice will be pulled out when the chart loads. If not set the default value is false.- Specified by:
setGroupedPulled
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
groupedPulled
- grouped pulled option- Returns:
- sliced chart model
-
getGroupedTitle
- Specified by:
getGroupedTitle
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- grouped title
-
setGroupedTitle
Description copied from interface:SlicedChartModel
Sets title of the group slice. If not set the default value is "Other".- Specified by:
setGroupedTitle
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
groupedTitle
- grouped title string- Returns:
- sliced chart model
-
getGroupPercent
- Specified by:
getGroupPercent
in interfaceSlicedChartModel<T extends SlicedChart>
-
setGroupPercent
Description copied from interface:SlicedChartModel
Sets group percent. If there is more than one slice whose percentage of the pie is less than this number, those slices will be grouped together into one slice. This is the "other" slice. It will always be the last slice in a pie. If not set the default value is 0.- Specified by:
setGroupPercent
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
groupPercent
- the group percent- Returns:
- sliced chart model
-
getHideLabelsPercent
- Specified by:
getHideLabelsPercent
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- hide labels percent
-
setHideLabelsPercent
Description copied from interface:SlicedChartModel
Sets hide labels percent. Slices with percent less then hideLabelsPercent won't display labels. This is useful to avoid cluttering up the chart, if you have a lot of small slices. 0 means all labels will be shown. If not set the default value is 0.- Specified by:
setHideLabelsPercent
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
hideLabelsPercent
- the hide labels percent- Returns:
- sliced chart model
-
getHoverAlpha
- Specified by:
getHoverAlpha
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- opacity of a hovered slice
-
setHoverAlpha
Description copied from interface:SlicedChartModel
Sets opacity of a hovered slice. Value range is 0 - 1. If not set the default value is 1.- Specified by:
setHoverAlpha
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
hoverAlpha
- opacity of a hovered slice- Returns:
- sliced chart model
-
getLabelsEnabled
- Specified by:
getLabelsEnabled
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- true if data labels are visible
-
setLabelsEnabled
Description copied from interface:SlicedChartModel
Set labelsEnabled to true if data labels should be visible. If not set the default value is true.- Specified by:
setLabelsEnabled
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
labelsEnabled
- labels enabled option- Returns:
- sliced chart model
-
getLabelTickAlpha
- Specified by:
getLabelTickAlpha
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
label
tick opacity
-
setLabelTickAlpha
Description copied from interface:SlicedChartModel
Setslabel
tick opacity. Value range is 0 - 1. If not set the default value is 0.2.- Specified by:
setLabelTickAlpha
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
labelTickAlpha
- label tick opacity- Returns:
- sliced chart model
-
getLabelTickColor
- Specified by:
getLabelTickColor
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
label
tick color
-
setLabelTickColor
Description copied from interface:SlicedChartModel
Setslabel
tick color. If not set the default value is #000000.- Specified by:
setLabelTickColor
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
labelTickColor
- label tick color- Returns:
- sliced chart model
-
getMarginBottom
- Specified by:
getMarginBottom
in interfaceHasMargins<T extends SlicedChart>
- Returns:
- bottom spacing
-
setMarginBottom
Description copied from interface:HasMargins
Sets bottom spacing. If not set the default value is 10.If is used for
Legend
default value is 0.If is used for
RadarChartModelImpl
the default value is 0.If is used for chart based on
RectangularChartModelImpl
(GanttChart, SerialChart, XYChart) the default value is 20.If is used for chart based on
SlicedChartModelImpl
(FunnelChart, PieChart) the default value is 10.If is used for
PanelsSettings
the default value is 0.- Specified by:
setMarginBottom
in interfaceHasMargins<T extends SlicedChart>
- Parameters:
marginBottom
- bottom spacing- Returns:
- object with set bottom spacing
-
getMarginLeft
- Specified by:
getMarginLeft
in interfaceHasMargins<T extends SlicedChart>
- Returns:
- left-hand spacing
-
setMarginLeft
Description copied from interface:HasMargins
Sets left-hand spacing.marginLeft will be ignored if chart is
SerialChart
orXYChartModelImpl
andAbstractLegend.autoMargins
is true.If is used for
Legend
the default value is 20.If is used for
RadarChartModelImpl
the default value is 0.If is used for chart based on
RectangularChartModelImpl
(GanttChart, SerialChart, XYChart) the default value is 20.If is used for chart based on
SlicedChartModelImpl
the default value is 0.If is used for
PanelsSettings
the default value is 0.- Specified by:
setMarginLeft
in interfaceHasMargins<T extends SlicedChart>
- Parameters:
marginLeft
- left-hand spacing- Returns:
- object with set left-hand spacing
-
getMarginRight
- Specified by:
getMarginRight
in interfaceHasMargins<T extends SlicedChart>
- Returns:
- right-hand spacing
-
setMarginRight
Description copied from interface:HasMargins
Sets right-hand spacing.marginRight will be ignored if chart is
SerialChart
orXYChartModelImpl
andAbstractLegend.autoMargins
is true.If is used for
Legend
the default value is 20.If is used for
RadarChartModelImpl
the default value is 0.If is used for chart based on
RectangularChartModelImpl
(GanttChart, SerialChart, XYChart) the default value is 20.If is used for chart based on
SlicedChartModelImpl
(FunnelChart, PieChart) the default value is 0.If is used for
PanelsSettings
the default value is 0.- Specified by:
setMarginRight
in interfaceHasMargins<T extends SlicedChart>
- Parameters:
marginRight
- right-hand spacing- Returns:
- object with set right-hand spacing
-
getMarginTop
- Specified by:
getMarginTop
in interfaceHasMargins<T extends SlicedChart>
- Returns:
- top spacing
-
setMarginTop
Description copied from interface:HasMargins
Sets top spacing. If not set the default value is 10.If is used for
Legend
the default value is 0.If is used for
RadarChartModelImpl
the default value is 0.If is used for chart based on
RectangularChartModelImpl
(GanttChart, SerialChart, XYChart) the default value is 20.If is used for chart based on
SlicedChartModelImpl
the default value is 10.If is used for
PanelsSettings
the default value is 0.- Specified by:
setMarginTop
in interfaceHasMargins<T extends SlicedChart>
- Parameters:
marginTop
- top spacing- Returns:
- object with set top spacing
-
getOutlineAlpha
- Specified by:
getOutlineAlpha
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- outline opacity
-
setOutlineAlpha
Description copied from interface:SlicedChartModel
Sets outline opacity. Value range is 0 - 1. If not set the default value is 0.- Specified by:
setOutlineAlpha
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
outlineAlpha
- outline opacity- Returns:
- sliced chart model
-
getOutlineColor
- Specified by:
getOutlineColor
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- outline color
-
setOutlineColor
Description copied from interface:SlicedChartModel
Sets outline color. If not set the default value is #FFFFFF.- Specified by:
setOutlineColor
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
outlineColor
- the outline color- Returns:
- sliced chart model
-
getOutlineThickness
- Specified by:
getOutlineThickness
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- outline thickness
-
setOutlineThickness
Description copied from interface:SlicedChartModel
Sets pie outline thickness. If not set the default value is 1.- Specified by:
setOutlineThickness
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
outlineThickness
- the outline thickness- Returns:
- sliced chart model
-
getPatternField
- Specified by:
getPatternField
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- pattern field name
-
setPatternField
Description copied from interface:SlicedChartModel
Sets field name from your data provider which holds pattern information.- Specified by:
setPatternField
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
patternField
- pattern field string- Returns:
- sliced chart model
-
getPulledField
- Specified by:
getPulledField
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- pulled field name
-
setPulledField
Description copied from interface:SlicedChartModel
Sets name of the field in chart's data provider which holds a boolean value telling the chart whether this slice must be pulled or not.- Specified by:
setPulledField
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
pulledField
- pulled field string- Returns:
- sliced chart model
-
getPullOutDuration
- Specified by:
getPullOutDuration
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- pull out duration in seconds
-
setPullOutDuration
Description copied from interface:SlicedChartModel
Sets pull out duration in seconds. If not set the default value is 1.- Specified by:
setPullOutDuration
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
pullOutDuration
- pull out duration in seconds- Returns:
- sliced chart model
-
getPullOutEffect
- Specified by:
getPullOutEffect
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- pull out effect
-
setPullOutEffect
Description copied from interface:SlicedChartModel
Sets pull out effect. Possible values are: easeOutSine, easeInSine, elastic, bounce. If not set the default value is BOUNCE.- Specified by:
setPullOutEffect
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
pullOutEffect
- the pull out effect- Returns:
- sliced chart model
-
getPullOutOnlyOne
- Specified by:
getPullOutOnlyOne
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- true if only one slice can be pulled out at a time
-
setPullOutOnlyOne
Description copied from interface:SlicedChartModel
If pullOutOnlyOne set to true, only one slice can be pulled out at a time. If the viewer clicks on a slice, any other pulled-out slice will be pulled in. If not set the default value is false.- Specified by:
setPullOutOnlyOne
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
pullOutOnlyOne
- pull out only one option- Returns:
- sliced chart model
-
getSequencedAnimation
- Specified by:
getSequencedAnimation
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- true if the animation should be sequenced
-
setSequencedAnimation
Description copied from interface:SlicedChartModel
Specifies whether the animation should be sequenced or all slices should appear at once. If not set the default value is true.- Specified by:
setSequencedAnimation
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
sequencedAnimation
- sequenced animation option- Returns:
- sliced chart model
-
getStartAlpha
- Specified by:
getStartAlpha
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- initial opacity of all slices
-
setStartAlpha
Description copied from interface:SlicedChartModel
Sets initial opacity of all slices. Slices will fade in from startAlpha. If not set the default value is 0.- Specified by:
setStartAlpha
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
startAlpha
- initial opacity of all slices- Returns:
- sliced chart model
-
getStartDuration
- Specified by:
getStartDuration
in interfaceHasStartEffect<T extends SlicedChart>
- Returns:
- duration of the animation, in seconds
-
setStartDuration
Description copied from interface:HasStartEffect
Sets duration of the animation, in seconds.If you use
AngularGaugeChartModelImpl
default value is 1.If you use charts based on
CoordinateChartModel
(GanttChart, RadarChart, SerialChart, XYChart) default value is 0.If you use chart based on
SlicedChartModelImpl
default value is 1.- Specified by:
setStartDuration
in interfaceHasStartEffect<T extends SlicedChart>
- Parameters:
startDuration
- the start duration- Returns:
- object with set duration of the animation
-
getStartEffect
- Specified by:
getStartEffect
in interfaceHasStartEffect<T extends SlicedChart>
- Returns:
- animation effect
-
setStartEffect
Description copied from interface:HasStartEffect
Sets animation effect.If you use
AngularGaugeChartModelImpl
animation effect will be applied for the arrow. If not set the default value is EASE_IN_SINE.If you use charts based on
CoordinateChartModel
(GanttChart, RadarChart, SerialChart, XYChart) default value is ELASTIC.If you use chart based on
SlicedChartModelImpl
default value is BOUNCE.- Specified by:
setStartEffect
in interfaceHasStartEffect<T extends SlicedChart>
- Parameters:
startEffect
- the start effect- Returns:
- object with set animation effect
-
getTitleField
- Specified by:
getTitleField
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- title field name
-
setTitleField
Description copied from interface:SlicedChartModel
Sets name of the field from data provider which holds slice's title.- Specified by:
setTitleField
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
titleField
- title field string- Returns:
- sliced chart model
-
getUrlField
- Specified by:
getUrlField
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- the URL field name
-
setUrlField
Description copied from interface:SlicedChartModel
Sets name of the field from data provider which holds URL which would be accessed if the user clicks on a slice.- Specified by:
setUrlField
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
urlField
- the URL field string- Returns:
- sliced chart model
-
getUrlTarget
- Specified by:
getUrlTarget
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- the URL target
-
setUrlTarget
Description copied from interface:SlicedChartModel
If URL is specified for a slice, it will be opened when user clicks on it. urlTarget specifies target of this URL. Use "_blank" if you want URL to be opened in a new window. If not set the default value is "_self".- Specified by:
setUrlTarget
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
urlTarget
- the URL target string- Returns:
- sliced chart model
-
getValueField
- Specified by:
getValueField
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- value field name
-
setValueField
Description copied from interface:SlicedChartModel
Sets name of the field from data provider which holds slice's value.- Specified by:
setValueField
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
valueField
- value field string- Returns:
- sliced chart model
-
getVisibleInLegendField
- Specified by:
getVisibleInLegendField
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- visible in legend field
-
setVisibleInLegendField
Description copied from interface:SlicedChartModel
Use this field to selectively specify which slice is shown in legend. It should be set to a boolean field in data (that holds either true or false). For example if you set visibleInLegendField to "showInLegend", all slices that have "showInLegend: false" in their data will not be shown in the legend.- Specified by:
setVisibleInLegendField
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
visibleInLegendField
- visible in legend field string- Returns:
- sliced chart model
-
getLabelFunction
- Specified by:
getLabelFunction
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- label function
-
setLabelFunction
Description copied from interface:SlicedChartModel
Sets label function that can format data labels in any way you want. Chart will call this method and will pass Slice object and formatted text as attributes. This function should return string which will be displayed as label.- Specified by:
setLabelFunction
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
labelFunction
- label function- Returns:
- sliced chart model
-
getMaxLabelWidth
- Specified by:
getMaxLabelWidth
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- maximum label width
-
setMaxLabelWidth
Description copied from interface:SlicedChartModel
Sets maximum label width. If width of the label is bigger than maxLabelWidth, it will be wrapped. If not set the default value is 200.- Specified by:
setMaxLabelWidth
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
maxLabelWidth
- maximum label width- Returns:
- sliced chart model
-
getClassNameField
- Specified by:
getClassNameField
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- class name field
-
setClassNameField
Description copied from interface:SlicedChartModel
Sets field name from your data provider which holds CSS class name. If this field is set andAbstractChart.addClassNames
is enabled, the slice element will have this class name set.- Specified by:
setClassNameField
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
classNameField
- class name field string- Returns:
- sliced chart model
-
getShowZeroSlices
- Specified by:
getShowZeroSlices
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- true if the chart displays outlines (if visible) and labels for slices even if their value is 0.
-
setShowZeroSlices
Description copied from interface:SlicedChartModel
Set showZeroSlices to true if you want the chart should display outlines (if visible) and labels for slices even if their value is 0. If not set the default value is false.- Specified by:
setShowZeroSlices
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
showZeroSlices
- show zero slices option- Returns:
- sliced chart model
-
getAccessibleLabel
- Specified by:
getAccessibleLabel
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- accessible label text
-
setAccessibleLabel
Description copied from interface:SlicedChartModel
Sets accessible label text. It will be read by screen readers if user rolls-over the slice or sets focus using tab key (this is possible only ifSlicedChartModelImpl.tabIndex
is set to some number). Text is added as aria-label tag. Note, not all screen readers and browsers support this. If not set the default value is "[[title]]: [[percents]]% [[value]] [[description]]".- Specified by:
setAccessibleLabel
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
accessibleLabel
- accessible label text- Returns:
- sliced chart model
-
getLabelColorField
- Specified by:
getLabelColorField
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- label color field
-
setLabelColorField
Description copied from interface:SlicedChartModel
Sets a field from your data provider which holds color value for the tick. Use it to set color of the label for each slice individually. If not set the default value is #000000.- Specified by:
setLabelColorField
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
labelColorField
- label color field string- Returns:
- sliced chart model
-
getTabIndex
- Specified by:
getTabIndex
in interfaceSlicedChartModel<T extends SlicedChart>
- Returns:
- tab index
-
setTabIndex
Description copied from interface:SlicedChartModel
In case you set it to some number, the chart will set focus on a slice (starting from first) when user clicks tab key. When a focus is set, screen readers like NVDA Screen reader will read label which is set usingSlicedChartModelImpl.accessibleLabel
. Note, not all browsers and readers support this.- Specified by:
setTabIndex
in interfaceSlicedChartModel<T extends SlicedChart>
- Parameters:
tabIndex
- the tab index- Returns:
- sliced chart model
-
addSliceClickListener
Description copied from interface:SlicedChart
Adds a listener for a slice. Called when user clicks on the slice.- Specified by:
addSliceClickListener
in interfaceSlicedChart<T extends SlicedChart>
- Parameters:
listener
- a listener to add- Returns:
- subscription
-
onSliceClick
-
addSliceRightClickListener
Description copied from interface:SlicedChart
Adds a listener for a slice. Called when user clicks on the slice.- Specified by:
addSliceRightClickListener
in interfaceSlicedChart<T extends SlicedChart>
- Parameters:
listener
- a listener to add- Returns:
- subscription
-
onSliceRightClick
-
addSlicePullInListener
Description copied from interface:SlicedChart
Adds a listener for a slice. Called when the slice did pull-in.- Specified by:
addSlicePullInListener
in interfaceSlicedChart<T extends SlicedChart>
- Parameters:
listener
- a listener to add- Returns:
- subscription
-
onSlicePullIn
-
addSlicePullOutListener
Description copied from interface:SlicedChart
Adds a listener for a slice. Called when the slice did pull-out.- Specified by:
addSlicePullOutListener
in interfaceSlicedChart<T extends SlicedChart>
- Parameters:
listener
- a listener to add- Returns:
- subscription
-
onSlicePullOut
-