Class CategoryAxesSettings

java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.axis.CategoryAxesSettings
All Implemented Interfaces:
Serializable

public class CategoryAxesSettings extends AbstractChartObject
Defines set of properties for all CategoryAxes of StockPanel. If there is no default value specified, default value of CategoryAxis class will be used.
See documentation for properties of CategoryAxesSettings JS object.
http://docs.amcharts.com/3/javascriptstockchart/CategoryAxesSettings
See Also:
  • Constructor Details

    • CategoryAxesSettings

      public CategoryAxesSettings()
  • Method Details

    • getAlwaysGroup

      public Boolean getAlwaysGroup()
      Returns:
      true if chart always group values to the first period available
    • setAlwaysGroup

      @StudioProperty(defaultValue="false") public CategoryAxesSettings setAlwaysGroup(Boolean alwaysGroup)
      Set alwaysGroup to true and if groupToPeriods doesn't have minPeriod value included, chart will always group values to the first period available. If not set the default value is false.
      Parameters:
      alwaysGroup - alwaysGroup option
      Returns:
      category axes settings
    • getAutoGridCount

      public Boolean getAutoGridCount()
      Returns:
      true if the number of gridCount is specified automatically, according to the axis size.
    • setAutoGridCount

      @StudioProperty(defaultValue="true") public CategoryAxesSettings setAutoGridCount(Boolean autoGridCount)
      Set autoGridCount to false if you don't want the number of gridCount are specified automatically, according to the axis size. If not set the default value is true.
      Parameters:
      autoGridCount - autoGridCount option
      Returns:
      category axes settings
    • getAxisAlpha

      public Double getAxisAlpha()
      Returns:
      axis opacity
    • setAxisAlpha

      @StudioProperty(defaultValue="0") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) CategoryAxesSettings setAxisAlpha(Double axisAlpha)
      Sets axis opacity. If not set the default value is 0.
      Parameters:
      axisAlpha - axis opacity
      Returns:
      category axes settings
    • getAxisColor

      public Color getAxisColor()
      Returns:
      axis color
    • setAxisColor

      @StudioProperty(type=OPTIONS) public CategoryAxesSettings setAxisColor(Color axisColor)
      Sets axis color.
      Parameters:
      axisColor - axis color
      Returns:
      category axes settings
    • getAxisHeight

      public Integer getAxisHeight()
      Returns:
      height of category axes
    • setAxisHeight

      @StudioProperty(defaultValue="28") public CategoryAxesSettings setAxisHeight(Integer axisHeight)
      Sets height of category axes. Set it to 0 if you set inside property to true. If not set the default value is 28.
      Parameters:
      axisHeight - height of category axes
      Returns:
      category axes settings
    • getAxisThickness

      public Integer getAxisThickness()
      Returns:
      thickness of the axis
    • setAxisThickness

      @StudioProperty public CategoryAxesSettings setAxisThickness(Integer axisThickness)
      Sets thickness of the axis.
      Parameters:
      axisThickness - thickness of the axis
      Returns:
      category axes settings
    • getBoldPeriodBeginning

      public Boolean getBoldPeriodBeginning()
      Returns:
      true if chart highlights the beginning of the periods in bold
    • setBoldPeriodBeginning

      @StudioProperty(defaultValue="true") public CategoryAxesSettings setBoldPeriodBeginning(Boolean boldPeriodBeginning)
      Set boldPeriodBeginning to false if you want chart will not try to highlight the beginning of the periods, like month, in bold. Works when parse dates are on for the category axis. If not set the default value is true.
      Parameters:
      boldPeriodBeginning - bold period beginning option
      Returns:
      category axes settings
    • getColor

      public Color getColor()
      Returns:
      text color
    • setColor

      Sets text color.
      Parameters:
      color - text color
      Returns:
      category axes settings
    • getDashLength

      public Integer getDashLength()
      Returns:
      length of a dash
    • setDashLength

      @StudioProperty public CategoryAxesSettings setDashLength(Integer dashLength)
      Sets length of a dash.
      Parameters:
      dashLength - length of a dash
      Returns:
      category axes settings
    • getDateFormats

      public List<DateFormat> getDateFormats()
      Returns:
      list of date formats of different periods
    • setDateFormats

      @StudioElementsGroup(caption="Date Formats", xmlElement="dateFormats") public CategoryAxesSettings setDateFormats(List<DateFormat> dateFormats)
      Sets list of date formats of different periods. Possible period values: fff - milliseconds, ss - seconds, mm - minutes, hh - hours, DD - days, MM - months, WW - weeks, YYYY - years.
      Parameters:
      dateFormats - list of date formats
      Returns:
      category axes settings
    • addDateFormats

      public CategoryAxesSettings addDateFormats(DateFormat... dateFormats)
      Adds date formats.
      Parameters:
      dateFormats - date formats
      Returns:
      category axes settings
    • getEqualSpacing

      public Boolean getEqualSpacing()
      Returns:
      true if data points is placed at equal intervals (omitting dates with no data)
    • setEqualSpacing

      @StudioProperty(defaultValue="false") public CategoryAxesSettings setEqualSpacing(Boolean equalSpacing)
      Set equalSpacing to true if you want data points to be placed at equal intervals (omitting dates with no data). If not set the default value is false.
      Parameters:
      equalSpacing - equalSpacing option
      Returns:
      category axes settings
    • getFillAlpha

      public Double getFillAlpha()
      Returns:
      fill opacity
    • setFillAlpha

      @StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) CategoryAxesSettings setFillAlpha(Double fillAlpha)
      Sets fill opacity. Every second space between grid lines can be filled with fillColor.
      Parameters:
      fillAlpha - fill opacity
      Returns:
      category axes settings
    • getFillColor

      public Color getFillColor()
      Returns:
      fill color
    • setFillColor

      @StudioProperty(type=OPTIONS) public CategoryAxesSettings setFillColor(Color fillColor)
      Sets fill color. Every second space between grid lines can be filled with color. Set fillAlpha to a value greater than 0 to see the fills.
      Parameters:
      fillColor - fill color
      Returns:
      category axes settings
    • getFontSize

      public Integer getFontSize()
      Returns:
      font size
    • setFontSize

      @StudioProperty public CategoryAxesSettings setFontSize(Integer fontSize)
      Sets text size.
      Parameters:
      fontSize - text size
      Returns:
      category axes settings
    • getGridAlpha

      public Double getGridAlpha()
      Returns:
      opacity of grid lines
    • setGridAlpha

      @StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) CategoryAxesSettings setGridAlpha(Double gridAlpha)
      Sets opacity of grid lines.
      Parameters:
      gridAlpha - opacity of grid lines
      Returns:
      category axes settings
    • getGridColor

      public Color getGridColor()
      Returns:
      color of grid lines
    • setGridColor

      @StudioProperty(type=OPTIONS) public CategoryAxesSettings setGridColor(Color gridColor)
      Sets color of grid lines.
      Parameters:
      gridColor - color of grid lines
      Returns:
      category axes settings
    • getGridCount

      public Integer getGridCount()
      Returns:
      number of grid lines
    • setGridCount

      @StudioProperty(defaultValue="10") public CategoryAxesSettings setGridCount(Integer gridCount)
      Sets number of grid lines. You should set autoGridCount to false in order this property not to be ignored. If not set the default value is 10.
      Parameters:
      gridCount - number of grid lines
      Returns:
      category axes settings
    • getGridThickness

      public Integer getGridThickness()
      Returns:
      thickness of grid lines
    • setGridThickness

      @StudioProperty public CategoryAxesSettings setGridThickness(Integer gridThickness)
      Sets thickness of grid lines.
      Parameters:
      gridThickness - grid thickness
      Returns:
      category axes settings
    • getGroupToPeriods

      public List<String> getGroupToPeriods()
      Returns:
      list of groupToPeriods strings
    • setGroupToPeriods

      @StudioProperty(type=STRING, defaultValue="ss,10ss,30ss,mm,10mm,30mm,hh,DD,WW,MM,YYYYY") public CategoryAxesSettings setGroupToPeriods(List<String> groupToPeriods)
      Sets list of groupToPeriods strings. Periods to which data will be grouped in case there are more data items in the selected period than specified in maxSeries property. Possible values: "ss", "10ss", "mm", "DD", "WW","MM", "YYYY". If not set the default value is
      
       ["ss", "10ss", "30ss",
        "mm", "10mm", "30mm",
        "hh", "DD",   "WW",
        "MM", "YYYY"]
       
      Parameters:
      groupToPeriods - list of groupToPeriods strings
      Returns:
      category axes settings
    • addGroupToPeriods

      public CategoryAxesSettings addGroupToPeriods(String... groupToPeriods)
      Adds groupToPeriods strings.
      Parameters:
      groupToPeriods - groupToPeriods
      Returns:
      category axes settings
    • getInside

      public Boolean getInside()
      Returns:
      true if values placed inside of plot area
    • setInside

      @StudioProperty(defaultValue="false") public CategoryAxesSettings setInside(Boolean inside)
      Set inside to true if values should be placed inside of plot area. If not set the default value is false.
      Parameters:
      inside - inside option
      Returns:
      category axes settings
    • getLabelOffset

      public Integer getLabelOffset()
      Returns:
      offset of axis labels
    • setLabelOffset

      @StudioProperty(defaultValue="0") public CategoryAxesSettings setLabelOffset(Integer labelOffset)
      Sets offset of axis labels. If not set the default value is 0.
      Parameters:
      labelOffset - offset of axis labels
      Returns:
      category axes settings
    • getLabelRotation

      public Integer getLabelRotation()
      Returns:
      rotation angle of a label
    • setLabelRotation

      @StudioProperty public CategoryAxesSettings setLabelRotation(Integer labelRotation)
      Sets rotation angle of a label.
      Parameters:
      labelRotation - rotation angle of a label
      Returns:
      category axes settings
    • getLabelsEnabled

      public Boolean getLabelsEnabled()
      Returns:
      true if axis displays category axis labels and value axis values.
    • setLabelsEnabled

      @StudioProperty(defaultValue="true") public CategoryAxesSettings setLabelsEnabled(Boolean labelsEnabled)
      Set labelsEnabled to false if you don't wont to display category axis labels and value axis values. If not set the default value is true.
      Parameters:
      labelsEnabled - labelsEnabled option
      Returns:
      category axes settings
    • getMarkPeriodChange

      public Boolean getMarkPeriodChange()
      Returns:
      true if period should be marked by a different date format
    • setMarkPeriodChange

      @StudioProperty(defaultValue="true") public CategoryAxesSettings setMarkPeriodChange(Boolean markPeriodChange)
      Set markPeriodChange to false if period shouldn't be marked by a different date format. If not set the default value is true.
      Parameters:
      markPeriodChange - markPeriodChange option
      Returns:
      category axes settings
    • getMaxSeries

      public Integer getMaxSeries()
      Returns:
      maximum series shown at a time
    • setMaxSeries

      @StudioProperty(defaultValue="150") public CategoryAxesSettings setMaxSeries(Integer maxSeries)
      Sets maximum series shown at a time. In case there are more data points in the selection than maxSeries, the chart will group data to longer periods, for example - you have 250 days in the selection, and maxSeries is 150 - the chart will group data to weeks. If not set the default value is 150.
      Parameters:
      maxSeries - maximum series shown at a time
      Returns:
      category axes settings
    • getMinHorizontalGap

      public Integer getMinHorizontalGap()
      Returns:
      minimum cell width required for one span between grid lines
    • setMinHorizontalGap

      @StudioProperty(defaultValue="75") public CategoryAxesSettings setMinHorizontalGap(Integer minHorizontalGap)
      Sets minimum cell width required for one span between grid lines. minHorizontalGap is used when calculating grid count. If not set the default value is 75.
      Parameters:
      minHorizontalGap - minimum cell width
      Returns:
      category axes settings
    • getMinPeriod

      public String getMinPeriod()
      Returns:
      the shortest period of your data
    • setMinPeriod

      @StudioProperty(type=OPTIONS, options={"fff","ss","mm","hh","DD","MM","YYYY"}, defaultValue="DD") public CategoryAxesSettings setMinPeriod(String minPeriod)
      Sets the shortest period of your data. "fff" - millisecond, "ss" - second, "mm" - minute, "hh" - hour, "DD" - day, "MM" - month, 'YYYY' - year. It's also possible to supply a number for increments, i.e. "15mm" which will instruct the chart that your data is supplied in 15 minute increments. If not set the default value is "DD".
      Parameters:
      minPeriod - the shortest period
      Returns:
      category axes settings
    • getPosition

      public CategoryAxesPosition getPosition()
      Returns:
      position of category axes
    • setPosition

      Sets position of category axes.
      Parameters:
      position - position of category axes
      Returns:
      category axes settings
    • getStartOnAxis

      public Boolean getStartOnAxis()
      Returns:
      true if the graph shouldn't start on axis
    • setStartOnAxis

      @StudioProperty(defaultValue="false") public CategoryAxesSettings setStartOnAxis(Boolean startOnAxis)
      Set startOnAxis to false if the graph should start on axis. In case you display columns, it is recommended to set this to false. startOnAxis can be set to true only if equalSpacing is set to true. If not set the default value is false.
      Parameters:
      startOnAxis - startOnAxis option
      Returns:
      category axes settings
    • getTickLength

      public Integer getTickLength()
      Returns:
      tick length
    • setTickLength

      @StudioProperty(defaultValue="0") public CategoryAxesSettings setTickLength(Integer tickLength)
      Sets tick length. If not set the default value is 0.
      Parameters:
      tickLength - tick length
      Returns:
      category axes settings
    • getTwoLineMode

      public Boolean getTwoLineMode()
      Returns:
      true category axis displays date strings of bot small and big period, in two rows
    • setTwoLineMode

      @StudioProperty(defaultValue="false") public CategoryAxesSettings setTwoLineMode(Boolean twoLineMode)
      Set twoLineMode to true, category axis will display date strings of bot small and big period, in two rows, at the position where bigger period changes. Works only when parseDates is set to true and equalSpacing is false. If not set the default value is false.
      Parameters:
      twoLineMode - twoLineMode option
      Returns:
      category axes settings
    • getBoldLabels

      public Boolean getBoldLabels()
      Returns:
      true if axis labels are bold
    • setBoldLabels

      @StudioProperty public CategoryAxesSettings setBoldLabels(Boolean boldLabels)
      Set to true if axis labels should be bold.
      Parameters:
      boldLabels - boldLabels option
      Returns:
      category axes settings
    • getMinorGridAlpha

      public Double getMinorGridAlpha()
      Returns:
      opacity of minor grid
    • setMinorGridAlpha

      @StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) CategoryAxesSettings setMinorGridAlpha(Double minorGridAlpha)
      Sets opacity of minor grid. In order minor to be visible, you should set minorGridEnabled to true.
      Parameters:
      minorGridAlpha - opacity of minor grid
      Returns:
      category axes settings
    • getMinorGridEnabled

      public Boolean getMinorGridEnabled()
      Returns:
      true if minor grid is displayed
    • setMinorGridEnabled

      @StudioProperty public CategoryAxesSettings setMinorGridEnabled(Boolean minorGridEnabled)
      Set to true if minor grid should be displayed. Note, if equalSpacing is set to true, this setting will be ignored.
      Parameters:
      minorGridEnabled - minorGridEnabled option
      Returns:
      category axes settings