Class ChartImpl<T extends Chart,M extends AbstractChart>

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
  • Field Details

  • Constructor Details

    • ChartImpl

      public ChartImpl()
  • Method Details

    • createComponent

      protected JmixAmchartsScene createComponent()
    • createChartSerializer

      protected ChartSerializer createChartSerializer()
    • setChartLocaleHelper

      @Autowired public void setChartLocaleHelper(ChartLocaleHelper chartLocaleHelper)
    • setFormatStringsRegistry

      @Autowired public void setFormatStringsRegistry(FormatStringsRegistry formatStringsRegistry)
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • setMessages

      @Autowired public void setMessages(Messages messages)
    • setCurrentAuthentication

      @Autowired public void setCurrentAuthentication(CurrentAuthentication currentAuthentication)
    • createChartConfiguration

      protected abstract M createChartConfiguration()
    • getModel

      protected M getModel()
    • initLocale

      protected void initLocale()
    • setupDefaults

      protected void setupDefaults(M chart)
    • setupChartLocale

      protected void setupChartLocale(AbstractChart chart)
    • repaint

      public void repaint()
      Description copied from interface: Chart
      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 interface Chart<T extends Chart>
    • getNativeJson

      public String getNativeJson()
      Specified by:
      getNativeJson in interface Chart<T extends Chart>
      Returns:
      additional JSON configuration as a string.
    • setNativeJson

      public void setNativeJson(String json)
      Description copied from interface: Chart
      Set additional JSON configuration as a string. This JSON can override configuration loaded from XML and from Component API.
      Specified by:
      setNativeJson in interface Chart<T extends Chart>
      Parameters:
      json - JSON configuration
    • getAddClassNames

      public Boolean getAddClassNames()
      Specified by:
      getAddClassNames in interface ChartModel<T extends Chart>
      Returns:
      true if CSS class names should be added to chart elements
    • setAddClassNames

      public T setAddClassNames(Boolean addClassNames)
      Description copied from interface: ChartModel
      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/
      Specified by:
      setAddClassNames in interface ChartModel<T extends Chart>
      Parameters:
      addClassNames - add CSS class names option
      Returns:
      chart model
    • getAllLabels

      public List<Label> getAllLabels()
      Specified by:
      getAllLabels in interface ChartModel<T extends Chart>
      Returns:
      list of labels
    • setAllLabels

      public T setAllLabels(List allLabels)
      Description copied from interface: ChartModel
      Sets the list of labels.
      Specified by:
      setAllLabels in interface ChartModel<T extends Chart>
      Parameters:
      allLabels - list of labels
      Returns:
      chart model
    • addLabels

      public T addLabels(Label... allLabels)
      Description copied from interface: ChartModel
      Adds labels.
      Specified by:
      addLabels in interface ChartModel<T extends Chart>
      Parameters:
      allLabels - the labels to to add
      Returns:
      chart model
    • getExport

      public Export getExport()
      Specified by:
      getExport in interface ChartModel<T extends Chart>
      Returns:
      export config
    • setExport

      public T setExport(Export export)
      Description copied from interface: ChartModel
      Sets export config. Specifies how export to image/data export/print/annotate menu will look and behave.
      Specified by:
      setExport in interface ChartModel<T extends Chart>
      Parameters:
      export - the export
      Returns:
      chart model
    • getBackgroundColor

      public Color getBackgroundColor()
      Specified by:
      getBackgroundColor in interface ChartModel<T extends Chart>
      Returns:
      background color
    • setBackgroundColor

      public T setBackgroundColor(Color backgroundColor)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setBackgroundColor in interface ChartModel<T extends Chart>
      Parameters:
      backgroundColor - the background color
      Returns:
      chart model
    • getBalloon

      public Balloon getBalloon()
      Specified by:
      getBalloon in interface ChartModel<T extends Chart>
      Returns:
      balloon of the chart
    • setBalloon

      public T setBalloon(Balloon balloon)
      Description copied from interface: ChartModel
      Sets the balloon (tooltip) of the chart.
      Specified by:
      setBalloon in interface ChartModel<T extends Chart>
      Parameters:
      balloon - the balloon
      Returns:
      chart model
    • getLegend

      public Legend getLegend()
      Specified by:
      getLegend in interface ChartModel<T extends Chart>
      Returns:
      legend of a chart
    • setLegend

      public T setLegend(Legend legend)
      Description copied from interface: ChartModel
      Sets legend of a chart.
      Specified by:
      setLegend in interface ChartModel<T extends Chart>
      Parameters:
      legend - the legend
      Returns:
      chart model
    • getDecimalSeparator

      public String getDecimalSeparator()
      Specified by:
      getDecimalSeparator in interface ChartModel<T extends Chart>
      Returns:
      decimal separator
    • setDecimalSeparator

      public T setDecimalSeparator(String decimalSeparator)
      Description copied from interface: ChartModel
      Sets decimal separator. If not set the default value is ".".
      Specified by:
      setDecimalSeparator in interface ChartModel<T extends Chart>
      Parameters:
      decimalSeparator - the decimal separator string
      Returns:
      chart model
    • getPercentPrecision

      public Integer getPercentPrecision()
      Specified by:
      getPercentPrecision in interface ChartModel<T extends Chart>
      Returns:
      percent precision
    • setPercentPrecision

      public T setPercentPrecision(Integer percentPrecision)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setPercentPrecision in interface ChartModel<T extends Chart>
      Parameters:
      percentPrecision - the percent precision
      Returns:
      chart model
    • getPrecision

      public Integer getPrecision()
      Specified by:
      getPrecision in interface ChartModel<T extends Chart>
      Returns:
      precision
    • setPrecision

      public T setPrecision(Integer precision)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setPrecision in interface ChartModel<T extends Chart>
      Parameters:
      precision - the precision
      Returns:
      chart model
    • getDataProvider

      public DataProvider getDataProvider()
      Specified by:
      getDataProvider in interface Chart<T extends Chart>
      Specified by:
      getDataProvider in interface ChartModel<T extends Chart>
      Returns:
      the data provider
    • setDataProvider

      public T setDataProvider(DataProvider dataProvider)
      Description copied from interface: ChartModel
      Sets data provider that contains data set.
      Specified by:
      setDataProvider in interface Chart<T extends Chart>
      Specified by:
      setDataProvider in interface ChartModel<T extends Chart>
      Parameters:
      dataProvider - the data provider
      Returns:
      chart
      See Also:
    • addData

      public T addData(DataItem... dataItems)
      Description copied from interface: ChartModel
      Adds data items. If DataProvider is null, so it creates ListDataProvider
      Specified by:
      addData in interface ChartModel<T extends Chart>
      Parameters:
      dataItems - data items to add
      Returns:
      chart model
    • getPathToImages

      public String getPathToImages()
      Specified by:
      getPathToImages in interface ChartModel<T extends Chart>
      Returns:
      path to images
    • setPathToImages

      public T setPathToImages(String pathToImages)
      Description copied from interface: ChartModel
      Specifies path to the folder where images like resize grips, lens and similar are.
      Specified by:
      setPathToImages in interface ChartModel<T extends Chart>
      Parameters:
      pathToImages - path to images
      Returns:
      chart model
    • getTheme

      public ChartTheme getTheme()
      Specified by:
      getTheme in interface ChartModel<T extends Chart>
      Returns:
      theme of a chart
    • setTheme

      public T setTheme(ChartTheme theme)
      Description copied from interface: ChartModel
      Sets theme of a chart. If not set the default value is NONE.
      Specified by:
      setTheme in interface ChartModel<T extends Chart>
      Parameters:
      theme - the theme
      Returns:
      chart model
    • getBorderAlpha

      public Double getBorderAlpha()
      Specified by:
      getBorderAlpha in interface ChartModel<T extends Chart>
      Returns:
      opacity of chart's border
    • setBorderAlpha

      public T setBorderAlpha(Double borderAlpha)
      Description copied from interface: ChartModel
      Sets opacity of chart's border. Value range is 0 - 1. If not set the default value is 0.
      Specified by:
      setBorderAlpha in interface ChartModel<T extends Chart>
      Parameters:
      borderAlpha - the border alpha
      Returns:
      chart model
    • getBorderColor

      public Color getBorderColor()
      Specified by:
      getBorderColor in interface ChartModel<T extends Chart>
      Returns:
      border color
    • setBorderColor

      public T setBorderColor(Color borderColor)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setBorderColor in interface ChartModel<T extends Chart>
      Parameters:
      borderColor - the border color
      Returns:
      chart model
    • getClassNamePrefix

      public String getClassNamePrefix()
      Specified by:
      getClassNamePrefix in interface ChartModel<T extends Chart>
      Returns:
      class name prefix
    • setClassNamePrefix

      public T setClassNamePrefix(String classNamePrefix)
      Description copied from interface: ChartModel
      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".
      Specified by:
      setClassNamePrefix in interface ChartModel<T extends Chart>
      Parameters:
      classNamePrefix - class name prefix string
      Returns:
      chart model
    • getCreditsPosition

      public CreditsPosition getCreditsPosition()
      Specified by:
      getCreditsPosition in interface ChartModel<T extends Chart>
      Returns:
      position of link to amCharts site
    • setCreditsPosition

      public T setCreditsPosition(CreditsPosition creditsPosition)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setCreditsPosition in interface ChartModel<T extends Chart>
      Parameters:
      creditsPosition - the credits position
      Returns:
      chart model
    • getColor

      public Color getColor()
      Specified by:
      getColor in interface ChartModel<T extends Chart>
      Returns:
      text color
    • setColor

      public T setColor(Color color)
      Description copied from interface: ChartModel
      Sets text color. If not set the default value is "#000000".
      Specified by:
      setColor in interface ChartModel<T extends Chart>
      Parameters:
      color - the text color
      Returns:
      chart model
    • getFontFamily

      public String getFontFamily()
      Specified by:
      getFontFamily in interface ChartModel<T extends Chart>
      Returns:
      font family
    • setFontFamily

      public T setFontFamily(String fontFamily)
      Description copied from interface: ChartModel
      Sets font family. If not set the default value is "Verdana".
      Specified by:
      setFontFamily in interface ChartModel<T extends Chart>
      Parameters:
      fontFamily - font family string
      Returns:
      chart model
    • getFontSize

      public Integer getFontSize()
      Specified by:
      getFontSize in interface ChartModel<T extends Chart>
      Returns:
      font size
    • setFontSize

      public T setFontSize(Integer fontSize)
      Description copied from interface: ChartModel
      Sets font size. If not set the default value is 11.
      Specified by:
      setFontSize in interface ChartModel<T extends Chart>
      Parameters:
      fontSize - the font size
      Returns:
      chart model
    • getHandDrawn

      public Boolean getHandDrawn()
      Specified by:
      getHandDrawn in interface ChartModel<T extends Chart>
      Returns:
      true if the lines of the chart should be distorted and should produce hand-drawn effect
    • setHandDrawn

      public T setHandDrawn(Boolean handDrawn)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setHandDrawn in interface ChartModel<T extends Chart>
      Parameters:
      handDrawn - hand drawn option
      Returns:
      chart model
    • getHandDrawScatter

      public Integer getHandDrawScatter()
      Specified by:
      getHandDrawScatter in interface ChartModel<T extends Chart>
      Returns:
      hand draw scatter
    • setHandDrawScatter

      public T setHandDrawScatter(Integer handDrawScatter)
      Description copied from interface: ChartModel
      Defines by how many pixels hand-drawn line (when handDrawn is set to true) will fluctuate. If not set the default value is 2.
      Specified by:
      setHandDrawScatter in interface ChartModel<T extends Chart>
      Parameters:
      handDrawScatter - the hand drawn scatter
      Returns:
      chart model
    • getHandDrawThickness

      public Integer getHandDrawThickness()
      Specified by:
      getHandDrawThickness in interface ChartModel<T extends Chart>
      Returns:
      hand drawn thickness
    • setHandDrawThickness

      public T setHandDrawThickness(Integer handDrawThickness)
      Description copied from interface: ChartModel
      Defines by how many pixels line thickness will fluctuate (when handDrawn is set to true). If not set the default value is 1.
      Specified by:
      setHandDrawThickness in interface ChartModel<T extends Chart>
      Parameters:
      handDrawThickness - the hand draw thickness
      Returns:
      chart model
    • getHideBalloonTime

      public Integer getHideBalloonTime()
      Specified by:
      getHideBalloonTime in interface ChartModel<T extends Chart>
      Returns:
      hide balloon time in milliseconds
    • setHideBalloonTime

      public T setHideBalloonTime(Integer hideBalloonTime)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setHideBalloonTime in interface ChartModel<T extends Chart>
      Parameters:
      hideBalloonTime - the hide balloon time in milliseconds
      Returns:
      chart model
    • getPanEventsEnabled

      public Boolean getPanEventsEnabled()
      Specified by:
      getPanEventsEnabled in interface ChartModel<T extends Chart>
      Returns:
      true if pan events enabled
    • setPanEventsEnabled

      public T setPanEventsEnabled(Boolean panEventsEnabled)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setPanEventsEnabled in interface ChartModel<T extends Chart>
      Parameters:
      panEventsEnabled - pan events enabled option
      Returns:
      chart model
    • getPrefixesOfBigNumbers

      public List<BigNumberPrefix> getPrefixesOfBigNumbers()
      Specified by:
      getPrefixesOfBigNumbers in interface ChartModel<T extends Chart>
      Returns:
      list of BigNumberPrefix
    • setPrefixesOfBigNumbers

      public T setPrefixesOfBigNumbers(List prefixesOfBigNumbers)
      Description copied from interface: ChartModel
      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"}]
      
      Specified by:
      setPrefixesOfBigNumbers in interface ChartModel<T extends Chart>
      Parameters:
      prefixesOfBigNumbers - list of BigNumberPrefix
      Returns:
      chart model
    • addPrefixesOfBigNumbers

      public T addPrefixesOfBigNumbers(BigNumberPrefix... prefixesOfBigNumbers)
      Description copied from interface: ChartModel
      Adds BigNumberPrefixes.
      Specified by:
      addPrefixesOfBigNumbers in interface ChartModel<T extends Chart>
      Parameters:
      prefixesOfBigNumbers - prefixes of big numbers
      Returns:
      chart model
    • getPrefixesOfSmallNumbers

      public List<SmallNumberPrefix> getPrefixesOfSmallNumbers()
      Specified by:
      getPrefixesOfSmallNumbers in interface ChartModel<T extends Chart>
      Returns:
      list of SmallNumberPrefix
    • setPrefixesOfSmallNumbers

      public T setPrefixesOfSmallNumbers(List prefixesOfSmallNumbers)
      Description copied from interface: ChartModel
      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"}]
       
      Specified by:
      setPrefixesOfSmallNumbers in interface ChartModel<T extends Chart>
      Parameters:
      prefixesOfSmallNumbers - list of SmallNumberPrefix
      Returns:
      chart model
    • addPrefixesOfSmallNumbers

      public T addPrefixesOfSmallNumbers(SmallNumberPrefix... prefixesOfSmallNumbers)
      Description copied from interface: ChartModel
      Adds SmallNumberPrefix
      Specified by:
      addPrefixesOfSmallNumbers in interface ChartModel<T extends Chart>
      Parameters:
      prefixesOfSmallNumbers - prefixes of small numbers
      Returns:
      chart model
    • getThousandsSeparator

      public String getThousandsSeparator()
      Specified by:
      getThousandsSeparator in interface ChartModel<T extends Chart>
      Returns:
      thousands separator
    • setThousandsSeparator

      public T setThousandsSeparator(String thousandsSeparator)
      Description copied from interface: ChartModel
      Sets thousands separator. If not set the default value is ".".
      Specified by:
      setThousandsSeparator in interface ChartModel<T extends Chart>
      Parameters:
      thousandsSeparator - - thousands separator string
      Returns:
      chart model
    • getTitles

      public List<Title> getTitles()
      Specified by:
      getTitles in interface ChartModel<T extends Chart>
      Returns:
      list of titles
    • setTitles

      public T setTitles(List list)
      Description copied from interface: ChartModel
      Sets list of titles.
      Specified by:
      setTitles in interface ChartModel<T extends Chart>
      Parameters:
      list - the titles
      Returns:
      chart model
    • addTitles

      public T addTitles(Title... titles)
      Description copied from interface: ChartModel
      Adds titles to chart.
      Specified by:
      addTitles in interface ChartModel<T extends Chart>
      Parameters:
      titles - the titles to add
      Returns:
      chart model
    • getUsePrefixes

      public Boolean getUsePrefixes()
      Specified by:
      getUsePrefixes in interface ChartModel<T extends Chart>
      Returns:
      true if uses prefixes is enabled
    • setUsePrefixes

      public T setUsePrefixes(Boolean usePrefixes)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setUsePrefixes in interface ChartModel<T extends Chart>
      Parameters:
      usePrefixes - the use prefixes option
      Returns:
      chart model
    • getAdditionalFields

      public List<String> getAdditionalFields()
      Specified by:
      getAdditionalFields in interface ChartModel<T extends Chart>
      Returns:
      list of additional fields
    • setAdditionalFields

      public T setAdditionalFields(List additionalFields)
      Description copied from interface: ChartModel
      Sets list of additional fields. Fields from your data provider that should be used directly in the chart configuration.
      Specified by:
      setAdditionalFields in interface ChartModel<T extends Chart>
      Parameters:
      additionalFields - list of additional fields
      Returns:
      chart model
    • addAdditionalFields

      public T addAdditionalFields(String... fields)
      Description copied from interface: ChartModel
      Adds additional fields
      Specified by:
      addAdditionalFields in interface ChartModel<T extends Chart>
      Parameters:
      fields - the fields
      Returns:
      chart model
    • getAutoDisplay

      public Boolean getAutoDisplay()
      Specified by:
      getAutoDisplay in interface ChartModel<T extends Chart>
      Returns:
      true if auto display is enabled
    • setAutoDisplay

      public T setAutoDisplay(Boolean autoDisplay)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setAutoDisplay in interface ChartModel<T extends Chart>
      Parameters:
      autoDisplay - auto display option
      Returns:
      chart model
    • getAutoResize

      public Boolean getAutoResize()
      Specified by:
      getAutoResize in interface ChartModel<T extends Chart>
      Returns:
      true if chart should resize itself whenever its parent container size changes
    • setAutoResize

      public T setAutoResize(Boolean autoResize)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setAutoResize in interface ChartModel<T extends Chart>
      Parameters:
      autoResize - auto resize option
      Returns:
      chart model
    • getBackgroundAlpha

      public Double getBackgroundAlpha()
      Specified by:
      getBackgroundAlpha in interface ChartModel<T extends Chart>
      Returns:
      opacity of background
    • setBackgroundAlpha

      public T setBackgroundAlpha(Double backgroundAlpha)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setBackgroundAlpha in interface ChartModel<T extends Chart>
      Parameters:
      backgroundAlpha - background alpha option
      Returns:
      chart model
    • getLanguage

      public String getLanguage()
      Specified by:
      getLanguage in interface ChartModel<T extends Chart>
      Returns:
      language
    • setLanguage

      public T setLanguage(String language)
      Description copied from interface: ChartModel
      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").
      Specified by:
      setLanguage in interface ChartModel<T extends Chart>
      Parameters:
      language - language string
      Returns:
      chart model
    • getPath

      public String getPath()
      Specified by:
      getPath in interface ChartModel<T extends Chart>
      Returns:
      path
    • setPath

      public T setPath(String path)
      Description copied from interface: ChartModel
      Specifies absolute or relative path to amCharts files.
      Specified by:
      setPath in interface ChartModel<T extends Chart>
      Parameters:
      path - the path string
      Returns:
      chart model
    • getSvgIcons

      public Boolean getSvgIcons()
      Specified by:
      getSvgIcons in interface ChartModel<T extends Chart>
      Returns:
      true if using SVG icons is enabled
    • setSvgIcons

      public T setSvgIcons(Boolean svgIcons)
      Description copied from interface: ChartModel
      Sets use SVG icons (if browser supports SVG). If not set the default value is true.
      Specified by:
      setSvgIcons in interface ChartModel<T extends Chart>
      Parameters:
      svgIcons - svgIcons option
      Returns:
      chart model
    • getTapToActivate

      public Boolean getTapToActivate()
      Specified by:
      getTapToActivate in interface ChartModel<T extends Chart>
      Returns:
      true if tap to activate is enabled
    • setTapToActivate

      public T setTapToActivate(Boolean tapToActivate)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setTapToActivate in interface ChartModel<T extends Chart>
      Parameters:
      tapToActivate - tap to activate option
      Returns:
      chart model
    • getDefs

      public String getDefs()
      Specified by:
      getDefs in interface ChartModel<T extends Chart>
      Returns:
      defs
    • setDefs

      public T setDefs(String defs)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setDefs in interface ChartModel<T extends Chart>
      Parameters:
      defs - defs string
      Returns:
      chart model
    • getAccessible

      public Boolean getAccessible()
      Specified by:
      getAccessible in interface ChartModel<T extends Chart>
      Returns:
      true if accessible is enabled
    • setAccessible

      public T setAccessible(Boolean accessible)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setAccessible in interface ChartModel<T extends Chart>
      Parameters:
      accessible - accessible option
      Returns:
      chart model
    • getAccessibleTitle

      public String getAccessibleTitle()
      Specified by:
      getAccessibleTitle in interface ChartModel<T extends Chart>
      Returns:
      description of a SVG element
    • setAccessibleTitle

      public T setAccessibleTitle(String accessibleTitle)
      Description copied from interface: ChartModel
      Description which is added to of a SVG element.
      Specified by:
      setAccessibleTitle in interface ChartModel<T extends Chart>
      Parameters:
      accessibleTitle - accessible title string
      Returns:
      chart model
    • setResponsive

      public T setResponsive(Responsive responsive)
      Description copied from interface: ChartModel
      Sets a config object for Responsive plugin
      Specified by:
      setResponsive in interface ChartModel<T extends Chart>
      Parameters:
      responsive - the responsive
      Returns:
      chart model
    • getResponsive

      public Responsive getResponsive()
      Specified by:
      getResponsive in interface ChartModel<T extends Chart>
      Returns:
      responsive
    • getProcessCount

      public Integer getProcessCount()
      Specified by:
      getProcessCount in interface ChartModel<T extends Chart>
      Returns:
      process count
    • setProcessCount

      public T setProcessCount(Integer processCount)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setProcessCount in interface ChartModel<T extends Chart>
      Parameters:
      processCount - the process count
      Returns:
      chart model
    • getProcessTimeout

      public Integer getProcessTimeout()
      Specified by:
      getProcessTimeout in interface ChartModel<T extends Chart>
      Returns:
      process timeout
    • setProcessTimeout

      public T setProcessTimeout(Integer processTimeout)
      Description copied from interface: ChartModel
      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 interface ChartModel<T extends Chart>
      Parameters:
      processTimeout - the process timeout
      Returns:
      chart model
    • getTouchClickDuration

      public Integer getTouchClickDuration()
      Specified by:
      getTouchClickDuration in interface ChartModel<T extends Chart>
      Returns:
      touch click duration in milliseconds
    • setTouchClickDuration

      public T setTouchClickDuration(Integer touchClickDuration)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setTouchClickDuration in interface ChartModel<T extends Chart>
      Parameters:
      touchClickDuration - the touch click duration in milliseconds
      Returns:
      chart model
    • getAutoTransform

      public Boolean getAutoTransform()
      Specified by:
      getAutoTransform in interface ChartModel<T extends Chart>
      Returns:
      true if auto transform is enabled,
    • setAutoTransform

      public T setAutoTransform(Boolean autoTransform)
      Description copied from interface: ChartModel
      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.
      Specified by:
      setAutoTransform in interface ChartModel<T extends Chart>
      Parameters:
      autoTransform - auto transform option
      Returns:
      chart model
    • addClickListener

      public Subscription addClickListener(Consumer<Chart.ChartClickEvent> listener)
      Description copied from interface: Chart
      Adds a listener for a chart. Called when user clicks on the chart.
      Specified by:
      addClickListener in interface Chart<T extends Chart>
      Parameters:
      listener - a listener to add
      Returns:
      subscription
    • onChartClick

      protected void onChartClick(ChartClickEvent e)
    • addRightClickListener

      public Subscription addRightClickListener(Consumer<Chart.ChartRightClickEvent> listener)
      Description copied from interface: Chart
      Adds a listener for a chart. Called when user clicks on the chart.
      Specified by:
      addRightClickListener in interface Chart<T extends Chart>
      Parameters:
      listener - a listener to add
      Returns:
      subscription
    • onChartRightClick

      protected void onChartRightClick(ChartRightClickEvent e)
    • addLegendItemHideListener

      public Subscription addLegendItemHideListener(Consumer<Chart.LegendItemHideEvent> listener)
      Description copied from interface: Chart
      Adds a listener for a chart. Called when the legend item hided.
      Specified by:
      addLegendItemHideListener in interface Chart<T extends Chart>
      Parameters:
      listener - a listener to add
      Returns:
      subscription
    • onLegendItemHide

      protected void onLegendItemHide(LegendItemHideEvent e)
    • addLegendItemShowListener

      public Subscription addLegendItemShowListener(Consumer<Chart.LegendItemShowEvent> listener)
      Description copied from interface: Chart
      Adds a listener for a chart. Called when the legend item showed.
      Specified by:
      addLegendItemShowListener in interface Chart<T extends Chart>
      Parameters:
      listener - a listener to add
      Returns:
      subscription
    • onLegendItemShow

      protected void onLegendItemShow(LegendItemShowEvent e)
    • addLegendLabelClickListener

      public Subscription addLegendLabelClickListener(Consumer<Chart.LegendItemClickEvent> listener)
      Description copied from interface: Chart
      Adds a listener for a chart. Called when user clicks on the legend item.
      Specified by:
      addLegendLabelClickListener in interface Chart<T extends Chart>
      Parameters:
      listener - a listener to add
      Returns:
      subscription
    • onLegendLabelClick

      protected void onLegendLabelClick(LegendLabelClickEvent e)
    • addLegendMarkerClickListener

      public Subscription addLegendMarkerClickListener(Consumer<Chart.LegendMarkerClickEvent> listener)
      Description copied from interface: Chart
      Adds a listener for a chart. Called when user clicks on the legend marker.
      Specified by:
      addLegendMarkerClickListener in interface Chart<T extends Chart>
      Parameters:
      listener - a listener to add
      Returns:
      subscription
    • onLegendMarkerClick

      protected void onLegendMarkerClick(LegendMarkerClickEvent e)
    • getAccessibleDescription

      public String getAccessibleDescription()
      Specified by:
      getAccessibleDescription in interface ChartModel<T extends Chart>
      Returns:
      accessible description string
    • setAccessibleDescription

      public T setAccessibleDescription(String accessibleDescription)
      Description copied from interface: ChartModel
      Description which will be added to node of SVG element.
      Specified by:
      setAccessibleDescription in interface ChartModel<T extends Chart>
      Parameters:
      accessibleDescription - description string
      Returns:
      chart model