Skip to content

Commit aca0c78

Browse files
committed
Cosmetic
1 parent 59f0069 commit aca0c78

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

app/src/main/kotlin/info/appdev/chartexample/HorizontalBarChartActivity.kt

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class HorizontalBarChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartV
3636
binding = ActivityHorizontalbarchartBinding.inflate(layoutInflater)
3737
setContentView(binding.root)
3838

39-
binding.seekBarY.setOnSeekBarChangeListener(this)
4039
binding.seekBarX.setOnSeekBarChangeListener(this)
40+
binding.seekBarY.setOnSeekBarChangeListener(this)
4141

4242
binding.chart1.setOnChartValueSelectedListener(this)
4343
binding.chart1.isLogging = true
@@ -55,33 +55,33 @@ class HorizontalBarChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartV
5555
// chart.setDrawBarShadow(true);
5656
binding.chart1.setDrawGridBackground(false)
5757

58-
val xl = binding.chart1.xAxis
59-
xl.position = XAxisPosition.BOTTOM
60-
xl.typeface = tfLight
61-
xl.isDrawAxisLine = true
62-
xl.isDrawGridLines = false
63-
xl.granularity = 10f
64-
65-
val yl = binding.chart1.axisLeft
66-
yl.typeface = tfLight
67-
yl.isDrawAxisLine = true
68-
yl.isDrawGridLines = true
69-
yl.axisMinimum = 0f // this replaces setStartAtZero(true)
70-
71-
// yl.setInverted(true);
72-
val yr = binding.chart1.axisRight
73-
yr.typeface = tfLight
74-
yr.isDrawAxisLine = true
75-
yr.isDrawGridLines = false
76-
yr.axisMinimum = 0f // this replaces setStartAtZero(true)
77-
78-
// yr.setInverted(true);
58+
val xAxis = binding.chart1.xAxis
59+
xAxis.position = XAxisPosition.BOTTOM
60+
xAxis.typeface = tfLight
61+
xAxis.isDrawAxisLine = true
62+
xAxis.isDrawGridLines = false
63+
xAxis.granularity = 10f
64+
65+
val yAxis = binding.chart1.axisLeft
66+
yAxis.typeface = tfLight
67+
yAxis.isDrawAxisLine = true
68+
yAxis.isDrawGridLines = true
69+
yAxis.axisMinimum = 0f // this replaces setStartAtZero(true)
70+
71+
// yl.setInverted(true)
72+
val axisRight = binding.chart1.axisRight
73+
axisRight.typeface = tfLight
74+
axisRight.isDrawAxisLine = true
75+
axisRight.isDrawGridLines = false
76+
axisRight.axisMinimum = 0f // this replaces setStartAtZero(true)
77+
78+
// yr.setInverted(true)
7979
binding.chart1.setFitBars(true)
8080
binding.chart1.animateY(2500)
8181

8282
// setting data
83-
binding.seekBarY.progress = 50
8483
binding.seekBarX.progress = 12
84+
binding.seekBarY.progress = 50
8585

8686
binding.chart1.legend.apply {
8787
verticalAlignment = Legend.LegendVerticalAlignment.BOTTOM

app/src/main/kotlin/info/appdev/chartexample/StackedBarActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ class StackedBarActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSele
6767
val xLabels = binding.chart1.xAxis
6868
xLabels.position = XAxisPosition.TOP
6969

70-
// chart.setDrawXLabels(false);
71-
// chart.setDrawYLabels(false);
70+
// chart.setDrawXLabels(false)
71+
// chart.setDrawYLabels(false)
7272

7373
// setting data
7474
binding.seekBarX.progress = 12

0 commit comments

Comments
 (0)