Class DefaultChartGrid
- java.lang.Object
-
- org.pepstock.charba.client.defaults.chart.DefaultChartGrid
-
- All Implemented Interfaces:
IsDefaultGrid
,IsDefaultScaleLines
public final class DefaultChartGrid extends Object implements IsDefaultGrid
Defaults for grid option element, based on chart type.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getColorAsString()
Returns the color of lines.int
getLineWidth()
Returns the width of lines.double
getTickBorderDashOffset()
Returns the offset for the line dash of the tick mark.String
getTickColorAsString()
Returns the color of the tick line.int
getTickLength()
Returns the length in pixels that the grid will draw in the axis area.int
getTickWidth()
Returns the width of the tick mark in pixels.
The first element if set as array.int
getZ()
Returns z-index of grid layer.
Values less than or equals to 0 are drawn under data sets, greater than 0 on top.boolean
isCircular()
Iftrue
, grid are circular (on radar chart only).boolean
isDisplay()
Iffalse
, do not display grid for this axis.boolean
isDrawOnChartArea()
Iftrue
, draw lines on the chart area inside the axis lines.
This is useful when there are multiple axes and you need to control which grid are drawn.boolean
isDrawTicks()
Iftrue
, draw lines beside the ticks in the axis area beside the chart.boolean
isOffset()
Iftrue
, grid will be shifted to be between labels.
-
-
-
Method Detail
-
isDisplay
public boolean isDisplay()
Description copied from interface:IsDefaultGrid
Iffalse
, do not display grid for this axis.- Specified by:
isDisplay
in interfaceIsDefaultGrid
- Returns:
- if
false
, do not display grid for this axis.
-
getColorAsString
public String getColorAsString()
Description copied from interface:IsDefaultScaleLines
Returns the color of lines.- Specified by:
getColorAsString
in interfaceIsDefaultScaleLines
- Returns:
- color of lines.
-
getLineWidth
public int getLineWidth()
Description copied from interface:IsDefaultScaleLines
Returns the width of lines.- Specified by:
getLineWidth
in interfaceIsDefaultScaleLines
- Returns:
- width of lines.
-
isDrawOnChartArea
public boolean isDrawOnChartArea()
Description copied from interface:IsDefaultGrid
Iftrue
, draw lines on the chart area inside the axis lines.
This is useful when there are multiple axes and you need to control which grid are drawn.- Specified by:
isDrawOnChartArea
in interfaceIsDefaultGrid
- Returns:
- if
true
, draw lines on the chart area inside the axis lines.
This is useful when there are multiple axes and you need to control which grid are drawn.
-
isDrawTicks
public boolean isDrawTicks()
Description copied from interface:IsDefaultGrid
Iftrue
, draw lines beside the ticks in the axis area beside the chart.- Specified by:
isDrawTicks
in interfaceIsDefaultGrid
- Returns:
- if
true
, draw lines beside the ticks in the axis area beside the chart.
-
getTickLength
public int getTickLength()
Description copied from interface:IsDefaultGrid
Returns the length in pixels that the grid will draw in the axis area.- Specified by:
getTickLength
in interfaceIsDefaultGrid
- Returns:
- Length in pixels that the grid will draw in the axis area.
-
isOffset
public boolean isOffset()
Description copied from interface:IsDefaultGrid
Iftrue
, grid will be shifted to be between labels. This is set totrue
in the bar chart by default.- Specified by:
isOffset
in interfaceIsDefaultGrid
- Returns:
- If
true
, grid will be shifted to be between labels.
-
isCircular
public boolean isCircular()
Description copied from interface:IsDefaultGrid
Iftrue
, grid are circular (on radar chart only).- Specified by:
isCircular
in interfaceIsDefaultGrid
- Returns:
- If
true
, grid are circular (on radar chart only).
-
getZ
public int getZ()
Description copied from interface:IsDefaultGrid
Returns z-index of grid layer.
Values less than or equals to 0 are drawn under data sets, greater than 0 on top.- Specified by:
getZ
in interfaceIsDefaultGrid
- Returns:
- z-index of grid layer.
Values less than or equals to 0 are drawn under data sets, greater than 0 on top.
-
getTickBorderDashOffset
public double getTickBorderDashOffset()
Description copied from interface:IsDefaultGrid
Returns the offset for the line dash of the tick mark.- Specified by:
getTickBorderDashOffset
in interfaceIsDefaultGrid
- Returns:
- the offset for the line dash of the tick mark
-
getTickColorAsString
public String getTickColorAsString()
Description copied from interface:IsDefaultGrid
Returns the color of the tick line.- Specified by:
getTickColorAsString
in interfaceIsDefaultGrid
- Returns:
- the color of the tick line.
-
getTickWidth
public int getTickWidth()
Description copied from interface:IsDefaultGrid
Returns the width of the tick mark in pixels.
The first element if set as array.- Specified by:
getTickWidth
in interfaceIsDefaultGrid
- Returns:
- stroke width of grid.
The first element if set as array.
-
-