Summ:  Fields Constr. Methods    Details:  Fields Constr. Methods      Class:  Prev Next
com.artfulbits.aiCharts.Base
Class ChartType

java.lang.Object com.artfulbits.aiCharts.Base.ChartType

Declaration: public abstract class ChartType extends Object
Direct Subclasses: ChartAreaType, ChartBubbleType, ChartCandleStickType, ChartColumnType, ChartFastLineType, ChartFunnelType, ChartHiLoOpenCloseType, ChartHiLoType, ChartLineType, ChartPieType, ChartPointType, ChartPyramidType, ChartRangeAreaType, ChartRangeColumnType, ChartRoseType, ChartSplineType, ChartStackedAreaType, ChartStackedColumnType, ChartStepAreaType, ChartStepLineType

 

Represents base class for building different chart types.

 

Since: 1.0

 

 

Fields Summary
static ChartCustomAttribute<java.lang.Float> POINT_WIDTH
    
Represents point width of bar-base types.

 

 

Constructors Summary
ChartType()
    
Initializes a new instance of ChartType.

 

 

Methods Summary
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.
abstract java.lang.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.
ChartPointDeclaration.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.
boolean isCompatible(ChartType type)
    
Determines whether this chart type can be shown along with passed type on area.
static boolean isCompatible(ChartType type1, ChartType type2)
    
Determines whether two chart types are compatible.
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.

 

Methods inherited from class: java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

 

 

 

POINT_WIDTH

 

public static final ChartCustomAttribute<java.lang.Float> POINT_WIDTH

 

Represents point width of bar-base types.

This value should be the same for each series

 

Since: 1.0

 

 

 

 

ChartType

 

public ChartType( )

 

Initializes a new instance of ChartType.

 

Since: 1.0

 

 

 

 

isSideBySide

 

public boolean isSideBySide( )

 

Indicated whether this chart type is placed side by side.

 

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

 

Since: 1.0

 

 

 

isStacked

 

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.

 

Since: 1.0

 

 

 

isStacked100

 

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.

 

Since: 1.0

 

 

 

isOriginDependent

 

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.

 

Since: 1.0

 

 

 

isRotated

 

public boolean isRotated( )

 

Indicates whether this type requires X and Y axes swapping.

 

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

 

Since: 1.0

 

 

 

colorPerPoint

 

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.

 

Since: 1.0

 

 

 

getRequiredCoordinateSystem

 

public CoordinateSystem getRequiredCoordinateSystem( )

 

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

 

Returns:
instance of CoordinateSystem enumeration.

 

Since: 1.0

 

 

 

getRequiredUsages

 

public ChartPointDeclaration.Usage[] getRequiredUsages( )

 

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

 

Returns:
array of ChartPointDeclaration.Usage enumerations.

 

Since: 1.0

 

 

 

isCompatible

 

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 wich current.

 

Since: 1.0

 

 

 

draw

 

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.

 

Since: 1.0

 

 

 

drawMarkers

 

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.

 

Since: 1.0
See also: ChartPointAttributes.setShowLabel(Boolean)ChartPointAttributes.setMarkerDrawable(Drawable)

 

 

 

getXRange

 

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.

 

Since: 1.0
See also: getYRange(ChartSeries)

 

 

 

getYRange

 

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.

 

Since: 1.0
See also: getXRange(ChartSeries)

 

 

 

isCompatible

 

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.

 

Since: 1.0

 

 

 

computeXRange

 

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:
instance of DoubleRange representing consumed range.

 

Since: 1.0

 

 

 

computeYRange

 

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:
instance of DoubleRange representing consumed range.

 

Since: 1.0

 

 

 

getName

 

public abstract java.lang.String getName( )

 

Provides human-readable representation of this chart type.

 

Returns:
instance of java.lang.String representing this chart type.

 

Since: 1.5

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.