Package io.jmix.charts.component.impl
Class ChartImpl<T extends Chart,M extends AbstractChart>
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<JmixAmchartsScene>
io.jmix.charts.component.impl.ChartImpl<T,M>
- All Implemented Interfaces:
Chart<T>
,ChartModel<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:
AngularGaugeChartImpl
,CoordinateChartImpl
,SlicedChartImpl
public abstract class ChartImpl<T extends Chart,M extends AbstractChart>
extends AbstractComponent<JmixAmchartsScene>
implements Chart<T>, org.springframework.beans.factory.InitializingBean
-
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 ChartLocaleHelper
protected ChartClickListener
protected CurrentAuthentication
protected FormatStringsRegistry
protected LegendItemHideListener
protected LegendItemShowListener
protected LegendLabelClickListener
protected LegendMarkerClickListener
protected Messages
protected ChartRightClickListener
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 TypeMethodDescriptionaddAdditionalFields
(String... fields) Adds additional fieldsaddClickListener
(Consumer<Chart.ChartClickEvent> listener) Adds a listener for a chart.Adds data items.Adds labels.Adds a listener for a chart.Adds a listener for a chart.Adds a listener for a chart.Adds a listener for a chart.addPrefixesOfBigNumbers
(BigNumberPrefix... prefixesOfBigNumbers) Adds BigNumberPrefixes.addPrefixesOfSmallNumbers
(SmallNumberPrefix... prefixesOfSmallNumbers) Adds SmallNumberPrefixAdds a listener for a chart.Adds titles to chart.void
protected abstract M
protected ChartSerializer
protected JmixAmchartsScene
getColor()
getDefs()
protected M
getModel()
getPath()
getTheme()
protected void
protected void
protected void
protected void
protected void
protected void
protected void
void
repaint()
Resend all items and properties to client and repaint chart.setAccessible
(Boolean accessible) When enabled, chart adds aria-label attributes to columns or bullets objects.setAccessibleDescription
(String accessibleDescription) Description which will be added to node of SVG element.setAccessibleTitle
(String accessibleTitle) Description which is added to of a SVG element.setAddClassNames
(Boolean addClassNames) Specifies, if CSS class names should be added to chart elements (line, fill, column, etc).setAdditionalFields
(List additionalFields) Sets list of additional fields.setAllLabels
(List allLabels) Sets the list of labels.setAutoDisplay
(Boolean autoDisplay) If you set autoDisplay to true the chart will automatically monitor changes of display style of chart’s container (or any of it’s parents) and will render chart correctly.setAutoResize
(Boolean autoResize) Set to false if you don't want chart to resize itself whenever its parent container size changes.setAutoTransform
(Boolean autoTransform) If you set it to true and your chart div (or any of the parent div) has CSS scale applied, the chart will position mouse at a correct position.setBackgroundAlpha
(Double backgroundAlpha) Sets opacity of background.setBackgroundColor
(Color backgroundColor) Sets background color.setBalloon
(Balloon balloon) Sets the balloon (tooltip) of the chart.setBorderAlpha
(Double borderAlpha) Sets opacity of chart's border.setBorderColor
(Color borderColor) Sets color of chart's border.void
setChartLocaleHelper
(ChartLocaleHelper chartLocaleHelper) setClassNamePrefix
(String classNamePrefix) Sets prefix to all class names which are added to all visual elements of a chart in caseAbstractChart.addClassNames
is set to true.Sets text color.setCreditsPosition
(CreditsPosition creditsPosition) Sets position of link to amCharts site.void
setCurrentAuthentication
(CurrentAuthentication currentAuthentication) setDataProvider
(DataProvider dataProvider) Sets data provider that contains data set.setDecimalSeparator
(String decimalSeparator) Sets decimal separator.Sets any additional information to SVG, like SVG filters or clip paths.Sets export config.setFontFamily
(String fontFamily) Sets font family.setFontSize
(Integer fontSize) Sets font size.void
setFormatStringsRegistry
(FormatStringsRegistry formatStringsRegistry) setHandDrawn
(Boolean handDrawn) If true, the lines of the chart will be distorted and will produce hand-drawn effect.setHandDrawScatter
(Integer handDrawScatter) Defines by how many pixels hand-drawn line (whenhandDrawn
is set to true) will fluctuate.setHandDrawThickness
(Integer handDrawThickness) Defines by how many pixels line thickness will fluctuate (whenhandDrawn
is set to true).setHideBalloonTime
(Integer hideBalloonTime) Sets time, in milliseconds after which balloon is hidden if the user rolls-out of the object.setLanguage
(String language) Sets language of default.Sets legend of a chart.void
setMessages
(Messages messages) void
setNativeJson
(String json) Set additional JSON configuration as a string.setPanEventsEnabled
(Boolean panEventsEnabled) This setting affects touch-screen devices only.Specifies absolute or relative path to amCharts files.setPathToImages
(String pathToImages) Specifies path to the folder where images like resize grips, lens and similar are.setPercentPrecision
(Integer percentPrecision) Sets precision of percent values.setPrecision
(Integer precision) Precision of values.setPrefixesOfBigNumbers
(List prefixesOfBigNumbers) Sets the prefixes which are used to make big numbers shorter: 2M instead of 2000000, etc.setPrefixesOfSmallNumbers
(List prefixesOfSmallNumbers) Sets prefixes which are used to make small numbers shorter: 2μ instead of 0.000002, etc.setProcessCount
(Integer processCount) If processTimeout is greater than 0, 1000 data items will be parsed at a time, then the chart will make pause and continue parsing data until it finishes.setProcessTimeout
(Integer processTimeout) If you set it to 1 millisecond or some bigger value, chart will be built in chunks instead of all at once.setResponsive
(Responsive responsive) Sets a config object for Responsive pluginsetSvgIcons
(Boolean svgIcons) Sets use SVG icons (if browser supports SVG).setTapToActivate
(Boolean tapToActivate) Charts which require gestures like swipe (charts with scrollbar/cursor) used to prevent regular page scrolling and could result page to stick to the same spot if the chart occupied whole screen.setTheme
(ChartTheme theme) Sets theme of a chart.setThousandsSeparator
(String thousandsSeparator) Sets thousands separator.Sets list of titles.setTouchClickDuration
(Integer touchClickDuration) Sets the touch click duration.protected void
setupChartLocale
(AbstractChart chart) protected void
setupDefaults
(M chart) setUsePrefixes
(Boolean usePrefixes) If true, prefixes will be used for big and small numbers.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.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
-
messages
-
currentAuthentication
-
chartLocaleHelper
-
formatStringsRegistry
-
clickHandler
-
rightClickHandler
-
legendItemHideHandler
-
legendItemShowHandler
-
legendLabelClickHandler
-
legendMarkerClickHandler
-
-
Constructor Details
-
ChartImpl
public ChartImpl()
-
-
Method Details
-
createComponent
-
createChartSerializer
-
setChartLocaleHelper
-
setFormatStringsRegistry
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
setMessages
-
setCurrentAuthentication
-
createChartConfiguration
-
getModel
-
initLocale
protected void initLocale() -
setupDefaults
-
setupChartLocale
-
repaint
public void repaint()Description copied from interface:Chart
Resend all items and properties to client and repaint chart. Use this method if you change some property of already displayed chart. -
getNativeJson
- Specified by:
getNativeJson
in interfaceChart<T extends Chart>
- Returns:
- additional JSON configuration as a string.
-
setNativeJson
Description copied from interface:Chart
Set additional JSON configuration as a string. This JSON can override configuration loaded from XML and from Component API.- Specified by:
setNativeJson
in interfaceChart<T extends Chart>
- Parameters:
json
- JSON configuration
-
getAddClassNames
- Specified by:
getAddClassNames
in interfaceChartModel<T extends Chart>
- Returns:
- true if CSS class names should be added to chart elements
-
setAddClassNames
Description copied from interface:ChartModel
Specifies, if CSS class names should be added to chart elements (line, fill, column, etc). If not set the default value is false.
See documentation for available CSS class names.
http://www.amcharts.com/kbase/css-class-names/- Specified by:
setAddClassNames
in interfaceChartModel<T extends Chart>
- Parameters:
addClassNames
- add CSS class names option- Returns:
- chart model
-
getAllLabels
- Specified by:
getAllLabels
in interfaceChartModel<T extends Chart>
- Returns:
- list of labels
-
setAllLabels
Description copied from interface:ChartModel
Sets the list of labels.- Specified by:
setAllLabels
in interfaceChartModel<T extends Chart>
- Parameters:
allLabels
- list of labels- Returns:
- chart model
-
addLabels
Description copied from interface:ChartModel
Adds labels.- Specified by:
addLabels
in interfaceChartModel<T extends Chart>
- Parameters:
allLabels
- the labels to to add- Returns:
- chart model
-
getExport
- Specified by:
getExport
in interfaceChartModel<T extends Chart>
- Returns:
- export config
-
setExport
Description copied from interface:ChartModel
Sets export config. Specifies how export to image/data export/print/annotate menu will look and behave.- Specified by:
setExport
in interfaceChartModel<T extends Chart>
- Parameters:
export
- the export- Returns:
- chart model
-
getBackgroundColor
- Specified by:
getBackgroundColor
in interfaceChartModel<T extends Chart>
- Returns:
- background color
-
setBackgroundColor
Description copied from interface:ChartModel
Sets background color. You should setAbstractChart.backgroundAlpha
to greater than 0 value in order background to be visible. If not set the default value is #FFFFFF.- Specified by:
setBackgroundColor
in interfaceChartModel<T extends Chart>
- Parameters:
backgroundColor
- the background color- Returns:
- chart model
-
getBalloon
- Specified by:
getBalloon
in interfaceChartModel<T extends Chart>
- Returns:
- balloon of the chart
-
setBalloon
Description copied from interface:ChartModel
Sets the balloon (tooltip) of the chart.- Specified by:
setBalloon
in interfaceChartModel<T extends Chart>
- Parameters:
balloon
- the balloon- Returns:
- chart model
-
getLegend
- Specified by:
getLegend
in interfaceChartModel<T extends Chart>
- Returns:
- legend of a chart
-
setLegend
Description copied from interface:ChartModel
Sets legend of a chart.- Specified by:
setLegend
in interfaceChartModel<T extends Chart>
- Parameters:
legend
- the legend- Returns:
- chart model
-
getDecimalSeparator
- Specified by:
getDecimalSeparator
in interfaceChartModel<T extends Chart>
- Returns:
- decimal separator
-
setDecimalSeparator
Description copied from interface:ChartModel
Sets decimal separator. If not set the default value is ".".- Specified by:
setDecimalSeparator
in interfaceChartModel<T extends Chart>
- Parameters:
decimalSeparator
- the decimal separator string- Returns:
- chart model
-
getPercentPrecision
- Specified by:
getPercentPrecision
in interfaceChartModel<T extends Chart>
- Returns:
- percent precision
-
setPercentPrecision
Description copied from interface:ChartModel
Sets precision of percent values. -1 means percent values won't be rounded at all and show as they are. If not set the default value is 2.- Specified by:
setPercentPrecision
in interfaceChartModel<T extends Chart>
- Parameters:
percentPrecision
- the percent precision- Returns:
- chart model
-
getPrecision
- Specified by:
getPrecision
in interfaceChartModel<T extends Chart>
- Returns:
- precision
-
setPrecision
Description copied from interface:ChartModel
Precision of values. -1 means values won't be rounded at all and show as they are. If not set the default value is -1.- Specified by:
setPrecision
in interfaceChartModel<T extends Chart>
- Parameters:
precision
- the precision- Returns:
- chart model
-
getDataProvider
- Specified by:
getDataProvider
in interfaceChart<T extends Chart>
- Specified by:
getDataProvider
in interfaceChartModel<T extends Chart>
- Returns:
- the data provider
-
setDataProvider
Description copied from interface:ChartModel
Sets data provider that contains data set.- Specified by:
setDataProvider
in interfaceChart<T extends Chart>
- Specified by:
setDataProvider
in interfaceChartModel<T extends Chart>
- Parameters:
dataProvider
- the data provider- Returns:
- chart
- See Also:
-
addData
Description copied from interface:ChartModel
Adds data items. IfDataProvider
is null, so it createsListDataProvider
- Specified by:
addData
in interfaceChartModel<T extends Chart>
- Parameters:
dataItems
- data items to add- Returns:
- chart model
-
getPathToImages
- Specified by:
getPathToImages
in interfaceChartModel<T extends Chart>
- Returns:
- path to images
-
setPathToImages
Description copied from interface:ChartModel
Specifies path to the folder where images like resize grips, lens and similar are.- Specified by:
setPathToImages
in interfaceChartModel<T extends Chart>
- Parameters:
pathToImages
- path to images- Returns:
- chart model
-
getTheme
- Specified by:
getTheme
in interfaceChartModel<T extends Chart>
- Returns:
- theme of a chart
-
setTheme
Description copied from interface:ChartModel
Sets theme of a chart. If not set the default value is NONE.- Specified by:
setTheme
in interfaceChartModel<T extends Chart>
- Parameters:
theme
- the theme- Returns:
- chart model
-
getBorderAlpha
- Specified by:
getBorderAlpha
in interfaceChartModel<T extends Chart>
- Returns:
- opacity of chart's border
-
setBorderAlpha
Description copied from interface:ChartModel
Sets opacity of chart's border. Value range is 0 - 1. If not set the default value is 0.- Specified by:
setBorderAlpha
in interfaceChartModel<T extends Chart>
- Parameters:
borderAlpha
- the border alpha- Returns:
- chart model
-
getBorderColor
- Specified by:
getBorderColor
in interfaceChartModel<T extends Chart>
- Returns:
- border color
-
setBorderColor
Description copied from interface:ChartModel
Sets color of chart's border. You should set borderAlpha to greater than 0 value in order border to be visible. If not set the default value is #000000.- Specified by:
setBorderColor
in interfaceChartModel<T extends Chart>
- Parameters:
borderColor
- the border color- Returns:
- chart model
-
getClassNamePrefix
- Specified by:
getClassNamePrefix
in interfaceChartModel<T extends Chart>
- Returns:
- class name prefix
-
setClassNamePrefix
Description copied from interface:ChartModel
Sets prefix to all class names which are added to all visual elements of a chart in caseAbstractChart.addClassNames
is set to true. If not set the default value is "amcharts".- Specified by:
setClassNamePrefix
in interfaceChartModel<T extends Chart>
- Parameters:
classNamePrefix
- class name prefix string- Returns:
- chart model
-
getCreditsPosition
- Specified by:
getCreditsPosition
in interfaceChartModel<T extends Chart>
- Returns:
- position of link to amCharts site
-
setCreditsPosition
Description copied from interface:ChartModel
Sets position of link to amCharts site. Allowed values are: top-left, top-right, bottom-left and bottom-right. Non-commercial version only. If not set the default value is TOP_LEFT.- Specified by:
setCreditsPosition
in interfaceChartModel<T extends Chart>
- Parameters:
creditsPosition
- the credits position- Returns:
- chart model
-
getColor
- Specified by:
getColor
in interfaceChartModel<T extends Chart>
- Returns:
- text color
-
setColor
Description copied from interface:ChartModel
Sets text color. If not set the default value is "#000000".- Specified by:
setColor
in interfaceChartModel<T extends Chart>
- Parameters:
color
- the text color- Returns:
- chart model
-
getFontFamily
- Specified by:
getFontFamily
in interfaceChartModel<T extends Chart>
- Returns:
- font family
-
setFontFamily
Description copied from interface:ChartModel
Sets font family. If not set the default value is "Verdana".- Specified by:
setFontFamily
in interfaceChartModel<T extends Chart>
- Parameters:
fontFamily
- font family string- Returns:
- chart model
-
getFontSize
- Specified by:
getFontSize
in interfaceChartModel<T extends Chart>
- Returns:
- font size
-
setFontSize
Description copied from interface:ChartModel
Sets font size. If not set the default value is 11.- Specified by:
setFontSize
in interfaceChartModel<T extends Chart>
- Parameters:
fontSize
- the font size- Returns:
- chart model
-
getHandDrawn
- Specified by:
getHandDrawn
in interfaceChartModel<T extends Chart>
- Returns:
- true if the lines of the chart should be distorted and should produce hand-drawn effect
-
setHandDrawn
Description copied from interface:ChartModel
If true, the lines of the chart will be distorted and will produce hand-drawn effect. Try to adjusthandDrawScatter
andhandDrawThickness
properties for a more scattered result. If not set the default value is false.- Specified by:
setHandDrawn
in interfaceChartModel<T extends Chart>
- Parameters:
handDrawn
- hand drawn option- Returns:
- chart model
-
getHandDrawScatter
- Specified by:
getHandDrawScatter
in interfaceChartModel<T extends Chart>
- Returns:
- hand draw scatter
-
setHandDrawScatter
Description copied from interface:ChartModel
Defines by how many pixels hand-drawn line (whenhandDrawn
is set to true) will fluctuate. If not set the default value is 2.- Specified by:
setHandDrawScatter
in interfaceChartModel<T extends Chart>
- Parameters:
handDrawScatter
- the hand drawn scatter- Returns:
- chart model
-
getHandDrawThickness
- Specified by:
getHandDrawThickness
in interfaceChartModel<T extends Chart>
- Returns:
- hand drawn thickness
-
setHandDrawThickness
Description copied from interface:ChartModel
Defines by how many pixels line thickness will fluctuate (whenhandDrawn
is set to true). If not set the default value is 1.- Specified by:
setHandDrawThickness
in interfaceChartModel<T extends Chart>
- Parameters:
handDrawThickness
- the hand draw thickness- Returns:
- chart model
-
getHideBalloonTime
- Specified by:
getHideBalloonTime
in interfaceChartModel<T extends Chart>
- Returns:
- hide balloon time in milliseconds
-
setHideBalloonTime
Description copied from interface:ChartModel
Sets time, in milliseconds after which balloon is hidden if the user rolls-out of the object. Note, this is not duration of fade-out. Duration of fade-out isBalloon.fadeOutDuration
. If not set the default value is 150.- Specified by:
setHideBalloonTime
in interfaceChartModel<T extends Chart>
- Parameters:
hideBalloonTime
- the hide balloon time in milliseconds- Returns:
- chart model
-
getPanEventsEnabled
- Specified by:
getPanEventsEnabled
in interfaceChartModel<T extends Chart>
- Returns:
- true if pan events enabled
-
setPanEventsEnabled
Description copied from interface:ChartModel
This setting affects touch-screen devices only. If a chart is on a page, and panEventsEnabled are set to true, the page won't move if the user touches the chart first. If a chart is big enough and occupies all the screen of your touch device, the user won’t be able to move the page at all. If you think that selecting/panning the chart is a primary purpose of your users, you should set panEventsEnabled to true, otherwise - false. If not set the default value is true.- Specified by:
setPanEventsEnabled
in interfaceChartModel<T extends Chart>
- Parameters:
panEventsEnabled
- pan events enabled option- Returns:
- chart model
-
getPrefixesOfBigNumbers
- Specified by:
getPrefixesOfBigNumbers
in interfaceChartModel<T extends Chart>
- Returns:
- list of BigNumberPrefix
-
setPrefixesOfBigNumbers
Description copied from interface:ChartModel
Sets the prefixes which are used to make big numbers shorter: 2M instead of 2000000, etc. Prefixes are used on value axes and in the legend. To enable prefixes, setusePrefixes
property to true. If not set the default value is[{"number":1e+3, "prefix":"k"}, {"number":1e+6, "prefix":"M"}, {"number":1e+9, "prefix":"G"}, {"number":1e+12, "prefix":"T"}, {"number":1e+15, "prefix":"P"}, {"number":1e+18, "prefix":"E"}, {"number":1e+21, "prefix":"Z"}, {"number":1e+24, "prefix":"Y"}]
- Specified by:
setPrefixesOfBigNumbers
in interfaceChartModel<T extends Chart>
- Parameters:
prefixesOfBigNumbers
- list of BigNumberPrefix- Returns:
- chart model
-
addPrefixesOfBigNumbers
Description copied from interface:ChartModel
Adds BigNumberPrefixes.- Specified by:
addPrefixesOfBigNumbers
in interfaceChartModel<T extends Chart>
- Parameters:
prefixesOfBigNumbers
- prefixes of big numbers- Returns:
- chart model
-
getPrefixesOfSmallNumbers
- Specified by:
getPrefixesOfSmallNumbers
in interfaceChartModel<T extends Chart>
- Returns:
- list of SmallNumberPrefix
-
setPrefixesOfSmallNumbers
Description copied from interface:ChartModel
Sets prefixes which are used to make small numbers shorter: 2μ instead of 0.000002, etc. Prefixes are used on value axes and in the legend. To enable prefixes, setusePrefixes
property to true. If not set the default value is[{"number":1e-24, "prefix":"y"}, {"number":1e-21, "prefix":"z"}, {"number":1e-18, "prefix":"a"}, {"number":1e-15, "prefix":"f"}, {"number":1e-12, "prefix":"p"}, {"number":1e-9, "prefix":"n"}, {"number":1e-6, "prefix":"μ"}, {"number":1e-3, "prefix":"m"}]
- Specified by:
setPrefixesOfSmallNumbers
in interfaceChartModel<T extends Chart>
- Parameters:
prefixesOfSmallNumbers
- list of SmallNumberPrefix- Returns:
- chart model
-
addPrefixesOfSmallNumbers
Description copied from interface:ChartModel
Adds SmallNumberPrefix- Specified by:
addPrefixesOfSmallNumbers
in interfaceChartModel<T extends Chart>
- Parameters:
prefixesOfSmallNumbers
- prefixes of small numbers- Returns:
- chart model
-
getThousandsSeparator
- Specified by:
getThousandsSeparator
in interfaceChartModel<T extends Chart>
- Returns:
- thousands separator
-
setThousandsSeparator
Description copied from interface:ChartModel
Sets thousands separator. If not set the default value is ".".- Specified by:
setThousandsSeparator
in interfaceChartModel<T extends Chart>
- Parameters:
thousandsSeparator
- - thousands separator string- Returns:
- chart model
-
getTitles
- Specified by:
getTitles
in interfaceChartModel<T extends Chart>
- Returns:
- list of titles
-
setTitles
Description copied from interface:ChartModel
Sets list of titles.- Specified by:
setTitles
in interfaceChartModel<T extends Chart>
- Parameters:
list
- the titles- Returns:
- chart model
-
addTitles
Description copied from interface:ChartModel
Adds titles to chart.- Specified by:
addTitles
in interfaceChartModel<T extends Chart>
- Parameters:
titles
- the titles to add- Returns:
- chart model
-
getUsePrefixes
- Specified by:
getUsePrefixes
in interfaceChartModel<T extends Chart>
- Returns:
- true if uses prefixes is enabled
-
setUsePrefixes
Description copied from interface:ChartModel
If true, prefixes will be used for big and small numbers. You can set arrays of prefixesprefixesOfSmallNumbers
andprefixesOfBigNumbers
properties. If not set the default value is false.- Specified by:
setUsePrefixes
in interfaceChartModel<T extends Chart>
- Parameters:
usePrefixes
- the use prefixes option- Returns:
- chart model
-
getAdditionalFields
- Specified by:
getAdditionalFields
in interfaceChartModel<T extends Chart>
- Returns:
- list of additional fields
-
setAdditionalFields
Description copied from interface:ChartModel
Sets list of additional fields. Fields from your data provider that should be used directly in the chart configuration.- Specified by:
setAdditionalFields
in interfaceChartModel<T extends Chart>
- Parameters:
additionalFields
- list of additional fields- Returns:
- chart model
-
addAdditionalFields
Description copied from interface:ChartModel
Adds additional fields- Specified by:
addAdditionalFields
in interfaceChartModel<T extends Chart>
- Parameters:
fields
- the fields- Returns:
- chart model
-
getAutoDisplay
- Specified by:
getAutoDisplay
in interfaceChartModel<T extends Chart>
- Returns:
- true if auto display is enabled
-
setAutoDisplay
Description copied from interface:ChartModel
If you set autoDisplay to true the chart will automatically monitor changes of display style of chart’s container (or any of it’s parents) and will render chart correctly. If not set the default value is false.- Specified by:
setAutoDisplay
in interfaceChartModel<T extends Chart>
- Parameters:
autoDisplay
- auto display option- Returns:
- chart model
-
getAutoResize
- Specified by:
getAutoResize
in interfaceChartModel<T extends Chart>
- Returns:
- true if chart should resize itself whenever its parent container size changes
-
setAutoResize
Description copied from interface:ChartModel
Set to false if you don't want chart to resize itself whenever its parent container size changes. If not set the default value is true.- Specified by:
setAutoResize
in interfaceChartModel<T extends Chart>
- Parameters:
autoResize
- auto resize option- Returns:
- chart model
-
getBackgroundAlpha
- Specified by:
getBackgroundAlpha
in interfaceChartModel<T extends Chart>
- Returns:
- opacity of background
-
setBackgroundAlpha
Description copied from interface:ChartModel
Sets opacity of background. Set it to greater 0 value if you wantAbstractChart.backgroundColor
to work. If not set the default value is 0.- Specified by:
setBackgroundAlpha
in interfaceChartModel<T extends Chart>
- Parameters:
backgroundAlpha
- background alpha option- Returns:
- chart model
-
getLanguage
- Specified by:
getLanguage
in interfaceChartModel<T extends Chart>
- Returns:
- language
-
setLanguage
Description copied from interface:ChartModel
Sets language of default. Note, you should include language js file from amcharts/lang and then use variable name used in this file, likesetLanguage("de")
.- Specified by:
setLanguage
in interfaceChartModel<T extends Chart>
- Parameters:
language
- language string- Returns:
- chart model
-
getPath
- Specified by:
getPath
in interfaceChartModel<T extends Chart>
- Returns:
- path
-
setPath
Description copied from interface:ChartModel
Specifies absolute or relative path to amCharts files.- Specified by:
setPath
in interfaceChartModel<T extends Chart>
- Parameters:
path
- the path string- Returns:
- chart model
-
getSvgIcons
- Specified by:
getSvgIcons
in interfaceChartModel<T extends Chart>
- Returns:
- true if using SVG icons is enabled
-
setSvgIcons
Description copied from interface:ChartModel
Sets use SVG icons (if browser supports SVG). If not set the default value is true.- Specified by:
setSvgIcons
in interfaceChartModel<T extends Chart>
- Parameters:
svgIcons
- svgIcons option- Returns:
- chart model
-
getTapToActivate
- Specified by:
getTapToActivate
in interfaceChartModel<T extends Chart>
- Returns:
- true if tap to activate is enabled
-
setTapToActivate
Description copied from interface:ChartModel
Charts which require gestures like swipe (charts with scrollbar/cursor) used to prevent regular page scrolling and could result page to stick to the same spot if the chart occupied whole screen. Now, in order these gestures to start working user has to touch the chart once. Regular touch events like touching on the bar/slice area do not require the first tap and will show balloons and perform other tasks as usual. If you have a chart which occupies full screen and your page does not require scrolling, set tapToActivate to false – this will bring old behavior back. If not set the default value is true.- Specified by:
setTapToActivate
in interfaceChartModel<T extends Chart>
- Parameters:
tapToActivate
- tap to activate option- Returns:
- chart model
-
getDefs
- Specified by:
getDefs
in interfaceChartModel<T extends Chart>
- Returns:
- defs
-
setDefs
Description copied from interface:ChartModel
Sets any additional information to SVG, like SVG filters or clip paths. The structure of this object should be identical to XML structure of a object you are adding, only in JSON format.- Specified by:
setDefs
in interfaceChartModel<T extends Chart>
- Parameters:
defs
- defs string- Returns:
- chart model
-
getAccessible
- Specified by:
getAccessible
in interfaceChartModel<T extends Chart>
- Returns:
- true if accessible is enabled
-
setAccessible
Description copied from interface:ChartModel
When enabled, chart adds aria-label attributes to columns or bullets objects. You can control values of these labels using properties likeAbstractGraph.accessibleLabel
. If not set the default value is true.- Specified by:
setAccessible
in interfaceChartModel<T extends Chart>
- Parameters:
accessible
- accessible option- Returns:
- chart model
-
getAccessibleTitle
- Specified by:
getAccessibleTitle
in interfaceChartModel<T extends Chart>
- Returns:
- description of a SVG element
-
setAccessibleTitle
Description copied from interface:ChartModel
Description which is added to of a SVG element.- Specified by:
setAccessibleTitle
in interfaceChartModel<T extends Chart>
- Parameters:
accessibleTitle
- accessible title string- Returns:
- chart model
-
setResponsive
Description copied from interface:ChartModel
Sets a config object for Responsive plugin- Specified by:
setResponsive
in interfaceChartModel<T extends Chart>
- Parameters:
responsive
- the responsive- Returns:
- chart model
-
getResponsive
- Specified by:
getResponsive
in interfaceChartModel<T extends Chart>
- Returns:
- responsive
-
getProcessCount
- Specified by:
getProcessCount
in interfaceChartModel<T extends Chart>
- Returns:
- process count
-
setProcessCount
Description copied from interface:ChartModel
If processTimeout is greater than 0, 1000 data items will be parsed at a time, then the chart will make pause and continue parsing data until it finishes. If not set the default value is 1000.- Specified by:
setProcessCount
in interfaceChartModel<T extends Chart>
- Parameters:
processCount
- the process count- Returns:
- chart model
-
getProcessTimeout
- Specified by:
getProcessTimeout
in interfaceChartModel<T extends Chart>
- Returns:
- process timeout
-
setProcessTimeout
Description copied from interface:ChartModel
If you set it to 1 millisecond or some bigger value, chart will be built in chunks instead of all at once. This is useful if you work with a lot of data and the initial build of the chart takes a lot of time, which freezes the whole web application by not allowing other processes to do their job while the chart is busy. If not set the default value is 0.- Specified by:
setProcessTimeout
in interfaceChartModel<T extends Chart>
- Parameters:
processTimeout
- the process timeout- Returns:
- chart model
-
getTouchClickDuration
- Specified by:
getTouchClickDuration
in interfaceChartModel<T extends Chart>
- Returns:
- touch click duration in milliseconds
-
setTouchClickDuration
Description copied from interface:ChartModel
Sets the touch click duration. If you set it to 200 (milliseconds) or so, the chart will fire GraphItemClickEvent or SliceClickEvent only if user holds his/her finger for 0.2 seconds (200 ms) on the column/bullet/slice object. If not set the default value is 0.- Specified by:
setTouchClickDuration
in interfaceChartModel<T extends Chart>
- Parameters:
touchClickDuration
- the touch click duration in milliseconds- Returns:
- chart model
-
getAutoTransform
- Specified by:
getAutoTransform
in interfaceChartModel<T extends Chart>
- Returns:
- true if auto transform is enabled,
-
setAutoTransform
Description copied from interface:ChartModel
If you set it to true and your chart div (or any of the parent div) has CSS scale applied, the chart will position mouse at a correct position. This operation consumes some CPU and quite a few people are using CSS transforms. If not set the default value is false.- Specified by:
setAutoTransform
in interfaceChartModel<T extends Chart>
- Parameters:
autoTransform
- auto transform option- Returns:
- chart model
-
addClickListener
Description copied from interface:Chart
Adds a listener for a chart. Called when user clicks on the chart.- Specified by:
addClickListener
in interfaceChart<T extends Chart>
- Parameters:
listener
- a listener to add- Returns:
- subscription
-
onChartClick
-
addRightClickListener
Description copied from interface:Chart
Adds a listener for a chart. Called when user clicks on the chart.- Specified by:
addRightClickListener
in interfaceChart<T extends Chart>
- Parameters:
listener
- a listener to add- Returns:
- subscription
-
onChartRightClick
-
addLegendItemHideListener
Description copied from interface:Chart
Adds a listener for a chart. Called when the legend item hided.- Specified by:
addLegendItemHideListener
in interfaceChart<T extends Chart>
- Parameters:
listener
- a listener to add- Returns:
- subscription
-
onLegendItemHide
-
addLegendItemShowListener
Description copied from interface:Chart
Adds a listener for a chart. Called when the legend item showed.- Specified by:
addLegendItemShowListener
in interfaceChart<T extends Chart>
- Parameters:
listener
- a listener to add- Returns:
- subscription
-
onLegendItemShow
-
addLegendLabelClickListener
Description copied from interface:Chart
Adds a listener for a chart. Called when user clicks on the legend item.- Specified by:
addLegendLabelClickListener
in interfaceChart<T extends Chart>
- Parameters:
listener
- a listener to add- Returns:
- subscription
-
onLegendLabelClick
-
addLegendMarkerClickListener
Description copied from interface:Chart
Adds a listener for a chart. Called when user clicks on the legend marker.- Specified by:
addLegendMarkerClickListener
in interfaceChart<T extends Chart>
- Parameters:
listener
- a listener to add- Returns:
- subscription
-
onLegendMarkerClick
-
getAccessibleDescription
- Specified by:
getAccessibleDescription
in interfaceChartModel<T extends Chart>
- Returns:
- accessible description string
-
setAccessibleDescription
Description copied from interface:ChartModel
Description which will be added to node of SVG element.- Specified by:
setAccessibleDescription
in interfaceChartModel<T extends Chart>
- Parameters:
accessibleDescription
- description string- Returns:
- chart model
-