Class Styler
java.lang.Object
org.knowm.xchart.style.Styler
- Direct Known Subclasses:
AxesChartStyler, DialStyler, PieStyler, RadarStyler
The styler is used to manage all things related to styling of the vast number of Chart components
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enumstatic enumstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Colorprivate BasicStrokeprivate Fontprivate Colorprivate Colorprivate Colorprivate Fontprivate Colorprivate intprivate booleanprivate Fontprivate Colorprivate Colorprivate Colorprivate Fontprivate Colorprivate intprivate Styler.ChartButtonPositionprivate Colorprivate intprivate Colorprivate Colorprivate Fontprivate intprivate Stringprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate Colorprivate Colorprivate Fontprivate Styler.LegendLayoutprivate intprivate Styler.LegendPositionprivate intprivate intprivate Colorprivate Colorprivate doubleprivate Color[]private BasicStroke[]private Marker[]private boolean(package private) Themethe default Themeprivate Colorprivate Colorprivate Fontprivate Colorprivate Styler.ToolTipTypeprivate Colorprivate final HashMap<Integer, Styler.YAxisPosition> private intprivate Color -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanintintintSet the chart legend border colorSet the legend layoutintintintdoubleColor[]Marker[]booleangetTheme()getYAxisGroupPosistion(int yAxisGroup) getYAxisGroupTitleColor(int yAxisGroup) intbooleanbooleanbooleanbooleanbooleanboolean(package private) voidsetAnnotationLineColor(Color annotationLineColor) setAnnotationLineStroke(BasicStroke annotationLineStroke) setAnnotationTextFont(Font annotationTextFont) setAnnotationTextFontColor(Color annotationTextFontColor) setAnnotationTextPanelBorderColor(Color borderColor) setAnnotationTextPanelFontColor(Color annotationTextPanelFontColor) setAnnotationTextPanelPadding(int annotationTextPanelPadding) setAntiAlias(boolean newVal) setBaseFont(Font baseFont) Set the base fontsetChartBackgroundColor(Color color) Set the chart background color - the part around the edge of the chartsetChartButtonBackgroundColor(Color chartButtonBackgroundColor) setChartButtonBorderColor(Color chartButtonBorderColor) setChartButtonFont(Font chartButtonFont) setChartButtonFontColor(Color chartButtonFontColor) setChartButtonMargin(int chartButtonMargin) setChartButtonPosition(Styler.ChartButtonPosition chartButtonPosition) setChartFontColor(Color color) Set the chart font color.setChartPadding(int chartPadding) Set the chart paddingsetChartTitleBoxBackgroundColor(Color chartTitleBoxBackgroundColor) set the chart title box background colorsetChartTitleBoxBorderColor(Color chartTitleBoxBorderColor) set the chart title box border colorsetChartTitleBoxVisible(boolean isChartTitleBoxVisible) Set the chart title box visibilitysetChartTitleFont(Font chartTitleFont) Set the chart title fontsetChartTitlePadding(int chartTitlePadding) set the chart title padding; the space between the chart title and the plot areasetChartTitleVisible(boolean isChartTitleVisible) Set the chart title visibilitysetDecimalPattern(String decimalPattern) Set the decimal formatter for all numbers on the chartsetLegendBackgroundColor(Color color) Set the chart legend background colorsetLegendBorderColor(Color legendBorderColor) setLegendFont(Font font) Set the chart legend fontsetLegendLayout(Styler.LegendLayout legendLayout) setLegendPadding(int legendPadding) Set the chart legend paddingsetLegendPosition(Styler.LegendPosition legendPosition) sets the legend positionsetLegendSeriesLineLength(int legendSeriesLineLength) Set the chart legend series line lengthsetLegendVisible(boolean isLegendVisible) Set the chart legend visibilitysetMarkerSize(int markerSize) Sets the size of the markers (in pixels)setPlotBackgroundColor(Color plotBackgroundColor) set the plot area's background colorsetPlotBorderColor(Color plotBorderColor) set the plot area's border colorsetPlotBorderVisible(boolean isPlotBorderVisible) sets the visibility of the border around the plot areasetPlotContentSize(double plotContentSize) Sets the content size of the plot inside the plot area of the chart.setSeriesColors(Color[] seriesColors) setSeriesLines(BasicStroke[] seriesLines) setSeriesMarkers(Marker[] seriesMarkers) setShowWithinAreaPoint(boolean showWithinAreaPoint) setToolTipBackgroundColor(Color toolTipBackgroundColor) setToolTipBorderColor(Color toolTipBorderColor) setToolTipFont(Font toolTipFont) setToolTipHighlightColor(Color toolTipHighlightColor) setToolTipsAlwaysVisible(boolean toolTipsAlwaysVisible) setToolTipsEnabled(boolean toolTipsEnabled) setToolTipType(Styler.ToolTipType toolTipType) setXAxisTitleColor(Color xAxisTitleColor) setYAxisGroupPosition(int yAxisGroup, Styler.YAxisPosition yAxisPosition) Set the Y-Axis group position.setYAxisGroupTitleColor(int yAxisGroup, Color yAxisColor) setYAxisLeftWidthHint(int yAxisLeftWidthHint) Set the width of the Y-Axis tick labels on the left side of the chart.setYAxisTitleColor(Color yAxisColor)
-
Field Details
-
theme
Theme themethe default Theme -
baseFont
-
chartBackgroundColor
-
chartFontColor
-
chartPadding
private int chartPadding -
seriesColors
-
seriesLines
-
seriesMarkers
-
chartTitleFont
-
isChartTitleVisible
private boolean isChartTitleVisible -
isChartTitleBoxVisible
private boolean isChartTitleBoxVisible -
chartTitleBoxBackgroundColor
-
chartTitleBoxBorderColor
-
chartTitlePadding
private int chartTitlePadding -
isLegendVisible
private boolean isLegendVisible -
legendBackgroundColor
-
legendBorderColor
-
legendFont
-
legendPadding
private int legendPadding -
legendSeriesLineLength
private int legendSeriesLineLength -
legendPosition
-
legendLayout
-
plotBackgroundColor
-
plotBorderColor
-
isPlotBorderVisible
private boolean isPlotBorderVisible -
plotContentSize
private double plotContentSize -
annotationTextPanelBackgroundColor
-
annotationTextPanelBorderColor
-
annotationTextPanelFont
-
annotationTextPanelFontColor
-
annotationTextPanelPadding
private int annotationTextPanelPadding -
annotationTextFont
-
annotationTextFontColor
-
annotationLineStroke
-
annotationLineColor
-
chartButtonBackgroundColor
-
chartButtonBorderColor
-
chartButtonFontColor
-
chartButtonFont
-
chartButtonMargin
private int chartButtonMargin -
chartButtonPosition
-
isToolTipsEnabled
private boolean isToolTipsEnabled -
isToolTipsAlwaysVisible
private boolean isToolTipsAlwaysVisible -
toolTipType
-
toolTipBackgroundColor
-
toolTipBorderColor
-
toolTipFont
-
toolTipHighlightColor
-
antiAlias
private boolean antiAlias -
decimalPattern
-
yAxisAlignmentMap
-
yAxisLeftWidthHint
private int yAxisLeftWidthHint -
showWithinAreaPoint
private boolean showWithinAreaPoint -
xAxisTitleColor
-
yAxisTitleColor
-
yAxisGroupTitleColorMap
-
markerSize
private int markerSize
-
-
Constructor Details
-
Styler
public Styler()
-
-
Method Details
-
setAllStyles
void setAllStyles() -
getBaseFont
-
setBaseFont
-
getChartBackgroundColor
-
setChartBackgroundColor
-
getChartFontColor
-
setChartFontColor
-
getChartPadding
public int getChartPadding() -
setChartPadding
-
getSeriesColors
-
setSeriesColors
-
getSeriesLines
-
setSeriesLines
-
getSeriesMarkers
-
setSeriesMarkers
-
getChartTitleFont
-
setChartTitleFont
-
isChartTitleVisible
public boolean isChartTitleVisible() -
setChartTitleVisible
Set the chart title visibility- Parameters:
isChartTitleVisible-
-
isChartTitleBoxVisible
public boolean isChartTitleBoxVisible() -
setChartTitleBoxVisible
Set the chart title box visibility- Parameters:
isChartTitleBoxVisible-
-
getChartTitleBoxBackgroundColor
-
setChartTitleBoxBackgroundColor
-
getChartTitleBoxBorderColor
-
setChartTitleBoxBorderColor
-
getChartTitlePadding
public int getChartTitlePadding() -
setChartTitlePadding
set the chart title padding; the space between the chart title and the plot area- Parameters:
chartTitlePadding-
-
isLegendVisible
public boolean isLegendVisible() -
setLegendVisible
Set the chart legend visibility- Parameters:
isLegendVisible-
-
getLegendBackgroundColor
-
setLegendBackgroundColor
-
getLegendBorderColor
-
setLegendBorderColor
-
getLegendFont
-
setLegendFont
-
getLegendPadding
public int getLegendPadding() -
setLegendPadding
Set the chart legend padding- Parameters:
legendPadding-
-
getLegendSeriesLineLength
public int getLegendSeriesLineLength() -
setLegendSeriesLineLength
Set the chart legend series line length- Parameters:
legendSeriesLineLength-- Returns:
-
getLegendPosition
-
setLegendPosition
sets the legend position- Parameters:
legendPosition-
-
getLegendLayout
-
setLegendLayout
-
getPlotBackgroundColor
-
setPlotBackgroundColor
-
getPlotBorderColor
-
setPlotBorderColor
-
isPlotBorderVisible
public boolean isPlotBorderVisible() -
setPlotBorderVisible
sets the visibility of the border around the plot area- Parameters:
isPlotBorderVisible-
-
getPlotContentSize
public double getPlotContentSize() -
setPlotContentSize
Sets the content size of the plot inside the plot area of the chart. To fill the area 100%, use a value of 1.0.- Parameters:
plotContentSize- - Valid range is between 0 and 1.
-
getAnnotationTextPanelBackgroundColor
-
setAnnotationTextPanelBackgroundColor
-
getAnnotationTextPanelBorderColor
-
setAnnotationTextPanelBorderColor
-
getAnnotationTextPanelFont
-
setAnnotationTextPanelFont
-
getAnnotationTextPanelFontColor
-
setAnnotationTextPanelFontColor
-
getAnnotationTextPanelPadding
public int getAnnotationTextPanelPadding() -
setAnnotationTextPanelPadding
-
getAnnotationTextFont
-
setAnnotationTextFont
-
getAnnotationTextFontColor
-
setAnnotationTextFontColor
-
getAnnotationLineStroke
-
setAnnotationLineStroke
-
getAnnotationLineColor
-
setAnnotationLineColor
-
getChartButtonBackgroundColor
-
setChartButtonBackgroundColor
-
getChartButtonBorderColor
-
setChartButtonBorderColor
-
getChartButtonFontColor
-
setChartButtonFontColor
-
getChartButtonFont
-
setChartButtonFont
-
getChartButtonMargin
public int getChartButtonMargin() -
setChartButtonMargin
-
getChartButtonPosition
-
setChartButtonPosition
-
isToolTipsEnabled
public boolean isToolTipsEnabled() -
setToolTipsEnabled
-
isToolTipsAlwaysVisible
public boolean isToolTipsAlwaysVisible() -
setToolTipsAlwaysVisible
-
getToolTipType
-
setToolTipType
-
getToolTipBackgroundColor
-
setToolTipBackgroundColor
-
getToolTipBorderColor
-
setToolTipBorderColor
-
getToolTipFont
-
setToolTipFont
-
getToolTipHighlightColor
-
setToolTipHighlightColor
-
getDecimalPattern
-
setDecimalPattern
-
getYAxisGroupPosistion
-
setYAxisGroupPosition
Set the Y-Axis group position.- Parameters:
yAxisGroup-yAxisPosition-
-
getAntiAlias
public boolean getAntiAlias() -
setAntiAlias
-
getYAxisLeftWidthHint
public int getYAxisLeftWidthHint() -
setYAxisLeftWidthHint
Set the width of the Y-Axis tick labels on the left side of the chart. This can help to align the start of the X-Axis for two or more charts that are arranged in a column of charts.- Parameters:
yAxisLeftWidthHint-
-
setShowWithinAreaPoint
-
getShowWithinAreaPoint
public boolean getShowWithinAreaPoint() -
getXAxisTitleColor
-
setXAxisTitleColor
-
getYAxisTitleColor
-
setYAxisTitleColor
-
getYAxisGroupTitleColor
-
setYAxisGroupTitleColor
-
getMarkerSize
public int getMarkerSize() -
setMarkerSize
Sets the size of the markers (in pixels)- Parameters:
markerSize-
-
getTheme
-