public abstract class

ChartPointAttributes

com.artfulbits.aiCharts.Base.ChartPointAttributes
Known Direct Subclasses

Class Overview

Represents attributes class.

XML Attributes
backgroundDefines background resource
filterDefines whether color filter is enabled
markerDefines marker resource
markersizeDefines marker size
showlabelDefines whether labels is shown
colorDefines background color
borderDefines border color
linewidthDefines line/border width
halignDefines labels horizontal alignment
valignDefines labels vertical alignment

Summary

Public Constructors
ChartPointAttributes()
Constructor.
ChartPointAttributes(ChartPointAttributes pointAttributes)
Constructor.
Public Methods
<TValue> TValue getAttribute(ChartCustomAttribute<TValue> attribute)
Gets the attribute.
int getBackColor()
Gets color.
Drawable getBackDrawable()
Sets the drawable used to draw this element.
int getBorderColor()
Gets the color of element's border.
Alignment getHLabelAlignment()
Gets the horizontal alignment for this element's label.
String getLabel()
Gets the string representation of label.
Float getLabelAngle()
Gets rotation angle of labels
Drawable getLabelBackground()
Gets Drawable used to draw background of label of point.
String getLabelFormat()
Gets label formatting string.
Integer getLabelPadding()
Gets padding for label of this element.
int getLineWidth()
Gets the line width.
Drawable getMarkerDrawable()
Gets drawable that is used to draw the marker of this element.
Point getMarkerSize()
This method is deprecated. use Drawable.getIntrinsicWidth/getIntrinsicHeight
Paint getPaint()
Gets instance of Paint object used to draw chart.
PathEffect getPathEffect()
This method is deprecated. getPaint()
boolean getShowLabel()
Gets value indicating whether label should be shown for this element.
Object getTag()
Gets the tag.
Paint getTextPaint()
Gets instance of Paint object used to draw text.
Alignment getVLabelAlignment()
Gets the vertical alignment for element's label.
boolean isBackFilterEnabled()
Gets value indicating whether point's color is to be drawn on top of specified point's drawbale.
void reset()
Clear values of all attributes.
void resetAttribute(ChartCustomAttribute<?> attribute)
Reset the attribute.
<TValue> void setAttribute(ChartCustomAttribute<TValue> attribute, TValue value)
Sets the attribute.
void setBackColor(Integer color)
Sets the color.
void setBackDrawable(Drawable drawable)
Gets the drawable that is used to draw this element.
void setBackFilterEnabled(Boolean value)
Sets value indicating whether point's color is to be drawn on top of specified point's drawbale.
void setBorderColor(Integer color)
Sets the color of element's border.
void setHLabelAlignment(Alignment alignment)
Sets the horizontal alignment for element's label.
void setLabel(String label)
Sets the string representation of label.
void setLabelAngle(Float angle)
Sets rotation angle of labels
void setLabelBackground(Drawable drawable)
Sets Drawable used to draw background of label of point.
void setLabelFormat(String pattern)
Sets the advanced label formatting string for the data point.
void setLabelPadding(Integer padding)
Sets padding for label of this element.
void setLineWidth(Integer width)
Sets the line width.
void setMarkerDrawable(Drawable drawable)
Gets drawable that is used to draw the marker of this element.
void setMarkerPaint(Paint paint)
Sets instance of Paint object used to draw text.
void setMarkerSize(Point size)
This method is deprecated. use Drawable.getIntrinsicWidth/getIntrinsicHeight
void setPaint(Paint paint)
Sets instance of Paint object used to draw chart.
void setPathEffect(PathEffect effect)
This method is deprecated. setPaint(Paint)
void setShowLabel(Boolean value)
Gets value indicating whether label should be shown for this element.
void setTag(Object tag)
Sets the tag.
void setTextPaint(Paint paint)
Sets instance of Paint object used to draw text.
void setVLabelAlignment(Alignment alignment)
Sets the vertical alignment for element's label.

Public Constructors

public ChartPointAttributes ()

Constructor. Creates a new ChartPointAttributes.

public ChartPointAttributes (ChartPointAttributes pointAttributes)

Constructor. Creates a new ChartPointAttributes, initialized with the attributes in the specified pointAttributes parameter.

Parameters
pointAttributes - Existing ChartPointAttributes used to initialized the attributes of the new ChartPointAttributes.

Public Methods

public TValue getAttribute (ChartCustomAttribute<TValue> attribute)

Gets the attribute.

Parameters
attribute instance of previously set attribute.
Returns
  • value of attribute.

public int getBackColor ()

Gets color.

Returns
  • value of color

public Drawable getBackDrawable ()

Sets the drawable used to draw this element.

Returns
  • instance of Drawable used to draw this element.

public int getBorderColor ()

Gets the color of element's border.

Returns
  • value of color.

public Alignment getHLabelAlignment ()

Gets the horizontal alignment for this element's label.

Returns

public String getLabel ()

Gets the string representation of label.

Returns
See Also

public Float getLabelAngle ()

Gets rotation angle of labels

Returns
  • angle rotation angle.

public Drawable getLabelBackground ()

Gets Drawable used to draw background of label of point.

public String getLabelFormat ()

