public final class

ChartRenderArgs

extends Object
java.lang.Object
   ↳ com.artfulbits.aiCharts.Base.ChartRenderArgs

Class Overview

Represent render arguments class. Instance of this class is created internally by aiChart building engine in order to pass rendering parameters to concerned elements.

Summary

Fields
public final ChartAxis ActualXAxis Instance of ChartAxis class representing actual X axis for currently drawing chart type.
public final ChartAxis ActualYAxis Instance of ChartAxis class representing actual Y axis for currently drawing chart type.
public final ChartArea Area Instance of ChartArea class represented by this drawing.
public final Rect Bounds Instance of RectF class representing drawing bounds.
public final Canvas Canvas Instance of Canvas class that should be used to draw corresponding object on.
public final ChartEngine Chart Instance of ChartEngine class represented by this drawing.
public final boolean IsRegionEnabled Identifies whether region calculations is enabled.
public final boolean IsRotated Indicated whether this is rotated drawing.
public final ChartSeries Series Instance of ChartSeries class.
public final CoordinateSystem System Instance of coordinate system represented by this drawing.
public final ChartType Type Instance of ChartType class represented by this drawing.
public final ChartAxis XAxis Instance of ChartAxis class.
public final ChartAxis YAxis Instance of ChartAxis class.
Public Methods
void addRegion(RectF rect, Object tag)
Adds the specified path region to chart's region for further hit testing.
void addRegion(Rect rect, Object tag)
Adds the specified path region to chart's region for further hit testing.
void addRegion(Path path, Rect bounds, Object tag)
Adds the specified path region to chart's region for further hit testing.
static ChartRenderArgs create(Canvas canvas, ChartSeries series, Rect bounds)
Creates a new instance of ChartRenderArgs class with specified parameters.
PointF getPoint(double x, double y)
Gets PointF point converted relatively to current coordinate system.
void getPoint(double x, double y, PointF outPoint)
Fills outPoint with values relative to current chart type.
void getRect(double x1, double y1, double x2, double y2, RectF rect)
Fills rectangle with values converted relatively to current coordinate system.
RectF getRect(double x1, double y1, double x2, double y2)
Gets rectangle with values converted relatively to current coordinate system.
DoubleRange getSideBySideOffset()
Gets offset for side by side chart types.
static DoubleRange getSideBySideOffset(ChartSeries series, ChartType seriesType, ChartArea area)
Gets side by side offset for specified parameters.
double getStackedValue(ChartPoint point, int yIndex, boolean high)
Gets stacked point.
static double getStackedValue(ChartArea area, ChartSeries series, ChartPoint point, int yIndex, boolean high)
Gets stacked value for specified parameters.
boolean isVisible(float x1, float y1, float x2, float y2)
Determined whether specified area is visible within current bounds.
boolean isVisible(float x, float y)
Determined whether point is visible within current bounds.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public final ChartAxis ActualXAxis

Instance of ChartAxis class representing actual X axis for currently drawing chart type.

public final ChartAxis ActualYAxis

Instance of ChartAxis class representing actual Y axis for currently drawing chart type.

public final ChartArea Area

Instance of ChartArea class represented by this drawing.

public final Rect Bounds

Instance of RectF class representing drawing bounds.

public final Canvas Canvas

Instance of Canvas class that should be used to draw corresponding object on.

public final ChartEngine Chart

Instance of ChartEngine class represented by this drawing.

public final boolean IsRegionEnabled

Identifies whether region calculations is enabled.

public final boolean IsRotated

Indicated whether this is rotated drawing.

public final ChartSeries Series

Instance of ChartSeries class. May be null depending on object that uses ChartRenderArgs.

public final CoordinateSystem System

Instance of coordinate system represented by this drawing.

public final ChartType Type

Instance of ChartType class represented by this drawing.

public final ChartAxis XAxis

Instance of ChartAxis class. May be null depending on object that uses ChartRenderArgs.

public final ChartAxis YAxis

Instance of ChartAxis class. May be null depending on object that uses ChartRenderArgs.

Public Methods

public void addRegion (RectF rect, Object tag)

Adds the specified path region to chart's region for further hit testing.

Parameters
rect instance of Rect class representing bounds of object.
tag region represented by object.

public void addRegion (Rect rect, Object tag)

Adds the specified path region to chart's region for further hit testing.

Parameters
rect instance of Rect class representing bounds of object.
tag region represented by object.

public void addRegion (Path path, Rect bounds, Object tag)

Adds the specified path region to chart's region for further hit testing.

Parameters
path instance of Path class representing region object.
bounds instance of Rect class representing bounds of object.
tag region represented by object.

public static ChartRenderArgs create (Canvas canvas, ChartSeries series, Rect bounds)

Creates a new instance of ChartRenderArgs class with specified parameters.

Parameters
canvas instance of Canvas class that should be used to draw on.
series instance of corresponding ChartSeries class.
bounds instance of RectF class representing drawing area.
Returns
  • Instance of ChartRenderArgs

public PointF getPoint (double x, double y)

Gets PointF point converted relatively to current coordinate system.

Parameters
x Absolute X value.
y Absolute Y value.
Returns
  • instance of point with converted X and Y values.

public void getPoint (double x, double y, PointF outPoint)

Fills outPoint with values relative to current chart type.

Parameters
x Absolute X value.
y Absolute Y value.
outPoint instance of PointF class.

public void getRect (double x1, double y1, double x2, double y2, RectF rect)

Fills rectangle with values converted relatively to current coordinate system.

Parameters
x1 left value of target absolute rectangle.
y1 bottom value of target absolute rectangle.
x2 right value of target absolute rectangle.
y2 top value of target absolute rectangle.
rect target rectangle.

public RectF getRect (double x1, double y1, double x2, double y2)

Gets rectangle with values converted relatively to current coordinate system.

Parameters
x1 left value of target absolute rectangle.
y1 bottom value of target absolute rectangle.
x2 right value of target absolute rectangle.
y2 top value of target absolute rectangle.
Returns
  • instance of rectangle filled with converted values.

public DoubleRange getSideBySideOffset ()

Gets offset for side by side chart types.

Returns
  • instance of DoubleRange representing side by side offset.

public static DoubleRange getSideBySideOffset (ChartSeries series, ChartType seriesType, ChartArea area)

Gets side by side offset for specified parameters.

Parameters
series instance of target series.
seriesType instance of target chart type.
area instance of target area.
Returns
  • instance of DoubleRange representing side by side offset.

public double getStackedValue (ChartPoint point, int yIndex, boolean high)

Gets stacked point. Actual for stacked chart types.

Parameters
point instance of ChartPoint class.
yIndex index of target Y value.
high true if value is considered to be high, otherwise false.
Returns
  • value representing point in stacked mode.

public static double getStackedValue (ChartArea area, ChartSeries series, ChartPoint point, int yIndex, boolean high)

Gets stacked value for specified parameters. Actual for stacked chart types.

Parameters
area instance of target area.
series instance of target series.
point instance of target point.
yIndex index of concerned Y value.
high true for high values, otherwise false.
Returns
  • stacked value.

public boolean isVisible (float x1, float y1, float x2, float y2)

Determined whether specified area is visible within current bounds.

Parameters
x1 left value of target area.
y1 bottom value of target area.
x2 right value of target area.
y2 top value of target area.
Returns
  • true if specified area is visible, otherwise false.

public boolean isVisible (float x, float y)

Determined whether point is visible within current bounds.

Parameters
x point's X value.
y point's Y value.
Returns
  • true if specified point is visible, otherwise false.