Skip to content

Commit

Permalink
empty date fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rodiguif committed Jul 13, 2021
1 parent 817115f commit 47d5264
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions app/src/main/java/com/oxeanbits/forecastchart/ui/MainExample.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,18 @@ class MainExample : AppCompatActivity() {
decimalFormat(SetupChartExample.getDecimalFormat())
detailsEnable(true)
}

forecastChartComponent{
size(MATCH, 350)
expectedLine(expectedLine.values, expectedLine.label,
expectedLine.color, expectedLine.forecasted)
actualLine(actualLine.values, actualLine.label,
actualLine.color, actualLine.forecasted)
forecastedLine(forecastedLine.values, forecastedLine.label,
forecastedLine.color, forecastedLine.forecasted)
unit("")
zoomEnabled(true)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class ForecastChartComponent(context: Context) : LinearLayoutComponent(context)
}

private fun emptyBar(): Bar {
return Bar(listOf(BarEntry(-1f, 0f)), "", RED)
return Bar(listOf(), "", 0)
}

fun expectedLine(arrayData: List<ChartEntry>, label: String,
Expand Down

0 comments on commit 47d5264

Please sign in to comment.