Search code examples
c#androidxamarinxamarin.androidscichart

Setting SciChartSurface background to transparent makes it black Xamarin.Android


In Xamarin.Android if you set the background to transparent it just makes the background black. Code:

this.sciChartSurface.SetBackgroundColor(Android.Graphics.Color.Transparent);
this.sciChartSurface.Background.Alpha = 0;
this.sciChartSurface.Background.SetAlpha(0);

Solution

  • The issue is that the default RenderSurface implementation in Scichart Android uses OpenGL, which does not allow transparency or compositing of views under the chart.

    However, SciChart provides an alternative which allows you to do this.

    Have a look at https://www.scichart.com/questions/question/transparent-bacground and set the RenderSurface on the SciChartSurface to a GLTextureView instance and it should work