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 @@ -114,8 +114,8 @@ class LineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelec
}

// draw limit lines behind data instead of on top
binding.chart1.axisLeft.setDrawLimitLinesBehindData(true)
binding.chart1.xAxis.setDrawLimitLinesBehindData(true)
binding.chart1.axisLeft.isDrawLimitLinesBehindData = true
binding.chart1.xAxis.isDrawLimitLinesBehindData = true

// add limit lines
binding.chart1.axisLeft.addLimitLine(limitLineUpper)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class SpecificPositionsLineChartActivity : DemoBase(), OnSeekBarChangeListener,
leftAxis.specificPositions = floatArrayOf(0f, 10f, 20f, 50f, 100f, 300f)

// limit lines are drawn behind data (and not on top)
leftAxis.setDrawLimitLinesBehindData(true)
leftAxis.isDrawLimitLinesBehindData = true
binding.chart1.axisRight.isEnabled = false
setData(45, 100f)
binding.chart1.animateX(2500)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,15 @@ abstract class BarLineChartBase<T : BarLineScatterCandleBubbleData<IBarLineScatt
axisRendererRight.renderGridLines(canvas)
}

if (mXAxis.isEnabled && mXAxis.isDrawLimitLinesBehindDataEnabled) {
if (mXAxis.isEnabled && mXAxis.isDrawLimitLinesBehindData) {
xAxisRenderer.renderLimitLines(canvas)
}

if (mAxisLeft.isEnabled && mAxisLeft.isDrawLimitLinesBehindDataEnabled) {
if (mAxisLeft.isEnabled && mAxisLeft.isDrawLimitLinesBehindData) {
axisRendererLeft.renderLimitLines(canvas)
}

if (mAxisRight.isEnabled && mAxisRight.isDrawLimitLinesBehindDataEnabled) {
if (mAxisRight.isEnabled && mAxisRight.isDrawLimitLinesBehindData) {
axisRendererRight.renderLimitLines(canvas)
}

Expand Down Expand Up @@ -300,15 +300,15 @@ abstract class BarLineChartBase<T : BarLineScatterCandleBubbleData<IBarLineScatt

dataRenderer!!.drawExtras(canvas)

if (mXAxis.isEnabled && !mXAxis.isDrawLimitLinesBehindDataEnabled) {
if (mXAxis.isEnabled && !mXAxis.isDrawLimitLinesBehindData) {
xAxisRenderer.renderLimitLines(canvas)
}

if (mAxisLeft.isEnabled && !mAxisLeft.isDrawLimitLinesBehindDataEnabled) {
if (mAxisLeft.isEnabled && !mAxisLeft.isDrawLimitLinesBehindData) {
axisRendererLeft.renderLimitLines(canvas)
}

if (mAxisRight.isEnabled && !mAxisRight.isDrawLimitLinesBehindDataEnabled) {
if (mAxisRight.isEnabled && !mAxisRight.isDrawLimitLinesBehindData) {
axisRendererRight.renderLimitLines(canvas)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@ open class RadarChart : PieRadarChartBase<RadarData> {
if (drawWeb)
dataRenderer?.drawExtras(canvas)

if (mYAxis!!.isEnabled && mYAxis!!.isDrawLimitLinesBehindDataEnabled) mYAxisRenderer!!.renderLimitLines(canvas)
if (mYAxis!!.isEnabled && mYAxis!!.isDrawLimitLinesBehindData) mYAxisRenderer!!.renderLimitLines(canvas)

dataRenderer?.drawData(canvas)

if (valuesToHighlight())
dataRenderer?.drawHighlighted(canvas, highlighted!!)

if (mYAxis!!.isEnabled && !mYAxis!!.isDrawLimitLinesBehindDataEnabled) mYAxisRenderer!!.renderLimitLines(canvas)
if (mYAxis!!.isEnabled && !mYAxis!!.isDrawLimitLinesBehindData) mYAxisRenderer!!.renderLimitLines(canvas)

mYAxisRenderer!!.renderAxisLabels(canvas)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ abstract class AxisBase : ComponentBase() {
* flag indicating the limit lines layer depth
* If this is set to true, the LimitLines are drawn behind the actual data,
*/
var isDrawLimitLinesBehindDataEnabled: Boolean = false
protected set
var isDrawLimitLinesBehindData: Boolean = false

/**
* flag indicating the grid lines layer depth
Expand Down Expand Up @@ -361,22 +360,6 @@ abstract class AxisBase : ComponentBase() {
limitRanges.clear()
}

/**
* If this is set to true, the LimitLines are drawn behind the actual data,
* otherwise on top. Default: false
*/
fun setDrawLimitLinesBehindData(enabled: Boolean) {
this.isDrawLimitLinesBehindDataEnabled = enabled
}

/**
* If this is set to false, the grid lines are draw on top of the actual data,
* otherwise behind. Default: true
*/
fun setDrawGridLinesBehindData(enabled: Boolean) {
this.isDrawGridLinesBehindDataEnabled = enabled
}

/**
* Returns the longest formatted label (in terms of characters), this axis contains.
*/
Expand Down
Loading