组合图中的水平滚动

Horizontal Scrolling in a CombinedChart

我在我的项目中使用 MPAndroidChart 库。 一个CombinedChart会填充用户提供的数据,所以增长太多很敏感,图表的可视化不太友好。

所以我想设置要显示的条目的初始最大值,然后让用户能够水平滚动以查看更多条目。

我在 MPAndroidChart Example 中看到,捏合缩放后,用户可以滚动到任何地方,所以我认为这个强大的库可以满足我的需求

好吧,这不是我想要的,但这些设置可以解决问题:

    CombinedChart mChart;
    mChart = (CombinedChart) findViewById(R.id.mchart);

    mChart.setScaleMinima(100f, 1f); // The total number of entries will be divided by these factors     
mChart.centerViewTo(lastXvalue, lastYValue, YAxis.AxisDependency.RIGHT); //This centers the view on the last value