Skip to content

Commit 1ff5d3c

Browse files
authored
Merge pull request #144 from ggggxiaolong/master
fix CubicLineChartActivity, BarLineChartTouchListener
2 parents 2779add + b0edeb7 commit 1ff5d3c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

MPChartExample/src/main/java/com/xxmassdeveloper/mpchartexample/CubicLineChartActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ protected void onCreate(Bundle savedInstanceState) {
105105
private void setData(int count, float range) {
106106

107107
ArrayList<Entry> values = new ArrayList<>();
108-
Double[] sampleValues = DataTools.Companion.getValues(100);
108+
Double[] sampleValues = DataTools.Companion.getMuchValues(count);
109109

110110
for (int i = 0; i < count; i++) {
111111
float val = (float) (sampleValues[i].floatValue() * (range + 1)) + 20;

MPChartLib/src/main/java/com/github/mikephil/charting/listener/BarLineChartTouchListener.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ private void performZoom(MotionEvent event) {
443443
*/
444444
private float getLimitedScaleX(float scaleX, MPPointF t) {
445445
ViewPortHandler h = mChart.getViewPortHandler();
446+
tempMatrix.set(mSavedMatrix);
446447
tempMatrix.postScale(scaleX, 1f, t.x, t.y);
447448

448449
mSavedMatrix.getValues(matrixBuffer);

0 commit comments

Comments
 (0)