我使用圖表框架achartengine來創建一個簡單的水平條形圖,但是無論何時將其切換爲橫向它都會使標籤文本變得非常難以閱讀。這是我的初始化圖表:景觀粉碎標籤文本achartengine
renderer = new XYMultipleSeriesRenderer();
dataset = new XYMultipleSeriesDataset();
seriesRenderer = new XYSeriesRenderer();
series = new CategorySeries("Episodes");
renderer.setOrientation(Orientation.VERTICAL); //display the bars horizontally
//allow the chart to scroll up and down, but not left to right
renderer.setPanEnabled(true, false);
renderer.setZoomEnabled(true,false);
renderer.setXLabelsAlign(Align.LEFT);
renderer.setLabelsTextSize(20);
renderer.setXLabels(0);
renderer.setBarSpacing(.25);
int[] margins = new int[]{0,0,20,20};
renderer.setMargins(margins);
renderer.setYTitle("Engagements");
renderer.setXAxisMin(0);
renderer.setXAxisMax(5);
renderer.setYAxisMin(0);
renderer.setShowLegend(false);
renderer.setLegendHeight(0);
renderer.setXLabelsColor(Color.rgb(10,94,143));
renderer.setYLabelsColor(0, Color.DKGRAY);
//cause the margins to be clear
renderer.setMarginsColor(Color.WHITE);
//change the series color
seriesRenderer.setColor(Color.rgb(149,209,240));
//add the series renderer to the renderer
renderer.addSeriesRenderer(seriesRenderer);
這是它的外觀畫像:http://www.flickr.com/photos/[email protected]/7748322920/
,這是它的所有景觀砸:http://www.flickr.com/photos/[email protected]/7748322690/
任何幫助/建議將不勝感激,感謝您的時間!
注:我試圖調整文本和扣球效果仍然存在
阿疑難雜症,以及感謝您的時間! – VinC 2012-08-10 18:04:15