Interface StockChartModel<T extends StockChartModel>

All Superinterfaces:
HasColors<T>
All Known Subinterfaces:
StockChart
All Known Implementing Classes:
StockChartGroup, StockChartImpl

public interface StockChartModel<T extends StockChartModel> extends HasColors<T>
  • Method Details

    • getAddClassNames

      Boolean getAddClassNames()
      Returns:
      true if addClassNames option is enabled
    • setAddClassNames

      @StudioProperty T setAddClassNames(Boolean addClassNames)
      Set addClassNames to true, if class names should be added to chart elements.
      Parameters:
      addClassNames - add class names option
      Returns:
      stock chart model
    • getExport

      Export getExport()
      Returns:
      export menu
    • setExport

      T setExport(Export export)
      Sets the export menu.
      Parameters:
      export - export menu
      Returns:
      stock chart model
    • getAnimationPlayed

      Boolean getAnimationPlayed()
      Returns:
      true if animation was already played
    • setAnimationPlayed

      @StudioProperty T setAnimationPlayed(Boolean animationPlayed)
      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.
      Parameters:
      animationPlayed - animation played option
      Returns:
      stock chart model
    • getAutoResize

      Boolean getAutoResize()
      Returns:
      true if autoResize is enabled
    • setAutoResize

      @StudioProperty(defaultValue="true") T setAutoResize(Boolean autoResize)
      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.
      Parameters:
      autoResize - auto resize option
      Returns:
      stock chart model
    • getBalloon

      Balloon getBalloon()
      Returns:
      balloon
    • setBalloon

      T setBalloon(Balloon balloon)
      Sets the balloon.
      Parameters:
      balloon - the balloon
      Returns:
      stock chart model
    • getCategoryAxesSettings

      CategoryAxesSettings getCategoryAxesSettings()
      Returns:
      category axis settings
    • setCategoryAxesSettings

      T setCategoryAxesSettings(CategoryAxesSettings categoryAxesSettings)
      Sets settings for category axes.
      Parameters:
      categoryAxesSettings - category axis settings
      Returns:
      stock chart model
    • getChartCursorSettings

      ChartCursorSettings getChartCursorSettings()
      Returns:
      chart cursor settings
    • setChartCursorSettings

      T setChartCursorSettings(ChartCursorSettings chartCursorSettings)
      Sets chart cursor settings.
      Parameters:
      chartCursorSettings - chart cursor settings
      Returns:
      stock chart model
    • getChartScrollbarSettings

      ChartScrollbarSettings getChartScrollbarSettings()
    • setChartScrollbarSettings

      T setChartScrollbarSettings(ChartScrollbarSettings chartScrollbarSettings)
      Sets chart scrollbar settings.
      Parameters:
      chartScrollbarSettings - chart scrollbar settings
      Returns:
      stock chart model
    • getClassNamePrefix

      String getClassNamePrefix()
      Returns:
      class name prefix
    • setClassNamePrefix

      @StudioProperty(defaultValue="amcharts") T setClassNamePrefix(String classNamePrefix)
      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".
      Parameters:
      classNamePrefix - class name prefix string
      Returns:
      stock chart model
    • getComparedDataSets

      List<String> getComparedDataSets()
      Returns:
      list of compared data sets
    • setComparedDataSets

      @StudioProperty(type=STRING) T setComparedDataSets(List<String> comparedDataSets)
      Sets the list of of data sets selected for comparing.
      Parameters:
      comparedDataSets - compared data sets
      Returns:
      stock chart model
    • addComparedDataSets

      T addComparedDataSets(String... comparedDataSets)
      Adds compared data sets.
      Parameters:
      comparedDataSets - compared data sets
      Returns:
      stock chart model
    • getDataDateFormat

      String getDataDateFormat()
      Returns:
      data date format
    • setDataDateFormat

      @StudioProperty T setDataDateFormat(String dataDateFormat)
      Sets data date format. Please note, that two-digit years "YY" is NOT supported in this setting.
      Parameters:
      dataDateFormat - data date format string
      Returns:
      stock chart model
    • getDataSet

      DataSet getDataSet(String id)
      Gets data set by id.
      Parameters:
      id - id of dataSet
      Returns:
      data set
    • getDataSets

      List<DataSet> getDataSets()
      Returns:
      list of data sets
    • setDataSets

      @StudioElementsGroup(caption="Data Sets", xmlElement="dataSets") T setDataSets(List<DataSet> dataSets)
      Sets the list of data sets.
      Parameters:
      dataSets - list of data sets
      Returns:
      stock chart model
    • addDataSets

      T addDataSets(DataSet... dataSets)
      Adds data sets.
      Parameters:
      dataSets - data sets
      Returns:
      stock chart model
    • getDataSetSelector

      DataSetSelector getDataSetSelector()
      Returns:
      data set selector
    • setDataSetSelector

      T setDataSetSelector(DataSetSelector dataSetSelector)
      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.
      Parameters:
      dataSetSelector - data set selector
      Returns:
      stock chart model
    • getExtendToFullPeriod

      Boolean getExtendToFullPeriod()
      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

      @StudioProperty(defaultValue="true") T 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. If not set the default value is true.
      Parameters:
      extendToFullPeriod - extend to full period option
      Returns:
      stock chart model
    • getFirstDayOfWeek

      Integer getFirstDayOfWeek()
      Returns:
      first day of week
    • setFirstDayOfWeek

      @StudioProperty(defaultValue="1") @Max(6L) @Min(0L) T setFirstDayOfWeek(Integer firstDayOfWeek)
      Sets day week starts. 0 - Sunday, 1 - Monday etc. If not set the default value is 1.
      Parameters:
      firstDayOfWeek - first day of week
      Returns:
      stock chart model
    • getGlueToTheEnd

      Boolean getGlueToTheEnd()
      Returns:
      true if the scope of the data view is set to the end after data update
    • setGlueToTheEnd

      @StudioProperty(defaultValue="false") T setGlueToTheEnd(Boolean glueToTheEnd)
      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.
      Parameters:
      glueToTheEnd - glue to the end option
      Returns:
      stock chart model
    • getLanguage

      String getLanguage()
      Returns:
      language
    • setLanguage

      @StudioProperty T setLanguage(String language)
      Sets language of default. Note, you should include language js file from amcharts/lang and then use variable name used in this file, like setLanguage("de").
      Parameters:
      language - language string
      Returns:
      stock chart model
    • getLegendSettings

      LegendSettings getLegendSettings()
      Returns:
      legend settings
    • setLegendSettings

      T setLegendSettings(LegendSettings legendSettings)
      Sets legend settings.
      Parameters:
      legendSettings - legend settings
      Returns:
      stock chart model
    • getMainDataSet

      String getMainDataSet()
      Returns:
      main data set
    • setMainDataSet

      @StudioProperty T setMainDataSet(String mainDataSet)
      Sets data set as main.
      Parameters:
      mainDataSet - main data set
      Returns:
      stock chart model
    • getMouseWheelScrollEnabled

      Boolean getMouseWheelScrollEnabled()
      Returns:
      true if scrolling of a chart with mouse wheel is enabled
    • setMouseWheelScrollEnabled

      @StudioProperty(defaultValue="false") T setMouseWheelScrollEnabled(Boolean mouseWheelScrollEnabled)
      Set mouseWheelScrollEnabled to true you wont to scroll chart with mouse wheel. If not set the default value is false.
      Parameters:
      mouseWheelScrollEnabled - mouse wheel scroll option
      Returns:
      stock chart model
    • getPanels

      List<StockPanel> getPanels()
      Returns:
      list of stock panels
    • setPanels

      @StudioElementsGroup(caption="Panels", xmlElement="panels") T setPanels(List<StockPanel> panels)
      Sets list of stock panels.
      Parameters:
      panels - list of stock panels
      Returns:
      stock chart model
    • addPanels

      T addPanels(StockPanel... panels)
      Adds stock panels.
      Parameters:
      panels - stock panels
      Returns:
      stock chart model
    • getPanelsSettings

      PanelsSettings getPanelsSettings()
      Returns:
      panel settings
    • setPanelsSettings

      T setPanelsSettings(PanelsSettings panelsSettings)
      Sets settings for stock panels.
      Parameters:
      panelsSettings - panel settings
      Returns:
      stock chart model
    • getPath

      String getPath()
      Returns:
      path
    • setPath

      T setPath(String path)
      Specifies absolute or relative path to amCharts files.
      Parameters:
      path - the path string
      Returns:
      stock chart model
    • getPathToImages

      String getPathToImages()
    • setPathToImages

      T setPathToImages(String pathToImages)
      Specifies path to the folder where images like resize grips, lens and similar are.
      Parameters:
      pathToImages - path to images
      Returns:
      stock chart model
    • getPeriodSelector

      PeriodSelector getPeriodSelector()
      Returns:
      period selector
    • setPeriodSelector

      T setPeriodSelector(PeriodSelector periodSelector)
      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.
      Parameters:
      periodSelector - period selector
      Returns:
      stock chart model
    • getStockEventsSettings

      StockEventsSettings getStockEventsSettings()
      Returns:
      stock events settings
    • setStockEventsSettings

      T setStockEventsSettings(StockEventsSettings stockEventsSettings)
      Sets settings for stock events.
      Parameters:
      stockEventsSettings - stock events settings
      Returns:
      stock chart model
    • getTheme

      ChartTheme getTheme()
      Returns:
      theme of a chart
    • setTheme

      T setTheme(ChartTheme theme)
      Sets theme of a chart.
      Parameters:
      theme - the theme
      Returns:
      stock chart model
    • getValueAxesSettings

      ValueAxesSettings getValueAxesSettings()
      Returns:
      value axes settings
    • setValueAxesSettings

      T setValueAxesSettings(ValueAxesSettings valueAxesSettings)
      Sets settings for value axes.
      Parameters:
      valueAxesSettings - value axes settings
      Returns:
      stock chart model
    • getZoomOutOnDataSetChange

      Boolean getZoomOutOnDataSetChange()
      Returns:
      true if chart zoom-out when main data set is changed
    • setZoomOutOnDataSetChange

      @StudioProperty(defaultValue="false") T setZoomOutOnDataSetChange(Boolean zoomOutOnDataSetChange)
      Specifies whether the chart should zoom-out when main data set is changed. If not set the default value is false.
      Parameters:
      zoomOutOnDataSetChange - zoom out on data set change option
      Returns:
      stock chart model
    • getAdditionalFields

      List<String> getAdditionalFields()
      Returns:
      list of additional fields
    • setAdditionalFields

      T setAdditionalFields(List<String> additionalFields)
      Sets list of additional fields. Fields from your data provider that should be used directly in the chart configuration.
      Parameters:
      additionalFields - list of additional fields
      Returns:
      stock chart model
    • getProcessTimeout

      Integer getProcessTimeout()
      Returns:
      process timeout
    • setProcessTimeout

      @StudioProperty(defaultValue="0") T setProcessTimeout(Integer processTimeout)
      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.
      Parameters:
      processTimeout - process timeout
      Returns:
      stock chart model