Constructor. Provide entries for the legend.
Optional
entries: LegendEntry[]the text direction for the legend
flag that indicates if this axis / legend is enabled or not
Defines if the renderer should ensure we always see the component fully
The legend entries array
Entries that will be appended to the end of the auto calculated entries after calculating the legend. (if the legend has already been calculated, you will need to call notifyDataSetChanged() to let the changes take effect)
the shape/form the legend colors are drawn in
Line dash path effect used for shapes that consist of lines.
the size of the legend forms/shapes
the size of the legend forms/shapes
the space between the legend entries on a vertical axis, default 2f private float this.mYEntrySpace = 2f; /** the space between the form and the actual label/text
The maximum relative size out of the whole chart view. / If the legend is to the right/left of the chart, then this affects the width of the legend. / If the legend is to the top/bottom of the chart, then this affects the height of the legend. / If the legend is the center of the piechart, then this defines the size of the rectangular bounds out of the size of the "hole". / default: 0.95f (95%)
Are the legend labels/colors a custom value or auto calculated? If false, then it's auto, if true, then custom. default false (automatic legend)
the total height of the legend (needed height space)
the total width of the legend (needed width space)
Protected
mthe text size of the labels
the space that should be left between stacked forms
the text color to use for the labels
the typeface used for the labels
Should the legend word wrap? / this is currently supported only for: BelowChartLeft, BelowChartRight, BelowChartCenter. / note that word wrapping a legend takes a toll on performance. / you may want to set maxSizePercent when word wrapping, to set the point where the text wraps. / default: false
the space between the legend entries on a horizontal axis, default 6f
the offset in pixels this component has on the x-axis
the space between the legend entries on a vertical axis, default 5f
the offset in pixels this component has on the Y-axis
returns the Typeface used for the labels, returns null if none is set
Font
sets a specific Typeface for the labels
returns the text size that is currently set for the labels, in pixels
sets the size of the label text in density pixels min = 6f, max = 24f, default 10
the text size, in DP
Sets a custom legend's entries array.
Entries that will be appended to the end of the auto calculated entries after calculating the legend. (if the legend has already been calculated, you will need to call notifyDataSetChanged() to let the changes take effect)
Class representing the legend of the chart. The legend will contain one entry per color and DataSet. Multiple colors in one DataSet are grouped together. The legend object is NOT available before setting data to the chart.