|
|
|
@ -9,7 +9,6 @@ import com.github.mikephil.charting.charts.BarLineChartBase |
|
|
|
import com.github.mikephil.charting.charts.LineChart |
|
|
|
import com.github.mikephil.charting.charts.LineChart |
|
|
|
import com.github.mikephil.charting.data.Entry |
|
|
|
import com.github.mikephil.charting.data.Entry |
|
|
|
import com.github.mikephil.charting.data.LineData |
|
|
|
import com.github.mikephil.charting.data.LineData |
|
|
|
import com.github.mikephil.charting.data.LineDataSet |
|
|
|
|
|
|
|
import com.github.mikephil.charting.highlight.Highlight |
|
|
|
import com.github.mikephil.charting.highlight.Highlight |
|
|
|
import com.github.mikephil.charting.listener.OnChartValueSelectedListener |
|
|
|
import com.github.mikephil.charting.listener.OnChartValueSelectedListener |
|
|
|
import com.google.android.material.chip.Chip |
|
|
|
import com.google.android.material.chip.Chip |
|
|
|
@ -21,6 +20,7 @@ import net.pokeranalytics.android.calculus.ObjectIdentifier |
|
|
|
import net.pokeranalytics.android.calculus.Stat |
|
|
|
import net.pokeranalytics.android.calculus.Stat |
|
|
|
import net.pokeranalytics.android.ui.activity.components.PokerAnalyticsActivity |
|
|
|
import net.pokeranalytics.android.ui.activity.components.PokerAnalyticsActivity |
|
|
|
import net.pokeranalytics.android.ui.fragment.components.PokerAnalyticsFragment |
|
|
|
import net.pokeranalytics.android.ui.fragment.components.PokerAnalyticsFragment |
|
|
|
|
|
|
|
import net.pokeranalytics.android.ui.graph.PALineDataSet |
|
|
|
import net.pokeranalytics.android.ui.graph.setStyle |
|
|
|
import net.pokeranalytics.android.ui.graph.setStyle |
|
|
|
import net.pokeranalytics.android.ui.view.LegendView |
|
|
|
import net.pokeranalytics.android.ui.view.LegendView |
|
|
|
import net.pokeranalytics.android.util.extensions.ChipGroupExtension |
|
|
|
import net.pokeranalytics.android.util.extensions.ChipGroupExtension |
|
|
|
@ -68,7 +68,7 @@ class GraphFragment : PokerAnalyticsFragment(), OnChartValueSelectedListener { |
|
|
|
this.legendContainer.addView(this.legendView) |
|
|
|
this.legendContainer.addView(this.legendView) |
|
|
|
this.legendView.prepareWithStat(this.stat, this.entries.size) |
|
|
|
this.legendView.prepareWithStat(this.stat, this.entries.size) |
|
|
|
|
|
|
|
|
|
|
|
val dataSet = LineDataSet(this.entries, this.stat.name) |
|
|
|
val dataSet = PALineDataSet(this.entries, this.stat.name, requireContext()) |
|
|
|
val colors = arrayOf(R.color.green_light).toIntArray() |
|
|
|
val colors = arrayOf(R.color.green_light).toIntArray() |
|
|
|
dataSet.setColors(colors, context) |
|
|
|
dataSet.setColors(colors, context) |
|
|
|
dataSet.setDrawCircles(false) |
|
|
|
dataSet.setDrawCircles(false) |
|
|
|
|