public abstract class

ChartType

extends Object
java.lang.Object
   ↳ com.artfulbits.aiCharts.Base.ChartType
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Represents base class for building different chart types.

Summary

Fields
public static final ChartCustomAttribute<Float> DEFAULT_POINT_WIDTH Represents default point width of bar-base types.
public static final ChartCustomAttribute<Float> POINT_WIDTH Represents point width of bar-base types.
public static final ChartCustomAttribute<Float> SERIES_SPACING Represents spacing between points of bar-base types.
Public Constructors
ChartType()
Initializes a new instance of ChartType.
Public Methods
boolean colorPerPoint()
Indicated whether this chart type requires separate color for each point it draws.
static DoubleRange computeXRange(ChartType type, ChartSeries series)
Calculates range consumed by specified chart type that represents specified series.
static DoubleRange computeYRange(ChartType type, ChartSeries series, int... yIndices)
Calculates range consumed by specified chart type that represents specified series.
abstract void draw(ChartRenderArgs args)
Draws this chart type on surface specified along.
void drawMarkers(ChartRenderArgs args)
Iterates over points collection for this chart type and draws marker for each point that requires it.
String getName()
Provides human-readable representation of this chart type.
CoordinateSystem getRequiredCoordinateSystem()
Gets value indicating coordinate system that this chart type requires to be shown.
Usage[] getRequiredUsages()
Gets value indicating usages that this chart type requires to be shown.
DoubleRange getXRange(ChartSeries series)
Gets range that this chart type will consume having specified series.
DoubleRange getYRange(ChartSeries series)
Gets range that this chart type will consume having specified series.
static boolean isCompatible(ChartType type1, ChartType type2)
Determines whether two chart types are compatible.
boolean isCompatible(ChartType type)
Determines whether this chart type can be shown along with passed type on area.
boolean isOriginDependent()
Indicates whether this type depends on axis origin value.
boolean isRotated()
Indicates whether this type requires X and Y axes swapping.
boolean isSideBySide()
Indicated whether this chart type is placed side by side.
boolean isStacked()
Indicates whether it type is stacked.
boolean isStacked100()
Indicated whether this type is stacked to percentage relationship.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final ChartCustomAttribute<Float> DEFAULT_POINT_WIDTH

Represents default point width of bar-base types.

This value should be the same for each series

public static final ChartCustomAttribute<Float> POINT_WIDTH

Represents point width of bar-base types.

This value should be the same for each series

public static final ChartCustomAttribute<Float> SERIES_SPACING

Represents spacing between points of bar-base types.

This value should be the same for each series

Public Constructors

public ChartType ()

Initializes a new instance of ChartType.

Public Methods

public boolean colorPerPoint ()

Indicated whether this chart type requires separate color for each point it draws.

Returns
  • true if this chart type requires color for each point, otherwise false.

public static DoubleRange computeXRange (ChartType type, ChartSeries series)

Calculates range consumed by specified chart type that represents specified series.

Parameters
type instance of consuming type.
series instance of represented ChartSeries class.
Returns

public static DoubleRange computeYRange (ChartType type, ChartSeries series, int... yIndices)

Calculates range consumed by specified chart type that represents specified series.

Parameters
type instance of consuming type.
series series instance of represented ChartSeries class.
yIndices array of values representing zero-based positions of Y values from series' points collection.
Returns

public abstract void draw (ChartRenderArgs args)

Draws this chart type on surface specified along.

Parameters
args instance of ChartRenderArgs that provides facilities to draw this type.

public void drawMarkers (ChartRenderArgs args)

Iterates over points collection for this chart type and draws marker for each point that requires it.

Parameters
args instance of ChartRenderArgs that provides facilities to draw markers for this type.

public String getName ()

Provides human-readable representation of this chart type.

Returns
  • instance of String representing this chart type.

public CoordinateSystem getRequiredCoordinateSystem ()

Gets value indicating coordinate system that this chart type requires to be shown.

Returns

public Usage[] getRequiredUsages ()

Gets value indicating usages that this chart type requires to be shown.

Returns

public DoubleRange getXRange (ChartSeries series)

Gets range that this chart type will consume having specified series.

Parameters
series instance of ChartSeries class.
Returns
  • instance of DoubleRange class that represents required X range.

public DoubleRange getYRange (ChartSeries series)

Gets range that this chart type will consume having specified series.

Parameters
series instance of ChartSeries class.
Returns
  • instance of DoubleRange class that represents required Y range.

public static boolean isCompatible (ChartType type1, ChartType type2)

Determines whether two chart types are compatible.

Parameters
type1 instance of first type.
type2 instance of second type.
Returns
  • true if specified chart types are compatible and can be shown on area together.

public boolean isCompatible (ChartType type)

Determines whether this chart type can be shown along with passed type on area.

Parameters
type instance of ChartType that should be checked for compatibility.
Returns
  • true if specified chart type is compatible which current.

public boolean isOriginDependent ()

Indicates whether this type depends on axis origin value.

Returns
  • true if chart type consumes value of origin to draw, otherwise false.

public boolean isRotated ()

Indicates whether this type requires X and Y axes swapping.

Returns
  • true if this chart type is rotated, otherwise false.

public boolean isSideBySide ()

Indicated whether this chart type is placed side by side.

Returns
  • true if chart type is side by side, otherwise false.

public boolean isStacked ()

Indicates whether it type is stacked. Stacked charts show the relationship of parts to the whole. Stacked charts offer similar complexity to clustered series by adding together component value items within or area.

Returns
  • true if this type is stacked, otherwise false.

public boolean isStacked100 ()

Indicated whether this type is stacked to percentage relationship. Series are stacked on top of each other, adding up to 100%. Each series' segment represents the percentage that the value contributes to the sum of the values for that category.

Returns
  • true is this chart type is 100% stacked, otherwise false.