I am using MPAndroidChart library.
I would like modify the size of bar present in bar chart. Could you let us know where to check for modify size of bar in bar chart in mp android chart
Click on any bar in the Bar Chart and right click on it, then select Format Data Series from the right-clicking menu. See screenshot: 2. In the popping up Format Data Series pane, move the Zoom bar of the Gap Width to the left side until the bar width meets your needs under the Series Options section.
Changing the bins: In SPSS, you can easily change the number of bins and the width of the bins that are displayed in your histogram. To do so, double-click your histogram in the output window. This will open a “Chart Editor”, where you can change the appearance of just about everything in your chart.
Larger bars The solution for this is to click the Excel chart's X axis, right click and choose Format Axis. Select Axis Options and then click on Text Axis to select it. This changes the way the axis is plotted giving wider bars. You can then adjust the gap width if necessary to make them wider.
1) On the Marks Card for the Bar marks put a pill like MIN(Number of Records) on the Size Shelf. This gives a value for Tableau to work with to adjust the thickness. 2) Drag the Size slider all the way to the right.
You can reduce the spacing between the bars that will automatically increase the width of bars.
BarDataSet set = new BarDataSet(vals, "Set A");
set.setBarSpacePercent(50f);
UPDATE v3.0.0:
As of this library version, you can control the bar width with the following method:
BarData barData = new BarData(...);
barData.setBarWidth(1f);
The number you provide for this method represents a certain interval on the x-axis. If your total axis has a range of e.g. 10k, and you set the bar width to 1000, the bar will cover 10% of the total x-axis range.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With