Interface ChartModel<T extends ChartModel>

All Known Subinterfaces:
AngularGaugeChart, AngularGaugeChartModel<T>, Chart<T>, CoordinateChart<T>, CoordinateChartModel<T>, FunnelChart, FunnelChartModel<T>, GanttChart, GanttChartModel<T>, PieChart, PieChartModel<T>, RadarChart, RadarChartModel<T>, RectangularChart<T>, RectangularChartModel<T>, SerialChart, SeriesBasedChart<T>, SeriesBasedChartModel<T>, SlicedChart<T>, SlicedChartModel<T>, XYChart, XYChartModel<T>
All Known Implementing Classes:
AbstractChart, AbstractSerialChart, AngularGaugeChartImpl, AngularGaugeChartModelImpl, ChartImpl, ChartWidget.BasicChart, CoordinateChartImpl, CoordinateChartModelImpl, FunnelChartImpl, FunnelChartModelImpl, GanttChartImpl, GanttChartModelImpl, JsonChartFragment.BasicChart, PieChartImpl, PieChartModelImpl, RadarChartImpl, RadarChartModelImpl, RectangularChartImpl, RectangularChartModelImpl, SerialChartImpl, SerialChartModelImpl, SeriesBasedChartImpl, SlicedChartImpl, SlicedChartModelImpl, StockPanel, XYChartImpl, XYChartModelImpl

