-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathPieEntryFloat.kt
More file actions
56 lines (43 loc) · 1.5 KB
/
PieEntryFloat.kt
File metadata and controls
56 lines (43 loc) · 1.5 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
package info.appdev.charting.data
import android.annotation.SuppressLint
import android.graphics.drawable.Drawable
import timber.log.Timber
@SuppressLint("ParcelCreator")
open class PieEntryFloat : EntryFloat {
var label: String? = null
constructor(value: Float) : super(0f, value)
constructor(value: Float, data: Any?) : super(0f, value, data)
constructor(value: Float, icon: Drawable?) : super(0f, value, icon)
constructor(value: Float, icon: Drawable?, data: Any?) : super(0f, value, icon, data)
constructor(value: Float, label: String?) : super(0f, value) {
this.label = label
}
constructor(value: Float, label: String?, data: Any?) : super(0f, value, data) {
this.label = label
}
constructor(value: Float, label: String?, icon: Drawable?) : super(0f, value, icon) {
this.label = label
}
constructor(value: Float, label: String?, icon: Drawable?, data: Any?) : super(0f, value, icon, data) {
this.label = label
}
val value: Float
/**
* This is the same as getY(). Returns the value of the PieEntry.
*/
get() = y
@get:Deprecated("")
@set:Deprecated("")
override var x: Float
get() {
Timber.i("Pie entries do not have x values")
return super.x
}
set(x) {
super.x = x
Timber.i("Pie entries do not have x values")
}
override fun copy(): PieEntryFloat {
return PieEntryFloat(y, label, data)
}
}