@@ -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
0 commit comments