|
|
|
|
@ -4,6 +4,7 @@ import android.os.Bundle |
|
|
|
|
import android.view.LayoutInflater |
|
|
|
|
import android.view.View |
|
|
|
|
import android.view.ViewGroup |
|
|
|
|
import android.widget.Toast |
|
|
|
|
import androidx.core.view.isVisible |
|
|
|
|
import com.github.mikephil.charting.data.BarDataSet |
|
|
|
|
import com.github.mikephil.charting.data.LineDataSet |
|
|
|
|
@ -16,6 +17,7 @@ import kotlinx.coroutines.GlobalScope |
|
|
|
|
import kotlinx.coroutines.launch |
|
|
|
|
import net.pokeranalytics.android.R |
|
|
|
|
import net.pokeranalytics.android.calculus.* |
|
|
|
|
import net.pokeranalytics.android.model.combined |
|
|
|
|
import net.pokeranalytics.android.ui.activity.components.PokerAnalyticsActivity |
|
|
|
|
import net.pokeranalytics.android.ui.extensions.ChipGroupExtension |
|
|
|
|
import net.pokeranalytics.android.ui.extensions.hideWithAnimation |
|
|
|
|
@ -107,6 +109,16 @@ class StatisticDetailsFragment : PokerAnalyticsFragment() { |
|
|
|
|
super.onCheckedChanged(group, checkedId) |
|
|
|
|
val aggregationType = aggregationTypes[checkedId] |
|
|
|
|
|
|
|
|
|
when (aggregationType) { |
|
|
|
|
AggregationType.MONTH, AggregationType.YEAR -> { |
|
|
|
|
val queryConditions = aggregationType.criterias.combined() |
|
|
|
|
if (queryConditions.size < 2) { |
|
|
|
|
Toast.makeText(context, R.string.less_then_2_values_for_display, Toast.LENGTH_LONG).show() |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
reports[aggregationType]?.let { report -> |
|
|
|
|
setGraphData(report, aggregationType) |
|
|
|
|
} ?: run { |
|
|
|
|
|