public interface ChartModel<T extends ChartModel>
  • Method Details

    • getAddClassNames

      Boolean getAddClassNames()
      Returns:
      true if CSS class names should be added to chart elements
    • setAddClassNames

      @StudioProperty(defaultValue="false") T setAddClassNames(Boolean addClassNames)
      Specifies, if CSS class names should be added to chart elements (line, fill, column, etc). If not set the default value is false.
      See documentation for available CSS class names.
      http://www.amcharts.com/kbase/css-class-names/
      Parameters:
      addClassNames - add CSS class names option
      Returns:
      chart model
    • getAllLabels

      List<Label> getAllLabels()
      Returns:
      list of labels
    • setAllLabels

      @StudioElementsGroup(caption="Labels", xmlElement="allLabels") T setAllLabels(List<Label> allLabels)
      Sets the list of labels.
      Parameters:
      allLabels - list of labels
      Returns:
      chart model
    • addLabels

      T addLabels(Label... allLabels)
      Adds labels.
      Parameters:
      allLabels - the labels to to add
      Returns:
      chart model
    • getExport

      Export getExport()
      Returns:
      export config
    • setExport

      T setExport(Export export)
      Sets export config. Specifies how export to image/data export/print/annotate menu will look and behave.
      Parameters:
      export - the export
      Returns:
      chart model
    • getBackgroundColor

      Color getBackgroundColor()
      Returns:
      background color
    • setBackgroundColor

      @StudioProperty(type=OPTIONS, defaultValue="#FFFFFF") T setBackgroundColor(Color backgroundColor)
      Sets background color. You should set AbstractChart.backgroundAlpha to greater than 0 value in order background to be visible. If not set the default value is #FFFFFF.
      Parameters:
      backgroundColor - the background color
      Returns:
      chart model
    • getBalloon

      Balloon getBalloon()
      Returns:
      balloon of the chart
    • setBalloon

      T setBalloon(Balloon balloon)
      Sets the balloon (tooltip) of the chart.
      Parameters:
      balloon - the balloon
      Returns:
      chart model
    • getLegend

      Legend getLegend()
      Returns:
      legend of a chart
    • setLegend

      T setLegend(Legend legend)
      Sets legend of a chart.
      Parameters:
      legend - the legend
      Returns:
      chart model
    • getDecimalSeparator

      String getDecimalSeparator()
      Returns:
      decimal separator
    • setDecimalSeparator

      @StudioProperty(defaultValue=".") T setDecimalSeparator(String decimalSeparator)
      Sets decimal separator. If not set the default value is ".".
      Parameters:
      decimalSeparator - the decimal separator string
      Returns:
      chart model
    • getPercentPrecision

      Integer getPercentPrecision()
      Returns:
      percent precision
    • setPercentPrecision

      @StudioProperty(defaultValue="2") T setPercentPrecision(Integer percentPrecision)
      Sets precision of percent values. -1 means percent values won't be rounded at all and show as they are. If not set the default value is 2.
      Parameters:
      percentPrecision - the percent precision
      Returns:
      chart model
    • getPrecision

      Integer getPrecision()
      Returns:
      precision
    • setPrecision

      @StudioProperty(defaultValue="-1") T setPrecision(Integer precision)
      Precision of values. -1 means values won't be rounded at all and show as they are. If not set the default value is -1.
      Parameters:
      precision - the precision
      Returns:
      chart model
    • getDataProvider

      DataProvider getDataProvider()
    • setDataProvider

      @StudioProperty(name="dataContainer", type=COLLECTION_DATACONTAINER_REF) T setDataProvider(DataProvider dataProvider)
      Sets data provider that contains data set.
      Parameters:
      dataProvider - the data provider
      Returns:
      chart model
    • addData

      T addData(DataItem... dataItems)
      Adds data items. If DataProvider is null, so it creates ListDataProvider
      Parameters:
      dataItems - data items to add
      Returns:
      chart model
    • getPathToImages

      String getPathToImages()
      Returns:
      path to images
    • 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:
      chart model
    • getTheme

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

      T setTheme(ChartTheme theme)
      Sets theme of a chart. If not set the default value is NONE.
      Parameters:
      theme - the theme
      Returns:
      chart model
    • getBorderAlpha

      Double getBorderAlpha()
      Returns:
      opacity of chart's border
    • setBorderAlpha

      @StudioProperty(defaultValue="0") @Max(1L) @Min(0L) T setBorderAlpha(Double borderAlpha)
      Sets opacity of chart's border. Value range is 0 - 1. If not set the default value is 0.
      Parameters:
      borderAlpha - the border alpha
      Returns:
      chart model
    • getBorderColor

      Color getBorderColor()
      Returns:
      border color
    • setBorderColor

      @StudioProperty(type=OPTIONS, defaultValue="#000000") T setBorderColor(Color borderColor)
      Sets color of chart's border. You should set borderAlpha to greater than 0 value in order border to be visible. If not set the default value is #000000.
      Parameters:
      borderColor - the border color
      Returns:
      chart model
    • getClassNamePrefix

      String getClassNamePrefix()
      Returns:
      class name prefix
    • setClassNamePrefix

      @StudioProperty(defaultValue="amcharts") T setClassNamePrefix(String classNamePrefix)
      Sets prefix to all class names which are added to all visual elements of a chart in case AbstractChart.addClassNames is set to true. If not set the default value is "amcharts".
      Parameters:
      classNamePrefix - class name prefix string
      Returns:
      chart model
    • getCreditsPosition

      CreditsPosition getCreditsPosition()
      Returns:
      position of link to amCharts site
    • setCreditsPosition

      @StudioProperty(type=ENUMERATION, defaultValue="TOP_LEFT") T setCreditsPosition(CreditsPosition creditsPosition)
      Sets position of link to amCharts site. Allowed values are: top-left, top-right, bottom-left and bottom-right. Non-commercial version only. If not set the default value is TOP_LEFT.
      Parameters:
      creditsPosition - the credits position
      Returns:
      chart model
    • getColor

      Color getColor()
      Returns:
      text color
    • setColor

      @StudioProperty(type=OPTIONS, defaultValue="#000000") T setColor(Color color)
      Sets text color. If not set the default value is "#000000".
      Parameters:
      color - the text color
      Returns:
      chart model
    • getFontFamily

      String getFontFamily()
      Returns:
      font family
    • setFontFamily

      @StudioProperty(defaultValue="Verdana") T setFontFamily(String fontFamily)
      Sets font family. If not set the default value is "Verdana".
      Parameters:
      fontFamily - font family string
      Returns:
      chart model
    • getFontSize

      Integer getFontSize()
      Returns:
      font size
    • setFontSize

      @StudioProperty(defaultValue="11") @PositiveOrZero T setFontSize(Integer fontSize)
      Sets font size. If not set the default value is 11.
      Parameters:
      fontSize - the font size
      Returns:
      chart model
    • getHandDrawn

      Boolean getHandDrawn()
      Returns:
      true if the lines of the chart should be distorted and should produce hand-drawn effect
    • setHandDrawn

      @StudioProperty(defaultValue="false") T setHandDrawn(Boolean handDrawn)
      If true, the lines of the chart will be distorted and will produce hand-drawn effect. Try to adjust handDrawScatter and handDrawThickness properties for a more scattered result. If not set the default value is false.
      Parameters:
      handDrawn - hand drawn option
      Returns:
      chart model
    • getHandDrawScatter

      Integer getHandDrawScatter()
      Returns:
      hand draw scatter
    • setHandDrawScatter

      @StudioProperty(defaultValue="2") @PositiveOrZero T setHandDrawScatter(Integer handDrawScatter)
      Defines by how many pixels hand-drawn line (when handDrawn is set to true) will fluctuate. If not set the default value is 2.
      Parameters:
      handDrawScatter - the hand drawn scatter
      Returns:
      chart model
    • getHandDrawThickness

      Integer getHandDrawThickness()
      Returns:
      hand drawn thickness
    • setHandDrawThickness

      @StudioProperty(defaultValue="1") @PositiveOrZero T setHandDrawThickness(Integer handDrawThickness)
      Defines by how many pixels line thickness will fluctuate (when handDrawn is set to true). If not set the default value is 1.
      Parameters:
      handDrawThickness - the hand draw thickness
      Returns:
      chart model
    • getHideBalloonTime

      Integer getHideBalloonTime()
      Returns:
      hide balloon time in milliseconds
    • setHideBalloonTime

      @StudioProperty(defaultValue="150") @PositiveOrZero T setHideBalloonTime(Integer hideBalloonTime)
      Sets time, in milliseconds after which balloon is hidden if the user rolls-out of the object. Note, this is not duration of fade-out. Duration of fade-out is Balloon.fadeOutDuration. If not set the default value is 150.
      Parameters:
      hideBalloonTime - the hide balloon time in milliseconds
      Returns:
      chart model
    • getPanEventsEnabled

      Boolean getPanEventsEnabled()
      Returns:
      true if pan events enabled
    • setPanEventsEnabled

      @StudioProperty(defaultValue="true") T setPanEventsEnabled(Boolean panEventsEnabled)
      This setting affects touch-screen devices only. If a chart is on a page, and panEventsEnabled are set to true, the page won't move if the user touches the chart first. If a chart is big enough and occupies all the screen of your touch device, the user won’t be able to move the page at all. If you think that selecting/panning the chart is a primary purpose of your users, you should set panEventsEnabled to true, otherwise - false. If not set the default value is true.
      Parameters:
      panEventsEnabled - pan events enabled option
      Returns:
      chart model
    • getPrefixesOfBigNumbers

      List<BigNumberPrefix> getPrefixesOfBigNumbers()
      Returns:
      list of BigNumberPrefix
    • setPrefixesOfBigNumbers

      T setPrefixesOfBigNumbers(List<BigNumberPrefix> prefixesOfBigNumbers)
      Sets the prefixes which are used to make big numbers shorter: 2M instead of 2000000, etc. Prefixes are used on value axes and in the legend. To enable prefixes, set usePrefixes property to true. If not set the default value is
      
       [{"number":1e+3,  "prefix":"k"},
        {"number":1e+6,  "prefix":"M"},
        {"number":1e+9,  "prefix":"G"},
        {"number":1e+12, "prefix":"T"},
        {"number":1e+15, "prefix":"P"},
        {"number":1e+18, "prefix":"E"},
        {"number":1e+21, "prefix":"Z"},
        {"number":1e+24, "prefix":"Y"}]
      
      Parameters:
      prefixesOfBigNumbers - list of BigNumberPrefix
      Returns:
      chart model
    • addPrefixesOfBigNumbers

      T addPrefixesOfBigNumbers(BigNumberPrefix... prefixesOfBigNumbers)
      Adds BigNumberPrefixes.
      Parameters:
      prefixesOfBigNumbers - prefixes of big numbers
      Returns:
      chart model
    • getPrefixesOfSmallNumbers

      List<SmallNumberPrefix> getPrefixesOfSmallNumbers()
      Returns:
      list of SmallNumberPrefix
    • setPrefixesOfSmallNumbers

      T setPrefixesOfSmallNumbers(List<SmallNumberPrefix> prefixesOfSmallNumbers)
      Sets prefixes which are used to make small numbers shorter: 2μ instead of 0.000002, etc. Prefixes are used on value axes and in the legend. To enable prefixes, set usePrefixes property to true. If not set the default value is
      
       [{"number":1e-24, "prefix":"y"},
        {"number":1e-21, "prefix":"z"},
        {"number":1e-18, "prefix":"a"},
        {"number":1e-15, "prefix":"f"},
        {"number":1e-12, "prefix":"p"},
        {"number":1e-9,  "prefix":"n"},
        {"number":1e-6,  "prefix":"μ"},
        {"number":1e-3,  "prefix":"m"}]
       
      Parameters:
      prefixesOfSmallNumbers - list of SmallNumberPrefix
      Returns:
      chart model
    • addPrefixesOfSmallNumbers

      T addPrefixesOfSmallNumbers(SmallNumberPrefix... prefixesOfSmallNumbers)
      Adds SmallNumberPrefix
      Parameters:
      prefixesOfSmallNumbers - prefixes of small numbers
      Returns:
      chart model
    • getThousandsSeparator

      String getThousandsSeparator()
      Returns:
      thousands separator
    • setThousandsSeparator

      @StudioProperty(defaultValue=".") T setThousandsSeparator(String thousandsSeparator)
      Sets thousands separator. If not set the default value is ".".
      Parameters:
      thousandsSeparator - - thousands separator string
      Returns:
      chart model
    • getTitles

      List<Title> getTitles()
      Returns:
      list of titles
    • setTitles

      @StudioElementsGroup(caption="Titles", xmlElement="titles") T setTitles(List<Title> titles)
      Sets list of titles.
      Parameters:
      titles - the titles
      Returns:
      chart model
    • addTitles

      T addTitles(Title... titles)
      Adds titles to chart.
      Parameters:
      titles - the titles to add
      Returns:
      chart model
    • getUsePrefixes

      Boolean getUsePrefixes()
      Returns:
      true if uses prefixes is enabled
    • setUsePrefixes

      @StudioProperty(defaultValue="false") T setUsePrefixes(Boolean usePrefixes)
      If true, prefixes will be used for big and small numbers. You can set arrays of prefixes prefixesOfSmallNumbers and prefixesOfBigNumbers properties. If not set the default value is false.
      Parameters:
      usePrefixes - the use prefixes option
      Returns:
      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:
      chart model
    • addAdditionalFields

      T addAdditionalFields(String... fields)
      Adds additional fields
      Parameters:
      fields - the fields
      Returns:
      chart model
    • getAutoDisplay

      Boolean getAutoDisplay()
      Returns:
      true if auto display is enabled
    • setAutoDisplay

      @StudioProperty(defaultValue="false") T 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. If not set the default value is false.
      Parameters:
      autoDisplay - auto display option
      Returns:
      chart model
    • getAutoResize

      Boolean getAutoResize()
      Returns:
      true if chart should resize itself whenever its parent container size changes
    • setAutoResize

      @StudioProperty(defaultValue="true") T setAutoResize(Boolean autoResize)
      Set to false if you don't want chart to resize itself whenever its parent container size changes. If not set the default value is true.
      Parameters:
      autoResize - auto resize option
      Returns:
      chart model
    • getBackgroundAlpha

      Double getBackgroundAlpha()
      Returns:
      opacity of background
    • setBackgroundAlpha

      @StudioProperty(defaultValue="0") @PositiveOrZero T setBackgroundAlpha(Double backgroundAlpha)
      Sets opacity of background. Set it to greater 0 value if you want AbstractChart.backgroundColor to work. If not set the default value is 0.
      Parameters:
      backgroundAlpha - background alpha option
      Returns:
      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:
      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:
      chart model
    • getSvgIcons

      Boolean getSvgIcons()
      Returns:
      true if using SVG icons is enabled
    • setSvgIcons

      @StudioProperty(defaultValue="true") T setSvgIcons(Boolean svgIcons)
      Sets use SVG icons (if browser supports SVG). If not set the default value is true.
      Parameters:
      svgIcons - svgIcons option
      Returns:
      chart model
    • getTapToActivate

      Boolean getTapToActivate()
      Returns:
      true if tap to activate is enabled
    • setTapToActivate

      @StudioProperty(defaultValue="true") T 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. 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.
      Parameters:
      tapToActivate - tap to activate option
      Returns:
      chart model
    • getDefs

      String getDefs()
      Returns:
      defs
    • setDefs

      @StudioProperty T setDefs(String defs)
      Sets 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.
      Parameters:
      defs - defs string
      Returns:
      chart model
    • getAccessible

      Boolean getAccessible()
      Returns:
      true if accessible is enabled
    • setAccessible

      @StudioProperty(defaultValue="true") T setAccessible(Boolean accessible)
      When enabled, chart adds aria-label attributes to columns or bullets objects. You can control values of these labels using properties like AbstractGraph.accessibleLabel. If not set the default value is true.
      Parameters:
      accessible - accessible option
      Returns:
      chart model
    • getAccessibleTitle

      String getAccessibleTitle()
      Returns:
      description of a SVG element
    • setAccessibleTitle

      @StudioProperty T setAccessibleTitle(String accessibleTitle)
      Description which is added to of a SVG element.
      Parameters:
      accessibleTitle - accessible title string
      Returns:
      chart model
    • getResponsive

      Responsive getResponsive()
      Returns:
      responsive
    • setResponsive

      T setResponsive(Responsive responsive)
      Sets a config object for Responsive plugin
      Parameters:
      responsive - the responsive
      Returns:
      chart model
    • getProcessCount

      Integer getProcessCount()
      Returns:
      process count
    • setProcessCount

      @StudioProperty(defaultValue="1000") @PositiveOrZero T 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. If not set the default value is 1000.
      Parameters:
      processCount - the process count
      Returns:
      chart model
    • getProcessTimeout

      Integer getProcessTimeout()
      Returns:
      process timeout
    • setProcessTimeout

      @StudioProperty(defaultValue="0") @PositiveOrZero T 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. 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 - the process timeout
      Returns:
      chart model
    • getTouchClickDuration

      Integer getTouchClickDuration()
      Returns:
      touch click duration in milliseconds
    • setTouchClickDuration

      @StudioProperty(defaultValue="0") @PositiveOrZero T setTouchClickDuration(Integer touchClickDuration)
      Sets the touch click duration. If you set it to 200 (milliseconds) or so, the chart will fire GraphItemClickEvent or SliceClickEvent only if user holds his/her finger for 0.2 seconds (200 ms) on the column/bullet/slice object. If not set the default value is 0.
      Parameters:
      touchClickDuration - the touch click duration in milliseconds
      Returns:
      chart model
    • getAutoTransform

      Boolean getAutoTransform()
      Returns:
      true if auto transform is enabled,
    • setAutoTransform

      @StudioProperty(defaultValue="false") T 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. This operation consumes some CPU and quite a few people are using CSS transforms. If not set the default value is false.
      Parameters:
      autoTransform - auto transform option
      Returns:
      chart model
    • getAccessibleDescription

      String getAccessibleDescription()
      Returns:
      accessible description string
    • setAccessibleDescription

      @StudioProperty T setAccessibleDescription(String accessibleDescription)
      Description which will be added to node of SVG element.
      Parameters:
      accessibleDescription - description string
      Returns:
      chart model