MPAndroidChart
MPAndroidChart copied to clipboard
How to set barWidth in pixels ?
How to set barWidth in pixels ?
the library provide function setBarWidth,
/**
* Sets the width each bar should have on the x-axis (in values, not pixels).
* Default 0.85f
*
* @param mBarWidth
*/
so I will set barWidth = 10/(10+9) = 0.52。
If you really want get pixels,you can caculate the barWidth depend your chart width and data count.