public final class

LegendStyle

extends Object
java.lang.Object
   ↳ com.shinobicontrols.charts.LegendStyle

Class Overview

Visual style properties for the chart's Legend. If you make any styling changes after the chart has been displayed, you should call chart.redrawChart().

Summary

Public Constructors
LegendStyle()
Public Methods
boolean areSymbolsShown()
Should the legend show symbols next to the series titles?
int getBackgroundColor()
Returns the color of the background of the legend
int getBorderColor()
Returns the color of the border line of the legend.
float getBorderWidth()
Returns the width of the border, in device independent pixels
float getCornerRadius()
Returns the radius of the corners of the legend, in device independent pixels
float getPadding()
Returns the amount of padding, around the inside perimeter of the legend, in device independent pixels
float getRowVerticalMargin()
Returns the vertical margin between rows in the legend, in device independent pixels.
Legend.SymbolAlignment getSymbolAlignment()
Returns where the symbols are drawn, when areSymbolsShown() is true.
float getSymbolCornerRadius()
Returns the radius of the corners of the legend symbols.
float getSymbolLabelGap()
Returns the gap between the symbol and the label representing a chart series in the legend, and also between different series within a row.
float getSymbolWidth()
Returns the width that each symbol in the legend has, in device independent pixels
int getTextAlignment()
Returns the alignment of the series titles.
int getTextColor()
Returns the color of the text used to display the series titles.
float getTextSize()
Returns the text size for the series titles, in scaled pixels.
float getTitleMargin()
Gets the margin value of the legend title label.
float getTitlePadding()
Gets the padding value of the legend title label.
int getTitleTextColor()
Returns the color for the legend title text.
float getTitleTextSize()
Returns the text size for the legend title text, in scaled pixels.
Typeface getTitleTypeface()
Returns the type face for the legend title.
Typeface getTypeface()
Returns the type face used for series titles within the legend.
void setBackgroundColor(int backgroundColor)
Sets the color for the background of the legend
void setBorderColor(int borderColor)
Sets the color of the border line for the legend.
void setBorderWidth(float borderWidth)
Sets the width of the legend border, in device independent pixels
void setCornerRadius(float cornerRadius)
Sets the radius for the corners of the legend, in device independent pixels
void setPadding(float padding)
Sets the amount of padding, around the inside perimeter of the legend, in device independent pixels
void setRowVerticalMargin(float rowVerticalMargin)
Sets the vertical margin between rows in the legend, in device independent pixels.
void setSymbolAlignment(Legend.SymbolAlignment symbolAlignment)
Sets where the symbols are drawn, when areSymbolsShown() is true.
void setSymbolCornerRadius(float symbolCornerRadius)
Sets the radius for the corners of the legend symbols.
void setSymbolLabelGap(float symbolLabelGap)
Sets the gap between the symbol and the label representing a chart series in the legend, and also between different series within a row.
void setSymbolWidth(float symbolWidth)
Sets the width that each symbol in the legend should have, in device independent pixels
void setSymbolsShown(boolean showSymbols)
Sets whether the legend should show symbols next to the series titles
void setTextAlignment(int textAlignment)
Sets the alignment of the series titles.
void setTextColor(int textColor)
Sets the color of the text used to display the series titles.
void setTextSize(float textSize)
Sets the text size for the series titles, in scaled pixels.
void setTitleMargin(float margin)
Sets the margin value of the legend title label.
void setTitlePadding(float padding)
Sets the padding value of the legend title label.
void setTitleTextColor(int titleTextColor)
Sets the color for the legend title text.
void setTitleTextSize(float titleTextSize)
Sets the text size for the legend title text, in scaled pixels.
void setTitleTypeface(Typeface titleTypeface)
Sets the type face for the legend title.
void setTypeface(Typeface typeface)
Sets the type face used for series titles within the legend.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LegendStyle ()

Public Methods

public boolean areSymbolsShown ()

Should the legend show symbols next to the series titles?

Returns
  • Whether the symbols are shown next to the series titles in the legend

public int getBackgroundColor ()

Returns the color of the background of the legend

Returns
  • the color of the background of the legend

public int getBorderColor ()

Returns the color of the border line of the legend.

Returns
  • The int representation of the color of the Legend's border

public float getBorderWidth ()

Returns the width of the border, in device independent pixels

Returns
  • The width of the border, in device independent pixels

public float getCornerRadius ()

Returns the radius of the corners of the legend, in device independent pixels

Returns
  • the radius of the corners of the legend, in device independent pixels

public float getPadding ()

Returns the amount of padding, around the inside perimeter of the legend, in device independent pixels

Returns
  • The padding around the inside perimeter of the legend, in device independent pixels

public float getRowVerticalMargin ()

Returns the vertical margin between rows in the legend, in device independent pixels.

Returns
  • the vertical margin between rows in the legend, in device independent pixels

public Legend.SymbolAlignment getSymbolAlignment ()

Returns where the symbols are drawn, when areSymbolsShown() is true.

Returns
  • Where the symbols are drawn

public float getSymbolCornerRadius ()

Returns the radius of the corners of the legend symbols. A radius of 0 will draw square corners.

