org.knowm.xchart.style
Class CategoryStyler
- java.lang.Object
-
- org.knowm.xchart.style.Styler
-
- org.knowm.xchart.style.AxesChartStyler
-
- org.knowm.xchart.style.CategoryStyler
-
public class CategoryStyler extends AxesChartStyler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.knowm.xchart.style.AxesChartStyler
AxesChartStyler.TextAlignment
-
Nested classes/interfaces inherited from class org.knowm.xchart.style.Styler
Styler.ChartButtonPosition, Styler.ChartTheme, Styler.LegendLayout, Styler.LegendPosition, Styler.ToolTipType, Styler.YAxisPosition
-
-
Constructor Summary
Constructors Constructor and Description CategoryStyler()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetAvailableSpaceFill()CategorySeries.CategorySeriesRenderStylegetDefaultSeriesRenderStyle()java.awt.FontgetLabelsFont()java.awt.ColorgetLabelsFontColor()java.awt.ColorgetLabelsFontColor(java.awt.Color backgroundColor)java.awt.ColorgetLabelsFontColorAutomaticDark()java.awt.ColorgetLabelsFontColorAutomaticLight()doublegetLabelsPosition()intgetLabelsRotation()booleanisLabelsFontColorAutomaticEnabled()booleanisLabelsVisible()booleanisOverlapped()booleanisShowStackSum()booleanisStacked()CategoryStylersetAvailableSpaceFill(double availableSpaceFill)Sets the available space for rendering each category as a percentage.CategoryStylersetDefaultSeriesRenderStyle(CategorySeries.CategorySeriesRenderStyle chartCategorySeriesRenderStyle)Sets the default series render style for the chart (bar, stick, line, scatter, area, etc.) You can override the series render style individually on each Series object.CategoryStylersetLabelsFont(java.awt.Font labelsFont)Sets the Font used for chart labelsCategoryStylersetLabelsFontColor(java.awt.Color labelsFontColor)Sets the color of the Font used for chart labelsCategoryStylersetLabelsFontColorAutomaticDark(java.awt.Color labelsFontColorAutomaticDark)CategoryStylersetLabelsFontColorAutomaticEnabled(boolean isLabelsFontColorAutomaticEnabled)CategoryStylersetLabelsFontColorAutomaticLight(java.awt.Color labelsFontColorAutomaticLight)CategoryStylersetLabelsPosition(double labelsPosition)A number between 0 and 1 setting the vertical position of the data label.CategoryStylersetLabelsRotation(int labelsRotation)Sets the rotation (in degrees) for chart labels.CategoryStylersetLabelsVisible(boolean labelsVisible)Sets if labels should be added to charts.CategoryStylersetOverlapped(boolean isOverlapped)set whether or not series renderings (i.e.CategoryStylersetShowStackSum(boolean showStackSum)If the category chart is set to be "stacked", the total value of the stack can be painted above the stack.CategoryStylersetStacked(boolean isStacked)Set whether or not series renderings (i.e.voidsetTheme(Theme theme)Set the theme the styler should use-
Methods inherited from class org.knowm.xchart.style.AxesChartStyler
getAxisTickLabelsColor, getAxisTickLabelsFont, getAxisTickMarkLength, getAxisTickMarksColor, getAxisTickMarksStroke, getAxisTickPadding, getAxisTitleFont, getAxisTitlePadding, getDatePattern, getErrorBarsColor, getLocale, getPlotGridLinesColor, getPlotGridLinesStroke, getPlotMargin, getTimezone, getXAxisDecimalPattern, getXAxisLabelAlignment, getXAxisLabelAlignmentVertical, getXAxisLabelRotation, getXAxisMax, getXAxisMaxLabelCount, getXAxisMin, getXAxisTickLabelsColor, getxAxisTickLabelsFormattingFunction, getXAxisTickMarksColor, getXAxisTickMarkSpacingHint, getYAxisDecimalPattern, getYAxisGroupDecimalPatternMap, getYAxisGroupTickLabelsColorMap, getYAxisGroupTickMarksColorMap, getYAxisLabelAlignment, getYAxisMax, getYAxisMax, getYAxisMin, getYAxisMin, getYAxisTickLabelsColor, getyAxisTickLabelsFormattingFunction, getYAxisTickMarksColor, getYAxisTickMarkSpacingHint, isAxisTicksLineVisible, isAxisTicksMarksVisible, isErrorBarsColorSeriesColor, isPlotGridHorizontalLinesVisible, isPlotGridLinesVisible, isPlotGridVerticalLinesVisible, isPlotTicksMarksVisible, isXAxisLogarithmic, isXAxisLogarithmicDecadeOnly, isXAxisTicksVisible, isXAxisTitleVisible, isYAxisLogarithmic, isYAxisLogarithmicDecadeOnly, isYAxisTicksVisible, isYAxisTitleVisible, putYAxisGroupDecimalPatternMap, setAxisTickLabelsColor, setAxisTickLabelsFont, setAxisTickMarkLength, setAxisTickMarksColor, setAxisTickMarksStroke, setAxisTickPadding, setAxisTicksLineVisible, setAxisTicksMarksVisible, setAxisTicksVisible, setAxisTitleFont, setAxisTitlePadding, setAxisTitlesVisible, setDatePattern, setErrorBarsColor, setErrorBarsColorSeriesColor, setLocale, setPlotGridHorizontalLinesVisible, setPlotGridLinesColor, setPlotGridLinesStroke, setPlotGridLinesVisible, setPlotGridVerticalLinesVisible, setPlotMargin, setPlotTicksMarksVisible, setTimezone, setXAxisDecimalPattern, setXAxisLabelAlignment, setXAxisLabelAlignmentVertical, setXAxisLabelRotation, setXAxisLogarithmic, setXAxisLogarithmicDecadeOnly, setXAxisMax, setXAxisMaxLabelCount, setXAxisMin, setXAxisTickLabelsColor, setxAxisTickLabelsFormattingFunction, setXAxisTickMarksColor, setXAxisTickMarkSpacingHint, setXAxisTicksVisible, setXAxisTitleVisible, setYAxisDecimalPattern, setYAxisGroupTickLabelsColorMap, setYAxisGroupTickMarksColorMap, setYAxisLabelAlignment, setYAxisLogarithmic, setYAxisLogarithmicDecadeOnly, setYAxisMax, setYAxisMax, setYAxisMin, setYAxisMin, setYAxisTickLabelsColor, setyAxisTickLabelsFormattingFunction, setYAxisTickMarksColor, setYAxisTickMarkSpacingHint, setYAxisTicksVisible, setYAxisTitleVisible
-
Methods inherited from class org.knowm.xchart.style.Styler
getAnnotationLineColor, getAnnotationLineStroke, getAnnotationTextFont, getAnnotationTextFontColor, getAnnotationTextPanelBackgroundColor, getAnnotationTextPanelBorderColor, getAnnotationTextPanelFont, getAnnotationTextPanelFontColor, getAnnotationTextPanelPadding, getAntiAlias, getBaseFont, getChartBackgroundColor, getChartButtonBackgroundColor, getChartButtonBorderColor, getChartButtonFont, getChartButtonFontColor, getChartButtonMargin, getChartButtonPosition, getChartFontColor, getChartPadding, getChartTitleBoxBackgroundColor, getChartTitleBoxBorderColor, getChartTitleFont, getChartTitlePadding, getDecimalPattern, getLegendBackgroundColor, getLegendBorderColor, getLegendFont, getLegendLayout, getLegendPadding, getLegendPosition, getLegendSeriesLineLength, getMarkerSize, getPlotBackgroundColor, getPlotBorderColor, getPlotContentSize, getSeriesColors, getSeriesLines, getSeriesMarkers, getShowWithinAreaPoint, getTheme, getToolTipBackgroundColor, getToolTipBorderColor, getToolTipFont, getToolTipHighlightColor, getToolTipType, getXAxisTitleColor, getYAxisGroupPosistion, getYAxisGroupTitleColor, getYAxisLeftWidthHint, getYAxisTitleColor, isChartTitleBoxVisible, isChartTitleVisible, isLegendVisible, isPlotBorderVisible, isToolTipsAlwaysVisible, isToolTipsEnabled, setAnnotationLineColor, setAnnotationLineStroke, setAnnotationTextFont, setAnnotationTextFontColor, setAnnotationTextPanelBackgroundColor, setAnnotationTextPanelBorderColor, setAnnotationTextPanelFont, setAnnotationTextPanelFontColor, setAnnotationTextPanelPadding, setAntiAlias, setBaseFont, setChartBackgroundColor, setChartButtonBackgroundColor, setChartButtonBorderColor, setChartButtonFont, setChartButtonFontColor, setChartButtonMargin, setChartButtonPosition, setChartFontColor, setChartPadding, setChartTitleBoxBackgroundColor, setChartTitleBoxBorderColor, setChartTitleBoxVisible, setChartTitleFont, setChartTitlePadding, setChartTitleVisible, setDecimalPattern, setLegendBackgroundColor, setLegendBorderColor, setLegendFont, setLegendLayout, setLegendPadding, setLegendPosition, setLegendSeriesLineLength, setLegendVisible, setMarkerSize, setPlotBackgroundColor, setPlotBorderColor, setPlotBorderVisible, setPlotContentSize, setSeriesColors, setSeriesLines, setSeriesMarkers, setShowWithinAreaPoint, setToolTipBackgroundColor, setToolTipBorderColor, setToolTipFont, setToolTipHighlightColor, setToolTipsAlwaysVisible, setToolTipsEnabled, setToolTipType, setXAxisTitleColor, setYAxisGroupPosition, setYAxisGroupTitleColor, setYAxisLeftWidthHint, setYAxisTitleColor
-
-
-
-
Method Detail
-
getDefaultSeriesRenderStyle
public CategorySeries.CategorySeriesRenderStyle getDefaultSeriesRenderStyle()
-
setDefaultSeriesRenderStyle
public CategoryStyler setDefaultSeriesRenderStyle(CategorySeries.CategorySeriesRenderStyle chartCategorySeriesRenderStyle)
Sets the default series render style for the chart (bar, stick, line, scatter, area, etc.) You can override the series render style individually on each Series object.- Parameters:
chartCategorySeriesRenderStyle-
-
getAvailableSpaceFill
public double getAvailableSpaceFill()
-
setAvailableSpaceFill
public CategoryStyler setAvailableSpaceFill(double availableSpaceFill)
Sets the available space for rendering each category as a percentage. For a bar chart with one series, it will be the width of the bar as a percentage of the maximum space alloted for the bar. If there are three series and three bars, the three bars will share the available space. This affects all category series render types, not only bar charts. Full width is 100%, i.e. 1.0- Parameters:
availableSpaceFill-
-
isOverlapped
public boolean isOverlapped()
-
setOverlapped
public CategoryStyler setOverlapped(boolean isOverlapped)
set whether or not series renderings (i.e. bars, stick, etc.) are overlapped. Otherwise they are placed side-by-side.- Parameters:
isOverlapped-
-
isStacked
public boolean isStacked()
-
setStacked
public CategoryStyler setStacked(boolean isStacked)
Set whether or not series renderings (i.e. bars, stick, etc.) are stacked.- Parameters:
isStacked-
-
isLabelsVisible
public boolean isLabelsVisible()
-
setLabelsVisible
public CategoryStyler setLabelsVisible(boolean labelsVisible)
Sets if labels should be added to charts. Each chart type has a different annotation type- Parameters:
labelsVisible-
-
isShowStackSum
public boolean isShowStackSum()
-
setShowStackSum
public CategoryStyler setShowStackSum(boolean showStackSum)
If the category chart is set to be "stacked", the total value of the stack can be painted above the stack.- Parameters:
showStackSum-- Returns:
-
getLabelsFont
public java.awt.Font getLabelsFont()
-
setLabelsFont
public CategoryStyler setLabelsFont(java.awt.Font labelsFont)
Sets the Font used for chart labels- Parameters:
labelsFont-
-
getLabelsFontColor
public java.awt.Color getLabelsFontColor()
-
getLabelsFontColor
public java.awt.Color getLabelsFontColor(java.awt.Color backgroundColor)
-
setLabelsFontColor
public CategoryStyler setLabelsFontColor(java.awt.Color labelsFontColor)
Sets the color of the Font used for chart labels- Parameters:
labelsFontColor-
-
getLabelsRotation
public int getLabelsRotation()
-
setLabelsRotation
public CategoryStyler setLabelsRotation(int labelsRotation)
Sets the rotation (in degrees) for chart labels.- Parameters:
labelsRotation-
-
getLabelsPosition
public double getLabelsPosition()
-
setLabelsPosition
public CategoryStyler setLabelsPosition(double labelsPosition)
A number between 0 and 1 setting the vertical position of the data label. Default is 0.5 placing it in the center.- Parameters:
labelsPosition-- Returns:
-
isLabelsFontColorAutomaticEnabled
public boolean isLabelsFontColorAutomaticEnabled()
-
setLabelsFontColorAutomaticEnabled
public CategoryStyler setLabelsFontColorAutomaticEnabled(boolean isLabelsFontColorAutomaticEnabled)
-
getLabelsFontColorAutomaticLight
public java.awt.Color getLabelsFontColorAutomaticLight()
-
setLabelsFontColorAutomaticLight
public CategoryStyler setLabelsFontColorAutomaticLight(java.awt.Color labelsFontColorAutomaticLight)
-
getLabelsFontColorAutomaticDark
public java.awt.Color getLabelsFontColorAutomaticDark()
-
setLabelsFontColorAutomaticDark
public CategoryStyler setLabelsFontColorAutomaticDark(java.awt.Color labelsFontColorAutomaticDark)
-
setTheme
public void setTheme(Theme theme)
Set the theme the styler should use- Parameters:
theme-
-
-
DataMelt 3.0 © DataMelt by jWork.ORG