Documentation of 'org.knowm.xchart.internal.chartpart.Axis' Java class
Axis
org.knowm.xchart.internal.chartpart

Class Axis<ST extends AxesChartStyler,S extends AxesChartSeries>

    • Constructor Detail

      • Axis

        public Axis(Chart<ST,S> chart,
                    Axis.Direction direction,
                    int index)
        Constructor
        Parameters:
        chart - the Chart
        direction - the axis direction (X or Y)
        index - the y-axis index (not relevant for x-axes)
    • Method Detail

      • preparePaint

        public void preparePaint()
      • paint

        public void paint(java.awt.Graphics2D g)
        Specified by:
        paint in interface ChartPart
      • getBounds

        public java.awt.geom.Rectangle2D getBounds()
        Specified by:
        getBounds in interface ChartPart
      • 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

Ads help maintain this website.