Open xinyu1993abc opened 5 years ago
Hi,
I don't know if this answer will be bashed. But it worked for me. I just figured it out.
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:scrollbars="horizontal">
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical" >
<com.github.mikephil.charting.charts.CombinedChart
android:id="@+id/combinedChartBroodingGrowing"
android:layout_width="3000dp"
android:layout_height="1000dp"
/>
</LinearLayout>
</HorizontalScrollView>
Unfortunately you'll need to specify the layout_width and layout_height explicitly in order for this to work(You'll need to play around and decide what's best for you. Also, please note: I haven't checked for any side effects. Use with discretion. I'm so sorry!). Also make sure setVisibleXRangeMaximum is not set. And then call saveToGallery() as usual. You'll see the entire chart saved to gallery. :)
The own saveToGallery() method saves the image before the current screen display. I want to achieve the effect of saving all the image data sliding backwards beyond the width of the current screen, saving a complete long image. Data picture