We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi , while i am saving a dynamically created chart like below . pieChart = new PieChart(getContext()); then i am getting error while saving
pieChart = new PieChart(getContext());
try { if (pieChart.saveToGallery(getFileName(fullPath),50)) { Toast.makeText(getContext(), "Saving SUCCESSFUL!", Toast.LENGTH_SHORT).show(); openFile(fullPath); } else { Toast.makeText(getContext(), "Saving FAILED!", Toast.LENGTH_SHORT) .show(); } }catch (Exception e){ e.printStackTrace(); }
Error is
java.lang.IllegalArgumentException: width and height must be > 0 07-27 17:22:04.639 19413-19413/com.acelrtech.tracer W/System.err: at android.graphics.Bitmap.createBitmap(Bitmap.java:807) 07-27 17:22:04.639 19413-19413/com.acelrtech.tracer W/System.err: at android.graphics.Bitmap.createBitmap(Bitmap.java:786) 07-27 17:22:04.639 19413-19413/com.acelrtech.tracer W/System.err: at android.graphics.Bitmap.createBitmap(Bitmap.java:753) 07-27 17:22:04.639 19413-19413/com.acelrtech.tracer W/System.err: at com.github.mikephil.charting.charts.Chart.getChartBitmap(Chart.java:1501) 07-27 17:22:04.639 19413-19413/com.acelrtech.tracer W/System.err: at com.github.mikephil.charting.charts.Chart.saveToGallery(Chart.java:1607) 07-27 17:22:04.639 19413-19413/com.acelrtech.tracer W/System.err: at com.github.mikephil.charting.charts.Chart.saveToGallery(Chart.java:1646) 07-27 17:22:04.639 19413-19413/com.acelrtech.tracer W/System.err: at com.acelrtech.graphlibrary.GraphFragment.saveGraph(GraphFragment.java:153) 07-27 17:22:04.639 19413-19413/com.acelrtech.tracer W/System.err: at com.acelrtech.graphlibrary.GraphFragment.draw_multi_bar_chart(GraphFragment.java:426) 07-27 17:22:04.639 19413-19413/com.acelrtech.tracer W/System.err: at com.acelrtech.graphlibrary.GraphFragment.generateGraph(GraphFragment.java:111) 07-27 17:22:04.639 19413-19413/com.acelrtech.tracer W/System.err: at com.acelrtech.graphlibrary.GraphFragment.onCreateView(GraphFragment.java:93)
The text was updated successfully, but these errors were encountered:
This error occurs because you have not added your chart to a layout, and therefore it has no size (which it needs).
Sorry, something went wrong.
No branches or pull requests
hi , while i am saving a dynamically created chart like below .
pieChart = new PieChart(getContext());
then i am getting error while saving
Error is
The text was updated successfully, but these errors were encountered: