Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class CubicLineChartActivity : DemoBase(), OnSeekBarChangeListener {
set1.lineMode = LineDataSet.Mode.CUBIC_BEZIER
set1.cubicIntensity = 0.2f
set1.isDrawFilledEnabled = true
set1.isDrawCirclesEnabled = false
set1.isDrawCircles = false
set1.lineWidth = 1.8f
set1.circleRadius = 4f
set1.setCircleColor(Color.WHITE)
Expand Down Expand Up @@ -169,7 +169,7 @@ class CubicLineChartActivity : DemoBase(), OnSeekBarChangeListener {
R.id.actionToggleCircles -> {
binding.chart1.lineData.dataSets?.forEach {
val set = it as LineDataSet
set.isDrawCirclesEnabled = !set.isDrawCirclesEnabled
set.isDrawCircles = !set.isDrawCircles
}
binding.chart1.invalidate()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class FilledLineActivity : DemoBase() {

set1.axisDependency = YAxis.AxisDependency.LEFT
set1.color = Color.rgb(255, 241, 46)
set1.isDrawCirclesEnabled = false
set1.isDrawCircles = false
set1.lineWidth = 2f
set1.circleRadius = 3f
set1.fillAlpha = 255
Expand All @@ -120,7 +120,7 @@ class FilledLineActivity : DemoBase() {
set2 = LineDataSet(valuesArray2, "DataSet 2")
set2.axisDependency = YAxis.AxisDependency.LEFT
set2.color = Color.rgb(255, 241, 46)
set2.isDrawCirclesEnabled = false
set2.isDrawCircles = false
set2.lineWidth = 2f
set2.circleRadius = 3f
set2.fillAlpha = 255
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class GradientActivity : DemoBase() {

val dataSet = LineDataSet(entries, "Linear").apply {
isDrawValues = false
isDrawCirclesEnabled = false
isDrawCircles = false
lineWidth = 2f

isDrawFilledEnabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class InvertedLineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartVa

R.id.actionToggleCircles -> {
binding.chart1.data?.dataSets?.forEach { set ->
set.isDrawCirclesEnabled = !set.isDrawCirclesEnabled
set.isDrawCircles = !set.isDrawCircles
}
binding.chart1.invalidate()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class LineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelec

R.id.actionToggleCircles -> {
binding.chart1.data?.dataSets?.map { it as LineDataSet }?.forEach { set ->
set.isDrawCirclesEnabled = !set.isDrawCirclesEnabled
set.isDrawCircles = !set.isDrawCircles
}
binding.chart1.invalidate()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class LineChartDualAxisActivity : DemoBase(), OnSeekBarChangeListener, OnChartVa

R.id.actionToggleCircles -> {
binding.chart1.data?.dataSets?.forEach { set ->
set.isDrawCirclesEnabled = !set.isDrawCirclesEnabled
set.isDrawCircles = !set.isDrawCircles
}
binding.chart1.invalidate()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class LineChartTimeActivity : DemoBase(), OnSeekBarChangeListener {
set1.color = holoBlue
set1.valueTextColor = holoBlue
set1.lineWidth = 1.5f
set1.isDrawCirclesEnabled = false
set1.isDrawCircles = false
set1.isDrawValues = false
set1.fillAlpha = 65
set1.fillColor = holoBlue
Expand Down Expand Up @@ -181,7 +181,7 @@ class LineChartTimeActivity : DemoBase(), OnSeekBarChangeListener {

R.id.actionToggleCircles -> {
binding.chart1.data?.dataSets?.forEach { set ->
set.isDrawCirclesEnabled = !set.isDrawCirclesEnabled
set.isDrawCircles = !set.isDrawCircles
}
binding.chart1.invalidate()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class MultiLineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartGestu
R.id.actionToggleCircles -> {
binding.chart1.data?.dataSets?.forEach { set ->
if (set is LineDataSet) {
set.isDrawCirclesEnabled = !set.isDrawCirclesEnabled
set.isDrawCircles = !set.isDrawCircles
}
}
binding.chart1.invalidate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class PerformanceLineChart : DemoBase(), OnSeekBarChangeListener {
set1.color = Color.BLACK
set1.lineWidth = 0.5f
set1.isDrawValues = false
set1.isDrawCirclesEnabled = false
set1.isDrawCircles = false
set1.lineMode = LineDataSet.Mode.LINEAR
set1.isDrawFilledEnabled = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class SpecificPositionsLineChartActivity : DemoBase(), OnSeekBarChangeListener,
R.id.actionToggleCircles -> {
binding.chart1.data?.dataSets?.forEach {
val set = it as LineDataSet
set.isDrawCirclesEnabled = !set.isDrawCirclesEnabled
set.isDrawCircles = !set.isDrawCircles
}
binding.chart1.invalidate()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class TimeLineActivity : DemoBase() {

set1.axisDependency = YAxis.AxisDependency.LEFT
set1.color = Color.rgb(255, 241, 46)
set1.isDrawCirclesEnabled = false
set1.isDrawCircles = false
set1.lineWidth = 2f
set1.circleRadius = 3f
set1.fillAlpha = 255
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ abstract class SimpleFragment : Fragment() {
ds1.lineWidth = 2f
ds2.lineWidth = 2f

ds1.isDrawCirclesEnabled = false
ds2.isDrawCirclesEnabled = false
ds1.isDrawCircles = false
ds2.isDrawCircles = false

ds1.color = ColorTemplate.VORDIPLOM_COLORS[0]
ds2.color = ColorTemplate.VORDIPLOM_COLORS[1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ open class LineDataSet(yVals: MutableList<Entry> = mutableListOf(), label: Strin
override val circleColorCount: Int
get() = circleColors.size

override var isDrawCirclesEnabled: Boolean
override var isDrawCircles: Boolean
get() = mDrawCircles
set(value) {
mDrawCircles = value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ interface ILineDataSet : ILineRadarDataSet<Entry> {
/**
* Returns true if drawing circles for this DataSet is enabled, false if not
*/
var isDrawCirclesEnabled: Boolean
var isDrawCircles: Boolean

/**
* Returns the color of the inner circle (the circle-hole).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ open class LineChartRenderer(
// make sure the values do not interfere with the circles
var valOffset = (dataSet.circleRadius * 1.75f).toInt()

if (!dataSet.isDrawCirclesEnabled)
if (!dataSet.isDrawCircles)
valOffset /= 2

xBounds.set(dataProvider, dataSet)
Expand Down Expand Up @@ -583,7 +583,7 @@ open class LineChartRenderer(
dataSets?.let {
for (i in it.indices) {
val dataSet = dataSets[i]
if (!dataSet.isVisible || !dataSet.isDrawCirclesEnabled || dataSet.entryCount == 0) continue
if (!dataSet.isVisible || !dataSet.isDrawCircles || dataSet.entryCount == 0) continue

circlePaintInner.color = dataSet.circleHoleColor

Expand Down
Loading