org.knowm.xchart.internal.chartpart
Class Axis<ST extends AxesChartStyler,S extends AxesChartSeries>
- java.lang.Object
-
- org.knowm.xchart.internal.chartpart.Axis<ST,S>
-
- All Implemented Interfaces:
- ChartPart
public class Axis<ST extends AxesChartStyler,S extends AxesChartSeries> extends java.lang.Object implements ChartPart
Axis
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classAxis.DirectionAn axis direction
-
Field Summary
-
Fields inherited from interface org.knowm.xchart.internal.chartpart.ChartPart
SOLID_STROKE
-
-
Constructor Summary
Constructors Constructor and Description Axis(Chart<ST,S> chart, Axis.Direction direction, int index)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AxisTickCalculator_getAxisTickCalculator()java.awt.geom.Rectangle2DgetBounds()doublegetChartValue(double screenPoint)Converts a screen coordinate to chart coordinate value.doublegetScreenValue(double chartPoint)Converts a chart coordinate value to screen coordinate.doublegetScreenValueForMax()doublegetScreenValueForMin()intgetYIndex()voidpaint(java.awt.Graphics2D g)voidpreparePaint()voidsetDataType(Series.DataType dataType)
-
-
-
Constructor Detail
-
Axis
public Axis(Chart<ST,S> chart, Axis.Direction direction, int index)
Constructor- Parameters:
chart- the Chartdirection- the axis direction (X or Y)index- the y-axis index (not relevant for x-axes)
-
-
Method Detail
-
preparePaint
public void preparePaint()
-
setDataType
public void setDataType(Series.DataType dataType)
-
getAxisTickCalculator
public AxisTickCalculator_ getAxisTickCalculator()
-
getBounds
public java.awt.geom.Rectangle2D getBounds()
-
getYIndex
public int getYIndex()
-
getScreenValue
public double getScreenValue(double chartPoint)
Converts a chart coordinate value to screen coordinate. Same as AxisTickCalculators calculation.- Parameters:
chartPoint- value in chart coordinate system- Returns:
- Coordinate of screen. eg: MouseEvent.getX(), MouseEvent.getY()
-
getScreenValueForMin
public double getScreenValueForMin()
-
getScreenValueForMax
public double getScreenValueForMax()
-
getChartValue
public double getChartValue(double screenPoint)
Converts a screen coordinate to chart coordinate value. Reverses the AxisTickCalculators calculation.- Parameters:
screenPoint- Coordinate of screen. eg: MouseEvent.getX(), MouseEvent.getY()- Returns:
- value in chart coordinate system
-
-
DataMelt 3.0 © DataMelt by jWork.ORG