achartengine

Multiple Line Label in AChartEngine based BarChart

感情迁移 提交于 2019-12-24 07:35:01
问题 I'm writing an application for Android which contains Bar Charts, The Bar Chart is built by using the AChartEngine API. The X axis label is quite long and overlaps the other labels, I was wondering if it is possible to have a line break in the label or have a multiple line label. I tried going through the API documentation but i found no answers and Google proves to be no better. 回答1: I dont think you can break xlable directly but i tried to rotate the lables so that they fit the page

Using AChartEngine library for graphs, not able to get value for diffrent x-axis value

回眸只為那壹抹淺笑 提交于 2019-12-24 07:07:53
问题 public static ArrayList<double[]> Value = new ArrayList<double[]>(); private double[] x = new double[10]; private double[] y = new double[10]; int counter = -1; add.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { counter++; x[counter] = Double.parseDouble(income_1.getText().toString()); y[counter] = Double.parseDouble(income_2.getText().toString()); income_1.setText(""); income_2.setText(""); } }); publish.setOnClickListener(new OnClickListener() { @Override

How to show grid for a custom x axis label: achartengine

风格不统一 提交于 2019-12-24 03:20:43
问题 I want a functionality where if user clicks on the the graph and if the x co ordinate is close to our point on XY line graph then I want to show a vertical grid for that point. The only function that seems related is mRenderer.setShowCustomTextGridY(boolean showGrid) But for which value should the grid be shown is not clear in the documentation. Please help. Which function should I use? 回答1: Once you have the X axis value, you can add a custom text label this way: renderer.addXTextLabel(x,

Two graphics in one screen

Deadly 提交于 2019-12-23 22:19:25
问题 I've being trying to display two graphics in one screen but I'm not able. Here is the code where i show one graphic inside the onClick function: case R.id.graphs: GraphicalView mChartView = new Niveau().execute(this); LinearLayout layout = (LinearLayout) findViewById(R.id.graph); layout.removeAllViews(); layout.addView(mChartView, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); break; Any idea?? Thank you very much! 回答1: case R.id.graphs: GraphicalView mChartView1 =

AChart Engine Bar Chart - hide the series when scrolling to right

一曲冷凌霜 提交于 2019-12-23 18:04:28
问题 I am using an excellent library AChart engine for generating bar chart. All features are working fine, but I have couple of things which I am not able to resolve: this is my screen shot: Now there are two things that needs to be fixed: 1) Hide the series when it is scrolled to right, currently the series March is visible even after 0,0 also. 2) Gridlines are on top of the graph but it should be behind the graph. 3) How to display the legends on top right corner instead of bottom. here is my

how to replace the legends of Piechart using achartengine API?

旧时模样 提交于 2019-12-23 17:06:35
问题 I am Using Achartengine Api for drawing pie chart. I am getting the legends displayed at the bottom of the Pie chart horizontally. but I want to display it on the right side of the Pie chart vertically. I heard that it can be done using setMargins() method . if I can use that please explain how to use that. Thank you in advance. 回答1: The setMargins() API call is, as the name suggests, for setting the margins around the chart. You cannot move the legend using this and you actually cannot move

AchartEngine: How to use TimeSeries with two different scales

半腔热情 提交于 2019-12-23 16:18:05
问题 As TimeSeries Construstor of AchartEngine API take only string as argument and have no other argument to pass as a scale argument. So how I will use it with two different scales Thanks 回答1: I suggest you don't try to use TimeSeries for multiple scales charting. You would better build a regular multiple scale line chart, set timestamps on the X axis and set your custom labels. // disable the default labels renderer.setXLabels(0); // add your formatted dates, several of these calls renderer

achartengine and hide series in legend

余生颓废 提交于 2019-12-23 10:09:13
问题 This is possible to hide series(title and line) in legend chart, lise on chart is still visible? I wnat only hide data in legend my I want to see my series on chart. I don;t want to hide all series in legend, only few. 回答1: You can hide some of the legend items this way: seriesRenderer.setShowLegendItem(false); 回答2: mRenderer.setShowLegend(false); 来源: https://stackoverflow.com/questions/16001676/achartengine-and-hide-series-in-legend

bar graph using AChartEngine library

给你一囗甜甜゛ 提交于 2019-12-23 07:37:10
问题 I have a bar graph using AChartEngine library as shown below :: public class MainActivity extends Activity { private String[] mMonth = new String[] { "Jan", "Feb" , "Mar", "Apr", "May", "Jun", "Jul", "Aug" , "Sep", "Oct", "Nov", "Dec" }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Getting reference to the button btn_chart Button btnChart = (Button) findViewById(R.id.btn_chart); // Defining click

AChartEngine CombinedXYChart wrong 4th parameter found

痴心易碎 提交于 2019-12-23 04:59:35
问题 i have a little Problem with my combined chart. 3 years ago i made the same with Eclipse and used a jar library. I copied my code to android Studio, using a dependency and now it's not working. I can't get it work. I will post my whole code and then I will mark the problem. public void createChart() { XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset(); XYMultipleSeriesRenderer multiRenderer = new XYMultipleSeriesRenderer(); final Bundle extras = this.getIntent().getExtras();