Search code examples
xamarinxamarin.formswebviewxamarin.androidrgraph

RGraph bar labelsAbove in the center of Bar to avoid Webview cutting it


I'm using a Webview in Xamarin to draw an RGraph.Bar.

The user can press a "+" button to manipulate the Graph then Graph is refreshed. The thing is for some reason the Webview is cutting off the labelsAbove the bars. shown here

I was wondering if there's a chance to put labelsAbove in the center of the bar or at the beggining of it so it's not that obvious or... a solution to the WebView cutting the graph (Height)


Solution

  • A few things to try:

    1. Try increasing the marginTop property. Try setting it to 50 and see how that looks.
    2. Try wrapping your canvas in a div and adding some margin-top to it:
    <div style="margin-top: 50px; display: inline-block">
        <canvas id="cvs" width="700" height="300"></canvas>
    </div>