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
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAdditionalFields(String... fields) Adds additional fieldsAdds data items.voidAdds labels.addPrefixesOfBigNumbers(BigNumberPrefix... prefixesOfBigNumbers) Adds BigNumberPrefixes.addPrefixesOfSmallNumbers(SmallNumberPrefix... prefixesOfSmallNumbers) Adds SmallNumberPrefixAdds titles to chart.protected voidgetColor()getDefs()getPath()getTheme()getType()voidsetAccessible(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 caseaddClassNamesis 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 (whenhandDrawnis set to true) will fluctuate.setHandDrawThickness(Integer handDrawThickness) Defines by how many pixels line thickness will fluctuate (whenhandDrawnis 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:
getAddClassNamesin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- true if CSS class names should be added to chart elements
-
setAddClassNames
Description copied from interface:ChartModelSpecifies, 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:
setAddClassNamesin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
addClassNames- add CSS class names option- Returns:
- chart model
-
getAllLabels
- Specified by:
getAllLabelsin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- list of labels
-
setAllLabels
Description copied from interface:ChartModelSets the list of labels.- Specified by:
setAllLabelsin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
allLabels- list of labels- Returns:
- chart model
-
addLabels
Description copied from interface:ChartModelAdds labels.- Specified by:
addLabelsin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
allLabels- the labels to to add- Returns:
- chart model
-
getExport
- Specified by:
getExportin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- export config
-
setExport
Description copied from interface:ChartModelSets export config. Specifies how export to image/data export/print/annotate menu will look and behave.- Specified by:
setExportin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
amExport- the export- Returns:
- chart model
-
getBackgroundColor
- Specified by:
getBackgroundColorin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- background color
-
setBackgroundColor
Description copied from interface:ChartModelSets background color. You should setbackgroundAlphato greater than 0 value in order background to be visible. If not set the default value is #FFFFFF.- Specified by:
setBackgroundColorin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
backgroundColor- the background color- Returns:
- chart model
-
getBalloon
- Specified by:
getBalloonin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- balloon of the chart
-
setBalloon
Description copied from interface:ChartModelSets the balloon (tooltip) of the chart.- Specified by:
setBalloonin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
balloon- the balloon- Returns:
- chart model
-
getLegend
- Specified by:
getLegendin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- legend of a chart
-
setLegend
Description copied from interface:ChartModelSets legend of a chart.- Specified by:
setLegendin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
legend- the legend- Returns:
- chart model
-
getDecimalSeparator
- Specified by:
getDecimalSeparatorin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- decimal separator
-
setDecimalSeparator
Description copied from interface:ChartModelSets decimal separator. If not set the default value is ".".- Specified by:
setDecimalSeparatorin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
decimalSeparator- the decimal separator string- Returns:
- chart model
-
getPercentPrecision
- Specified by:
getPercentPrecisionin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- percent precision
-
setPercentPrecision
Description copied from interface:ChartModelSets 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:
setPercentPrecisionin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
percentPrecision- the percent precision- Returns:
- chart model
-
getPrecision
- Specified by:
getPrecisionin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- precision
-
setPrecision
Description copied from interface:ChartModelPrecision 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:
setPrecisionin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
precision- the precision- Returns:
- chart model
-
getDataProvider
- Specified by:
getDataProviderin interfaceChartModel<T extends AbstractChartObject & ChartModel>
-
setDataProvider
Description copied from interface:ChartModelSets data provider that contains data set.- Specified by:
setDataProviderin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
dataProvider- the data provider- Returns:
- chart model
-
fireDataProviderChanged
protected void fireDataProviderChanged() -
addData
Description copied from interface:ChartModelAdds data items. IfDataProvideris null, so it createsListDataProvider- Specified by:
addDatain interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
dataItems- data items to add- Returns:
- chart model
-
getPathToImages
- Specified by:
getPathToImagesin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- path to images
-
setPathToImages
Description copied from interface:ChartModelSpecifies path to the folder where images like resize grips, lens and similar are.- Specified by:
setPathToImagesin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
pathToImages- path to images- Returns:
- chart model
-
getTheme
- Specified by:
getThemein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- theme of a chart
-
setTheme
Description copied from interface:ChartModelSets theme of a chart. If not set the default value is NONE.- Specified by:
setThemein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
theme- the theme- Returns:
- chart model
-
getBorderAlpha
- Specified by:
getBorderAlphain interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- opacity of chart's border
-
setBorderAlpha
Description copied from interface:ChartModelSets opacity of chart's border. Value range is 0 - 1. If not set the default value is 0.- Specified by:
setBorderAlphain interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
borderAlpha- the border alpha- Returns:
- chart model
-
getBorderColor
- Specified by:
getBorderColorin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- border color
-
setBorderColor
Description copied from interface:ChartModelSets 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:
setBorderColorin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
borderColor- the border color- Returns:
- chart model
-
getClassNamePrefix
- Specified by:
getClassNamePrefixin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- class name prefix
-
setClassNamePrefix
Description copied from interface:ChartModelSets prefix to all class names which are added to all visual elements of a chart in caseaddClassNamesis set to true. If not set the default value is "amcharts".- Specified by:
setClassNamePrefixin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
classNamePrefix- class name prefix string- Returns:
- chart model
-
getCreditsPosition
- Specified by:
getCreditsPositionin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- position of link to amCharts site
-
setCreditsPosition
Description copied from interface:ChartModelSets 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:
setCreditsPositionin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
creditsPosition- the credits position- Returns:
- chart model
-
getColor
- Specified by:
getColorin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- text color
-
setColor
Description copied from interface:ChartModelSets text color. If not set the default value is "#000000".- Specified by:
setColorin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
color- the text color- Returns:
- chart model
-
getFontFamily
- Specified by:
getFontFamilyin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- font family
-
setFontFamily
Description copied from interface:ChartModelSets font family. If not set the default value is "Verdana".- Specified by:
setFontFamilyin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
fontFamily- font family string- Returns:
- chart model
-
getFontSize
- Specified by:
getFontSizein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- font size
-
setFontSize
Description copied from interface:ChartModelSets font size. If not set the default value is 11.- Specified by:
setFontSizein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
fontSize- the font size- Returns:
- chart model
-
getHandDrawn
- Specified by:
getHandDrawnin 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:ChartModelIf true, the lines of the chart will be distorted and will produce hand-drawn effect. Try to adjusthandDrawScatterandhandDrawThicknessproperties for a more scattered result. If not set the default value is false.- Specified by:
setHandDrawnin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
handDrawn- hand drawn option- Returns:
- chart model
-
getHandDrawScatter
- Specified by:
getHandDrawScatterin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- hand draw scatter
-
setHandDrawScatter
Description copied from interface:ChartModelDefines by how many pixels hand-drawn line (whenhandDrawnis set to true) will fluctuate. If not set the default value is 2.- Specified by:
setHandDrawScatterin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
handDrawScatter- the hand drawn scatter- Returns:
- chart model
-
getHandDrawThickness
- Specified by:
getHandDrawThicknessin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- hand drawn thickness
-
setHandDrawThickness
Description copied from interface:ChartModelDefines by how many pixels line thickness will fluctuate (whenhandDrawnis set to true). If not set the default value is 1.- Specified by:
setHandDrawThicknessin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
handDrawThickness- the hand draw thickness- Returns:
- chart model
-
getHideBalloonTime
- Specified by:
getHideBalloonTimein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- hide balloon time in milliseconds
-
setHideBalloonTime
Description copied from interface:ChartModelSets 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:
setHideBalloonTimein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
hideBalloonTime- the hide balloon time in milliseconds- Returns:
- chart model
-
getPanEventsEnabled
- Specified by:
getPanEventsEnabledin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- true if pan events enabled
-
setPanEventsEnabled
Description copied from interface:ChartModelThis 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:
setPanEventsEnabledin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
panEventsEnabled- pan events enabled option- Returns:
- chart model
-
getPrefixesOfBigNumbers
- Specified by:
getPrefixesOfBigNumbersin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- list of BigNumberPrefix
-
setPrefixesOfBigNumbers
Description copied from interface:ChartModelSets 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, setusePrefixesproperty 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:
setPrefixesOfBigNumbersin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
prefixesOfBigNumbers- list of BigNumberPrefix- Returns:
- chart model
-
addPrefixesOfBigNumbers
Description copied from interface:ChartModelAdds BigNumberPrefixes.- Specified by:
addPrefixesOfBigNumbersin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
prefixesOfBigNumbers- prefixes of big numbers- Returns:
- chart model
-
getPrefixesOfSmallNumbers
- Specified by:
getPrefixesOfSmallNumbersin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- list of SmallNumberPrefix
-
setPrefixesOfSmallNumbers
Description copied from interface:ChartModelSets 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, setusePrefixesproperty 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:
setPrefixesOfSmallNumbersin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
prefixesOfSmallNumbers- list of SmallNumberPrefix- Returns:
- chart model
-
addPrefixesOfSmallNumbers
Description copied from interface:ChartModelAdds SmallNumberPrefix- Specified by:
addPrefixesOfSmallNumbersin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
prefixesOfSmallNumbers- prefixes of small numbers- Returns:
- chart model
-
getThousandsSeparator
- Specified by:
getThousandsSeparatorin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- thousands separator
-
setThousandsSeparator
Description copied from interface:ChartModelSets thousands separator. If not set the default value is ".".- Specified by:
setThousandsSeparatorin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
thousandsSeparator- - thousands separator string- Returns:
- chart model
-
getTitles
- Specified by:
getTitlesin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- list of titles
-
setTitles
Description copied from interface:ChartModelSets list of titles.- Specified by:
setTitlesin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
titles- the titles- Returns:
- chart model
-
addTitles
Description copied from interface:ChartModelAdds titles to chart.- Specified by:
addTitlesin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
titles- the titles to add- Returns:
- chart model
-
getUsePrefixes
- Specified by:
getUsePrefixesin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- true if uses prefixes is enabled
-
setUsePrefixes
Description copied from interface:ChartModelIf true, prefixes will be used for big and small numbers. You can set arrays of prefixesprefixesOfSmallNumbersandprefixesOfBigNumbersproperties. If not set the default value is false.- Specified by:
setUsePrefixesin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
usePrefixes- the use prefixes option- Returns:
- chart model
-
getWiredFields
- Specified by:
getWiredFieldsin classChartModelImpl- Returns:
- fields of the
DataItemthat are bound to the chart
-
getAdditionalFields
- Specified by:
getAdditionalFieldsin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- list of additional fields
-
setAdditionalFields
Description copied from interface:ChartModelSets list of additional fields. Fields from your data provider that should be used directly in the chart configuration.- Specified by:
setAdditionalFieldsin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
additionalFields- list of additional fields- Returns:
- chart model
-
addAdditionalFields
Description copied from interface:ChartModelAdds additional fields- Specified by:
addAdditionalFieldsin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
fields- the fields- Returns:
- chart model
-
getType
-
getAutoDisplay
- Specified by:
getAutoDisplayin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- true if auto display is enabled
-
setAutoDisplay
Description copied from interface:ChartModelIf 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:
setAutoDisplayin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
autoDisplay- auto display option- Returns:
- chart model
-
getAutoResize
- Specified by:
getAutoResizein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- true if chart should resize itself whenever its parent container size changes
-
setAutoResize
Description copied from interface:ChartModelSet 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:
setAutoResizein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
autoResize- auto resize option- Returns:
- chart model
-
getBackgroundAlpha
- Specified by:
getBackgroundAlphain interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- opacity of background
-
setBackgroundAlpha
Description copied from interface:ChartModelSets opacity of background. Set it to greater 0 value if you wantbackgroundColorto work. If not set the default value is 0.- Specified by:
setBackgroundAlphain interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
backgroundAlpha- background alpha option- Returns:
- chart model
-
getLanguage
- Specified by:
getLanguagein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- language
-
setLanguage
Description copied from interface:ChartModelSets 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:
setLanguagein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
language- language string- Returns:
- chart model
-
getPath
- Specified by:
getPathin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- path
-
setPath
Description copied from interface:ChartModelSpecifies absolute or relative path to amCharts files.- Specified by:
setPathin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
path- the path string- Returns:
- chart model
-
getSvgIcons
- Specified by:
getSvgIconsin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- true if using SVG icons is enabled
-
setSvgIcons
Description copied from interface:ChartModelSets use SVG icons (if browser supports SVG). If not set the default value is true.- Specified by:
setSvgIconsin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
svgIcons- svgIcons option- Returns:
- chart model
-
getTapToActivate
- Specified by:
getTapToActivatein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- true if tap to activate is enabled
-
setTapToActivate
Description copied from interface:ChartModelCharts 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:
setTapToActivatein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
tapToActivate- tap to activate option- Returns:
- chart model
-
getDefs
- Specified by:
getDefsin 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:
setDefsin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
defs- json string- Returns:
- this object
-
getAccessible
- Specified by:
getAccessiblein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- true if accessible is enabled
-
setAccessible
Description copied from interface:ChartModelWhen 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:
setAccessiblein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
accessible- accessible option- Returns:
- chart model
-
getAccessibleTitle
- Specified by:
getAccessibleTitlein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- description of a SVG element
-
setAccessibleTitle
Description copied from interface:ChartModelDescription which is added to of a SVG element.- Specified by:
setAccessibleTitlein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
accessibleTitle- accessible title string- Returns:
- chart model
-
setResponsive
Description copied from interface:ChartModelSets a config object for Responsive plugin- Specified by:
setResponsivein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
responsive- the responsive- Returns:
- chart model
-
getResponsive
- Specified by:
getResponsivein interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- responsive
-
getProcessCount
- Specified by:
getProcessCountin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- process count
-
setProcessCount
Description copied from interface:ChartModelIf 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:
setProcessCountin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
processCount- the process count- Returns:
- chart model
-
getProcessTimeout
- Specified by:
getProcessTimeoutin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- process timeout
-
setProcessTimeout
Description copied from interface:ChartModelIf 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:
setProcessTimeoutin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
processTimeout- the process timeout- Returns:
- chart model
-
getTouchClickDuration
- Specified by:
getTouchClickDurationin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- touch click duration in milliseconds
-
setTouchClickDuration
Description copied from interface:ChartModelSets 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:
setTouchClickDurationin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
touchClickDuration- the touch click duration in milliseconds- Returns:
- chart model
-
addDataProviderChangeListener
-
removeDataProviderSetListener
-
getAutoTransform
- Specified by:
getAutoTransformin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- true if auto transform is enabled,
-
setAutoTransform
Description copied from interface:ChartModelIf 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:
setAutoTransformin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
autoTransform- auto transform option- Returns:
- chart model
-
getAccessibleDescription
- Specified by:
getAccessibleDescriptionin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Returns:
- accessible description string
-
setAccessibleDescription
Description copied from interface:ChartModelDescription which will be added to node of SVG element.- Specified by:
setAccessibleDescriptionin interfaceChartModel<T extends AbstractChartObject & ChartModel>- Parameters:
accessibleDescription- description string- Returns:
- chart model
-