Skip to content

Commit 328f851

Browse files
Improve logic of the function
Previously, we were assigning the charts value to itself, and it was making the logic harder to follow.
1 parent 2154a93 commit 328f851

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

WooCommerce/src/main/kotlin/com/woocommerce/android/ui/dashboard/stats/DashboardStatsView.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,7 @@ class DashboardStatsView @JvmOverloads constructor(
649649
}
650650

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

0 commit comments

Comments
 (0)