Android: I am using AChartEngine library for graphs, but not able to integrate achartengine's graph view with android xm
By : OBS
Date : March 29 2020, 07:55 AM
seems to work fine This is a FAQ for AChartEngine. The AChartEngine demo application is available for download here: AChartEngine demoIn the demo source code you can see an example on how to embed a chart into an existing view. code :
<LinearLayout
android:id="@+id/chart"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal" />
private GraphicalView mChartView;
protected void onResume() {
super.onResume();
if (mChartView == null) {
LinearLayout layout = (LinearLayout) findViewById(R.id.chart);
mChartView = ChartFactory.getLineChartView(this, mDataset,
mRenderer);
layout.addView(mChartView, new LayoutParams
(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
...
} else {
mChartView.repaint();
}
}
if (mChartView != null) {
mChartView.repaint();
}
|
How to use achartEngine?
By : user3368428
Date : March 29 2020, 07:55 AM
hope this fix your issue In the ChartFactory class there are several methods that you can use like this: code :
GraphicalView gView=ChartFactory.getDoughnutChartView(context,data,renderer);
setContentView(gView);
|
Could not find class 'org.achartengine.model.CategorySeries', referenced from method com.example.qaod.AChartEngine.<i
By : user2104726
Date : March 29 2020, 07:55 AM
this one helps. Project -> Build Path -> Configure Build path -> Libraries Tab -> Add External Jar File. Like this in Eclipse
|
ClassCastException:java.lang.Exception: java.lang.ClassCastException in mapred
By : Lennox Gay
Date : March 29 2020, 07:55 AM
around this issue I guess that this line job.setInputFormatClass(KeyValueTextInputFormat.class); tells your program to treat your input as key value pairs of Text. Therefore, when you require your input value to be a LongWritable you get this Exception. A quick fix would be to read your input as Text and then, if you want to use a LongWritable, parse it using: code :
public static class KVMapper
extends Mapper<Text, Text, Text, LongWritable>{
private final static LongWritable val = new LongWritable();
public void map(Text key, Text value, Context context) {
val.set(Long.parseLong(value.toString()));
context.write(key,val);
}
}
|
Bar graph using AchartEngine
By : Enrico Ronconi
Date : March 29 2020, 07:55 AM
I hope this helps you . I have created bar graph using aChartEngine library. Can anyone help me how to increase the width of the bars and position the bars at the centre of X-axis? , If you want to set width of the bars-- try this...
|