![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | Crash when exporting a SeriesBand Tool in Android | ||
|---|---|---|---|
| Product: | Java TeeChart | Reporter: | yeray alonso <yeray> |
| Component: | Android | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
The following code reproduces the problem: private void initializeChart() { tChart1.getAspect().setView3D(false); Series series1 = new Line(tChart1.getChart()); series1.fillSampleValues(); Series series2 = new Line(tChart1.getChart()); series2.fillSampleValues(); SeriesBand band1 = new SeriesBand(tChart1.getChart()); band1.setSeries(series1); band1.setSeries2(series2); } private void exportChart2Jpg() { checkExternalStorage(); if (mExternalStorageAvailable) { if (mExternalStorageWriteable) { final File ExtPath = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "TeeChart"); ExtPath.mkdirs(); String path = ExtPath.getAbsolutePath() + File.separator + "Java2Image.jpg"; Image im = tChart1.getExport().getImage().image(380, 600); try { im.save(path, "jpg", null); } catch (FileNotFoundException e) { e.printStackTrace(); } } } } Don't forget to add the WRITE_EXTERNAL_STORAGE permission before the application tag in the Manifest: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />