public final class

ChartAxisStripLine

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

Class Overview

Represents axis strip line class. Strip lining allows easily apply horizontal or vertical bands behind data spaced at periodic intervals. Striplines give user an additional visual cue that adds to their understanding of the information the chart presents.

Since stripline is connected to ChartAxis, it should be added to axis strilpines collection:

 // Creating stripline 0.5 units width that is repeated each 1 unit.
 ChartAxisStripLine stripline = new ChartAxisStripLine(0.5, 1);
 // Adding stripline to striplines collection.
 area.getDefaultXAxis().getStripLines().add(stripline);
 

Summary

Public Constructors
ChartAxisStripLine()
Initializes new instance of ChartAxisStripLine.
ChartAxisStripLine(double width, double period)
Initializes new instance of ChartAxisStripLine with specified parameters.
Public Methods
Drawable getBackground()
Gets the background used to draw the stripline.
int getColor()
This method is deprecated. getBackground()
double getEnd()
Gets the axis dependent value indicating ending position of stripline.
Alignment getHorizontalAlignment()
Gets the horizontal alignment for the text.
double getPeriod()
Gets the period used to repeat stripline for parent ChartAxis.
double getStart()
Gets the axis dependent value indicating starting position of stripline.
String getText()
Gets the stripline text.
float getTextAngle()
Gets text angle.
Paint getTextPaint()
Gets TextPaint object that will be used to draw the text.
Alignment getVerticalAlignment()
Gets the vertical alignment for the text.
double getWidth()
Gets the width of stripline in axis dependent units.
void setAlignment(Alignment horizontalAlignment, Alignment verticalAlignment)
Sets both the vertical and horizontal alignment for the text.
void setBackground(Drawable background)
Sets the background used to draw the stripline.
void setColor(int color)
This method is deprecated. setBackground(Drawable)
void setEnd(double end)
Sets the axis dependent value indicating ending position of stripline.
void setHorizontalAlignment(Alignment alignment)
Sets the horizontal alignment for the text.
void setPeriod(double period)
Gets the period used to repeat stripline for parent ChartAxis.
void setStart(double start)
Sets the axis dependent value indicating starting position of stripline.
void setText(String text)
Sets the stripline text.
void setTextAngle(float angle)
Sets text angle.
void setVerticalAlignment(Alignment alignment)
Sets the vertical alignment for the text.
void setWidth(double width)
Sets the width of stripline in axis dependent units.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ChartAxisStripLine ()

Initializes new instance of ChartAxisStripLine. Strip line should be added to chart axis in order to participate in rendering process.

public ChartAxisStripLine (double width, double period)

Initializes new instance of ChartAxisStripLine with specified parameters. Strip line should be added to chart axis in order to participate in rendering process.

Parameters
width width of stripline in axis depended units.
period period value that is used to repeat striplines.

Public Methods

public Drawable getBackground ()

Gets the background used to draw the stripline.

Returns
  • instance of Drawable that participated in drawing stripline.
See Also

public int getColor ()

This method is deprecated.
getBackground()

Gets the color used to draw the stripline.

Returns
  • integer value of stripline color.

public double getEnd ()

Gets the axis dependent value indicating ending position of stripline.

Returns
  • stripline ending value position.

public Alignment getHorizontalAlignment ()

Gets the horizontal alignment for the text.

Returns
  • instance of Alignment enumeration containing current alignment value.

public double getPeriod ()

Gets the period used to repeat stripline for parent ChartAxis.

Returns
  • value of current period used to draw the stripline.

public double getStart ()

Gets the axis dependent value indicating starting position of stripline.

Returns
  • value starting position.
See Also

public String getText ()

Gets the stripline text.

Returns
  • value of stripline text.

public float getTextAngle ()

Gets text angle.

Returns
  • angle in degrees.

public Paint getTextPaint ()

Gets TextPaint object that will be used to draw the text.

Returns
  • instance of TextPaint object that will be used to draw the text.

public Alignment getVerticalAlignment ()

Gets the vertical alignment for the text.

Returns
  • instance of Alignment enumeration containing current alignment value.

public double getWidth ()

Gets the width of stripline in axis dependent units.

Returns
  • width of stripline.
See Also

public void setAlignment (Alignment horizontalAlignment, Alignment verticalAlignment)

Sets both the vertical and horizontal alignment for the text.

Parameters
horizontalAlignment instance of Alignment enumeration containing desired alignment value.
verticalAlignment instance of Alignment enumeration containing desired alignment value.

public void setBackground (Drawable background)

Sets the background used to draw the stripline.

Parameters
background instance of Drawable that will participate in drawing stripline.
See Also
  • #setBackgroundColor(int)

public void setColor (int color)

This method is deprecated.
setBackground(Drawable)

Sets the color used to draw the stripline.

Parameters
color integer value desired stripline color.

public void setEnd (double end)

Sets the axis dependent value indicating ending position of stripline.

Parameters
end stripline ending value position.
See Also

public void setHorizontalAlignment (Alignment alignment)

Sets the horizontal alignment for the text.

Parameters
alignment instance of Alignment enumeration containing desired alignment value.

public void setPeriod (double period)

Gets the period used to repeat stripline for parent ChartAxis.

Parameters
period value of desired period used to repeat the stripline.

public void setStart (double start)

Sets the axis dependent value indicating starting position of stripline.

Parameters
start staring position of stripline.

public void setText (String text)

Sets the stripline text.

Parameters
text text for this stripline.

public void setTextAngle (float angle)

Sets text angle.

Parameters
angle value in degrees.

public void setVerticalAlignment (Alignment alignment)

Sets the vertical alignment for the text.

Parameters
alignment instance of Alignment enumeration containing desired alignment value.

public void setWidth (double width)

Sets the width of stripline in axis dependent units.

Parameters
width value of stripline width.
See Also