Package io.jmix.charts.model.axis
Class CategoryAxesSettings
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.axis.CategoryAxesSettings
- All Implemented Interfaces:
Serializable
Defines set of properties for all CategoryAxes of
See documentation for properties of CategoryAxesSettings JS object.
http://docs.amcharts.com/3/javascriptstockchart/CategoryAxesSettings
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddDateFormats
(DateFormat... dateFormats) Adds date formats.addGroupToPeriods
(String... groupToPeriods) Adds groupToPeriods strings.getColor()
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.setAutoGridCount
(Boolean autoGridCount) Set autoGridCount to false if you don't want the number of gridCount are specified automatically, according to the axis size.@Max(1L) @Min(0L) CategoryAxesSettings
setAxisAlpha
(Double axisAlpha) Sets axis opacity.setAxisColor
(Color axisColor) Sets axis color.setAxisHeight
(Integer axisHeight) Sets height of category axes.setAxisThickness
(Integer axisThickness) Sets thickness of the axis.setBoldLabels
(Boolean boldLabels) Set to true if axis labels should be bold.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.Sets text color.setDashLength
(Integer dashLength) Sets length of a dash.setDateFormats
(List<DateFormat> dateFormats) Sets list of date formats of different periods.setEqualSpacing
(Boolean equalSpacing) Set equalSpacing to true if you want data points to be placed at equal intervals (omitting dates with no data).@Max(1L) @Min(0L) CategoryAxesSettings
setFillAlpha
(Double fillAlpha) Sets fill opacity.setFillColor
(Color fillColor) Sets fill color.setFontSize
(Integer fontSize) Sets text size.@Max(1L) @Min(0L) CategoryAxesSettings
setGridAlpha
(Double gridAlpha) Sets opacity of grid lines.setGridColor
(Color gridColor) Sets color of grid lines.setGridCount
(Integer gridCount) Sets number of grid lines.setGridThickness
(Integer gridThickness) Sets thickness of grid lines.setGroupToPeriods
(List<String> groupToPeriods) Sets list of groupToPeriods strings.Set inside to true if values should be placed inside of plot area.setLabelOffset
(Integer labelOffset) Sets offset of axis labels.setLabelRotation
(Integer labelRotation) Sets rotation angle of a label.setLabelsEnabled
(Boolean labelsEnabled) Set labelsEnabled to false if you don't wont to display category axis labels and value axis values.setMarkPeriodChange
(Boolean markPeriodChange) Set markPeriodChange to false if period shouldn't be marked by a different date format.setMaxSeries
(Integer maxSeries) Sets maximum series shown at a time.setMinHorizontalGap
(Integer minHorizontalGap) Sets minimum cell width required for one span between grid lines.@Max(1L) @Min(0L) CategoryAxesSettings
setMinorGridAlpha
(Double minorGridAlpha) Sets opacity of minor grid.setMinorGridEnabled
(Boolean minorGridEnabled) Set to true if minor grid should be displayed.setMinPeriod
(String minPeriod) Sets the shortest period of your data.setPosition
(CategoryAxesPosition position) Sets position of category axes.setStartOnAxis
(Boolean startOnAxis) Set startOnAxis to false if the graph should start on axis.setTickLength
(Integer tickLength) Sets tick length.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.
-
Constructor Details
-
CategoryAxesSettings
public CategoryAxesSettings()
-
-
Method Details
-
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
- 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
- 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
- Returns:
- axis color
-
setAxisColor
Sets axis color.- Parameters:
axisColor
- axis color- Returns:
- category axes settings
-
getAxisHeight
- Returns:
- height of category axes
-
setAxisHeight
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
- Returns:
- thickness of the axis
-
setAxisThickness
Sets thickness of the axis.- Parameters:
axisThickness
- thickness of the axis- Returns:
- category axes settings
-
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
- Returns:
- text color
-
setColor
Sets text color.- Parameters:
color
- text color- Returns:
- category axes settings
-
getDashLength
- Returns:
- length of a dash
-
setDashLength
Sets length of a dash.- Parameters:
dashLength
- length of a dash- Returns:
- category axes settings
-
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
Adds date formats.- Parameters:
dateFormats
- date formats- Returns:
- category axes settings
-
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
- 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
- Returns:
- fill color
-
setFillColor
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
- Returns:
- font size
-
setFontSize
Sets text size.- Parameters:
fontSize
- text size- Returns:
- category axes settings
-
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
- Returns:
- color of grid lines
-
setGridColor
Sets color of grid lines.- Parameters:
gridColor
- color of grid lines- Returns:
- category axes settings
-
getGridCount
- Returns:
- number of grid lines
-
setGridCount
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
- Returns:
- thickness of grid lines
-
setGridThickness
Sets thickness of grid lines.- Parameters:
gridThickness
- grid thickness- Returns:
- category axes settings
-
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
Adds groupToPeriods strings.- Parameters:
groupToPeriods
- groupToPeriods- Returns:
- category axes settings
-
getInside
- Returns:
- true if values placed inside of plot area
-
setInside
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
- Returns:
- offset of axis labels
-
setLabelOffset
Sets offset of axis labels. If not set the default value is 0.- Parameters:
labelOffset
- offset of axis labels- Returns:
- category axes settings
-
getLabelRotation
- Returns:
- rotation angle of a label
-
setLabelRotation
Sets rotation angle of a label.- Parameters:
labelRotation
- rotation angle of a label- Returns:
- category axes settings
-
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
- 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
- Returns:
- maximum series shown at a time
-
setMaxSeries
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
- 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
- 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
- Returns:
- position of category axes
-
setPosition
@StudioProperty(type=ENUMERATION) public CategoryAxesSettings setPosition(CategoryAxesPosition position) Sets position of category axes.- Parameters:
position
- position of category axes- Returns:
- category axes settings
-
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
- Returns:
- tick length
-
setTickLength
Sets tick length. If not set the default value is 0.- Parameters:
tickLength
- tick length- Returns:
- category axes settings
-
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
- Returns:
- true if axis labels are bold
-
setBoldLabels
Set to true if axis labels should be bold.- Parameters:
boldLabels
- boldLabels option- Returns:
- category axes settings
-
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
- Returns:
- true if minor grid is displayed
-
setMinorGridEnabled
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
-