GraphView offers many options to style your charts individually. The styles are so ordered that they are to the specific modules like the Series, the Legend, the Grid and some general styles. So if you are looking for styling options you have to take a look into these objects.
Hint: New styles are coming by time and not all features are listed here. Please take a look at the API reference documentation, to see all options.
These are options that are general and therefore on the
This title will be displayed above the viewport.
Title font color and size
By default it will use the font of your app theme. You can set the font size and color via the methods:
Label and Grid options
The styles regarding the labels and the grid belong to the GridLabelRenderer, which you can access via
There are many options:
- Horizontal and Vertical Axis Titles, colors and font size
- Use a fixed count of horizontal/vertical labels that will be generated
- Show/Hide horizontal/vertical labels
- Labels color for horizontal, vertical and the second scale axis
- Labels text alignment
- Label Formatter. Get more information about Labels and label formatter.
- Highlight zero lines. This is a flag whether the line for zero points (Y=0 or X=0) should be highlighted with a more fat line.
- Grid color
- Grid Style. It's possible to define the grid style. You can choose between HORIZONTAL, VERTICAL and BOTH or NONE direction grid lines.
Viewport options are about the what you actually see in the area where the data gets plotted.
You can set the options to the
Set Manual or Automatic axis bounds
To set manual bounds you use setMinX(), setMaxX(), setMinY(), setMaxY() and you have to flag it via
Set whether is is scalable and scrollable
To change the legend options you use the graphView.getLegendRenderer() object. The most important options is this:
Find more information about Legend here.
Some options are related to the series, so you set them at the Series object. The most options are related to the type of the series and so you have to take a deeper look at the specific types here.
This are the general options regardless of the type:
- OnDataPointTapListener. Get more information about Tap listener on data.