Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed546e84 authored by Rithika Gosukonda's avatar Rithika Gosukonda Committed by Android (Google) Code Review
Browse files

Merge "[Spa] Adding enable/disable touch functionality for the Barchart widget" into main

parents 73164f71 5fdbfaac
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -86,6 +86,10 @@ interface BarChartModel {
     */
    val yAxisLabelCount: Int
        get() = 3

    /** If set to true, touch gestures are enabled on the [BarChart]. */
    val enableBarchartTouch: Boolean
        get() = true
}

data class BarChartData(
@@ -127,6 +131,7 @@ fun BarChart(barChartModel: BarChartModel) {
                            legend.isEnabled = false
                            extraBottomOffset = 4f
                            setScaleEnabled(false)
                            setTouchEnabled(barChartModel.enableBarchartTouch)

                            xAxis.apply {
                                position = XAxis.XAxisPosition.BOTTOM