在MPAndroidChart给y轴和线图的开始和结束之间的空间

问题描述 投票:2回答:3

我正在开发使用MPAndroidChart一些值线图。这里线图被从Y轴开始到结束end of the chart

请帮我给一些空间或线的起点和垂直轴之间添加空白,结束也like this

android mpandroidchart
3个回答
0
投票

我认为你应该使用条形图,而不是一个折线图的。

如果你让空间看起来它不会从X-0开始


1
投票

有没有办法添加行的起点和垂直轴之间的额外空间,但你可以得到由最小像轴相同的结果

lineChart.getXAxis().setAxisMinimum(-2);

0
投票

你可以用下面的方法去做

//Leave some space before the line
xAxis.setSpaceMin(50f);
//Leave some space after the line
xAxis.setSpaceMax(50f);
© www.soinside.com 2019 - 2024. All rights reserved.