LegendEntry.java
2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package com.github.mikephil.charting.components;
import android.graphics.DashPathEffect;
import com.github.mikephil.charting.utils.ColorTemplate;
public class LegendEntry {
public LegendEntry() {
}
/**
*
* @param label The legend entry text. A `null` label will start a group.
* @param form The form to draw for this entry.
* @param formSize Set to NaN to use the legend's default.
* @param formLineWidth Set to NaN to use the legend's default.
* @param formLineDashEffect Set to nil to use the legend's default.
* @param formColor The color for drawing the form.
*/
public LegendEntry(String label,
Legend.LegendForm form,
float formSize,
float formLineWidth,
DashPathEffect formLineDashEffect,
int formColor)
{
this.label = label;
this.form = form;
this.formSize = formSize;
this.formLineWidth = formLineWidth;
this.formLineDashEffect = formLineDashEffect;
this.formColor = formColor;
}
/**
* The legend entry text.
* A `null` label will start a group.
*/
public String label;
/**
* The form to draw for this entry.
*
* `NONE` will avoid drawing a form, and any related space.
* `EMPTY` will avoid drawing a form, but keep its space.
* `DEFAULT` will use the Legend's default.
*/
public Legend.LegendForm form = Legend.LegendForm.DEFAULT;
/**
* Form size will be considered except for when .None is used
*
* Set as NaN to use the legend's default
*/
public float formSize = Float.NaN;
/**
* Line width used for shapes that consist of lines.
*
* Set as NaN to use the legend's default
*/
public float formLineWidth = Float.NaN;
/**
* Line dash path effect used for shapes that consist of lines.
*
* Set to null to use the legend's default
*/
public DashPathEffect formLineDashEffect = null;
/**
* The color for drawing the form
*/
public int formColor = ColorTemplate.COLOR_NONE;
}