0
您好我正在使用MPAndroidChart上的BubbleChart。我的X值非常大,所以我的泡沫尺寸非常小,爲了查看泡泡對於在圖表上縮放很多我爲氣泡設置了很大的尺寸,但它們保持很小。那是我的代碼。BubbleChart(MPAndroidChart) - 泡泡尺寸
BubbleChart bubbleChart =(BubbleChart)findViewById(R.id.bubbleChart);
ArrayList<BubbleEntry> entries = new ArrayList<>();
entries.add(new BubbleEntry(323,1f,10f));
entries.add(new BubbleEntry(981,5f, 10f));
entries.add(new BubbleEntry(1300,3f ,10f));
XAxis xAxis = bubbleChart.getXAxis();
xAxis.setAxisMinimum(0);
xAxis.setAxisMaximum(1440);
YAxis yAxis = bubbleChart.getAxisLeft();
yAxis.setAxisMinimum(0);
yAxis.setAxisMaximum(8);
YAxis yAxis2=bubbleChart.getAxisRight();
yAxis2.setAxisMinimum(0);
yAxis2.setAxisMaximum(8);
BubbleDataSet bubbleDataSet = new BubbleDataSet(entries, "");
bubbleDataSet.setColor(Color.RED,180);
BubbleData data= new BubbleData(bubbleDataSet);
bubbleChart.setData(data);
截圖: bubblechart