From cbfe48b411c2cc20d501b54801899697f6545e74 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 | 3 ++- 1 file changed, 2 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 69feb056b..06ee22f90 100644 --- a/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt +++ b/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt @@ -37,7 +37,7 @@ class LineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelec super.onCreate(savedInstanceState) binding = ActivityLinechartBinding.inflate(layoutInflater) setContentView(binding.root) - + binding.seekBarX.setOnSeekBarChangeListener(this) binding.seekBarY.max = 180 binding.seekBarY.setOnSeekBarChangeListener(this) @@ -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 32d06a8ed393e1a727ae3e25c0712160abfa8b18 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt b/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt index 06ee22f90..51d3e248b 100644 --- a/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt +++ b/app/src/main/kotlin/info/appdev/chartexample/LineChartActivity.kt @@ -24,6 +24,7 @@ import info.appdev.chartexample.DataTools.Companion.setData import info.appdev.chartexample.custom.MyMarkerView import info.appdev.chartexample.databinding.ActivityLinechartBinding import info.appdev.chartexample.notimportant.DemoBase +import info.appdev.charting.components.XAxis import timber.log.Timber /** @@ -48,6 +49,7 @@ class LineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelec // disable description text binding.chart1.description.isEnabled = false binding.chart1.legend?.isEnabled = false + binding.chart1.xAxis.position = XAxis.XAxisPosition.BOTTOM // enable touch gestures binding.chart1.setTouchEnabled(true)