1
我正在使用组合图表来绘制堆积酒吧和它的顶部的折线图。 当我将栏阴影设置为true时,一些栏被隐藏。 这是我将bar阴影设置为true的代码。MPAndroidChart酒吧阴影隐藏实际酒吧
public void setupChart(CombinedChart combinedChart)
{
combinedChart.setDrawOrder(new CombinedChart.DrawOrder[]{CombinedChart.DrawOrder.BAR, CombinedChart.DrawOrder.LINE});
combinedChart.setNoDataText("");
combinedChart.setNoDataTextDescription("");
combinedChart.setDescription(null);
combinedChart.setDrawGridBackground(false);
combinedChart.setDrawBarShadow(true);
combinedChart.setBackgroundColor(getResources().getColor(R.color.transparent));
XAxisValueFormatter customX=new MyXAxisValueFormatter();
XAxis xAxis=combinedChart.getXAxis();
xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);
xAxis.setDrawAxisLine(false);
xAxis.setDrawLabels(true);
xAxis.setDrawGridLines(false);
xAxis.setGridColor(getResources().getColor(R.color.Gray));
xAxis.setValueFormatter(customX);
xAxis.setSpaceBetweenLabels(2);
YAxisValueFormatter customY=new MyYAxisValueFormatter();
YAxis leftAxis=combinedChart.getAxisLeft();
leftAxis.setLabelCount(4, false);
leftAxis.setDrawAxisLine(false);
leftAxis.setDrawGridLines(false);
leftAxis.setValueFormatter(customY);
leftAxis.setPosition(YAxis.YAxisLabelPosition.OUTSIDE_CHART);
leftAxis.setSpaceTop(15f);
YAxis rightAxis=combinedChart.getAxisRight();
rightAxis.setEnabled(false);
combinedChart.getLegend().setEnabled(false);
}
我也得到了下面的图表
相同的代码与酒吧阴影设置为false
combinedChart.setDrawBarShadow(false);
产生与杆如下图右预期。
我在做什么出格的顺序吗?
如果这是一个我不希望的错误,我可以使用网格线实现条形阴影吗?
很好的图书馆。