jsuarezruiz / AlohaKit.Controls

A set of .NET MAUI drawn controls.
MIT License
410 stars 46 forks source link

Bar chart footer label is not visible in iOS but works fine in Android #47

Open joyusjose opened 1 year ago

joyusjose commented 1 year ago

Trying to implement a bar chart in MAUI app and seems working fine in android but footer label is not visible in iOS. Tried to set/ change FooterLabelsFontColor as well.

ericgutierre01 commented 1 year ago

this is still the same, no solution >(

xufeitt commented 1 year ago

Hi everyone

I have solved this problem.

var strSize = canvas.GetStringSize(text, Font, FooterLabelsTextSize); bounds.Width = itemSize.Width; bounds.Height = strSize.Height ; canvas.DrawString(text, bounds, HorizontalAlignment.Center, VerticalAlignment.Center, TextFlow.ClipBounds);

Modify _bounds.Height = strSize.Height + 2 ;

bounds.height not enough height , that will do not diaplay the drawstring on IOS