Class Styler

java.lang.Object
org.knowm.xchart.style.Styler
Direct Known Subclasses:
AxesChartStyler, DialStyler, PieStyler, RadarStyler

public abstract class Styler extends Object
The styler is used to manage all things related to styling of the vast number of Chart components
  • Constructor Details

    • Styler

      public Styler()
  • Method Details

    • getBaseFont

      public Font getBaseFont()
    • setBaseFont

      public Styler setBaseFont(Font baseFont)
      Set the base font
      Parameters:
      baseFont -
      Returns:
      styler
    • getChartBackgroundColor

      public Color getChartBackgroundColor()
    • setChartBackgroundColor

      public Styler setChartBackgroundColor(Color color)
      Set the chart background color - the part around the edge of the chart
      Parameters:
      color -
    • getChartFontColor

      public Color getChartFontColor()
    • setChartFontColor

      public Styler setChartFontColor(Color color)
      Set the chart font color. includes: Chart title, axes label, legend
      Parameters:
      color -
    • getChartPadding

      public int getChartPadding()
    • setChartPadding

      public Styler setChartPadding(int chartPadding)
      Set the chart padding
      Parameters:
      chartPadding -
    • getSeriesColors

      public Color[] getSeriesColors()
    • setSeriesColors

      public Styler setSeriesColors(Color[] seriesColors)
    • getSeriesLines

      public BasicStroke[] getSeriesLines()
    • setSeriesLines

      public Styler setSeriesLines(BasicStroke[] seriesLines)
    • getSeriesMarkers

      public Marker[] getSeriesMarkers()
    • setSeriesMarkers

      public Styler setSeriesMarkers(Marker[] seriesMarkers)
    • getChartTitleFont

      public Font getChartTitleFont()
    • setChartTitleFont

      public Styler setChartTitleFont(Font chartTitleFont)
      Set the chart title font
      Parameters:
      chartTitleFont -
      Returns:
    • isChartTitleVisible

      public boolean isChartTitleVisible()
    • setChartTitleVisible

      public Styler setChartTitleVisible(boolean isChartTitleVisible)
      Set the chart title visibility
      Parameters:
      isChartTitleVisible -
    • isChartTitleBoxVisible

      public boolean isChartTitleBoxVisible()
    • setChartTitleBoxVisible

      public Styler setChartTitleBoxVisible(boolean isChartTitleBoxVisible)
      Set the chart title box visibility
      Parameters:
      isChartTitleBoxVisible -
    • getChartTitleBoxBackgroundColor

      public Color getChartTitleBoxBackgroundColor()
    • setChartTitleBoxBackgroundColor

      public Styler setChartTitleBoxBackgroundColor(Color chartTitleBoxBackgroundColor)
      set the chart title box background color
      Parameters:
      chartTitleBoxBackgroundColor -
    • getChartTitleBoxBorderColor

      public Color getChartTitleBoxBorderColor()
    • setChartTitleBoxBorderColor

      public Styler setChartTitleBoxBorderColor(Color chartTitleBoxBorderColor)
      set the chart title box border color
      Parameters:
      chartTitleBoxBorderColor -
    • getChartTitlePadding

      public int getChartTitlePadding()
    • setChartTitlePadding

      public Styler setChartTitlePadding(int chartTitlePadding)
      set the chart title padding; the space between the chart title and the plot area
      Parameters:
      chartTitlePadding -
    • isLegendVisible

      public boolean isLegendVisible()
    • setLegendVisible

      public Styler setLegendVisible(boolean isLegendVisible)
      Set the chart legend visibility
      Parameters:
      isLegendVisible -
    • getLegendBackgroundColor

      public Color getLegendBackgroundColor()
    • setLegendBackgroundColor

      public Styler setLegendBackgroundColor(Color color)
      Set the chart legend background color
      Parameters:
      color -
    • getLegendBorderColor

      public Color getLegendBorderColor()
      Set the chart legend border color
      Returns:
    • setLegendBorderColor

      public Styler setLegendBorderColor(Color legendBorderColor)
    • getLegendFont

      public Font getLegendFont()
    • setLegendFont

      public Styler setLegendFont(Font font)
      Set the chart legend font
      Parameters:
      font -
    • getLegendPadding

      public int getLegendPadding()
    • setLegendPadding

      public Styler setLegendPadding(int legendPadding)
      Set the chart legend padding
      Parameters:
      legendPadding -
    • getLegendSeriesLineLength

      public int getLegendSeriesLineLength()
    • setLegendSeriesLineLength

      public Styler setLegendSeriesLineLength(int legendSeriesLineLength)
      Set the chart legend series line length
      Parameters:
      legendSeriesLineLength -
      Returns:
    • getLegendPosition

      public Styler.LegendPosition getLegendPosition()
    • setLegendPosition

      public Styler setLegendPosition(Styler.LegendPosition legendPosition)
      sets the legend position
      Parameters:
      legendPosition -
    • getLegendLayout

      public Styler.LegendLayout getLegendLayout()
      Set the legend layout
      Returns:
    • setLegendLayout

      public Styler setLegendLayout(Styler.LegendLayout legendLayout)
    • getPlotBackgroundColor

      public Color getPlotBackgroundColor()
    • setPlotBackgroundColor

      public Styler setPlotBackgroundColor(Color plotBackgroundColor)
      set the plot area's background color
      Parameters:
      plotBackgroundColor -
    • getPlotBorderColor

      public Color getPlotBorderColor()
    • setPlotBorderColor

      public Styler setPlotBorderColor(Color plotBorderColor)
      set the plot area's border color
      Parameters:
      plotBorderColor -
    • isPlotBorderVisible

      public boolean isPlotBorderVisible()
    • setPlotBorderVisible

      public Styler setPlotBorderVisible(boolean isPlotBorderVisible)
      sets the visibility of the border around the plot area
      Parameters:
      isPlotBorderVisible -
    • getPlotContentSize

      public double getPlotContentSize()
    • setPlotContentSize

      public Styler setPlotContentSize(double plotContentSize)
      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

      public Color getAnnotationTextPanelBackgroundColor()
    • setAnnotationTextPanelBackgroundColor

      public Styler setAnnotationTextPanelBackgroundColor(Color color)
    • getAnnotationTextPanelBorderColor

      public Color getAnnotationTextPanelBorderColor()
    • setAnnotationTextPanelBorderColor

      public Styler setAnnotationTextPanelBorderColor(Color borderColor)
    • getAnnotationTextPanelFont

      public Font getAnnotationTextPanelFont()
    • setAnnotationTextPanelFont

      public Styler setAnnotationTextPanelFont(Font font)
    • getAnnotationTextPanelFontColor

      public Color getAnnotationTextPanelFontColor()
    • setAnnotationTextPanelFontColor

      public Styler setAnnotationTextPanelFontColor(Color annotationTextPanelFontColor)
    • getAnnotationTextPanelPadding

      public int getAnnotationTextPanelPadding()
    • setAnnotationTextPanelPadding

      public Styler setAnnotationTextPanelPadding(int annotationTextPanelPadding)
    • getAnnotationTextFont

      public Font getAnnotationTextFont()
    • setAnnotationTextFont

      public Styler setAnnotationTextFont(Font annotationTextFont)
    • getAnnotationTextFontColor

      public Color getAnnotationTextFontColor()
    • setAnnotationTextFontColor

      public Styler setAnnotationTextFontColor(Color annotationTextFontColor)
    • getAnnotationLineStroke

      public BasicStroke getAnnotationLineStroke()
    • setAnnotationLineStroke

      public Styler setAnnotationLineStroke(BasicStroke annotationLineStroke)
    • getAnnotationLineColor

      public Color getAnnotationLineColor()
    • setAnnotationLineColor

      public Styler setAnnotationLineColor(Color annotationLineColor)
    • getChartButtonBackgroundColor

      public Color getChartButtonBackgroundColor()
    • setChartButtonBackgroundColor

      public Styler setChartButtonBackgroundColor(Color chartButtonBackgroundColor)
    • getChartButtonBorderColor

      public Color getChartButtonBorderColor()
    • setChartButtonBorderColor

      public Styler setChartButtonBorderColor(Color chartButtonBorderColor)
    • getChartButtonFontColor

      public Color getChartButtonFontColor()
    • setChartButtonFontColor

      public Styler setChartButtonFontColor(Color chartButtonFontColor)
    • getChartButtonFont

      public Font getChartButtonFont()
    • setChartButtonFont

      public Styler setChartButtonFont(Font chartButtonFont)
    • getChartButtonMargin

      public int getChartButtonMargin()
    • setChartButtonMargin

      public Styler setChartButtonMargin(int chartButtonMargin)
    • getChartButtonPosition

      public Styler.ChartButtonPosition getChartButtonPosition()
    • setChartButtonPosition

      public Styler setChartButtonPosition(Styler.ChartButtonPosition chartButtonPosition)
    • isToolTipsEnabled

      public boolean isToolTipsEnabled()
    • setToolTipsEnabled

      public Styler setToolTipsEnabled(boolean toolTipsEnabled)
    • isToolTipsAlwaysVisible

      public boolean isToolTipsAlwaysVisible()
    • setToolTipsAlwaysVisible

      public Styler setToolTipsAlwaysVisible(boolean toolTipsAlwaysVisible)
    • getToolTipType

      public Styler.ToolTipType getToolTipType()
    • setToolTipType

      public Styler setToolTipType(Styler.ToolTipType toolTipType)
    • getToolTipBackgroundColor

      public Color getToolTipBackgroundColor()
    • setToolTipBackgroundColor

      public Styler setToolTipBackgroundColor(Color toolTipBackgroundColor)
    • getToolTipBorderColor

      public Color getToolTipBorderColor()
    • setToolTipBorderColor

      public Styler setToolTipBorderColor(Color toolTipBorderColor)
    • getToolTipFont

      public Font getToolTipFont()
    • setToolTipFont

      public Styler setToolTipFont(Font toolTipFont)
    • getToolTipHighlightColor

      public Color getToolTipHighlightColor()
    • setToolTipHighlightColor

      public Styler setToolTipHighlightColor(Color toolTipHighlightColor)
    • getDecimalPattern

      public String getDecimalPattern()
    • setDecimalPattern

      public Styler setDecimalPattern(String decimalPattern)
      Set the decimal formatter for all numbers on the chart
      Parameters:
      decimalPattern - - the pattern describing the decimal format
    • getYAxisGroupPosistion

      public Styler.YAxisPosition getYAxisGroupPosistion(int yAxisGroup)
    • setYAxisGroupPosition

      public Styler setYAxisGroupPosition(int yAxisGroup, Styler.YAxisPosition yAxisPosition)
      Set the Y-Axis group position.
      Parameters:
      yAxisGroup -
      yAxisPosition -
    • getAntiAlias

      public boolean getAntiAlias()
    • setAntiAlias

      public Styler setAntiAlias(boolean newVal)
    • getYAxisLeftWidthHint

      public int getYAxisLeftWidthHint()
    • setYAxisLeftWidthHint

      public Styler setYAxisLeftWidthHint(int yAxisLeftWidthHint)
      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

      public Styler setShowWithinAreaPoint(boolean showWithinAreaPoint)
    • getShowWithinAreaPoint

      public boolean getShowWithinAreaPoint()
    • getXAxisTitleColor

      public Color getXAxisTitleColor()
    • setXAxisTitleColor

      public Styler setXAxisTitleColor(Color xAxisTitleColor)
    • getYAxisTitleColor

      public Color getYAxisTitleColor()
    • setYAxisTitleColor

      public Styler setYAxisTitleColor(Color yAxisColor)
    • getYAxisGroupTitleColor

      public Color getYAxisGroupTitleColor(int yAxisGroup)
    • setYAxisGroupTitleColor

      public Styler setYAxisGroupTitleColor(int yAxisGroup, Color yAxisColor)
    • getMarkerSize

      public int getMarkerSize()
    • setMarkerSize

      public Styler setMarkerSize(int markerSize)
      Sets the size of the markers (in pixels)
      Parameters:
      markerSize -
    • getTheme

      public Theme getTheme()