whitespace COMPANY whitespace SERVICES whitespace PRODUCTS whitespace PURCHASE whitespace SUPPORT whitespace CONTACTS whitespace Home whitespace Contact Us whitespace Site Map whitespace
whitespace
SUPPORT
whitespace
FORUM
whitespace
FAQS
whitespace
SUBSCRIPTION
whitespace
REQUEST ON-LINE
whitespace
whitespace

Technical Support Forum

Welcome Guest Search | Active Topics | Log In | Register

questions about creating a pie chart Options · View
meimeimei
#1 Posted : Monday, April 04, 2011 3:39:46 PM
Rank: Newbie

Groups: Registered

Joined: 4/4/2011
Posts: 1
Location: hk
package com.artfulbits.aiCharts.piesample;

import com.artfulbits.aiCharts.ChartView;
import com.artfulbits.aiCharts.Base.*;
import android.app.Activity;
import android.os.Bundle;

public class MainActivity extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

ChartView chartView = (ChartView) findViewById(R.id.chartView);
ChartSeries series = chartView.getSeries().get(0);

double[] data = { 973, 4054, 732, 577, 337, 34 };
String[] labels = { "Africa", "Asia", "Europe",
"Latin America and the Caribbean", "Northern America", "Oceania" };

for (int i = 0; i < data.length; i++)
{
ChartPoint point = series.getPoints().addXY(i, data[i]);

point.setLabel(labels[i]);
}
}
}

I put the code from piesample to the class, however,
some of the lines are underlined indicating there are errors. How can i fix that? THANK YOU!!
Baydalka Volodymyr
#2 Posted : Monday, April 04, 2011 3:45:58 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
Hi,

Please, make sure that you add aiCharts library to classpath. Please check "aiCharts User Guide.pdf" document from the package.

Best regards,
Volodymyr Baydalka
Andriod development and support team
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Company | Services | Practices | Technologies | Career | Contacts | Privacy
© 2005-2016 ArtfulBits. All rights reserved.