Returns
  • the radius of the corners of the legend symbols

public float getSymbolLabelGap ()

Returns the gap between the symbol and the label representing a chart series in the legend, and also between different series within a row. In device independent pixels.

Returns
  • the gap between the symbol and the series label in the legend, in device independent pixels

public float getSymbolWidth ()

Returns the width that each symbol in the legend has, in device independent pixels

Returns
  • the width that each symbol in the legend has, in device independent pixels

public int getTextAlignment ()

Returns the alignment of the series titles.

Returns
  • The android.view.Gravity of the series titles

public int getTextColor ()

Returns the color of the text used to display the series titles.

Returns
  • The int representation of the color of the text showing the series titles

public float getTextSize ()

Returns the text size for the series titles, in scaled pixels.

Returns
  • The size of the text for the series titles, in scaled pixels.

public float getTitleMargin ()

Gets the margin value of the legend title label.

Returns
  • The value of the margin of the legend title label, in scaled pixels.

public float getTitlePadding ()

Gets the padding value of the legend title label.

Returns
  • The value of the padding of the legend title label, in scaled pixels.

public int getTitleTextColor ()

Returns the color for the legend title text.

Returns
  • The int representation of the color of the text for the Legend's title

public float getTitleTextSize ()

Returns the text size for the legend title text, in scaled pixels.

Returns
  • The size of the text in the legend title, in scaled pixels.

public Typeface getTitleTypeface ()

Returns the type face for the legend title.

Returns
  • The legend title's type face

public Typeface getTypeface ()

Returns the type face used for series titles within the legend.

Returns
  • the type face for series titles in the Legend

public void setBackgroundColor (int backgroundColor)

Sets the color for the background of the legend

Parameters
backgroundColor the color for the background of the legend

public void setBorderColor (int borderColor)

Sets the color of the border line for the legend.

Parameters
borderColor the int representation of the color for the Legend's border
See Also

public void setBorderWidth (float borderWidth)

Sets the width of the legend border, in device independent pixels

Parameters
borderWidth the width for the legend border, in device independent pixels
See Also

public void setCornerRadius (float cornerRadius)

Sets the radius for the corners of the legend, in device independent pixels

Parameters
cornerRadius the radius for the corners of the legend, in device independent pixels

public void setPadding (float padding)

Sets the amount of padding, around the inside perimeter of the legend, in device independent pixels

Parameters
padding the padding around the inside perimeter of the legend, in device independent pixels
See Also

public void setRowVerticalMargin (float rowVerticalMargin)

Sets the vertical margin between rows in the legend, in device independent pixels.

Parameters
rowVerticalMargin the vertical margin between rows in the legend, in device independent pixels

public void setSymbolAlignment (Legend.SymbolAlignment symbolAlignment)

Sets where the symbols are drawn, when areSymbolsShown() is true.

Parameters
symbolAlignment where the symbols should be drawn

public void setSymbolCornerRadius (float symbolCornerRadius)

Sets the radius for the corners of the legend symbols. Setting a radius of 0 will draw square corners.

Parameters
symbolCornerRadius the radius for the corners of the legend symbols

public void setSymbolLabelGap (float symbolLabelGap)

Sets the gap between the symbol and the label representing a chart series in the legend, and also between different series within a row. In device independent pixels.

Parameters
symbolLabelGap the gap between the symbol and the series label in the legend, in device independent pixels

public void setSymbolWidth (float symbolWidth)

Sets the width that each symbol in the legend should have, in device independent pixels

Parameters
symbolWidth the width that each symbol in the legend should have, in device independent pixels
See Also

public void setSymbolsShown (boolean showSymbols)

Sets whether the legend should show symbols next to the series titles

Parameters
showSymbols whether the legend should show symbols next to the series titles

public void setTextAlignment (int textAlignment)

Sets the alignment of the series titles.

Parameters
textAlignment the android.view.Gravity of the series titles

public void setTextColor (int textColor)

Sets the color of the text used to display the series titles.

Parameters
textColor the int representation of the color of the text showing the series titles
See Also

public void setTextSize (float textSize)

Sets the text size for the series titles, in scaled pixels.

Parameters
textSize the size of the text for the series titles, in scaled pixels
See Also

public void setTitleMargin (float margin)

Sets the margin value of the legend title label.

Parameters
margin The value of the margin of the legend title label, in scaled pixels.
See Also

public void setTitlePadding (float padding)

Sets the padding value of the legend title label.

Parameters
padding The value of the padding of the legend title label, in scaled pixels.

public void setTitleTextColor (int titleTextColor)

Sets the color for the legend title text.

Parameters
titleTextColor the int representation of the color of the text for the Legend's title

public void setTitleTextSize (float titleTextSize)

Sets the text size for the legend title text, in scaled pixels.

Parameters
titleTextSize the size of the text in the legend title, in scaled pixels.

public void setTitleTypeface (Typeface titleTypeface)

Sets the type face for the legend title.

Parameters
titleTypeface the legend title's type face

public void setTypeface (Typeface typeface)

Sets the type face used for series titles within the legend.

Parameters
typeface The type face for series titles in the legend
See Also