PhilJay / MPAndroidChart

A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.
Other
37.68k stars 9.02k forks source link

Pie Chart view size does not fit chart content #4711

Open bitvale opened 5 years ago

bitvale commented 5 years ago

Summary Pie Chart view size does not fit chart content if description and legend are disabled:

chartView.description.isEnabled = false
chartView.legend.form = Legend.LegendForm.NONE

Untitled-2

Expected Behavior Pie Chart view size fit chart content

Device (please complete the following information):

Quentinvk commented 5 years ago

Hey Bitvale, isn't that what dataset.selectionShift = 30f is supposed to fix? If you weren't aware of this function, I hope it helps. Cheers

bitvale commented 5 years ago

I don't think this is about selectionShift, because top space on the screen shoot is the default selectionShift (12f). And the expected behavior is the same small space (selectionShift) on the bottom.