com.vaadin.flow.component.charts.model.style.
Class AxisStyle
- java.lang.Object
-
- com.vaadin.flow.component.charts.model.AbstractConfigurationObject
-
- com.vaadin.flow.component.charts.model.style.AxisStyle
-
All Implemented Interfaces:
public class AxisStyle extends AbstractConfigurationObject
The AxisStyle class contains options for customizing the style of an axis
See Also:
-
-
Constructor Summary
Constructors Constructor Description AxisStyle()
-
Method Summary
All Methods Modifier and Type Method Description Color
getAlternateGridColor()
Color
getGridLineColor()
Number
getGridLineWidth()
Style
getLabels()
Color
getLineColor()
Number
getLineWidth()
TickIntervalStyle
getMinorTickInterval()
Style
getSubtitle()
Color
getTickColor()
Number
getTickWidth()
Style
getTitle()
void
setAlternateGridColor(Color alternateGridColor)
Sets the alternate grid color.
void
setGridLineColor(Color gridLineColor)
Sets the color of the grid lines extending the ticks across the plot area.
void
setGridLineWidth(Number gridLineWidth)
Sets the width of the grid lines extending the ticks across the plot area.
void
setLabels(Style style)
Sets the style for labels
void
setLineColor(Color lineColor)
Sets the color of the line marking the axis itself.
void
setLineWidth(Number lineWidth)
Sets the width of the line marking the axis itself.
void
setMinorTickInterval(TickIntervalStyle minorTickInterval)
Sets the tick interval in scale units for the minor ticks.
void
setSubtitle(Style style)
Sets the subtitle style
void
setTickColor(Color tickColor)
Sets the color for the main tick marks.
void
setTickWidth(Number tickWidth)
Sets the pixel width of the major tick marks.
void
setTitle(Style style)
Sets the title style
-
-
-
Method Detail
-
getMinorTickInterval
public TickIntervalStyle getMinorTickInterval()
See Also:
-
setMinorTickInterval
public void setMinorTickInterval(TickIntervalStyle minorTickInterval)
Sets the tick interval in scale units for the minor ticks. On a linear axis, if
TickIntervalStyle.AUTO
, the minor tick interval is calculated as a fifth of the tickInterval. If null, minor ticks are not shown. On logarithmic axes, the unit is the power of the value. For example, setting the minor tick interval to 1 puts one tick on each of 0.1, 1, 10, 100 etc. Setting the minor tick interval to 0.1 produces 9 ticks between 1 and 10, 10 and 100 etc. A minor tick interval ofTickIntervalStyle.AUTO
on a log axis results in a best guess, attempting to enter approximately 5 minor ticks between each major tick. Defaults to null.Parameters:
minorTickInterval
-
-
getLineColor
public Color getLineColor()
See Also:
-
setLineColor
public void setLineColor(Color lineColor)
Sets the color of the line marking the axis itself. Defaults to "#C0D0E0".
Parameters:
lineColor
-
-
getLineWidth
public Number getLineWidth()
See Also:
-
setLineWidth
public void setLineWidth(Number lineWidth)
Sets the width of the line marking the axis itself. Defaults to 1.
Parameters:
lineWidth
-
-
getTickWidth
public Number getTickWidth()
See Also:
-
setTickWidth
public void setTickWidth(Number tickWidth)
Sets the pixel width of the major tick marks. Defaults to 1.
Parameters:
tickWidth
-
-
getTickColor
public Color getTickColor()
See Also:
-
setTickColor
public void setTickColor(Color tickColor)
Sets the color for the main tick marks. Defaults to #C0D0E0.
Parameters:
tickColor
-
-
getTitle
public Style getTitle()
Returns:
The title style
-
setTitle
public void setTitle(Style style)
Sets the title style
Parameters:
style
-
-
getSubtitle
public Style getSubtitle()
Returns:
The subtitle style
-
setSubtitle
public void setSubtitle(Style style)
Sets the subtitle style
Parameters:
style
- Subtitle style
-
getLabels
public Style getLabels()
Returns:
The style for labels
-
setLabels
public void setLabels(Style style)
Sets the style for labels
Parameters:
style
- Labels style
-
getGridLineWidth
public Number getGridLineWidth()
Returns:
The width of grid lines or null if not defined
See Also:
-
setGridLineWidth
public void setGridLineWidth(Number gridLineWidth)
Sets the width of the grid lines extending the ticks across the plot area. Defaults to 0.
Parameters:
gridLineWidth
-
-
getAlternateGridColor
public Color getAlternateGridColor()
Returns:
The alternate grid color, null if not defined
See Also:
-
setAlternateGridColor
public void setAlternateGridColor(Color alternateGridColor)
Sets the alternate grid color. When using an alternate grid color, a band is painted across the plot area between every other grid line. Defaults to null.
Parameters:
alternateGridColor
-
-
getGridLineColor
public Color getGridLineColor()
Returns:
The color of grid lines, null if not defined
See Also:
-
setGridLineColor
public void setGridLineColor(Color gridLineColor)
Sets the color of the grid lines extending the ticks across the plot area. Defaults to "#C0C0C0".
Parameters:
gridLineColor
- Color of grid lines
-
-