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.ZoomEventNested 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.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ChartLocaleHelperprotected ChartClickListenerprotected CurrentAuthenticationprotected FormatStringsRegistryprotected LegendItemHideListenerprotected LegendItemShowListenerprotected LegendLabelClickListenerprotected LegendMarkerClickListenerprotected Messagesprotected ChartRightClickListenerFields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Constructor Summary
Constructors -
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.voidprotected abstract Mprotected ChartSerializerprotected JmixAmchartsScenegetColor()getDefs()protected MgetModel()getPath()getTheme()protected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidvoidrepaint()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.voidsetChartLocaleHelper(ChartLocaleHelper chartLocaleHelper) setClassNamePrefix(String classNamePrefix) Sets prefix to all class names which are added to all visual elements of a chart in caseAbstractChart.addClassNamesis set to true.Sets text color.setCreditsPosition(CreditsPosition creditsPosition) Sets position of link to amCharts site.voidsetCurrentAuthentication(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.voidsetFormatStringsRegistry(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 (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.voidsetMessages(Messages messages) voidsetNativeJson(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 voidsetupChartLocale(AbstractChart chart) protected voidsetupDefaults(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, withUnwrappedCompositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods 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:
afterPropertiesSetin 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:ChartResend all items and properties to client and repaint chart. Use this method if you change some property of already displayed chart. -
getNativeJson
- Specified by:
getNativeJsonin interfaceChart<T extends Chart>- Returns:
- additional JSON configuration as a string.
-
setNativeJson
Description copied from interface:ChartSet additional JSON configuration as a string. This JSON can override configuration loaded from XML and from Component API.- Specified by:
setNativeJsonin interfaceChart<T extends Chart>- Parameters:
json- JSON configuration
-
getAddClassNames
- Specified by:
getAddClassNamesin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
addClassNames- add CSS class names option- Returns:
- chart model
-
getAllLabels
- Specified by:
getAllLabelsin interfaceChartModel<T extends Chart>- Returns:
- list of labels
-
setAllLabels
Description copied from interface:ChartModelSets the list of labels.- Specified by:
setAllLabelsin interfaceChartModel<T extends Chart>- Parameters:
allLabels- list of labels- Returns:
- chart model
-
addLabels
Description copied from interface:ChartModelAdds labels.- Specified by:
addLabelsin interfaceChartModel<T extends Chart>- Parameters:
allLabels- the labels to to add- Returns:
- chart model
-
getExport
- Specified by:
getExportin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
export- the export- Returns:
- chart model
-
getBackgroundColor
- Specified by:
getBackgroundColorin interfaceChartModel<T extends Chart>- Returns:
- background color
-
setBackgroundColor
Description copied from interface:ChartModelSets background color. You should setAbstractChart.backgroundAlphato greater than 0 value in order background to be visible. If not set the default value is #FFFFFF.- Specified by:
setBackgroundColorin interfaceChartModel<T extends Chart>- Parameters:
backgroundColor- the background color- Returns:
- chart model
-
getBalloon
- Specified by:
getBalloonin interfaceChartModel<T extends Chart>- Returns:
- balloon of the chart
-
setBalloon
Description copied from interface:ChartModelSets the balloon (tooltip) of the chart.- Specified by:
setBalloonin interfaceChartModel<T extends Chart>- Parameters:
balloon- the balloon- Returns:
- chart model
-
getLegend
- Specified by:
getLegendin interfaceChartModel<T extends Chart>- Returns:
- legend of a chart
-
setLegend
Description copied from interface:ChartModelSets legend of a chart.- Specified by:
setLegendin interfaceChartModel<T extends Chart>- Parameters:
legend- the legend- Returns:
- chart model
-
getDecimalSeparator
- Specified by:
getDecimalSeparatorin interfaceChartModel<T extends Chart>- Returns:
- decimal separator
-
setDecimalSeparator
Description copied from interface:ChartModelSets decimal separator. If not set the default value is ".".- Specified by:
setDecimalSeparatorin interfaceChartModel<T extends Chart>- Parameters:
decimalSeparator- the decimal separator string- Returns:
- chart model
-
getPercentPrecision
- Specified by:
getPercentPrecisionin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
percentPrecision- the percent precision- Returns:
- chart model
-
getPrecision
- Specified by:
getPrecisionin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
precision- the precision- Returns:
- chart model
-
getDataProvider
- Specified by:
getDataProviderin interfaceChart<T extends Chart>- Specified by:
getDataProviderin interfaceChartModel<T extends Chart>- Returns:
- the data provider
-
setDataProvider
Description copied from interface:ChartModelSets data provider that contains data set.- Specified by:
setDataProviderin interfaceChart<T extends Chart>- Specified by:
setDataProviderin interfaceChartModel<T extends Chart>- Parameters:
dataProvider- the data provider- Returns:
- chart
- See Also:
-
addData
Description copied from interface:ChartModelAdds data items. IfDataProvideris null, so it createsListDataProvider- Specified by:
addDatain interfaceChartModel<T extends Chart>- Parameters:
dataItems- data items to add- Returns:
- chart model
-
getPathToImages
- Specified by:
getPathToImagesin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
pathToImages- path to images- Returns:
- chart model
-
getTheme
- Specified by:
getThemein interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
theme- the theme- Returns:
- chart model
-
getBorderAlpha
- Specified by:
getBorderAlphain interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
borderAlpha- the border alpha- Returns:
- chart model
-
getBorderColor
- Specified by:
getBorderColorin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
borderColor- the border color- Returns:
- chart model
-
getClassNamePrefix
- Specified by:
getClassNamePrefixin interfaceChartModel<T extends Chart>- 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 caseAbstractChart.addClassNamesis set to true. If not set the default value is "amcharts".- Specified by:
setClassNamePrefixin interfaceChartModel<T extends Chart>- Parameters:
classNamePrefix- class name prefix string- Returns:
- chart model
-
getCreditsPosition
- Specified by:
getCreditsPositionin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
creditsPosition- the credits position- Returns:
- chart model
-
getColor
- Specified by:
getColorin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
color- the text color- Returns:
- chart model
-
getFontFamily
- Specified by:
getFontFamilyin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
fontFamily- font family string- Returns:
- chart model
-
getFontSize
- Specified by:
getFontSizein interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
fontSize- the font size- Returns:
- chart model
-
getHandDrawn
- Specified by:
getHandDrawnin 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: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 Chart>- Parameters:
handDrawn- hand drawn option- Returns:
- chart model
-
getHandDrawScatter
- Specified by:
getHandDrawScatterin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
handDrawScatter- the hand drawn scatter- Returns:
- chart model
-
getHandDrawThickness
- Specified by:
getHandDrawThicknessin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
handDrawThickness- the hand draw thickness- Returns:
- chart model
-
getHideBalloonTime
- Specified by:
getHideBalloonTimein interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
hideBalloonTime- the hide balloon time in milliseconds- Returns:
- chart model
-
getPanEventsEnabled
- Specified by:
getPanEventsEnabledin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
panEventsEnabled- pan events enabled option- Returns:
- chart model
-
getPrefixesOfBigNumbers
- Specified by:
getPrefixesOfBigNumbersin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
prefixesOfBigNumbers- list of BigNumberPrefix- Returns:
- chart model
-
addPrefixesOfBigNumbers
Description copied from interface:ChartModelAdds BigNumberPrefixes.- Specified by:
addPrefixesOfBigNumbersin interfaceChartModel<T extends Chart>- Parameters:
prefixesOfBigNumbers- prefixes of big numbers- Returns:
- chart model
-
getPrefixesOfSmallNumbers
- Specified by:
getPrefixesOfSmallNumbersin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
prefixesOfSmallNumbers- list of SmallNumberPrefix- Returns:
- chart model
-
addPrefixesOfSmallNumbers
Description copied from interface:ChartModelAdds SmallNumberPrefix- Specified by:
addPrefixesOfSmallNumbersin interfaceChartModel<T extends Chart>- Parameters:
prefixesOfSmallNumbers- prefixes of small numbers- Returns:
- chart model
-
getThousandsSeparator
- Specified by:
getThousandsSeparatorin interfaceChartModel<T extends Chart>- Returns:
- thousands separator
-
setThousandsSeparator
Description copied from interface:ChartModelSets thousands separator. If not set the default value is ".".- Specified by:
setThousandsSeparatorin interfaceChartModel<T extends Chart>- Parameters:
thousandsSeparator- - thousands separator string- Returns:
- chart model
-
getTitles
- Specified by:
getTitlesin interfaceChartModel<T extends Chart>- Returns:
- list of titles
-
setTitles
Description copied from interface:ChartModelSets list of titles.- Specified by:
setTitlesin interfaceChartModel<T extends Chart>- Parameters:
list- the titles- Returns:
- chart model
-
addTitles
Description copied from interface:ChartModelAdds titles to chart.- Specified by:
addTitlesin interfaceChartModel<T extends Chart>- Parameters:
titles- the titles to add- Returns:
- chart model
-
getUsePrefixes
- Specified by:
getUsePrefixesin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
usePrefixes- the use prefixes option- Returns:
- chart model
-
getAdditionalFields
- Specified by:
getAdditionalFieldsin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
additionalFields- list of additional fields- Returns:
- chart model
-
addAdditionalFields
Description copied from interface:ChartModelAdds additional fields- Specified by:
addAdditionalFieldsin interfaceChartModel<T extends Chart>- Parameters:
fields- the fields- Returns:
- chart model
-
getAutoDisplay
- Specified by:
getAutoDisplayin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
autoDisplay- auto display option- Returns:
- chart model
-
getAutoResize
- Specified by:
getAutoResizein interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
autoResize- auto resize option- Returns:
- chart model
-
getBackgroundAlpha
- Specified by:
getBackgroundAlphain interfaceChartModel<T extends Chart>- Returns:
- opacity of background
-
setBackgroundAlpha
Description copied from interface:ChartModelSets opacity of background. Set it to greater 0 value if you wantAbstractChart.backgroundColorto work. If not set the default value is 0.- Specified by:
setBackgroundAlphain interfaceChartModel<T extends Chart>- Parameters:
backgroundAlpha- background alpha option- Returns:
- chart model
-
getLanguage
- Specified by:
getLanguagein interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
language- language string- Returns:
- chart model
-
getPath
- Specified by:
getPathin interfaceChartModel<T extends Chart>- Returns:
- path
-
setPath
Description copied from interface:ChartModelSpecifies absolute or relative path to amCharts files.- Specified by:
setPathin interfaceChartModel<T extends Chart>- Parameters:
path- the path string- Returns:
- chart model
-
getSvgIcons
- Specified by:
getSvgIconsin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
svgIcons- svgIcons option- Returns:
- chart model
-
getTapToActivate
- Specified by:
getTapToActivatein interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
tapToActivate- tap to activate option- Returns:
- chart model
-
getDefs
- Specified by:
getDefsin interfaceChartModel<T extends Chart>- Returns:
- defs
-
setDefs
Description copied from interface:ChartModelSets 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 Chart>- Parameters:
defs- defs string- Returns:
- chart model
-
getAccessible
- Specified by:
getAccessiblein interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
accessible- accessible option- Returns:
- chart model
-
getAccessibleTitle
- Specified by:
getAccessibleTitlein interfaceChartModel<T extends Chart>- 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 Chart>- 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 Chart>- Parameters:
responsive- the responsive- Returns:
- chart model
-
getResponsive
- Specified by:
getResponsivein interfaceChartModel<T extends Chart>- Returns:
- responsive
-
getProcessCount
- Specified by:
getProcessCountin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
processCount- the process count- Returns:
- chart model
-
getProcessTimeout
- Specified by:
getProcessTimeoutin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
processTimeout- the process timeout- Returns:
- chart model
-
getTouchClickDuration
- Specified by:
getTouchClickDurationin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
touchClickDuration- the touch click duration in milliseconds- Returns:
- chart model
-
getAutoTransform
- Specified by:
getAutoTransformin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
autoTransform- auto transform option- Returns:
- chart model
-
addClickListener
Description copied from interface:ChartAdds a listener for a chart. Called when user clicks on the chart.- Specified by:
addClickListenerin interfaceChart<T extends Chart>- Parameters:
listener- a listener to add- Returns:
- subscription
-
onChartClick
-
addRightClickListener
Description copied from interface:ChartAdds a listener for a chart. Called when user clicks on the chart.- Specified by:
addRightClickListenerin interfaceChart<T extends Chart>- Parameters:
listener- a listener to add- Returns:
- subscription
-
onChartRightClick
-
addLegendItemHideListener
Description copied from interface:ChartAdds a listener for a chart. Called when the legend item hided.- Specified by:
addLegendItemHideListenerin interfaceChart<T extends Chart>- Parameters:
listener- a listener to add- Returns:
- subscription
-
onLegendItemHide
-
addLegendItemShowListener
Description copied from interface:ChartAdds a listener for a chart. Called when the legend item showed.- Specified by:
addLegendItemShowListenerin interfaceChart<T extends Chart>- Parameters:
listener- a listener to add- Returns:
- subscription
-
onLegendItemShow
-
addLegendLabelClickListener
Description copied from interface:ChartAdds a listener for a chart. Called when user clicks on the legend item.- Specified by:
addLegendLabelClickListenerin interfaceChart<T extends Chart>- Parameters:
listener- a listener to add- Returns:
- subscription
-
onLegendLabelClick
-
addLegendMarkerClickListener
Description copied from interface:ChartAdds a listener for a chart. Called when user clicks on the legend marker.- Specified by:
addLegendMarkerClickListenerin interfaceChart<T extends Chart>- Parameters:
listener- a listener to add- Returns:
- subscription
-
onLegendMarkerClick
-
getAccessibleDescription
- Specified by:
getAccessibleDescriptionin interfaceChartModel<T extends Chart>- 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 Chart>- Parameters:
accessibleDescription- description string- Returns:
- chart model
-