Package org.knowm.xchart.style
Class XYStyler
- java.lang.Object
-
- org.knowm.xchart.style.Styler
-
- org.knowm.xchart.style.AxesChartStyler
-
- org.knowm.xchart.style.XYStyler
-
public class XYStyler 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
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.ColorcursorBackgroundColorprivate java.awt.ColorcursorColorprivate java.awt.FontcursorFontprivate java.awt.ColorcursorFontColorprivate floatcursorLineWidthprivate java.util.function.Function<java.lang.Double,java.lang.String>customCursorXDataFormattingFunctionprivate java.util.function.Function<java.lang.Double,java.lang.String>customCursorYDataFormattingFunctionprivate booleanisCursorEnabledprivate booleanisZoomEnabledprivate XYSeries.XYSeriesRenderStylexySeriesRenderStyleprivate booleanzoomResetByButtonprivate booleanzoomResetByDoubleClickprivate java.awt.ColorzoomSelectionColor
-
Constructor Summary
Constructors Constructor Description XYStyler()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.ColorgetCursorBackgroundColor()java.awt.ColorgetCursorColor()java.awt.FontgetCursorFont()java.awt.ColorgetCursorFontColor()floatgetCursorLineWidth()java.util.function.Function<java.lang.Double,java.lang.String>getCustomCursorXDataFormattingFunction()java.util.function.Function<java.lang.Double,java.lang.String>getCustomCursorYDataFormattingFunction()XYSeries.XYSeriesRenderStylegetDefaultSeriesRenderStyle()java.awt.ColorgetZoomSelectionColor()booleanisCursorEnabled()booleanisZoomEnabled()booleanisZoomResetByButton()booleanisZoomResetByDoubleClick()protected voidsetAllStyles()XYStylersetCursorBackgroundColor(java.awt.Color cursorBackgroundColor)XYStylersetCursorColor(java.awt.Color cursorColor)XYStylersetCursorEnabled(boolean isCursorEnabled)XYStylersetCursorFont(java.awt.Font cursorFont)XYStylersetCursorFontColor(java.awt.Color cursorFontColor)XYStylersetCursorLineWidth(float cursorLineWidth)XYStylersetCustomCursorXDataFormattingFunction(java.util.function.Function<java.lang.Double,java.lang.String> customCursorXDataFormattingFunction)Set the custom function for formatting the cursor tooltip based on the series X-Axis dataXYStylersetCustomCursorYDataFormattingFunction(java.util.function.Function<java.lang.Double,java.lang.String> customCursorYDataFormattingFunction)Set the custom function for formatting the cursor tooltip based on the series Y-Axis dataXYStylersetDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle xySeriesRenderStyle)Sets the default series render style for the chart (line, scatter, area, etc.) You can override the series render style individually on each Series object.voidsetTheme(Theme theme)Set the theme the styler should useXYStylersetZoomEnabled(boolean isZoomEnabled)XYStylersetZoomResetByButton(boolean zoomResetByButton)XYStylersetZoomResetByDoubleClick(boolean zoomResetByDoubleClick)XYStylersetZoomSelectionColor(java.awt.Color zoomSelectionColor)-
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
-
-
-
-
Field Detail
-
xySeriesRenderStyle
private XYSeries.XYSeriesRenderStyle xySeriesRenderStyle
-
isZoomEnabled
private boolean isZoomEnabled
-
zoomSelectionColor
private java.awt.Color zoomSelectionColor
-
zoomResetByDoubleClick
private boolean zoomResetByDoubleClick
-
zoomResetByButton
private boolean zoomResetByButton
-
isCursorEnabled
private boolean isCursorEnabled
-
cursorColor
private java.awt.Color cursorColor
-
cursorLineWidth
private float cursorLineWidth
-
cursorFont
private java.awt.Font cursorFont
-
cursorFontColor
private java.awt.Color cursorFontColor
-
cursorBackgroundColor
private java.awt.Color cursorBackgroundColor
-
customCursorXDataFormattingFunction
private java.util.function.Function<java.lang.Double,java.lang.String> customCursorXDataFormattingFunction
-
customCursorYDataFormattingFunction
private java.util.function.Function<java.lang.Double,java.lang.String> customCursorYDataFormattingFunction
-
-
Method Detail
-
setAllStyles
protected void setAllStyles()
- Overrides:
setAllStylesin classAxesChartStyler
-
setTheme
public void setTheme(Theme theme)
Set the theme the styler should use- Parameters:
theme-
-
getDefaultSeriesRenderStyle
public XYSeries.XYSeriesRenderStyle getDefaultSeriesRenderStyle()
-
setDefaultSeriesRenderStyle
public XYStyler setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle xySeriesRenderStyle)
Sets the default series render style for the chart (line, scatter, area, etc.) You can override the series render style individually on each Series object.- Parameters:
xySeriesRenderStyle-
-
isZoomEnabled
public boolean isZoomEnabled()
-
setZoomEnabled
public XYStyler setZoomEnabled(boolean isZoomEnabled)
-
getZoomSelectionColor
public java.awt.Color getZoomSelectionColor()
-
setZoomSelectionColor
public XYStyler setZoomSelectionColor(java.awt.Color zoomSelectionColor)
-
isZoomResetByDoubleClick
public boolean isZoomResetByDoubleClick()
-
setZoomResetByDoubleClick
public XYStyler setZoomResetByDoubleClick(boolean zoomResetByDoubleClick)
-
isZoomResetByButton
public boolean isZoomResetByButton()
-
setZoomResetByButton
public XYStyler setZoomResetByButton(boolean zoomResetByButton)
-
isCursorEnabled
public boolean isCursorEnabled()
-
setCursorEnabled
public XYStyler setCursorEnabled(boolean isCursorEnabled)
-
getCursorColor
public java.awt.Color getCursorColor()
-
setCursorColor
public XYStyler setCursorColor(java.awt.Color cursorColor)
-
getCursorLineWidth
public float getCursorLineWidth()
-
setCursorLineWidth
public XYStyler setCursorLineWidth(float cursorLineWidth)
-
getCursorFont
public java.awt.Font getCursorFont()
-
setCursorFont
public XYStyler setCursorFont(java.awt.Font cursorFont)
-
getCursorFontColor
public java.awt.Color getCursorFontColor()
-
setCursorFontColor
public XYStyler setCursorFontColor(java.awt.Color cursorFontColor)
-
getCursorBackgroundColor
public java.awt.Color getCursorBackgroundColor()
-
setCursorBackgroundColor
public XYStyler setCursorBackgroundColor(java.awt.Color cursorBackgroundColor)
-
getCustomCursorXDataFormattingFunction
public java.util.function.Function<java.lang.Double,java.lang.String> getCustomCursorXDataFormattingFunction()
-
setCustomCursorXDataFormattingFunction
public XYStyler setCustomCursorXDataFormattingFunction(java.util.function.Function<java.lang.Double,java.lang.String> customCursorXDataFormattingFunction)
Set the custom function for formatting the cursor tooltip based on the series X-Axis data- Parameters:
customCursorXDataFormattingFunction-
-
getCustomCursorYDataFormattingFunction
public java.util.function.Function<java.lang.Double,java.lang.String> getCustomCursorYDataFormattingFunction()
-
setCustomCursorYDataFormattingFunction
public XYStyler setCustomCursorYDataFormattingFunction(java.util.function.Function<java.lang.Double,java.lang.String> customCursorYDataFormattingFunction)
Set the custom function for formatting the cursor tooltip based on the series Y-Axis data- Parameters:
customCursorYDataFormattingFunction-
-
-