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 @@ -39,13 +39,13 @@ open class LineChart : BarLineChartBase<LineData?>, LineDataProvider {

// Min and max values...
val yAxisValueFormatter = axisLeft.valueFormatter
val minVal = yAxisValueFormatter.getFormattedValue(lineData.yMin, null)
val maxVal = yAxisValueFormatter.getFormattedValue(lineData.yMax, null)
val minVal = yAxisValueFormatter?.getFormattedValue(lineData.yMin, null)
val maxVal = yAxisValueFormatter?.getFormattedValue(lineData.yMax, null)

// Data range...
val xAxisValueFormatter = xAxis.valueFormatter
val minRange = xAxisValueFormatter.getFormattedValue(lineData.xMin, null)
val maxRange = xAxisValueFormatter.getFormattedValue(lineData.xMax, null)
val minRange = xAxisValueFormatter?.getFormattedValue(lineData.xMin, null)
val maxRange = xAxisValueFormatter?.getFormattedValue(lineData.xMax, null)
val entries = if (numberOfPoints == 1) "entry" else "entries"
return String.format(
Locale.getDefault(), "The line chart has %d %s. " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
public class LimitLine extends ComponentBase {

/** limit / maximum (the y-value or xIndex) */
private float mLimit;
private final float mLimit;

/** the width of the limit line */
private float mLineWidth = 2f;
Expand Down Expand Up @@ -130,7 +130,7 @@ public void disableDashedLine() {
* disabled
*/
public boolean isDashedLineEnabled() {
return mDashPathEffect == null ? false : true;
return mDashPathEffect != null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public float getHigh() {
/**
* limit / maximum (the y-value or xIndex)
*/
private Range mLimit;
private final Range mLimit;

/**
* the width of the limit line
Expand Down Expand Up @@ -182,7 +182,7 @@ public void disableDashedLine() {
* disabled
*/
public boolean isDashedLineEnabled() {
return mDashPathEffect == null ? false : true;
return mDashPathEffect != null;
}

/**
Expand Down
Loading
Loading