Gets label formatting string.

Returns
  • instance of String that is used to format labels.

public Integer getLabelPadding ()

Gets padding for label of this element.

Returns
  • value of padding.

public int getLineWidth ()

Gets the line width.

Returns
  • current width of line.

public Drawable getMarkerDrawable ()

Gets drawable that is used to draw the marker of this element.

Returns

public Point getMarkerSize ()

This method is deprecated.
use Drawable.getIntrinsicWidth/getIntrinsicHeight

Gets size of marker for this element.

Returns
  • instance of Point representing marker size.
See Also

public Paint getPaint ()

Gets instance of Paint object used to draw chart.

Returns
  • instance of Paint object used to draw chart. Default - null.

public PathEffect getPathEffect ()

This method is deprecated.
getPaint()

Gets the line path effect.

Returns

public boolean getShowLabel ()

Gets value indicating whether label should be shown for this element.

Returns
  • true if label should be shown for point, otherwise false.

public Object getTag ()

Gets the tag.

Returns
  • value of tag.
See Also

public Paint getTextPaint ()

Gets instance of Paint object used to draw text.

Returns
  • instance of Paint object used to draw text.

public Alignment getVLabelAlignment ()

Gets the vertical alignment for element's label.

Returns

public boolean isBackFilterEnabled ()

Gets value indicating whether point's color is to be drawn on top of specified point's drawbale.

Returns
  • true if point's color is to be drawn on top of specified point's drawable, otherwise false.

public void reset ()

Clear values of all attributes.

public void resetAttribute (ChartCustomAttribute<?> attribute)

Reset the attribute.

Parameters
attribute instance of previously set attribute.

public void setAttribute (ChartCustomAttribute<TValue> attribute, TValue value)

Sets the attribute.

Parameters
attribute instance of ChartCustomAttribute class.
value value of attribute.

public void setBackColor (Integer color)

Sets the color.

Parameters
color color to draw point.
See Also

public void setBackDrawable (Drawable drawable)

Gets the drawable that is used to draw this element.

Parameters
drawable instance of Drawable used to draw this element.

public void setBackFilterEnabled (Boolean value)

Sets value indicating whether point's color is to be drawn on top of specified point's drawbale.

public void setBorderColor (Integer color)

Sets the color of element's border.

Parameters
color value of color for border.
See Also

public void setHLabelAlignment (Alignment alignment)

Sets the horizontal alignment for element's label.

Parameters
alignment instance of desired alignment.

public void setLabel (String label)

Sets the string representation of label.

Parameters
label String label value.
See Also

public void setLabelAngle (Float angle)

Sets rotation angle of labels

Parameters
angle rotation angle.

public void setLabelBackground (Drawable drawable)

Sets Drawable used to draw background of label of point.

Parameters
drawable instance of Drawable class that should be used to draw background of label of point.

public void setLabelFormat (String pattern)

Sets the advanced label formatting string for the data point. aiCharts analyzes passed string for formatting keywords.

Parameters
pattern - string analyzed for occurrence keyword substrings.
Keyword format: {PERCENT0,#.##}
"{","}" - identifies start and end of keyword.
"PERCENT" - keyword name. See table below for available keywords.
"0" - optional index of Y value (0 if not specified).
"#.##" - formatting part applied to double values (optional).
"," - identifies that "#.##" format is used.
Available keywords
keyworddescriptionsupports indicesvalue format
LABELlabel of point--
XVALUEX value of point-decimal format
XDATEX date value of point-date format
YVALUEY value of point+decimal format
SERIESNAMEname of series--
INDEXindex of point--
AXISLABELaxis label of point--
PERCENTpercentage of the Y point value+decimal format

public void setLabelPadding (Integer padding)

Sets padding for label of this element.

Parameters
padding value of padding.

public void setLineWidth (Integer width)

Sets the line width.

Parameters
width value of desired width.
See Also

public void setMarkerDrawable (Drawable drawable)

Gets drawable that is used to draw the marker of this element.

Parameters
drawable instance of Drawable.

public void setMarkerPaint (Paint paint)

Sets instance of Paint object used to draw text.

Parameters
paint of Paint object used to draw text.

public void setMarkerSize (Point size)

This method is deprecated.
use Drawable.getIntrinsicWidth/getIntrinsicHeight

Gets the size of marker for this element.

Parameters
size instance of Point representing marker size.
See Also

public void setPaint (Paint paint)

Sets instance of Paint object used to draw chart.

Parameters
paint of Paint object used to draw chart.

public void setPathEffect (PathEffect effect)

This method is deprecated.
setPaint(Paint)

Sets the line path effect.

Parameters
effect PathEffect instance.

public void setShowLabel (Boolean value)

Gets value indicating whether label should be shown for this element.

Parameters
value true if label should be shown for point, otherwise false.
See Also

public void setTag (Object tag)

Sets the tag.

Parameters
tag value of tag.
See Also

public void setTextPaint (Paint paint)

Sets instance of Paint object used to draw text.

Parameters
paint of Paint object used to draw text.

public void setVLabelAlignment (Alignment alignment)

Sets the vertical alignment for element's label.

Parameters
alignment instance of Alignment enumeration that represents the alignment.