Skip to content
Open
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 @@ -527,15 +527,15 @@ abstract class BarLineChartBase<T : BarLineScatterCandleBubbleData<IBarLineScatt
/**
* draws the grid background
*/
protected fun drawGridBackground(c: Canvas) {
protected fun drawGridBackground(canvas: Canvas) {
if (mDrawGridBackground) {
// draw the grid background

c.drawRect(viewPortHandler.contentRect, mGridBackgroundPaint!!)
canvas.drawRect(viewPortHandler.contentRect, mGridBackgroundPaint!!)
}

if (this.isDrawBordersEnabled) {
c.drawRect(viewPortHandler.contentRect, mBorderPaint!!)
canvas.drawRect(viewPortHandler.contentRect, mBorderPaint!!)
}
}

Expand Down
4 changes: 2 additions & 2 deletions chartLib/src/main/kotlin/info/appdev/charting/charts/Chart.kt
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>> : ViewGroup, IBaseP
/**
* Draws the description text in the bottom right corner of the chart (per default)
*/
protected fun drawDescription(c: Canvas) {
protected fun drawDescription(canvas: Canvas) {
// check if description should be drawn

if (description.isEnabled) {
Expand All @@ -402,7 +402,7 @@ abstract class Chart<T : ChartData<out IDataSet<out Entry>>> : ViewGroup, IBaseP
y = position.y
}

c.drawText(description.text!!, x, y, mDescPaint)
canvas.drawText(description.text!!, x, y, mDescPaint)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ open class LineChartRenderer(
/**
* Draws a normal line.
*/
protected fun drawLinear(c: Canvas, dataSet: ILineDataSet) {
protected fun drawLinear(canvas: Canvas, dataSet: ILineDataSet) {
val entryCount = dataSet.entryCount

val pointsPerEntryPair = if (dataSet.isDrawSteppedEnabled) 4 else 2
Expand All @@ -266,14 +266,14 @@ open class LineChartRenderer(
val canvas: Canvas? = if (dataSet.isDashedLineEnabled) {
bitmapCanvas
} else {
c
canvas
}

xBounds.set(dataProvider, dataSet)

// if drawing filled is enabled
if (dataSet.isDrawFilledEnabled && entryCount > 0) {
drawLinearFill(c, dataSet, trans!!, xBounds)
drawLinearFill(canvas!!, dataSet, trans!!, xBounds)
}

// more than 1 color
Expand Down
Loading