achartengine

Replace the data of AChartEngine's piechart

蓝咒 提交于 2019-12-11 06:43:29
问题 I am drawing piechart using ACartENgine . And I want to replace the data of piechart. To replace I called mSeries.clear(); method to remove all old data and then add new dataset to mSeries . But my problem is while do this all my legends displayed in white color instead of category color. How can I avoid this problem. All I want is replace the data of piechart with new values. Is there any better idea. How can I achieve this? Any one please help me. Thanks in advance. 回答1: There is a set(int

java.lang.NoClassDefFoundError: org.achartengine.model.CategorySeries Error in AChartLibrary

天大地大妈咪最大 提交于 2019-12-11 06:35:25
问题 I am trying to create a Dial Chart using AChartLibrary(I am completely lost..I have no idea how to do it and I am trying my hand in it but to no avail so any tutorial that might help is welcomed). I have managed to implement the Chart as follows import android.app.Fragment; import android.graphics.Color; import android.os.Bundle; import android.view.ViewGroup; import android.view.View; import android.view.LayoutInflater; import android.widget.GridLayout; import android.widget.LinearLayout;

AchartEngine add text with superscript

三世轮回 提交于 2019-12-11 05:45:20
问题 Is it possible to add superscript, or subscript characters to AchartEngine's x axes label, like you did in Microsoft Word? 回答1: You can try this str = str.replaceAll("0", "⁰"); str = str.replaceAll("1", "¹"); str = str.replaceAll("2", "²"); str = str.replaceAll("3", "³"); str = str.replaceAll("4", "⁴"); str = str.replaceAll("5", "⁵"); str = str.replaceAll("6", "⁶"); str = str.replaceAll("7", "⁷"); str = str.replaceAll("8", "⁸"); str = str.replaceAll("9", "⁹"); String str = "X2"; String xtitle

How do I set grid depth\z-index of achartengine in Android?

拥有回忆 提交于 2019-12-11 05:10:36
问题 Still having a great time fiddling with aChartEngine, but I have come to a point where I could some help. I'm looking to change the depth or z-index of the grid of a chart. But so far I haven't found any options in both the regular documentation as in the source to set the this. Does anyone has a tip or solution regarding the grids in aChartEngine? Thanks for your help! 回答1: I guess nobody has this issue, but just in case you might wonder how to change the depth of the grids in aChartEngine,

Android need help with diagram

为君一笑 提交于 2019-12-11 03:58:01
问题 i've been doing this code about making a diagram in android, but the error keep coming, am i missing something? package android.research.chart; import java.io.File; import java.io.FileOutputStream; import org.achartengine.ChartFactory; import org.achartengine.GraphicalView; import org.achartengine.chart.PointStyle; import org.achartengine.chartdemo.demo.R; import org.achartengine.model.SeriesSelection; import org.achartengine.model.XYMultipleSeriesDataset; import org.achartengine.model

How to set the Date Format for CombinedXYChart in AChartEngine?

若如初见. 提交于 2019-12-11 03:54:01
问题 I can set the date format in the time chart like this final GraphicalView view = ChartFactory.getTimeChartView(context, dataset, mRenderer, "dd-MMM-yyyy"); but I can't do the same in the case of ComninedXYChart String[] types = new String[] { TimeChart.TYPE , ScatterChart.TYPE, ScatterChart.TYPE}; final GraphicalView view = ChartFactory.getCombinedXYChartView(context, dataset, mRenderer, types); image below: any ideas? 回答1: In the CombinedXYChart case, you will have to use custom labels: //

Android: how to create lists under the charts in Achartengine?

孤街醉人 提交于 2019-12-11 03:36:34
问题 Android: Hi, I'm using AchartEngine to display charts in my App I have tried different ways to display this charts with some lists under the chart in my app, but I haven't. I have no Idea about how to use these charts with defining layouts in xml. I'm able to display the graphs without using the xml layouts. Many Thanks in Advance. Regards, Harry. 回答1: If Achartengine is referenced in your project (or compiled if you are including the source) then you should see the view available in the

How to Format XAxis values correctly in Line Chart in aChartEngine in android

▼魔方 西西 提交于 2019-12-11 03:33:42
问题 How can i make the XAxis in achartEngine format correctly? I would like it to have only the date value spaced correctly in the X-Axis with date values but i can't seem to get it work correctly. this is what i have tried: XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset(); dataset.addSeries(series); XYMultipleSeriesRenderer mRenderer = new XYMultipleSeriesRenderer(); mRenderer.setBackgroundColor(Color.BLACK); mRenderer.setApplyBackgroundColor(true); mRenderer.setGridColor(Color

Android Chart with dates on x-axis

我是研究僧i 提交于 2019-12-11 02:15:56
问题 Here I'm trying to show a chart with dates on x-axis where the values are retrieved from web-server: // Our first data Date[] x = dates_array; // x values! double[] y = readings_array; // y values! XYMultipleSeriesRenderer mRenderer = new XYMultipleSeriesRenderer(); // Holds a collection of XYSeriesRenderer and customizes the graph XYSeriesRenderer renderer = new XYSeriesRenderer(); // This will be used to customize line 1 XYSeriesRenderer renderer2 = new XYSeriesRenderer(); // This will be

Android issue with AChartEngine: set image in margin

你。 提交于 2019-12-11 01:41:32
问题 Is it possible to set an image to background margin ? I usually use mRenderer.setMarginsColor(Color.argb(0x00, 0x01, 0x01, 0x01)) but i want to set an image. 回答1: You cannot set image as background in AChartEngine as it is out of the box. I don't see any value in that. 来源: https://stackoverflow.com/questions/12565030/android-issue-with-achartengine-set-image-in-margin