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);
產生與杆如下圖右預期。
我在做什麼出格的順序嗎?
如果這是一個我不希望的錯誤,我可以使用網格線實現條形陰影嗎?
很好的圖書館。