GeezerVison is showing github.com — Fixes related to legend rendering (issue #1969) · FlyingAndroid/MPAndroidChart@9ccf58f
File tree
Expand file treeCollapse file tree
Open diff view settings
MPChartExample/src/com/xxmassdeveloper/mpchartexample MPChartLib/src/main/java/com/github/mikephil/charting
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: MPChartExample/src/com/xxmassdeveloper/mpchartexample/PieChartActivity.java +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -52,12 +52,9 @@ protected void onCreate(Bundle savedInstanceState) { |
52 | 52 |
|
53 | 53 | mSeekBarX = (SeekBar) findViewById(R.id.seekBar1); |
54 | 54 | mSeekBarY = (SeekBar) findViewById(R.id.seekBar2); |
55 | | - |
| 55 | + mSeekBarX.setProgress(4); |
56 | 56 | mSeekBarY.setProgress(10); |
57 | 57 |
|
58 | | - mSeekBarX.setOnSeekBarChangeListener(this); |
59 | | - mSeekBarY.setOnSeekBarChangeListener(this); |
60 | | - |
61 | 58 | mChart = (PieChart) findViewById(R.id.chart1); |
62 | 59 | mChart.setUsePercentValues(true); |
63 | 60 | mChart.setDescription(""); |
@@ -95,6 +92,9 @@ protected void onCreate(Bundle savedInstanceState) { |
95 | 92 | mChart.animateY(1400, Easing.EasingOption.EaseInOutQuad); |
96 | 93 | // mChart.spin(2000, 0, 360); |
97 | 94 |
|
| 95 | + mSeekBarX.setOnSeekBarChangeListener(this); |
| 96 | + mSeekBarY.setOnSeekBarChangeListener(this); |
| 97 | + |
98 | 98 | Legend l = mChart.getLegend(); |
99 | 99 | l.setPosition(LegendPosition.RIGHT_OF_CHART); |
100 | 100 | l.setXEntrySpace(7f); |
|
Collapse file
Copy file name to clipboardExpand all lines: MPChartExample/src/com/xxmassdeveloper/mpchartexample/ScatterChartActivity.java +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -74,6 +74,7 @@ protected void onCreate(Bundle savedInstanceState) { |
74 | 74 | Legend l = mChart.getLegend(); |
75 | 75 | l.setPosition(LegendPosition.RIGHT_OF_CHART); |
76 | 76 | l.setTypeface(mTfLight); |
| 77 | + l.setXOffset(5f); |
77 | 78 |
|
78 | 79 | YAxis yl = mChart.getAxisLeft(); |
79 | 80 | yl.setTypeface(mTfLight); |
|