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

Commit 5fdbfaac authored by Rithika Gosukonda's avatar Rithika Gosukonda
Browse files

[Spa] Adding enable/disable touch functionality for the Barchart widget

Fix : b/311456223
Change-Id: I972c185276e6699ca6cf360fcd0c7d9296985c53
parent 89f4a3e5
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