From 69ab5166e168753b00c9766d1325ea12ffeffde4 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Tue, 30 Jul 2024 18:05:58 +0200 Subject: [PATCH 1/2] Legend test --- .../main/kotlin/info/appdev/chartexample/LineChartActivity.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt b/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt index c9b81110b..3cb2a5584 100644 --- a/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt +++ b/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt @@ -47,6 +47,7 @@ class LineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelec // disable description text binding.chart1.description.isEnabled = false + binding.chart1.legend?.isEnabled = false // enable touch gestures binding.chart1.setTouchEnabled(true) From 96debac2d14821b8d16f1a96e3479eec90a4f34c Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Wed, 31 Jul 2024 16:08:15 +0200 Subject: [PATCH 2/2] Move xAxis to bottom --- .../main/kotlin/info/appdev/chartexample/LineChartActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt b/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt index 3cb2a5584..3cf9c44d4 100644 --- a/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt +++ b/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt @@ -20,6 +20,7 @@ import info.appdev.charting.components.Legend.LegendForm import info.appdev.charting.components.LimitLine import info.appdev.charting.components.LimitLine.LimitLabelPosition import info.appdev.charting.components.LimitRange +import info.appdev.charting.components.XAxis import info.appdev.charting.data.Entry import info.appdev.charting.data.LineDataSet import info.appdev.charting.highlight.Highlight @@ -47,7 +48,8 @@ class LineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelec // disable description text binding.chart1.description.isEnabled = false - binding.chart1.legend?.isEnabled = false + binding.chart1.legend.isEnabled = false + binding.chart1.xAxis.position = XAxis.XAxisPosition.BOTTOM // enable touch gestures binding.chart1.setTouchEnabled(true)