Display SfChart in a Layout like a simple element

Hello. I am following the docs to display graphs and everything is very good and beautiful. The problem is that the graphs are taking the whole screen. Is there any way to display the graph inside specific layout like LinearLayout? Thank you very much.

2 Replies

KE Konstantinos Evangelidis February 22, 2018 10:44 AM UTC

I found the answer. I will leave it here in case that someone else will need it. You need to set SfChart chart = new SfChart(this); After that you have to create your graph and create a layout in xml file. At last you need to set this FindViewById<LinearLayout>(Resource.Id.ll1).AddView(chart); to add the graph to the specific layout you want to display.


DV Divya Venkatesan Syncfusion Team February 22, 2018 11:00 AM UTC

Hi Konstantinos,

We are glad to know that you have got the solution and also thanks for sharing it.

Please get back to us if you need any other assistance.

Regards,
Divya Venkatesan

Loader.
Up arrow icon