Package io.jmix.charts.component.impl
Class StockChartImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<JmixAmStockChartScene>
io.jmix.charts.component.impl.StockChartImpl
- All Implemented Interfaces:
StockChart
,StockChartModel<StockChart>
,HasColors<StockChart>
,AttachNotifier
,Component
,Component.BelongToFrame
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,org.springframework.beans.factory.InitializingBean
public class StockChartImpl
extends AbstractComponent<JmixAmStockChartScene>
implements StockChart, org.springframework.beans.factory.InitializingBean
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.charts.component.StockChart
StockChart.AbstractDataSetSelectorEvent, StockChart.AbstractStockChartClickEvent, StockChart.AbstractStockChartEvent, StockChart.AbstractStockEventEvent, StockChart.AbstractStockGraphEvent, StockChart.AbstractStockGraphItemEvent, StockChart.DataSetSelectorCompareEvent, StockChart.DataSetSelectorSelectEvent, StockChart.DataSetSelectorUnCompareEvent, StockChart.PeriodSelectorChangeEvent, StockChart.StockChartClickEvent, StockChart.StockChartRightClickEvent, StockChart.StockEventClickEvent, StockChart.StockEventRollOutEvent, StockChart.StockEventRollOverEvent, StockChart.StockGraphClickEvent, StockChart.StockGraphItemClickEvent, StockChart.StockGraphItemRightClickEvent, StockChart.StockGraphItemRollOutEvent, StockChart.StockGraphItemRollOverEvent, StockChart.StockGraphRollOutEvent, StockChart.StockGraphRollOverEvent, StockChart.ZoomEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected ChartLocaleHelper
protected CurrentAuthentication
protected FormatStringsRegistry
protected Messages
protected MessageTools
protected Metadata
protected StockChartImpl.StockChartEventsForwarder
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.charts.component.StockChart
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddClickListener
(Consumer<StockChart.StockChartClickEvent> clickListener) Adds a listener to stock chart click events.Adds colors.addComparedDataSets
(String... comparedDataSets) Adds compared data sets.addDataSets
(DataSet... dataSets) Adds data sets.addDataSetSelectorCompareListener
(Consumer<StockChart.DataSetSelectorCompareEvent> compareListener) Adds a listener to dataset selector compare events.Adds a listener to dataset selector select events.addDataSetSelectorUnCompareListener
(Consumer<StockChart.DataSetSelectorUnCompareEvent> unCompareListener) Adds a listener to dataset selector uncompare events.addPanels
(StockPanel... panels) Adds stock panels.addPeriodSelectorChangeListener
(Consumer<StockChart.PeriodSelectorChangeEvent> changeListener) Adds a listener to period selector change events.addRightClickListener
(Consumer<StockChart.StockChartRightClickEvent> clickListener) Adds listener to stock chart right click events.addStockEventClickListener
(Consumer<StockChart.StockEventClickEvent> clickListener) Adds listener to stock event click events.addStockEventRollOutListener
(Consumer<StockChart.StockEventRollOutEvent> rollOutListener) Adds a listener to stock event roll-out events.addStockEventRollOverListener
(Consumer<StockChart.StockEventRollOverEvent> rollOverListener) Adds listener to stock event roll-over events.addStockGraphClickListener
(Consumer<StockChart.StockGraphClickEvent> clickListener) Adds a listener to stock graph click events.Adds a listener to stock graph item click events.addStockGraphItemRightClickListener
(Consumer<StockChart.StockGraphItemRightClickEvent> clickListener) Adds a listener to stock graph item right click events.addStockGraphItemRollOutListener
(Consumer<StockChart.StockGraphItemRollOutEvent> rollOutListener) Adds a listener to stock graph item roll-out events.addStockGraphItemRollOverListener
(Consumer<StockChart.StockGraphItemRollOverEvent> rollOverListener) Adds a listener to stock graph item roll-over events.addStockGraphRollOutListener
(Consumer<StockChart.StockGraphRollOutEvent> rollOutListener) Adds a listener to stock graph roll-out events.addStockGraphRollOverListener
(Consumer<StockChart.StockGraphRollOverEvent> rollOverListener) Adds a listener to stock graph roll-over events.addZoomListener
(Consumer<StockChart.ZoomEvent> zoomListener) Adds listener to stock chart zoom events.void
protected StockChartSerializer
protected JmixAmStockChartScene
protected StockChartGroup
getDataSet
(String id) Gets data set by id.protected StockChartGroup
getModel()
getPath()
protected StockEvent
getStockEvent
(String stockEventId) protected StockGraph
getStockGraphById
(StockPanel panel, String graphId) protected StockGraph
getStockGraphById
(String graphId) protected StockPanel
getTheme()
protected void
void
repaint()
Resend all items and properties to client and repaint chart.setAddClassNames
(Boolean addClassNames) Set addClassNames to true, if class names should be added to chart elements.setAdditionalFields
(List<String> additionalFields) Sets list of additional fields.setAnimationPlayed
(Boolean animationPlayed) Specifies if animation was already played.setAutoResize
(Boolean autoResize) Set autoResize to true if you want chart to resize itself whenever its parent container size changes.setBalloon
(Balloon balloon) Sets the balloon.setCategoryAxesSettings
(CategoryAxesSettings categoryAxesSettings) Sets settings for category axes.setChartCursorSettings
(ChartCursorSettings chartCursorSettings) Sets chart cursor settings.void
setChartLocaleHelper
(ChartLocaleHelper chartLocaleHelper) setChartScrollbarSettings
(ChartScrollbarSettings chartScrollbarSettings) Sets chart scrollbar settings.setClassNamePrefix
(String classNamePrefix) Sets the class name prefix.Sets the list of colors.setComparedDataSets
(List<String> comparedDataSets) Sets the list of of data sets selected for comparing.void
setCurrentAuthentication
(CurrentAuthentication currentAuthentication) setDataDateFormat
(String dataDateFormat) Sets data date format.setDataSets
(List<DataSet> dataSets) Sets the list of data sets.setDataSetSelector
(DataSetSelector dataSetSelector) Sets data set selector.Sets the export menu.setExtendToFullPeriod
(Boolean extendToFullPeriod) Specifies if the chart should always display full first and last data item when data is grouped to a longer period if the chart is zoomed from the beginning or end of the data.setFirstDayOfWeek
(Integer firstDayOfWeek) Sets day week starts.void
setFormatStringsRegistry
(FormatStringsRegistry formatStringsRegistry) setGlueToTheEnd
(Boolean glueToTheEnd) Set glueToTheEnd to true if the scope of the data view should be set to the end after data update.setLanguage
(String language) Sets language of default.setLegendSettings
(LegendSettings legendSettings) Sets legend settings.setMainDataSet
(String mainDataSet) Sets data set as main.void
setMessages
(Messages messages) void
setMessageTools
(MessageTools messageTools) void
setMetadata
(Metadata metadata) setMouseWheelScrollEnabled
(Boolean mouseWheelScrollEnabled) Set mouseWheelScrollEnabled to true you wont to scroll chart with mouse wheel.void
setNativeJson
(String json) Set additional JSON configuration as a string.setPanels
(List<StockPanel> panels) Sets list of stock panels.setPanelsSettings
(PanelsSettings panelsSettings) Sets settings for stock panels.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.setPeriodSelector
(PeriodSelector periodSelector) Sets period selector.setProcessTimeout
(Integer processTimeout) Sets the process timeout.setStockEventsSettings
(StockEventsSettings stockEventsSettings) Sets settings for stock events.setTheme
(ChartTheme theme) Sets theme of a chart.protected void
setupDefaults
(StockChartGroup chart) protected void
setupFormatStrings
(List<StockPanel> panels) setValueAxesSettings
(ValueAxesSettings valueAxesSettings) Sets settings for value axes.setZoomOutOnDataSetChange
(Boolean zoomOutOnDataSetChange) Specifies whether the chart should zoom-out when main data set is changed.Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setParent, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
-
Field Details
-
messages
-
messageTools
-
metadata
-
currentAuthentication
-
chartLocaleHelper
-
formatStringsRegistry
-
stockChartEventsForwarder
-
-
Constructor Details
-
StockChartImpl
public StockChartImpl()
-
-
Method Details
-
createConfiguration
-
createComponent
-
createChartSerializer
-
setMessages
-
setMetadata
-
setCurrentAuthentication
-
setChartLocaleHelper
-
setMessageTools
-
setFormatStringsRegistry
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
initLocale
protected void initLocale() -
setupDefaults
-
setupFormatStrings
-
getConfiguration
-
getModel
-
repaint
public void repaint()Description copied from interface:StockChart
Resend all items and properties to client and repaint chart. Use this method if you change some property of already displayed chart.- Specified by:
repaint
in interfaceStockChart
-
getStockEvent
-
addClickListener
Description copied from interface:StockChart
Adds a listener to stock chart click events. Called when user clicks on the stock chart.- Specified by:
addClickListener
in interfaceStockChart
- Parameters:
clickListener
- a listener to add- Returns:
- subscription
-
addRightClickListener
public Subscription addRightClickListener(Consumer<StockChart.StockChartRightClickEvent> clickListener) Description copied from interface:StockChart
Adds listener to stock chart right click events. Called when user clicks on the stock chart.- Specified by:
addRightClickListener
in interfaceStockChart
- Parameters:
clickListener
- a listener to add- Returns:
- subscription
-
addStockEventClickListener
public Subscription addStockEventClickListener(Consumer<StockChart.StockEventClickEvent> clickListener) Description copied from interface:StockChart
Adds listener to stock event click events. Called when user clicks on the stock event.- Specified by:
addStockEventClickListener
in interfaceStockChart
- Parameters:
clickListener
- a listener to add- Returns:
- subscription
-
addStockEventRollOutListener
public Subscription addStockEventRollOutListener(Consumer<StockChart.StockEventRollOutEvent> rollOutListener) Description copied from interface:StockChart
Adds a listener to stock event roll-out events. Called when the stock event did roll-out.- Specified by:
addStockEventRollOutListener
in interfaceStockChart
- Parameters:
rollOutListener
- a listener to add- Returns:
- subscription
-
addStockEventRollOverListener
public Subscription addStockEventRollOverListener(Consumer<StockChart.StockEventRollOverEvent> rollOverListener) Description copied from interface:StockChart
Adds listener to stock event roll-over events. Called when the stock event did roll-over.- Specified by:
addStockEventRollOverListener
in interfaceStockChart
- Parameters:
rollOverListener
- a listener to add- Returns:
- subscription
-
addZoomListener
Description copied from interface:StockChart
Adds listener to stock chart zoom events.- Specified by:
addZoomListener
in interfaceStockChart
- Parameters:
zoomListener
- a listener to add- Returns:
- subscription
-
addPeriodSelectorChangeListener
public Subscription addPeriodSelectorChangeListener(Consumer<StockChart.PeriodSelectorChangeEvent> changeListener) Description copied from interface:StockChart
Adds a listener to period selector change events. Called when the period selector changed.- Specified by:
addPeriodSelectorChangeListener
in interfaceStockChart
- Parameters:
changeListener
- a listener- Returns:
- subscription
-
addDataSetSelectorCompareListener
public Subscription addDataSetSelectorCompareListener(Consumer<StockChart.DataSetSelectorCompareEvent> compareListener) Description copied from interface:StockChart
Adds a listener to dataset selector compare events. Called when the data set is selected for comparing.- Specified by:
addDataSetSelectorCompareListener
in interfaceStockChart
- Parameters:
compareListener
- a listener to add- Returns:
- subscription
-
addDataSetSelectorSelectListener
public Subscription addDataSetSelectorSelectListener(Consumer<StockChart.DataSetSelectorSelectEvent> selectListener) Description copied from interface:StockChart
Adds a listener to dataset selector select events. Called when the dataset selector selected.- Specified by:
addDataSetSelectorSelectListener
in interfaceStockChart
- Parameters:
selectListener
- a listener to add- Returns:
- subscription
-
addDataSetSelectorUnCompareListener
public Subscription addDataSetSelectorUnCompareListener(Consumer<StockChart.DataSetSelectorUnCompareEvent> unCompareListener) Description copied from interface:StockChart
Adds a listener to dataset selector uncompare events. Called when the dataset selector removed from comparison.- Specified by:
addDataSetSelectorUnCompareListener
in interfaceStockChart
- Parameters:
unCompareListener
- a listener to add- Returns:
- subscription
-
addStockGraphClickListener
public Subscription addStockGraphClickListener(Consumer<StockChart.StockGraphClickEvent> clickListener) Description copied from interface:StockChart
Adds a listener to stock graph click events. Called when user clicks on the stock graph.- Specified by:
addStockGraphClickListener
in interfaceStockChart
- Parameters:
clickListener
- a listener to add- Returns:
- subscription
-
addStockGraphRollOutListener
public Subscription addStockGraphRollOutListener(Consumer<StockChart.StockGraphRollOutEvent> rollOutListener) Description copied from interface:StockChart
Adds a listener to stock graph roll-out events. Called when the stock graph did roll-out.- Specified by:
addStockGraphRollOutListener
in interfaceStockChart
- Parameters:
rollOutListener
- a listener to add- Returns:
- subscription
-
addStockGraphRollOverListener
public Subscription addStockGraphRollOverListener(Consumer<StockChart.StockGraphRollOverEvent> rollOverListener) Description copied from interface:StockChart
Adds a listener to stock graph roll-over events. Called when the stock graph did roll-over.- Specified by:
addStockGraphRollOverListener
in interfaceStockChart
- Parameters:
rollOverListener
- a listener to add- Returns:
- subscription
-
addStockGraphItemClickListener
public Subscription addStockGraphItemClickListener(Consumer<StockChart.StockGraphItemClickEvent> clickListener) Description copied from interface:StockChart
Adds a listener to stock graph item click events. Called when user clicks on the stock graph item.- Specified by:
addStockGraphItemClickListener
in interfaceStockChart
- Parameters:
clickListener
- a listener to add- Returns:
- subscription
-
addStockGraphItemRightClickListener
public Subscription addStockGraphItemRightClickListener(Consumer<StockChart.StockGraphItemRightClickEvent> clickListener) Description copied from interface:StockChart
Adds a listener to stock graph item right click events. Called when user clicks on the stock graph item.- Specified by:
addStockGraphItemRightClickListener
in interfaceStockChart
- Parameters:
clickListener
- a listener to add- Returns:
- subscription
-
addStockGraphItemRollOutListener
public Subscription addStockGraphItemRollOutListener(Consumer<StockChart.StockGraphItemRollOutEvent> rollOutListener) Description copied from interface:StockChart
Adds a listener to stock graph item roll-out events. Called when the stock graph item did roll-out.- Specified by:
addStockGraphItemRollOutListener
in interfaceStockChart
- Parameters:
rollOutListener
- a listener to add- Returns:
- subscription
-
addStockGraphItemRollOverListener
public Subscription addStockGraphItemRollOverListener(Consumer<StockChart.StockGraphItemRollOverEvent> rollOverListener) Description copied from interface:StockChart
Adds a listener to stock graph item roll-over events.- Specified by:
addStockGraphItemRollOverListener
in interfaceStockChart
- Parameters:
rollOverListener
- a listener to add- Returns:
- subscription
-
getNativeJson
- Specified by:
getNativeJson
in interfaceStockChart
- Returns:
- additional JSON configuration as a string.
-
setNativeJson
Description copied from interface:StockChart
Set additional JSON configuration as a string. This JSON can override configuration loaded from XML and from Component API.- Specified by:
setNativeJson
in interfaceStockChart
- Parameters:
json
- additional JSON configuration
-
getAddClassNames
- Specified by:
getAddClassNames
in interfaceStockChartModel<StockChart>
- Returns:
- true if addClassNames option is enabled
-
setAddClassNames
Description copied from interface:StockChartModel
Set addClassNames to true, if class names should be added to chart elements.- Specified by:
setAddClassNames
in interfaceStockChartModel<StockChart>
- Parameters:
addClassNames
- add class names option- Returns:
- stock chart model
-
getExport
- Specified by:
getExport
in interfaceStockChartModel<StockChart>
- Returns:
- export menu
-
setExport
Description copied from interface:StockChartModel
Sets the export menu.- Specified by:
setExport
in interfaceStockChartModel<StockChart>
- Parameters:
export
- export menu- Returns:
- stock chart model
-
getAnimationPlayed
- Specified by:
getAnimationPlayed
in interfaceStockChartModel<StockChart>
- Returns:
- true if animation was already played
-
setAnimationPlayed
Description copied from interface:StockChartModel
Specifies if animation was already played. Animation is only played once, when chart is rendered for the first time. If you want the animation to be repeated, set this property to false.- Specified by:
setAnimationPlayed
in interfaceStockChartModel<StockChart>
- Parameters:
animationPlayed
- animation played option- Returns:
- stock chart model
-
getAutoResize
- Specified by:
getAutoResize
in interfaceStockChartModel<StockChart>
- Returns:
- true if autoResize is enabled
-
setAutoResize
Description copied from interface:StockChartModel
Set autoResize to true if you want chart to resize itself whenever its parent container size changes. If not set the default value is true.- Specified by:
setAutoResize
in interfaceStockChartModel<StockChart>
- Parameters:
autoResize
- auto resize option- Returns:
- stock chart model
-
getBalloon
- Specified by:
getBalloon
in interfaceStockChartModel<StockChart>
- Returns:
- balloon
-
setBalloon
Description copied from interface:StockChartModel
Sets the balloon.- Specified by:
setBalloon
in interfaceStockChartModel<StockChart>
- Parameters:
balloon
- the balloon- Returns:
- stock chart model
-
getCategoryAxesSettings
- Specified by:
getCategoryAxesSettings
in interfaceStockChartModel<StockChart>
- Returns:
- category axis settings
-
setCategoryAxesSettings
Description copied from interface:StockChartModel
Sets settings for category axes.- Specified by:
setCategoryAxesSettings
in interfaceStockChartModel<StockChart>
- Parameters:
categoryAxesSettings
- category axis settings- Returns:
- stock chart model
-
getChartCursorSettings
- Specified by:
getChartCursorSettings
in interfaceStockChartModel<StockChart>
- Returns:
- chart cursor settings
-
setChartCursorSettings
Description copied from interface:StockChartModel
Sets chart cursor settings.- Specified by:
setChartCursorSettings
in interfaceStockChartModel<StockChart>
- Parameters:
chartCursorSettings
- chart cursor settings- Returns:
- stock chart model
-
getChartScrollbarSettings
- Specified by:
getChartScrollbarSettings
in interfaceStockChartModel<StockChart>
-
setChartScrollbarSettings
Description copied from interface:StockChartModel
Sets chart scrollbar settings.- Specified by:
setChartScrollbarSettings
in interfaceStockChartModel<StockChart>
- Parameters:
chartScrollbarSettings
- chart scrollbar settings- Returns:
- stock chart model
-
getClassNamePrefix
- Specified by:
getClassNamePrefix
in interfaceStockChartModel<StockChart>
- Returns:
- class name prefix
-
setClassNamePrefix
Description copied from interface:StockChartModel
Sets the class name prefix. This prefix is added to all class names which are added to all visual elements of a chart in case addClassNames is set to true. If not set the default value is "amcharts".- Specified by:
setClassNamePrefix
in interfaceStockChartModel<StockChart>
- Parameters:
classNamePrefix
- class name prefix string- Returns:
- stock chart model
-
getColors
- Specified by:
getColors
in interfaceHasColors<StockChart>
- Returns:
- List of colors
-
setColors
Description copied from interface:HasColors
Sets the list of colors.If you use charts based on
SlicedChartModelImpl
it specifies the colors of the slices, if the slice color is not set. If there are more slices than colors in this array, the chart picks random color.If you use charts based on
CoordinateChartModelImpl
orStockChartModel
it specifies the colors of the graphs if the lineColor of a graph is not set. If there are more graphs then colors in this array, the chart picks a random color. If not set the default value is["#FF6600", "#FCD202", "#B0DE09", "#0D8ECF", "#2A0CD0", "#CD0D74", "#CC0000", "#00CC00", "#0000CC", "#DDDDDD", "#999999", "#333333", "#990000"]
If you use chart based on
SlicedChartModelImpl
(PieChart, FunnelChart). Specifies the colors of the slices, if the slice color is not set. If there are more slices than colors in this array, the chart picks random color. If not set default value is["#FF0F00", "#FF6600", "#FF9E01", "#FCD202", "#F8FF01", "#B0DE09", "#04D215", "#0D8ECF", "#0D52D1", "#2A0CD0", "#8A0CCF", "#CD0D74", "#754DEB", "#DDDDDD", "#999999", "#333333", "#000000", "#57032A", "#CA9726", "#990000", "#4B0C25"]
- Specified by:
setColors
in interfaceHasColors<StockChart>
- Parameters:
colors
- list of colors- Returns:
- chart
-
addColors
Description copied from interface:HasColors
Adds colors.- Specified by:
addColors
in interfaceHasColors<StockChart>
- Parameters:
colors
- list of colors- Returns:
- chart
-
getComparedDataSets
- Specified by:
getComparedDataSets
in interfaceStockChartModel<StockChart>
- Returns:
- list of compared data sets
-
setComparedDataSets
Description copied from interface:StockChartModel
Sets the list of of data sets selected for comparing.- Specified by:
setComparedDataSets
in interfaceStockChartModel<StockChart>
- Parameters:
comparedDataSets
- compared data sets- Returns:
- stock chart model
-
addComparedDataSets
Description copied from interface:StockChartModel
Adds compared data sets.- Specified by:
addComparedDataSets
in interfaceStockChartModel<StockChart>
- Parameters:
comparedDataSets
- compared data sets- Returns:
- stock chart model
-
getDataDateFormat
- Specified by:
getDataDateFormat
in interfaceStockChartModel<StockChart>
- Returns:
- data date format
-
setDataDateFormat
Description copied from interface:StockChartModel
Sets data date format. Please note, that two-digit years "YY" is NOT supported in this setting.- Specified by:
setDataDateFormat
in interfaceStockChartModel<StockChart>
- Parameters:
dataDateFormat
- data date format string- Returns:
- stock chart model
-
getDataSets
- Specified by:
getDataSets
in interfaceStockChartModel<StockChart>
- Returns:
- list of data sets
-
setDataSets
Description copied from interface:StockChartModel
Sets the list of data sets.- Specified by:
setDataSets
in interfaceStockChartModel<StockChart>
- Parameters:
dataSets
- list of data sets- Returns:
- stock chart model
-
addDataSets
Description copied from interface:StockChartModel
Adds data sets.- Specified by:
addDataSets
in interfaceStockChartModel<StockChart>
- Parameters:
dataSets
- data sets- Returns:
- stock chart model
-
getDataSetSelector
- Specified by:
getDataSetSelector
in interfaceStockChartModel<StockChart>
- Returns:
- data set selector
-
setDataSetSelector
Description copied from interface:StockChartModel
Sets data set selector. You can add it if you have more than one data set and want users to be able to select/compare them.- Specified by:
setDataSetSelector
in interfaceStockChartModel<StockChart>
- Parameters:
dataSetSelector
- data set selector- Returns:
- stock chart model
-
getExtendToFullPeriod
- Specified by:
getExtendToFullPeriod
in interfaceStockChartModel<StockChart>
- Returns:
- true if chart always displays full first and last data item when data is grouped to a longer period if the chart is zoomed from the beginning or end of the data
-
setExtendToFullPeriod
Description copied from interface:StockChartModel
Specifies if the chart should always display full first and last data item when data is grouped to a longer period if the chart is zoomed from the beginning or end of the data. If not set the default value is true.- Specified by:
setExtendToFullPeriod
in interfaceStockChartModel<StockChart>
- Parameters:
extendToFullPeriod
- extend to full period option- Returns:
- stock chart model
-
getFirstDayOfWeek
- Specified by:
getFirstDayOfWeek
in interfaceStockChartModel<StockChart>
- Returns:
- first day of week
-
setFirstDayOfWeek
Description copied from interface:StockChartModel
Sets day week starts. 0 - Sunday, 1 - Monday etc. If not set the default value is 1.- Specified by:
setFirstDayOfWeek
in interfaceStockChartModel<StockChart>
- Parameters:
firstDayOfWeek
- first day of week- Returns:
- stock chart model
-
getGlueToTheEnd
- Specified by:
getGlueToTheEnd
in interfaceStockChartModel<StockChart>
- Returns:
- true if the scope of the data view is set to the end after data update
-
setGlueToTheEnd
Description copied from interface:StockChartModel
Set glueToTheEnd to true if the scope of the data view should be set to the end after data update. If not set the default value is false.- Specified by:
setGlueToTheEnd
in interfaceStockChartModel<StockChart>
- Parameters:
glueToTheEnd
- glue to the end option- Returns:
- stock chart model
-
getLanguage
- Specified by:
getLanguage
in interfaceStockChartModel<StockChart>
- Returns:
- language
-
setLanguage
Description copied from interface:StockChartModel
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 interfaceStockChartModel<StockChart>
- Parameters:
language
- language string- Returns:
- stock chart model
-
getLegendSettings
- Specified by:
getLegendSettings
in interfaceStockChartModel<StockChart>
- Returns:
- legend settings
-
setLegendSettings
Description copied from interface:StockChartModel
Sets legend settings.- Specified by:
setLegendSettings
in interfaceStockChartModel<StockChart>
- Parameters:
legendSettings
- legend settings- Returns:
- stock chart model
-
getMainDataSet
- Specified by:
getMainDataSet
in interfaceStockChartModel<StockChart>
- Returns:
- main data set
-
setMainDataSet
Description copied from interface:StockChartModel
Sets data set as main.- Specified by:
setMainDataSet
in interfaceStockChartModel<StockChart>
- Parameters:
mainDataSet
- main data set- Returns:
- stock chart model
-
getMouseWheelScrollEnabled
- Specified by:
getMouseWheelScrollEnabled
in interfaceStockChartModel<StockChart>
- Returns:
- true if scrolling of a chart with mouse wheel is enabled
-
setMouseWheelScrollEnabled
Description copied from interface:StockChartModel
Set mouseWheelScrollEnabled to true you wont to scroll chart with mouse wheel. If not set the default value is false.- Specified by:
setMouseWheelScrollEnabled
in interfaceStockChartModel<StockChart>
- Parameters:
mouseWheelScrollEnabled
- mouse wheel scroll option- Returns:
- stock chart model
-
getPanels
- Specified by:
getPanels
in interfaceStockChartModel<StockChart>
- Returns:
- list of stock panels
-
setPanels
Description copied from interface:StockChartModel
Sets list of stock panels.- Specified by:
setPanels
in interfaceStockChartModel<StockChart>
- Parameters:
panels
- list of stock panels- Returns:
- stock chart model
-
addPanels
Description copied from interface:StockChartModel
Adds stock panels.- Specified by:
addPanels
in interfaceStockChartModel<StockChart>
- Parameters:
panels
- stock panels- Returns:
- stock chart model
-
getPanelsSettings
- Specified by:
getPanelsSettings
in interfaceStockChartModel<StockChart>
- Returns:
- panel settings
-
setPanelsSettings
Description copied from interface:StockChartModel
Sets settings for stock panels.- Specified by:
setPanelsSettings
in interfaceStockChartModel<StockChart>
- Parameters:
panelsSettings
- panel settings- Returns:
- stock chart model
-
getPath
- Specified by:
getPath
in interfaceStockChartModel<StockChart>
- Returns:
- path
-
setPath
Description copied from interface:StockChartModel
Specifies absolute or relative path to amCharts files.- Specified by:
setPath
in interfaceStockChartModel<StockChart>
- Parameters:
path
- the path string- Returns:
- stock chart model
-
getPathToImages
- Specified by:
getPathToImages
in interfaceStockChartModel<StockChart>
-
setPathToImages
Description copied from interface:StockChartModel
Specifies path to the folder where images like resize grips, lens and similar are.- Specified by:
setPathToImages
in interfaceStockChartModel<StockChart>
- Parameters:
pathToImages
- path to images- Returns:
- stock chart model
-
getPeriodSelector
- Specified by:
getPeriodSelector
in interfaceStockChartModel<StockChart>
- Returns:
- period selector
-
setPeriodSelector
Description copied from interface:StockChartModel
Sets period selector. You can add it if you want user's to be able to enter date ranges or zoom chart with predefined period buttons.- Specified by:
setPeriodSelector
in interfaceStockChartModel<StockChart>
- Parameters:
periodSelector
- period selector- Returns:
- stock chart model
-
getStockEventsSettings
- Specified by:
getStockEventsSettings
in interfaceStockChartModel<StockChart>
- Returns:
- stock events settings
-
setStockEventsSettings
Description copied from interface:StockChartModel
Sets settings for stock events.- Specified by:
setStockEventsSettings
in interfaceStockChartModel<StockChart>
- Parameters:
stockEventsSettings
- stock events settings- Returns:
- stock chart model
-
getTheme
- Specified by:
getTheme
in interfaceStockChartModel<StockChart>
- Returns:
- theme of a chart
-
setTheme
Description copied from interface:StockChartModel
Sets theme of a chart.- Specified by:
setTheme
in interfaceStockChartModel<StockChart>
- Parameters:
theme
- the theme- Returns:
- stock chart model
-
getValueAxesSettings
- Specified by:
getValueAxesSettings
in interfaceStockChartModel<StockChart>
- Returns:
- value axes settings
-
setValueAxesSettings
Description copied from interface:StockChartModel
Sets settings for value axes.- Specified by:
setValueAxesSettings
in interfaceStockChartModel<StockChart>
- Parameters:
valueAxesSettings
- value axes settings- Returns:
- stock chart model
-
getZoomOutOnDataSetChange
- Specified by:
getZoomOutOnDataSetChange
in interfaceStockChartModel<StockChart>
- Returns:
- true if chart zoom-out when main data set is changed
-
setZoomOutOnDataSetChange
Description copied from interface:StockChartModel
Specifies whether the chart should zoom-out when main data set is changed. If not set the default value is false.- Specified by:
setZoomOutOnDataSetChange
in interfaceStockChartModel<StockChart>
- Parameters:
zoomOutOnDataSetChange
- zoom out on data set change option- Returns:
- stock chart model
-
getDataSet
Description copied from interface:StockChartModel
Gets data set by id.- Specified by:
getDataSet
in interfaceStockChartModel<StockChart>
- Parameters:
id
- id of dataSet- Returns:
- data set
-
getAdditionalFields
- Specified by:
getAdditionalFields
in interfaceStockChartModel<StockChart>
- Returns:
- list of additional fields
-
setAdditionalFields
Description copied from interface:StockChartModel
Sets list of additional fields. Fields from your data provider that should be used directly in the chart configuration.- Specified by:
setAdditionalFields
in interfaceStockChartModel<StockChart>
- Parameters:
additionalFields
- list of additional fields- Returns:
- stock chart model
-
getProcessTimeout
- Specified by:
getProcessTimeout
in interfaceStockChartModel<StockChart>
- Returns:
- process timeout
-
setProcessTimeout
Description copied from interface:StockChartModel
Sets the process timeout. 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 interfaceStockChartModel<StockChart>
- Parameters:
processTimeout
- process timeout- Returns:
- stock chart model
-
getStockPanelById
-
getStockGraphById
-
getStockGraphById
-