Skip to content

Commit

Permalink
Improve logic of the function
Browse files Browse the repository at this point in the history
Previously, we were assigning the charts value to itself, and it was making the logic harder to follow.
  • Loading branch information
hichamboushaba committed Sep 13, 2024
1 parent 2154a93 commit 328f851
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,7 @@ class DashboardStatsView @JvmOverloads constructor(
}

private fun generateLineDataSet(revenueStats: Map<String, Double>): LineDataSet {
chartRevenueStats = revenueStats
val entries = chartRevenueStats.values.mapIndexed { index, value ->
val entries = revenueStats.values.mapIndexed { index, value ->
Entry((index + 1).toFloat(), value.toFloat())
}
return LineDataSet(entries, "")
Expand Down

0 comments on commit 328f851

Please sign in to comment.