Package io.jmix.charts.model.chart.impl
Class AbstractChart<T extends AbstractChartObject & ChartModel>
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.chart.impl.ChartModelImpl
io.jmix.charts.model.chart.impl.AbstractChart<T>
- All Implemented Interfaces:
ChartModel<T>
,Serializable
- Direct Known Subclasses:
AngularGaugeChartModelImpl
,ChartWidget.BasicChart
,CoordinateChartModelImpl
,JsonChartFragment.BasicChart
,SlicedChartModelImpl
public abstract class AbstractChart<T extends AbstractChartObject & ChartModel>
extends ChartModelImpl
implements ChartModel<T>
Base class for charts.
See documentation for properties of AmChart JS object.
http://docs.amcharts.com/3/javascriptcharts/AmChart
See documentation for properties of AmChart JS object.
http://docs.amcharts.com/3/javascriptcharts/AmChart
- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAdditionalFields
(String... fields) Adds additional fieldsAdds data items.void
Adds labels.addPrefixesOfBigNumbers
(BigNumberPrefix... prefixesOfBigNumbers) Adds BigNumberPrefixes.addPrefixesOfSmallNumbers
(SmallNumberPrefix... prefixesOfSmallNumbers) Adds SmallNumberPrefixAdds titles to chart.protected void
getColor()
getDefs()
getPath()
getTheme()
getType()
void
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<String> additionalFields) Sets list of additional fields.setAllLabels
(List<Label> 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.setClassNamePrefix
(String classNamePrefix) Sets prefix to all class names which are added to all visual elements of a chart in caseaddClassNames
is set to true.Sets text color.setCreditsPosition
(CreditsPosition creditsPosition) Sets position of link to amCharts site.setDataProvider
(DataProvider dataProvider) Sets data provider that contains data set.setDecimalSeparator
(String decimalSeparator) Sets decimal separator./** Using this property you can add 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.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.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<BigNumberPrefix> prefixesOfBigNumbers) Sets the prefixes which are used to make big numbers shorter: 2M instead of 2000000, etc.setPrefixesOfSmallNumbers
(List<SmallNumberPrefix> 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.setUsePrefixes
(Boolean usePrefixes) If true, prefixes will be used for big and small numbers.
-
Constructor Details
-
AbstractChart
-
AbstractChart
protected AbstractChart()
-
-
Method Details
-
getAddClassNames
- Specified by:
getAddClassNames
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
addClassNames
- add CSS class names option- Returns:
- chart model
-
getAllLabels
- Specified by:
getAllLabels
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Returns:
- list of labels
-
setAllLabels
Description copied from interface:ChartModel
Sets the list of labels.- Specified by:
setAllLabels
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Parameters:
allLabels
- list of labels- Returns:
- chart model
-
addLabels
Description copied from interface:ChartModel
Adds labels.- Specified by:
addLabels
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Parameters:
allLabels
- the labels to to add- Returns:
- chart model
-
getExport
- Specified by:
getExport
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
amExport
- the export- Returns:
- chart model
-
getBackgroundColor
- Specified by:
getBackgroundColor
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Returns:
- background color
-
setBackgroundColor
Description copied from interface:ChartModel
Sets background color. You should setbackgroundAlpha
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 AbstractChartObject & ChartModel>
- Parameters:
backgroundColor
- the background color- Returns:
- chart model
-
getBalloon
- Specified by:
getBalloon
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
balloon
- the balloon- Returns:
- chart model
-
getLegend
- Specified by:
getLegend
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Returns:
- legend of a chart
-
setLegend
Description copied from interface:ChartModel
Sets legend of a chart.- Specified by:
setLegend
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Parameters:
legend
- the legend- Returns:
- chart model
-
getDecimalSeparator
- Specified by:
getDecimalSeparator
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
decimalSeparator
- the decimal separator string- Returns:
- chart model
-
getPercentPrecision
- Specified by:
getPercentPrecision
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
percentPrecision
- the percent precision- Returns:
- chart model
-
getPrecision
- Specified by:
getPrecision
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
precision
- the precision- Returns:
- chart model
-
getDataProvider
- Specified by:
getDataProvider
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
-
setDataProvider
Description copied from interface:ChartModel
Sets data provider that contains data set.- Specified by:
setDataProvider
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Parameters:
dataProvider
- the data provider- Returns:
- chart model
-
fireDataProviderChanged
protected void fireDataProviderChanged() -
addData
Description copied from interface:ChartModel
Adds data items. IfDataProvider
is null, so it createsListDataProvider
- Specified by:
addData
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Parameters:
dataItems
- data items to add- Returns:
- chart model
-
getPathToImages
- Specified by:
getPathToImages
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
pathToImages
- path to images- Returns:
- chart model
-
getTheme
- Specified by:
getTheme
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
theme
- the theme- Returns:
- chart model
-
getBorderAlpha
- Specified by:
getBorderAlpha
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
borderAlpha
- the border alpha- Returns:
- chart model
-
getBorderColor
- Specified by:
getBorderColor
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
borderColor
- the border color- Returns:
- chart model
-
getClassNamePrefix
- Specified by:
getClassNamePrefix
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 caseaddClassNames
is set to true. If not set the default value is "amcharts".- Specified by:
setClassNamePrefix
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Parameters:
classNamePrefix
- class name prefix string- Returns:
- chart model
-
getCreditsPosition
- Specified by:
getCreditsPosition
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
creditsPosition
- the credits position- Returns:
- chart model
-
getColor
- Specified by:
getColor
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
color
- the text color- Returns:
- chart model
-
getFontFamily
- Specified by:
getFontFamily
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
fontFamily
- font family string- Returns:
- chart model
-
getFontSize
- Specified by:
getFontSize
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
fontSize
- the font size- Returns:
- chart model
-
getHandDrawn
- Specified by:
getHandDrawn
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
handDrawn
- hand drawn option- Returns:
- chart model
-
getHandDrawScatter
- Specified by:
getHandDrawScatter
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
handDrawScatter
- the hand drawn scatter- Returns:
- chart model
-
getHandDrawThickness
- Specified by:
getHandDrawThickness
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
handDrawThickness
- the hand draw thickness- Returns:
- chart model
-
getHideBalloonTime
- Specified by:
getHideBalloonTime
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
hideBalloonTime
- the hide balloon time in milliseconds- Returns:
- chart model
-
getPanEventsEnabled
- Specified by:
getPanEventsEnabled
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
panEventsEnabled
- pan events enabled option- Returns:
- chart model
-
getPrefixesOfBigNumbers
- Specified by:
getPrefixesOfBigNumbers
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
prefixesOfBigNumbers
- list of BigNumberPrefix- Returns:
- chart model
-
addPrefixesOfBigNumbers
Description copied from interface:ChartModel
Adds BigNumberPrefixes.- Specified by:
addPrefixesOfBigNumbers
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Parameters:
prefixesOfBigNumbers
- prefixes of big numbers- Returns:
- chart model
-
getPrefixesOfSmallNumbers
- Specified by:
getPrefixesOfSmallNumbers
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
prefixesOfSmallNumbers
- list of SmallNumberPrefix- Returns:
- chart model
-
addPrefixesOfSmallNumbers
Description copied from interface:ChartModel
Adds SmallNumberPrefix- Specified by:
addPrefixesOfSmallNumbers
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Parameters:
prefixesOfSmallNumbers
- prefixes of small numbers- Returns:
- chart model
-
getThousandsSeparator
- Specified by:
getThousandsSeparator
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
thousandsSeparator
- - thousands separator string- Returns:
- chart model
-
getTitles
- Specified by:
getTitles
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Returns:
- list of titles
-
setTitles
Description copied from interface:ChartModel
Sets list of titles.- Specified by:
setTitles
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Parameters:
titles
- the titles- Returns:
- chart model
-
addTitles
Description copied from interface:ChartModel
Adds titles to chart.- Specified by:
addTitles
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Parameters:
titles
- the titles to add- Returns:
- chart model
-
getUsePrefixes
- Specified by:
getUsePrefixes
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
usePrefixes
- the use prefixes option- Returns:
- chart model
-
getWiredFields
- Specified by:
getWiredFields
in classChartModelImpl
- Returns:
- fields of the
DataItem
that are bound to the chart
-
getAdditionalFields
- Specified by:
getAdditionalFields
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
fields
- the fields- Returns:
- chart model
-
getType
-
getAutoDisplay
- Specified by:
getAutoDisplay
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
autoDisplay
- auto display option- Returns:
- chart model
-
getAutoResize
- Specified by:
getAutoResize
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
autoResize
- auto resize option- Returns:
- chart model
-
getBackgroundAlpha
- Specified by:
getBackgroundAlpha
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Returns:
- opacity of background
-
setBackgroundAlpha
Description copied from interface:ChartModel
Sets opacity of background. Set it to greater 0 value if you wantbackgroundColor
to work. If not set the default value is 0.- Specified by:
setBackgroundAlpha
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Parameters:
backgroundAlpha
- background alpha option- Returns:
- chart model
-
getLanguage
- Specified by:
getLanguage
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
language
- language string- Returns:
- chart model
-
getPath
- Specified by:
getPath
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Returns:
- path
-
setPath
Description copied from interface:ChartModel
Specifies absolute or relative path to amCharts files.- Specified by:
setPath
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Parameters:
path
- the path string- Returns:
- chart model
-
getSvgIcons
- Specified by:
getSvgIcons
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
svgIcons
- svgIcons option- Returns:
- chart model
-
getTapToActivate
- Specified by:
getTapToActivate
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
tapToActivate
- tap to activate option- Returns:
- chart model
-
getDefs
- Specified by:
getDefs
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Returns:
- defs
-
setDefs
/** Using this property you can add 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 AbstractChartObject & ChartModel>
- Parameters:
defs
- json string- Returns:
- this object
-
getAccessible
- Specified by:
getAccessible
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
accessible
- accessible option- Returns:
- chart model
-
getAccessibleTitle
- Specified by:
getAccessibleTitle
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
responsive
- the responsive- Returns:
- chart model
-
getResponsive
- Specified by:
getResponsive
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- Returns:
- responsive
-
getProcessCount
- Specified by:
getProcessCount
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
processCount
- the process count- Returns:
- chart model
-
getProcessTimeout
- Specified by:
getProcessTimeout
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
processTimeout
- the process timeout- Returns:
- chart model
-
getTouchClickDuration
- Specified by:
getTouchClickDuration
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
touchClickDuration
- the touch click duration in milliseconds- Returns:
- chart model
-
addDataProviderChangeListener
-
removeDataProviderSetListener
-
getAutoTransform
- Specified by:
getAutoTransform
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
autoTransform
- auto transform option- Returns:
- chart model
-
getAccessibleDescription
- Specified by:
getAccessibleDescription
in interfaceChartModel<T extends AbstractChartObject & ChartModel>
- 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 AbstractChartObject & ChartModel>
- Parameters:
accessibleDescription
- description string- Returns:
- chart model
-