achartengine

Trouble getting axis centered on Origo in AChartEngine

十年热恋 提交于 2019-12-13 04:35:34
问题 I'm having trouble getting AChartEngine to center the actual visible axises on Origo instead of having them along the left- and bottom of the chart. I need to have the axises like so: Any ideas? (This question is similar to question #2 [2]: Make x-axis in vertical center using AChartEngine but I thought that a more specific question might get an answer) 回答1: I made some modifications to AChartEngine 1.0.0 to make it possible to display axises in the center of the plot. Use code below to set

AChartEngine Scroll Area

笑着哭i 提交于 2019-12-13 04:35:00
问题 Is there any way to limit the scroll area of AChartEngine? I have a graph of stats for a team where the X-axis represents time and the Y-axis represents score and it doesn't make sense to have negative for either. I'd like to make it so that the farthest that the user can scroll down and to the left would put the origin in the bottom left corner of the screen. I appreciate any assistance. 回答1: Try using setPanLimits() method .. double[] panLimits={0,10,0,50}; // [panMinimumX, panMaximumX,

How to display x-axis label above the axis using AChartEngine in Android?

ε祈祈猫儿з 提交于 2019-12-13 04:23:35
问题 I want to create graph like above. In this graph titles are on top. User can select particular time to view more detail. How to show this X-axis labels on top of axis using AChartEngine or any other graph api for android? 回答1: You can use annotations, which are text labels that can be placed anywhere in the graph. series.addAnnotation("Vacation", 6, 30); 来源: https://stackoverflow.com/questions/17545194/how-to-display-x-axis-label-above-the-axis-using-achartengine-in-android

Android achartengine setDisplayChartValues crashes App

妖精的绣舞 提交于 2019-12-12 20:20:11
问题 I just want to display the Y values right above the chart line, I found that the method to do this is setting setDisplayChartValues to true. However when I use it the app crashes with the following error message: java.lang.IndexOutOfBoundsException: Invalid index 3, size is 3 being 3 the number of points in the chart. public class LineGraph { private XYMultipleSeriesRenderer mRenderer = new XYMultipleSeriesRenderer(); private double max = 0; private double min = 999; public View getView

AChartEngine does not display the maximum chart value - Bar Chart

江枫思渺然 提交于 2019-12-12 14:16:20
问题 I am working on Achart Engine and i am facing 2 issues Issue 1) i am facing exactly same problem as posted in the screen shot here displaying max chart values on Y axis 2) suppose in the 3 bars if i one among the bar is 0 say middle one then the bar will not be drawn and shows blank between the two bars, but i dont want to show some space. On Issues what i want to acheive: Issue 1) My Ymax value is 50 ,i can make the Y max value to 60 so that the max value is displayed and will not cut.But

Bar chart not working in AchartEngine

我怕爱的太早我们不能终老 提交于 2019-12-12 12:23:05
问题 I am trying to create Bar Chart using AchartEngine but various things doesn't work for me.. 1) Unable to show Grid. 2) Unable to remove category series title i.e "Bar Graph". 3) It's not showing bars as it should show. 4) By Default white color background is visible. is it possible to provide space between each bars?? Bar Chart Code CategorySeries series = new CategorySeries("Bar Graph"); for (int i = 0; i < availCatList.size(); i++) series.add(availCatList.get(i), mTotal.get(i));

AChartEngine Messed up labels

半城伤御伤魂 提交于 2019-12-12 04:19:34
问题 My chart displays fine but as soon as I scroll to the side, I have random time appearing and it messes up the dates, see this picture: http://img14.imageshack.us/img14/8329/statqs.jpg I'd like to only display the date and nothing else, I don't know how the renderer comes up with time that I never entered. Also I'd like to know how I can prevent scrolling to the left (x axis) and down (negative y), I can no longer use SetPanLimits because my x values are dates and not numbers. Any help would

android - how to make plot with user data

落爺英雄遲暮 提交于 2019-12-12 02:46:59
问题 I have a program which makes some calculations according to user data. The program works fine ,but when i try to use achartengine in order to make the plot ,it crashes.(doesn't do the plot) I am not sure if i am passing right the data in the LineGraph class. As i understand i must use "Bundle sth=getIntent.getExtras()" but i am not sure where to put it in LineGraph. I have the number_cores class which in which the user enters the data and then presses the calculate button and in another

AChartEngine-Combined TimeChart and ScatterChart, X-Axis date

一世执手 提交于 2019-12-12 01:56:43
问题 I have created a graph where tamperatures are displayed in a timeChart. I needed to mark a few temperatures with different color, so I used a XYCombinedChart and added a ScatterChar with the temperatures I wanted to mark. It all worked well. The only problem is that, in order to make it work, I used milliseconds in ScatterCharts's XYSeries like shown below: XYSeries pointSeries = new XYSeries("NotFromSensor"); dataset.addSeries(pointSeries); int t = 0; for (t = 0; t < MainActivity.temps.size(

Android converting graph (AChartEngine) into image using toBitmap()

亡梦爱人 提交于 2019-12-12 01:07:52
问题 I am trying to add graph to my Android application using AChartEngine . The only thing different from examples is that I want to make from graph bitmap and then insert into ImageView . I am able to add graph without any problems to the LinearLayout, but after using method toBitmap() on graph and inserting it into ImageView I don't have anything and get NullPointerException . The possible problem that I've found is ID of generated graph which is -1 . This is the code: public class Chart