achart engine차트를 액티비티 절반에만 띄워주기 위해서..

아래 링크의 내용을 따라하려합니다.

http://groups.google.com/group/achartengine/browse_thread/thread/467ae1fa7096adfe


그런데 첫부분 ㅋ

1. First of all define a function to get a TimeChartView in SalesGrowthChart like this 

public  View getView(Context context) 
{ 
// your code here same as execute method given 
 return ChartFactory.getTimeChartView(context, buildDateDataset(titles, 
dates, values), 
        renderer, "MMM yyyy"); 
} 

이 부분을 어떤 파일에 집어넣야 하는지 모르겠습니다.


지금 현재 상황은,

제 프로젝트에서 import해서 achartengine-0.7.0.jar을 Refreenced Libaries 에 넣은 상태입니다.


그런데 저 안의 파일은 직접 수정이 안되더군요. 다 풀어서 수정하고 jar로 만들어야 하나요? ㅋ


기초를 몰라 죄송합니당;


아래는 전체 긁은 외국님 답변입니다.

Hi pramod, 
Yes you can draw chart in half view and in rest view can draw something 
else. 
1. First of all define a function to get a TimeChartView in 
SalesGrowthChart like this 
public  View getView(Context context) 
{ 
// your code here same as execute method given 
 return ChartFactory.getTimeChartView(context, buildDateDataset(titles, 
dates, values), 
        renderer, "MMM yyyy"); 
} 

2. Then make a  layout file abc.xml where you want to show your 
salesgrowthchart and rest of the other widgets like this 
<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 
  xmlns:android="http://schemas.android.com/apk/res/android
  android:orientation="horizontal" 
  android:id="@+id/salesLayout" 
  android:layout_width="match_parent" 
  android:layout_height="match_parent"> 
<!--   place your other views here --> 
</LinearLayout> 

3. make a class extending activity class which set its content view to
abc.xml 
and by programmatically add salesgrowthview to the linearlayout like this 

    SalesGrowthChart salesView = new SalesGrowthChart(); 
    View chartView = salesView.getView(this); 
    chartView.setLayoutParams(new 
LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, 
LinearLayout.LayoutParams.FILL_PARENT, 1f)); 
    LinearLayout layout = (LinearLayout)findViewById(R.id.salesLayout); 

    layout.addView(chartView, 0); 

Set the layout_gravity attribute according to the layout you need as i have 
used layout_gravity = 1 to make it equally divided. 
Thanks