Class PanelsSettings

java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.settings.PanelsSettings
All Implemented Interfaces:
HasStartEffect<PanelsSettings>, HasMargins<PanelsSettings>, Serializable

public class PanelsSettings extends AbstractChartObject implements HasMargins<PanelsSettings>, HasStartEffect<PanelsSettings>
Defines set of properties for all StockPanels. If there is no default value specified, default value of StockPanel class will be used.
See documentation for properties of PanelsSettings JS object.
http://docs.amcharts.com/3/javascriptstockchart/PanelsSettings
See Also:
  • Constructor Details

    • PanelsSettings

      public PanelsSettings()
  • Method Details

    • getAngle

      public Integer getAngle()
      Returns:
      angle of the 3D part of plot area
    • setAngle

      @StudioProperty public PanelsSettings setAngle(Integer angle)
      Sets the angle of the 3D part of plot area. This creates a 3D effect (if the depth3D is greater than 0).
      Parameters:
      angle - angle
      Returns:
      panels settings
    • getBackgroundAlpha

      public Double getBackgroundAlpha()
      Returns:
      opacity of panel background
    • setBackgroundAlpha

      @StudioProperty(defaultValue="0") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) PanelsSettings setBackgroundAlpha(Double backgroundAlpha)
      Sets opacity of panel background. Possible values are 1 and 0. Values like 0.5 will not make it half-transparent. If not set the default value is 0.
      Parameters:
      backgroundAlpha - opacity
      Returns:
      panels settings
    • getBackgroundColor

      public Color getBackgroundColor()
      Returns:
      background color of panels
    • setBackgroundColor

      @StudioProperty(type=ENUMERATION, defaultValue="FFFFFF") public PanelsSettings setBackgroundColor(Color backgroundColor)
      Sets background color of panels. Set backgroundAlpha to greater than 0 value in order to make background visible. If not set the default value is #FFFFFF.
      Parameters:
      backgroundColor - color
      Returns:
      panels settings
    • getColumnSpacing

      public Integer getColumnSpacing()
      Returns:
      gap in pixels between two columns of the same category
    • setColumnSpacing

      @StudioProperty public PanelsSettings setColumnSpacing(Integer columnSpacing)
      Sets the gap in pixels between two columns of the same category.
      Parameters:
      columnSpacing - column spacing
      Returns:
      panels settings
    • getColumnWidth

      public Integer getColumnWidth()
      Returns:
      relative width of columns
    • setColumnWidth

      @StudioProperty public PanelsSettings setColumnWidth(Integer columnWidth)
      Sets relative width of columns. Valid values 0 - 1.
      Parameters:
      columnWidth - column relative width
      Returns:
      panels settings
    • getCreditsPosition

      public CreditsPosition getCreditsPosition()
      Returns:
      credits position
    • setCreditsPosition

      @StudioProperty(type=ENUMERATION, defaultValue="TOP_RIGHT") public PanelsSettings setCreditsPosition(CreditsPosition creditsPosition)
      Sets position of amCharts link (free version only). Possible values are: top-left. top-right, bottom-left, bottom-right. You can adjust the position of amcharts link so that it would not overlap with contents of your chart. If not set the default value is TOP_RIGHT.
      Parameters:
      creditsPosition - credits position
      Returns:
      panels settings
    • getDecimalSeparator

      public String getDecimalSeparator()
      Returns:
      separator of decimal values
    • setDecimalSeparator

      @StudioProperty public PanelsSettings setDecimalSeparator(String decimalSeparator)
      Sets separator of decimal values.
      Parameters:
      decimalSeparator - decimal separator
      Returns:
      panels settings
    • getDepth3D

      public Integer getDepth3D()
      Returns:
      depth of the 3D part of plot area
    • setDepth3D

      @StudioProperty public PanelsSettings setDepth3D(Integer depth3D)
      Sets the depth of the 3D part of plot area. This creates a 3D effect (if the angle is greater than 0).
      Parameters:
      depth3D - depth 3D
      Returns:
      panels settings
    • getFontFamily

      public String getFontFamily()
      Returns:
      font family
    • setFontFamily

      @StudioProperty public PanelsSettings setFontFamily(String fontFamily)
      Sets font family.
      Parameters:
      fontFamily - font family
      Returns:
      panels settings
    • getFontSize

      public Integer getFontSize()
      Returns:
      font size
    • setFontSize

      @StudioProperty public PanelsSettings setFontSize(Integer fontSize)
      Sets font size.
      Parameters:
      fontSize - font size
      Returns:
      panels settings
    • getMarginBottom

      public Integer getMarginBottom()
      Specified by:
      getMarginBottom in interface HasMargins<PanelsSettings>
      Returns:
      bottom spacing
    • setMarginBottom

      @StudioProperty(defaultValue="0") public PanelsSettings setMarginBottom(Integer marginBottom)
      Description copied from interface: HasMargins
      Sets bottom spacing. If not set the default value is 10.

      If is used for Legend default value is 0.

      If is used for RadarChartModelImpl the default value is 0.

      If is used for chart based on RectangularChartModelImpl (GanttChart, SerialChart, XYChart) the default value is 20.

      If is used for chart based on SlicedChartModelImpl (FunnelChart, PieChart) the default value is 10.

      If is used for PanelsSettings the default value is 0.

      Specified by:
      setMarginBottom in interface HasMargins<PanelsSettings>
      Parameters:
      marginBottom - bottom spacing
      Returns:
      object with set bottom spacing
    • getMarginLeft

      public Integer getMarginLeft()
      Specified by:
      getMarginLeft in interface HasMargins<PanelsSettings>
      Returns:
      left-hand spacing
    • setMarginLeft

      @StudioProperty(defaultValue="0") public PanelsSettings setMarginLeft(Integer marginLeft)
      Description copied from interface: HasMargins
      Sets left-hand spacing.

      marginLeft will be ignored if chart is SerialChart or XYChartModelImpl and AbstractLegend.autoMargins is true.

      If is used for Legend the default value is 20.

      If is used for RadarChartModelImpl the default value is 0.

      If is used for chart based on RectangularChartModelImpl (GanttChart, SerialChart, XYChart) the default value is 20.

      If is used for chart based on SlicedChartModelImpl the default value is 0.

      If is used for PanelsSettings the default value is 0.

      Specified by:
      setMarginLeft in interface HasMargins<PanelsSettings>
      Parameters:
      marginLeft - left-hand spacing
      Returns:
      object with set left-hand spacing
    • getMarginRight

      public Integer getMarginRight()
      Specified by:
      getMarginRight in interface HasMargins<PanelsSettings>
      Returns:
      right-hand spacing
    • setMarginRight

      @StudioProperty(defaultValue="0") public PanelsSettings setMarginRight(Integer marginRight)
      Description copied from interface: HasMargins
      Sets right-hand spacing.

      marginRight will be ignored if chart is SerialChart or XYChartModelImpl and AbstractLegend.autoMargins is true.

      If is used for Legend the default value is 20.

      If is used for RadarChartModelImpl the default value is 0.

      If is used for chart based on RectangularChartModelImpl (GanttChart, SerialChart, XYChart) the default value is 20.

      If is used for chart based on SlicedChartModelImpl (FunnelChart, PieChart) the default value is 0.

      If is used for PanelsSettings the default value is 0.

      Specified by:
      setMarginRight in interface HasMargins<PanelsSettings>
      Parameters:
      marginRight - right-hand spacing
      Returns:
      object with set right-hand spacing
    • getMarginTop

      public Integer getMarginTop()
      Specified by:
      getMarginTop in interface HasMargins<PanelsSettings>
      Returns:
      top spacing
    • setMarginTop

      @StudioProperty(defaultValue="0") public PanelsSettings setMarginTop(Integer marginTop)
      Description copied from interface: HasMargins
      Sets top spacing. If not set the default value is 10.

      If is used for Legend the default value is 0.

      If is used for RadarChartModelImpl the default value is 0.

      If is used for chart based on RectangularChartModelImpl (GanttChart, SerialChart, XYChart) the default value is 20.

      If is used for chart based on SlicedChartModelImpl the default value is 10.

      If is used for PanelsSettings the default value is 0.

      Specified by:
      setMarginTop in interface HasMargins<PanelsSettings>
      Parameters:
      marginTop - top spacing
      Returns:
      object with set top spacing
    • getMaxSelectedTime

      public Long getMaxSelectedTime()
      Returns:
      the longest time span allowed to select (in milliseconds)
    • setMaxSelectedTime

      @StudioProperty public PanelsSettings setMaxSelectedTime(Long maxSelectedTime)
      Sets the longest time span allowed to select (in milliseconds). For example, 259200000 will limit selection to 3 days. Works if CategoryAxesSettings.equalSpacing is set to false.
      Parameters:
      maxSelectedTime - maximum selected time
      Returns:
      panels settings
    • getMinSelectedTime

      public Long getMinSelectedTime()
      Returns:
      the shortest time span allowed to select (in milliseconds)
    • setMinSelectedTime

      @StudioProperty(defaultValue="0") public PanelsSettings setMinSelectedTime(Long minSelectedTime)
      Sets the shortest time span allowed to select (in milliseconds). For example, 1000 will limit selection to 1 second. Works if CategoryAxesSettings.equalSpacing is set to false. If not set the default value is 0.
      Parameters:
      minSelectedTime - minimum selected time
      Returns:
      panels settings
    • getPanelSpacing

      public Integer getPanelSpacing()
      Returns:
      gap between panels
    • setPanelSpacing

      @StudioProperty(defaultValue="8") public PanelsSettings setPanelSpacing(Integer panelSpacing)
      Sets gap between panels. If not set the default value is 8.
      Parameters:
      panelSpacing - panel spacing
      Returns:
      panels settings
    • getPanEventsEnabled

      public Boolean getPanEventsEnabled()
      Returns:
      true if panEventsEnabled is enabled
    • setPanEventsEnabled

      @StudioProperty(defaultValue="false") public PanelsSettings 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. That's why the default value is false. If you think that selecting or or panning the chart is a primary purpose of your chart users, you should set panEventsEnabled to true. If not set the default value is false.
      Parameters:
      panEventsEnabled - panEventsEnabled option
      Returns:
      panels settings
    • getPercentPrecision

      public Double getPercentPrecision()
      Returns:
      precision of percent values
    • setPercentPrecision

      @StudioProperty public PanelsSettings setPercentPrecision(Double percentPrecision)
      Sets precision of percent values.
      Parameters:
      percentPrecision - percent precision
      Returns:
      panels settings
    • getPlotAreaBorderAlpha

      public Double getPlotAreaBorderAlpha()
      Returns:
      the opacity of plot area's border
    • setPlotAreaBorderAlpha

      @StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) PanelsSettings setPlotAreaBorderAlpha(Double plotAreaBorderAlpha)
      Sets the opacity of plot area's border.
      Parameters:
      plotAreaBorderAlpha - opacity
      Returns:
      panels settings
    • getPlotAreaBorderColor

      public Color getPlotAreaBorderColor()
      Returns:
      the color of the plot area's border.
    • setPlotAreaBorderColor

      @StudioProperty(type=OPTIONS) public PanelsSettings setPlotAreaBorderColor(Color plotAreaBorderColor)
      Sets the color of the plot area's border.
      Parameters:
      plotAreaBorderColor - color
      Returns:
      panels settings
    • getPlotAreaFillAlphas

      public Double getPlotAreaFillAlphas()
      Returns:
      opacity of plot area fill
    • setPlotAreaFillAlphas

      @StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) PanelsSettings setPlotAreaFillAlphas(Double plotAreaFillAlphas)
      Sets opacity of plot area fill.
      Parameters:
      plotAreaFillAlphas - opacity
      Returns:
      panels settings
    • getPlotAreaFillColors

      public List<Color> getPlotAreaFillColors()
      Returns:
      list of colors
    • setPlotAreaFillColors

      public PanelsSettings setPlotAreaFillColors(List<Color> plotAreaFillColors)
      Sets list of the colors used to tint the background gradient fill of the plot area.
      Parameters:
      plotAreaFillColors - list of colors
      Returns:
      panels settings
    • addPlotAreaFillColors

      public PanelsSettings addPlotAreaFillColors(Color... plotAreaFillColors)
      Adds colors.
      Parameters:
      plotAreaFillColors - colors
      Returns:
      panels settings
    • getPrecision

      public Double getPrecision()
      Returns:
      precision of values
    • setPrecision

      @StudioProperty public PanelsSettings setPrecision(Double precision)
      Sets precision of values. -1 means values will not be rounded and shown as they are.
      Parameters:
      precision - precision
      Returns:
      panels settings
    • getPrefixesOfBigNumbers

      public List<BigNumberPrefix> getPrefixesOfBigNumbers()
      Returns:
      list of big number prefixes
    • setPrefixesOfBigNumbers

      public PanelsSettings setPrefixesOfBigNumbers(List<BigNumberPrefix> prefixesOfBigNumbers)
      Sets list of big number prefixes. 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 big number prefixes
      Returns:
      panels settings
    • getPrefixesOfSmallNumbers

      public List<SmallNumberPrefix> getPrefixesOfSmallNumbers()
      Returns:
      list of small number prefixes
    • setPrefixesOfSmallNumbers

      public PanelsSettings 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 small number prefixes
      Returns:
      panels settings
    • getRecalculateToPercents

      public RecalculateToPercents getRecalculateToPercents()
      Returns:
      recalculate to percents
    • setRecalculateToPercents

      @StudioProperty(type=ENUMERATION, defaultValue="whenComparing") public PanelsSettings setRecalculateToPercents(RecalculateToPercents recalculateToPercents)
      Specifies when values should be recalculated to percents. Possible values are: "never", "always", "whenComparing". If not set the default value is "whenComparing".
      Parameters:
      recalculateToPercents - recalculate to percents
      Returns:
      panels settings
    • getSequencedAnimation

      public Boolean getSequencedAnimation()
      Returns:
      true if in the animation all objects appear at once
    • setSequencedAnimation

      @StudioProperty public PanelsSettings setSequencedAnimation(Boolean sequencedAnimation)
      Set sequencedAnimation to true if in the animation all objects should appear at once.
      Parameters:
      sequencedAnimation - sequencedAnimation option
      Returns:
      panels settings
    • getStartAlpha

      public Double getStartAlpha()
      Returns:
      initial opacity of the column/line
    • setStartAlpha

      @StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) PanelsSettings setStartAlpha(Double startAlpha)
      Sets the initial opacity of the column/line. If you set startDuration to a value higher than 0, the columns/lines will fade in from startAlpha.
      Parameters:
      startAlpha - initial opacity
      Returns:
      panels settings
    • getStartDuration

      public Double getStartDuration()
      Specified by:
      getStartDuration in interface HasStartEffect<PanelsSettings>
      Returns:
      duration of the animation, in seconds
    • setStartDuration

      @StudioProperty public PanelsSettings setStartDuration(Double startDuration)
      Description copied from interface: HasStartEffect
      Sets duration of the animation, in seconds.

      If you use AngularGaugeChartModelImpl default value is 1.

      If you use charts based on CoordinateChartModel (GanttChart, RadarChart, SerialChart, XYChart) default value is 0.

      If you use chart based on SlicedChartModelImpl default value is 1.

      Specified by:
      setStartDuration in interface HasStartEffect<PanelsSettings>
      Parameters:
      startDuration - the start duration
      Returns:
      object with set duration of the animation
    • getStartEffect

      public AnimationEffect getStartEffect()
      Specified by:
      getStartEffect in interface HasStartEffect<PanelsSettings>
      Returns:
      animation effect
    • setStartEffect

      @StudioProperty(type=ENUMERATION) public PanelsSettings setStartEffect(AnimationEffect startEffect)
      Description copied from interface: HasStartEffect
      Sets animation effect.

      If you use AngularGaugeChartModelImpl animation effect will be applied for the arrow. If not set the default value is EASE_IN_SINE.

      If you use charts based on CoordinateChartModel (GanttChart, RadarChart, SerialChart, XYChart) default value is ELASTIC.

      If you use chart based on SlicedChartModelImpl default value is BOUNCE.

      Specified by:
      setStartEffect in interface HasStartEffect<PanelsSettings>
      Parameters:
      startEffect - the start effect
      Returns:
      object with set animation effect
    • getThousandsSeparator

      public String getThousandsSeparator()
      Returns:
      separator of thousand values
    • setThousandsSeparator

      @StudioProperty public PanelsSettings setThousandsSeparator(String thousandsSeparator)
      Sets separator of thousand values.
      Parameters:
      thousandsSeparator - thousands separator
      Returns:
      panels settings
    • getUsePrefixes

      public Boolean getUsePrefixes()
      Returns:
      true if prefixes is used for big and small numbers
    • setUsePrefixes

      @StudioProperty public PanelsSettings setUsePrefixes(Boolean usePrefixes)
      Set usePrefixes to true if prefixes should be used for big and small numbers.
      Parameters:
      usePrefixes - usePrefixes option
      Returns:
      panels settings
    • getZoomOutAxes

      public Boolean getZoomOutAxes()
      Returns:
      true if zoomOutAxes is enabled
    • setZoomOutAxes

      @StudioProperty(defaultValue="true") public PanelsSettings setZoomOutAxes(Boolean zoomOutAxes)
      Set zoomOutAxes to false if zoomed-in value axes shouldn't be zoomed-out when user changes selected period with PeriodSelector. If not set the default value is true.
      Parameters:
      zoomOutAxes - zoomOutAxes option
      Returns:
      panels settings