public class

Title

extends TextView
java.lang.Object
   ↳ android.view.View
     ↳ android.widget.TextView
       ↳ com.shinobicontrols.charts.Title

Class Overview

A title object used by the chart and chart axes to display a android.widget.TextView with appropriate text.

The look and feel of titles on the chart is managed by instances of the sub-classes of TitleStyle; the look and feel of the chart title is managed by MainTitleStyle and the look and feel of axis titles is managed by AxisTitleStyle. TitleStyle contains the common styling properties of all titles.

By default, the chart title is displayed above the chart, and the chart canvas makes room for the title. If you wish to update the position of the title, you can use the setPosition(Title.Position) method. This allows you to specify the position of the title relative to the chart. MainTitleStyle also offers you some methods to fine-tune the title appearance. These are:

  • setCentersOn(Title.CentersOn): Allows you to specify whether the title centers on the full chart view, the plot area, or the canvas.
  • setOverlapsChart(boolean): Allows you to specify whether the title overlaps with the chart, or whether the chart canvas makes room for it.
By default, the axes titles are displayed in the center of each axis. If you wish to update the position of the title, you can use the setPosition(Title.Position) method. AxisTitleStyle also allows you to specify the orientation of the axis title to be either horizontal or vertical via the setOrientation(Title.Orientation) method.

Summary

Nested Classes
enum Title.CentersOn Determines what the title is centered on. 
enum Title.Orientation Determines the orientation of the title is positioned, horizontal or vertical. 
enum Title.Position Determines where the title is positioned, relative to the chart or axis. 
[Expand]
Inherited Constants
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Protected Methods
void onDraw(Canvas canvas)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
[Expand]
Inherited Methods
From class android.widget.TextView
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewTreeObserver.OnPreDrawListener
From interface android.view.accessibility.AccessibilityEventSource

Protected Methods

protected void onDraw (Canvas canvas)

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)