Linearlayout Achartengine Chart Not Displaying In Scrollview
I'm trying to create an achartengine chart within a scrollview but it won't display! It just shows a black screen, but doesn't crash or anything. The thing is if I just change my
Solution 1:
Under the scrollview you have to insert
android:fillViewport="true"
Solution 2:
You will also have to do the following call, otherwise there will be display issues:
renderer.setInScroll(true);
Solution 3:
Other solution is to give a size for your LinearLayout @+id/trendchart:
for example:
<LinearLayoutandroid:id="@+id/trendchart"android:layout_width="fill_parent"android:layout_height="180dp"android:orientation="vertical" /></LinearLayout>
works fine for me.
Solution 4:
I've tried the accepted answers but none of them work for me. I solved my problem by adding
chartView.setLayoutParams(newLayoutParams(LayoutParams.MATCH_PARENT, 500));
But don't use
chartView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT))
;
because for some reason it still not displaying the chart. Hope that will help someone
Post a Comment for "Linearlayout Achartengine Chart Not Displaying In Scrollview"