Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 80

A C C L | Android Charting Component Library

1.0 Introduction 1.1 Problem Definition

The project describes that the ACCL is a component library that could be used by an application developer to create, evaluate and implement various charts and charting features in the Android platform. This document is intended for the application developers and the testers of Android system. The Overall Description section, of this document gives an overview of the functionality of the system. It describes the informal requirements and is used to establish a context for the technical requirements and specification. Android Charting Component Library(ACCL) supports Real time results, Real time graphs, Supports 3D charts, Supports all charting features unlike kiChart, Supports other charts also in addition to kiChart.

1.2

Motivation
People always like to see things graphically instead of the fact that are jotted down on the paper because its always easier to use and of course understand in a much lesser time.

Thus, charting was introduced to help people observe data in a statistical manner, which is always preferred.

To achieve this goal of viewing data statistically different types of charts were developed. A chart is a graphical representation of data, in which "the data is represented by symbols, such as bars in a bar chart, lines in a line chart, or slices in a pie chart. A chart can represent tabular numeric data, functions or some kinds of qualitative structures.

Different types of charts which even our project is going to incorporate are defined further.

The component library for charting in the Androids native SDK, will allow the programmers to develop and enhance the applications needing statistical analysis without worrying to first write the code for the all the charts and then proceed. As there is currently no component library for charting present in the native SDK.

1|Page

A C C L | Android Charting Component Library

The developers may also use this library to check their systems memory usage or use it in any network monitoring tool which requires statistical analysis.

Thus, this library will provide as a base for the application developers and would help them concentrate on the main application without caring about the lower level details.

1.3

Scope

This component library will be a collection of various charting components for application developers like Android application developers and various testers working on Android. This system will be designed to maximize the clients productivity by allowing them to view their vital information in a graphical form, which would otherwise be a very complex job. By maximizing the clients work efficiency and production the library will meet the clients needs while remaining easy to understand and use. More specifically, this component library is designed to allow the users to view different types of charts according to their requirements and convenience like pie charts, stack charts, histograms, bar charts etc. The project will help the company in greatly in establishing themselves in the Android market. The project help other developers also working with the Androids native SDK. The project would remove the load of the lower level work and help them concentrate on the main application. Thus, it would make the Android OS ultimately more efficient and convenient to work on.

1.4

Organization of the Report


Our project report is sectioned into various sections that describes the pattern in

which our project has come to its completion. Abstract includes a brief and simple description about overall project. Section one explains introductory part which contains overview about how many summarizers are there and which out of them we are using for our project and why.
2|Page

A C C L | Android Charting Component Library

Section second implies product perspective in which we highlight the initial requirements that are required in the beginning for developing this project, like software interface, hardware interface requirement analysis, feasibility study, and all the technical terms with their explanation are mentioned in this section. Next section explains about the various modules along with their working. Fourth section includes description of various database tables to be used for storing information like basic word table and stop word table. It is then followed by description of information in diagrammatic manner like using Context diagrams, DFDs, and flowcharts of all the project modules. The last section of this report includes a working example from the developed tool along with screenshots and coding used for the project.

1.5

Purpose

The main purpose of ACCL is to develop a component library that could be used by an application developer to create, evaluate and implement various charts and charting features in the Android platform. Developing a component library for charting in the native Android SDK. The library will have all the charting features which must be present in the respective charts like pie chart, line chart, bar chart, area chart etc. The library will enhance the performance of the charts and remove the lag that appears in loading and further processing them. The library will act as an tool in reducing the load of developing any further charting based application for the company, like network monitoring tool etc. The component library for charting in the Androids native SDK, will allow the programmers to develop and enhance the applications needing statistical analysis without worrying to first write the code for the all the charts and then proceed. As there is currently no component library for charting present in the native SDK. The developers may also use this library to check their systems memory usage or use it in any network monitoring tool which requires statistical analysis. Thus, this library will provide as a base for the application developers and would help them concentrate on the main application without caring about the lower level details
3|Page

A C C L | Android Charting Component Library

2.0 2.1

Background Literature Survey

Android is an operating system for mobile devices such as smart phones and tablet computers. It is developed by the Open Handset Alliance led by Google. Google purchased the initial developer of the software, Android Inc., in 2005. The unveiling of the Android distribution on November 5, 2007 was announced with the founding of the Open Handset Alliance, a consortium of 84 hardware, software, and telecommunication companies devoted to

advancing open standards for mobile devices. Google released most of the Android code under the Apache License, a free software license. The Android Open Source Project (AOSP) is tasked with the maintenance and further development of Android. Android consists of a kernel based on the Linux kernel, with middleware, libraries and

APIs written in C and application software running on an application framework which includes Java-compatible libraries based on Apache Harmony. Android uses the Dalvik virtual machine with just-in-time compilation to run compiled Java code. Android has a large

community of developers writing applications ("apps") that extend the functionality of the devices. Developers write primarily in a customized version of Java. There are currently more than 520,000 apps available for Android. Apps can be downloaded from third-party sites or through online stores such as Android Market, the app store run by Google. Android was listed as the best-selling smartphone platform worldwide in Q4 2010 by Canalys with over 190 million Android devices in use by October 2011.

4|Page

A C C L | Android Charting Component Library

2.2

History

2.2.1 Foundation
Android, Inc. was founded in Palo Alto, California, United States in October, 2003 byAndy Rubin (co-founder of Danger), Rich Miner (co-founder of Wildfire Communications, Inc.), Nick Sears (once VP at T-Mobile), and Chris White (headed design and interface development at WebTV) to develop, in Rubin's words "...smarter mobile devices that are more aware of its owner's location and preferences". Despite the obvious past accomplishments of the founders and early employees, Android Inc. operated secretly, revealing only that it was working on software for mobile phones. That same year, Rubin ran out of cash. Steve Perlman brought him $10,000 in cash in an envelope and refused a stake in the company.

2.2.2 Acquisition by Google


Google acquired Android Inc. in August 2005, making Android Inc. a wholly owned subsidiary of Google Inc. Key employees of Android Inc., including Andy Rubin, Rich Miner and Chris White, stayed at the company after the acquisition. Not much was known about Android Inc. at the time of the acquisition, but many assumed that Google was planning to enter the mobile phone market with this move.

2.2.3 Post-acquisition development


At Google, the team led by Rubin developed a mobile device platform powered by the Linux kernel. Google marketed the platform to handset makers and carriers on the premise of providing a flexible, upgradable system. Google had lined up a series of hardware component and software partners and signaled to carriers that it was open to various degrees of cooperation on their part. Speculation about Google's intention to enter the mobile communications market continued to build through December 2006.Reports from the BBC and The Wall Street Journal noted that Google wanted its search and applications on mobile phones and it was working hard to deliver that. Print and online media outlets soon reported rumors that Google was developing a Googlebranded handset. Some speculated that as Google was defining technical specifications, it was showing prototypes to cell phone manufacturers and network operators.In September
5|Page

A C C L | Android Charting Component Library

2007, InformationWeek covered

an Evalueserve study

reporting

that

Google

had

filed

several patent applications in the area of mobile telephony.

2.3

The Open Handset Alliance

Enter search advertising giant Google. Now a household name, Google has shown an interest in spreading its brand and suite of tools to the wireless marketplace. The companys business model has been amazingly successful on the Internet, and technically speaking, wireless isnt that different. The companys initial forays into mobile were beset with all the problems you would expect. The freedoms Internet users enjoyed were not shared by mobile phone subscribers. Internet users can choose from the wide variety of computer brands, operating systems, Internet service providers, and Web browser applications. Nearly all Google services are free and ad driven. Many applications in the Google Labs suite would directly compete with the applications available on mobile phones. The applications range from simple calendars and calculators to navigation with Google Map sand the latest tailored news from News Alertsnot to mention corporate acquisitions like Blogger and YouTube. When this approach didnt yield the intended results, Google decided to a different approachto revamp the entire system upon which wireless application development was based, hoping to provide a more open environment for users and developers: the Internet model. The Internet model allowes users to choose between freeware, shareware, and paid software. This enables free market competition among services. Forming of the Open Handset Alliance With its user-centric, democratic design philosophies, Google has led a movement to turn the existing closely guarded wireless market into one where phone users can move between carriers easily and have unfettered access to applications and services. With its vast resources, Google has taken a broad approach, examining the wireless infrastructure from the FCC wireless spectrum policies to the handset manufacturers requirements, application developer needs, and mobile operator desires. Next, Google joined with other like-minded members in the wireless community and posed the following question: What would it take to build a better mobile phone? The Open Handset Alliance (OHA) (Figure 1.5) was formed in November 2007 to answer that very question. The OHA is a business alliance comprised of many of the largest and most successful mobile
6|Page

A C C L | Android Charting Component Library

companies on the planet. Its members include chip makers, handset manufacturers, software developers, and service providers. The entire mobile supply chain is well represented. The Open Handset Alliance 17

The Open Handset Alliance.

Working together, OHA members began developing a nonproprietary open standard platform that would aim to alleviate the aforementioned problems hindering the mobile community. They called it the Android project. Googles involvement in the Android project has been extensive. The company hosts the open source project and provides online documentation, tools, forums, and the 03_0321627091_ch01.qxd 7/22/09 3:06 PM Page 17Software Development Kit (SDK). Google has also hosted a number of events at conferences and the Android Developer Challenge, a contest to encourage developers to write killer Android applicationsfor $10 million dollars in prizes. Manufacturers: Designing the Android Handsets More than half the members of the OHA are handset manufacturers, such as Samsung, Motorola, HTC, and LG, and semiconductor companies, such as Intel, Texas Instruments,NVIDIA, and Qualcomm. These companies are helping design the first generation of Android handsets The first shipping Android handsetthe T-Mobile G1was developed by handset manufacturer HTC with service provided by T-Mobile. It was released in October 2008. Many other Android handsets are slated for 2009 and early 2010. Content Providers: Developing Android Applications When users have Android handsets, they need those killer apps, right? Google has led the pack, developing Android applications, many of which, like the email client and Web browser, are core features of the platform. OHA members, such as

7|Page

A C C L | Android Charting Component Library

eBay, are also working on Android application integration with their online auctions. The first Android Developer Challenge received 1,788 submissionsall newly developed Android games, productivity helpers, and a slew of Location-Based Services (LBS). We also saw humanitarian, social networking, and mash-up apps. Many of these applications have debuted with users through the Android MarketGoogles software distribution mechanism for Android.

2.4

Mobile Operators: Delivering the Android Experience

After you have the phones, you have to get them out to the users. Mobile operators from Asia, North America, Europe, and Latin America have joined the OHA, ensuring a market for the Android movement. With almost half a billion subscribers, telephony giant China Mobile is a founding member of the alliance. Other operators have signed on as well.

2.4.1 Taking Advantage of All Android Has to Offer


Androids open platform has been embraced by much of the mobile development community extending far beyond the members of the OHA. As Android phones and applications become more readily available, many in the tech community anticipate other mobile operators and handset manufacturers will jump on

2.5

Android Platform Differences

Android is hailed as the first complete, open, and free mobile platform. n Complete: The designers took a comprehensive approach when they developed the Android platform. They began with a secure operating system and built a robust software framework on top that allows for rich application development opportunities. n Open: The Android platform is provided through open source licensing. Developers have unprecedented access to the handset features when developing applications. n Free: Android applications are free to develop. There are no licensing or royalty fees to develop on the platform. No required membership fees. No required testing fees. No required signing or certification fees. Android applications can be distributed and commercialized in a variety of ways.

8|Page

A C C L | Android Charting Component Library

2.5.1 Android: A Next Generation Platform


Although Android has many innovative features not available in existing mobile platforms, its designers also leveraged many tried-and-true approaches proven to work in the wireless world. Its true that many of these features appear in existing proprietary platforms, but Android combines them in a free and open fashion, while simultaneously addressing many of the flaws on these competing platforms. The Android mascot is a little green robot, shown in Figure 1.6.Youll see this little guy (girl?) often used to depict Android-related materials. Android is the first in a new generation of mobile platforms, giving its platform developers a distinct edge on the competition. Androids designers examined the benefits and drawbacks of existing platforms and then incorporate their most successful features.

9|Page

A C C L | Android Charting Component Library

2.6

Licensing

With the exception of brief update periods, Android has been available under a free and open source software license from October 21, 2008 until March 2011. Google published the entire source code (including network and telephony stacks) under an Apache License. Google also keeps the reviewed issues list publicly open for anyone to see and comment. Even though the software is open source, device manufacturers cannot use Google's Android trademark unless Google certifies that the device complies with their Compatibility Definition Document (CDD). Devices must also meet this definition to be eligible to license Google's closed-source applications, including the Android Market. In September 2010, Skyhook Wireless filed a lawsuit against Google in which they alleged that Google had used the compatibility document to block Skyhook's mobile positioning service (XPS) from Motorola's Android mobile devices. In December 2010 a judge denied Skyhook's motion for preliminary injunction, saying that Google had not closed off the possibility of accepting a revised version of Skyhook's XPS service, and that Motorola had terminated their contract with Skyhook because Skyhook wanted to disable Google's location data collection functions on Motorola's devices, which would have violated Motorola's obligations to Google and its carriers. In early 2011, Google chose to withhold the Android source code to the tablet-only Honeycomb release, creating a controversy over Google's commitment to open source with Android. The reason, according to Andy Rubin in an official Android blog post, was because Honeycomb was rushed for production of the Motorola Xoom, and they did not want third parties creating a "really bad user experience" by attempting to put onto smartphones a version of Android intended for tablets. Google later confirmed that the Honeycomb source code would not be released until after it was merged with the Gingerbread release in Ice Cream Sandwich. One of the criticisms often levied against Android is that it is not as open as Google claims. A mid-2009 Google strategy briefing included phrases such as "Do not develop in the open. Instead, make source code available after innovation is complete". The document also suggests that time-to-market exclusivity be given to partners who abide by Google's specifications. In an
10 | P a g e

A C C L | Android Charting Component Library

internal email, dated Aug. 6, 2010, Dan Morrill, a manager in the Android group, noted in passing that it was obvious to the phone makers that "we are using compatibility as a club to make them do things we want." In a July 2011 research into open source projects, Android was found to be the most "closed" platform scoring significantly lower in an "openness" index. The other projects examined were Qt, Symbian, MeeGo, Mozilla, WebKit, Linux and Eclipse.

11 | P a g e

A C C L | Android Charting Component Library

3.0

Android

Android is an operating system for mobile devices such as smart phones and tablet computers .Developed by the Open Handset Alliance led by Google. Android Open Source Project is tasked with the maintenance and further development of android.

3.1

About Android

Android consists of a kernel based on the Linux kernel. The next level up contains the Android native libraries. They are all written in C/C++ internally, but youll be calling them through Java interfaces. In this layer you can find the Surface Manager, 2D and 3D graphics, Media codec, the SQL database (SQLite), and a native web browser engine (WebKit).Android uses the Dalvik virtual machine. Dalvik Virtual Machine. Dalvik runs dex files, which are converted at compile time from standard class and jar files. Android has seen a number of updates since its original release. Its recent releases are 2.0 Eclair , 2.1 clair, 2.2 Froyo , 2.3 Gingerbread, 3.0 , 3.1 ,3.2 Honeycomb.

3.2

Android Emulator

The Android SDK includes a mobile device emulator a virtual mobile device that runs on your computer. The emulator lets you develop and test Android applications without using a physical device. The emulator supports a variety of options that you can specify when launching the emulator, to control its appearance or behavior. Google provides an Android emulator with their SDK, which is designed to let developers test their apps on Android before running them on handsets. We can use this to test drive Android on our computer, heres how to do it.

12 | P a g e

A C C L | Android Charting Component Library

3.2.1 Getting Started


The Android Emulator requires Java to run, so if you dont already have Java installed on your computer, download it from the link below and install as normal.

Then, download the Android SDK from Google (link below), and make sure to select the correct version for your computer. Once its downloaded, unzip the files as normal.

13 | P a g e

A C C L | Android Charting Component Library

In Windows, run the SDK Setup.exe program to get started running Android on your PC.

14 | P a g e

A C C L | Android Charting Component Library

The SDK will check Googles servers for available packages.

15 | P a g e

A C C L | Android Charting Component Library

If you see an SSL error message, click the Settings tab on the left in the SDK and AVD Manager window that opened in the background. Here, uncheck the Force https box, click Ok, and then reopen the setup.

Now, the Package Installer will open. You can choose what you want to install, and then clickInstall to begin installing the Android emulator on your computer.

16 | P a g e

A C C L | Android Charting Component Library

By default, all of the SDK platforms, samples, and APIs will be selected for install. This can take quite a while to download, as several versions of Android are currently available. If you only want to play around with Android, choose the version you want. Youll want the SDK Platform Android your version. Then click the Reject bullet on all the other entries, and click Install. We wanted to try out the latest Android 2.2 as well as the older 1.5, so we downloaded both of them.

17 | P a g e

A C C L | Android Charting Component Library

Once youve started installing, youll see a window showing the download and installation progress. This may take a few minutes, depending on your Internet speed.

Youll have some little Androids in your taskbar, but unfortunately they dont show the download progress.

18 | P a g e

A C C L | Android Charting Component Library

3.2.2 Setup an Android Emulator


Once the download is completed, you can setup an emulator to test drive Android on your computer. Select the Virtual Devices from the left menu, and then click the New button on the right.

Enter a name for your virtualized Android, and select the version of Android you want to use from the drop-down menu. This will only show the version you installed previously, so you may only see one version listed depending on your selection.

19 | P a g e

A C C L | Android Charting Component Library

Enter a size under the SD Card entry; this is a virtual SD card thats actually an IMG file that Android will use to store your settings and files in. Then, select a screen size from the skin options. The default is a standard, Nexus One-type display, while the others are different sizes including even a BlackBerry-style device.

20 | P a g e

A C C L | Android Charting Component Library

Click Create AVD when youre finished.

The program may appear to freeze while it is creating the AVD, so just wait until you see the confirmation window.

21 | P a g e

A C C L | Android Charting Component Library

Youre now ready to run Android on your PC! Select your new virtual Android, and click Starton the right.

You can choose to scale the display if youve chosen a larger screen size than your monitor will fit, and then select Launch.

Android will now begin to load in your emulator. Several command prompt windows may open, and then youll see the emulator itself. Notice that the default, large screen size will display a keypad and virtual buttons on the right side of the emulated device.

22 | P a g e

A C C L | Android Charting Component Library

Android may take several minutes to load, especially on your first run. After a while, the boot screen will switch to an Android boot animation. Finally, youll be presented with your new Android home screen! Use your mouse as you would normally, though remember that you dont need to double-click to open apps.

23 | P a g e

A C C L | Android Charting Component Library

We did experience a few crashes in our tests, and the emulator felt somewhat sluggish, but in all, its fun to try out a new mobile OS without spending money on a new phone.

24 | P a g e

A C C L | Android Charting Component Library

3.3

Android Platform

Android is an operating system and a software platform upon which applications are developed. A core set of applications for everyday tasks, such as Web browsing and email, are included on Android handsets. As a product of the Open Handset Alliances vision for a robust and open source development environment for wireless, Android is an emerging mobile development platform. The platform was designed for the sole purpose of encouraging a free and open market that all mobile applications phone users might want to have and software developers might want to develop.

3.4

Androids Underlying Architecture

The Android platform is designed to be more fault-tolerant than many of its predecessors.The handset runs a Linux operating system, upon which Android applications are executed in a secure fashion. Each Android application runs in its own virtual machine. Android applications are managed code; therefore, they are much less likely to cause the phone to crash, leading to fewer instances of device corruption (also called bricking the phone, or rendering it useless).

25 | P a g e

A C C L | Android Charting Component Library

3.4.1 The Linux Operating System


The Linux 2.6 kernel handles core system services and acts as a hardware abstraction layer (HAL) between the physical hardware of the handset and the Android software stack.

The Linux Kernel Mascot

26 | P a g e

A C C L | Android Charting Component Library

Diagram of the Android platform architecture.

27 | P a g e

A C C L | Android Charting Component Library

Some of the core functions the kernel handles include 1) Enforcement of application permissions and security 2) Low-level memory management 3) Process management and threading 4) The network stack 5) Display, keypad input, camera, WiFi, Flash memory, audio, and binder (IPC) driver access.

3.4.2 Android Application Runtime Environment


Each Android application runs in a separate process, with its own instance of the Dalvik virtual machine (VM). Based on the Java VM, the Dalvik design has been optimized for mobile devices. The Dalvik VM has a small memory footprint and multiple instances of the Dalvik VM can run concurrently on the handset. Security and Permissions. The integrity of the Android platform is maintained through a variety of security measures.

3.5

Applications as Operating System Users

When an application is installed, the operating system creates a new user profile associated with the application. Each application runs as a different user, with its own private files on the file system, a user ID, and a secure operating environment. The application executes in its own process with its own instance of the Dalvik VM and under its own user ID on the operating system.

3.5.1 Explicitly Defined Application Permissions


To access shared resources on the system, Android applications register for the specific privileges they require. Some of these privileges enable the application to use phone functionality to make calls, access the network, and control the camera and other hardware
28 | P a g e

A C C L | Android Charting Component Library

sensors. Applications also require permission to access shared data containing private and personal information such as user preferences, users location, and contact information. Applications might also enforce their own permissions by declaring them for other applications to use. The application can declare any number of different permission types, such as read-only or read-write permissions, for finer control over the application.

3.5.2 Limited Ad-Hoc Permissions


Applications that act as content providers might want to provide some on-the-fly permissions to other applications for specific information they want to share openly. This is done using ad-hoc granting and revoking of access to specific resources using Uniform Resource Identifiers (URIs). URIs index specific data assets on the system, such as images and text. Here is an example of a URI that provides the phone numbers of all contacts: content://contacts/phones to understand how this permission process works, lets look at an example. Lets say weve got an application that keeps track of the users public and private birthday wish lists. If this application wanted to share its data with other applications, it could grant URI permissions for the public wish list, allowing another application permission to access this list without explicitly having to ask for it.

3.5.3 Developing Android Applications


The Android SDK provides an extensive set of application programming interfaces (APIs) that is both modern and robust. Android handset core system services are exposed and accessible to all applications. When granted the appropriate permissions ,Android applications can share data among one another and access shared resources on the system securely.

3.5.4

Android Programming Language Choices

Android applications are written in Java For now, the Java language is the developers only choice on the Android platform. There has been some speculation that other programming languages, such as C++, might be added in future versions of Android.

29 | P a g e

A C C L | Android Charting Component Library

Duke, The Java Masco

3.5.5 No Distinctions Made Between Native and Third-Party Applications


Unlike other mobile development platforms, there is no distinction between native applications and developer-created applications on the Android platform. Provided the application is granted the appropriate permissions, all applications have the same access to core libraries and the underlying hardware interfaces. Android handsets ship with a set of native applications such as a Web browser and contact manager. Third-party applications might integrate with these core applications and even extend them to provide a rich user experience.

3.5.6 Commonly Used Packages


With Android, mobile developers no longer have to reinvent the wheel. Instead, developers use familiar class libraries exposed through Androids Java packages to perform common tasks such as graphics, database access, network access, secure communications, and utilities (such as XML parsing). The Android packages include support for 1) Common user interface widgets (Buttons, Spin Controls,Text Input) 2) User interface layout 3) Secure networking and Web browsing features (SSL,WebKit) 4) Structured storage and relational databases (SQLite) 5) Powerful 2D and 3D graphics (SGL and OpenGL ES 1.0) 6) Audio and visual media formats (MPEG4, MP3, Still Images)

30 | P a g e

A C C L | Android Charting Component Library

3.6 Android Application Framework


The Android application framework provides everything necessary to implement your average application. The Android application lifecycle involves the following key components: 1) Activities are functions the application performs. 2) Groups of views define the applications layout. 3) Intents inform the system about an applications plans. 4) Services allow for background processing without user interaction. 5) Notifications alert the user when something interesting happens. Android Applications can interact with the operating system and underlying hardware using a collection of managers. Each manager is responsible for keeping the state of some underlying system service. For example, there is a Location Manager that facilitates interaction with the location-based services available on the handset. The View Manager and Window Manager manage user interface fundamentals. Applications can interact with one another by using or acting as a Content Provider. Built-in applications such as the Contact manager are content providers, allowing third-party applications to access contact data and use it in an infinite number of ways. The sky is the limit.

31 | P a g e

A C C L | Android Charting Component Library

4.0

Charting And Charts

People always like to see things graphically instead of the fact that are jotted down on the paper because its always easier to use and of course understand in a much lesser time. Thus, charting was introduced to help people observe data in a statistical manner, which is always preferred. To achieve this goal of viewing data statistically different types of charts were developed. A chart is a graphical representation of data, in which "the data is represented by symbols, such as bars in a bar chart, lines in a line chart, or slices in a pie chart. A chart can represent tabular numeric data, functions or some kinds of qualitative structures. Different types of charts which even our project is going to incorporate are defined further.

4.1

Bar chart

A bar chart or bar graph is a chart with rectangular bars with lengths proportional to the values that they represent. The bars can be plotted vertically or horizontally. Bar charts are used for plotting discrete (or 'discontinuous') data which has discrete values. Some examples of discontinuous data include 'shoe size' or 'eye color', for which you would use a bar chart. In contrast, some examples of continuous data would be 'height' or 'weight'. A bar chart is very useful if you are trying to record certain information whether it is continuous or not continuous data. Bar charts also look a lot like a histogram. They are often mistaken for each other.

32 | P a g e

A C C L | Android Charting Component Library

Bar Chart

4.2

Histogram

In statistics, a histogram is a graphical representation showing a visual impression of the distribution of data. It is an estimate of the probability distribution of a continuous variable and was first introduced by Karl Pearson. A histogram consists of tabular frequencies, shown as adjacent rectangles, erected over discrete intervals (bins), with an area equal to the frequency of the observations in the interval. The height of a rectangle is also equal to the frequency density of the interval, i.e., the frequency divided by the width of the interval. The total area of the histogram is equal to the number of data. A histogram may also be normalized displaying relative frequencies. It then shows the proportion of cases that fall into each of several categories, with the total area equaling 1. The categories are usually specified as consecutive, non-overlapping intervals of a variable. The categories (intervals) must be adjacent, and often are chosen to be of the same size. Histograms are used to plot density of data, and often for density estimation: estimating the probability density function of the underlying variable. The total area of a histogram used for probability density is always normalized to 1. If the length of the intervals on the x-axis is all 1, then a histogram is identical to a relative frequency plot.
33 | P a g e

A C C L | Android Charting Component Library

Histograms

4.3

Pie Chart

A pie chart (or a circle graph) is a circular chart divided into sectors, illustrating proportion. In a pie chart, the arc length of each sector (and consequently its central angle and area), is proportional to the quantity it represents. When angles are measured with 1 turn as unit then a number of percent is identified with the same number of centiturns. Together, the sectors create a full disk. It is named for its resemblance to apie which has been sliced. The earliest known pie chart is generally credited to William Playfair's Statistical Breviary of 1801. The pie chart is perhaps the most ubiquitous statistical chart in the business world and the mass media. However, it has been criticized,[4]and some recommend avoiding it, pointing out in particular that it is difficult to compare different sections of a given pie chart, or to compare data across different pie charts. Pie charts can be an effective way of displaying information in some cases, in particular if the intent is to compare the size of a slice with the whole pie, rather than comparing the slices among them. Pie charts work particularly well when the slices represent 25
34 | P a g e

A C C L | Android Charting Component Library

to 50% of the data, but in general, other plots such as the bar chart or the dot plot, or nongraphical methods such as tables, may be more adapted for representing certain information. It also shows the frequency within certain groups of information.

t Pie Char

35 | P a g e

A C C L | Android Charting Component Library

4.4

Line Chart

A line chart or line graph is a type of graph, which displays information as a series of data points connected by straight line segments. It is a basic type of chart common in many fields. It is an extension of a scatter graph, and is created by connecting a series of points that represent individual measurements with line segments. A line chart is often used to visualize a trend in data over intervals of time a time series thus the line is often drawn chronologically.

Line chart

5.0 5.1

Project Development Development Tools

The Android SDK includes a variety of tools that help you develop mobile applications for the Android platform. The tools are classified into two groups: SDK tools and platform tools. SDK tools are platform independent and are required no matter which Android platform you are developing on. Platform tools are customized to support the features of the latest Android platform.

36 | P a g e

A C C L | Android Charting Component Library

5.2

SDK Tools

The SDK tools are installed with the SDK starter package and are periodically updated. The SDK tools are required if you are developing Android applications. The most important SDK tools include the Android SDK Manager (android sdk), the AVD Manager (android avd) the emulator (emulator), and the Dalvik Debug Monitor Server (ddms). A short summary of some frequently-used SDK tools is provided below:

5.2.1 ANDROID
Android is an important development tool that lets us:

Create, delete, and view Android Virtual Devices (AVDs). See Managing AVDs from the Command Line.

Create and update Android projects. See Managing Projects from the Command Line. Update your Android SDK with new platforms, add-ons, and documentation. See Adding SDK Packages. If we are using Eclipse, the android tool's features are integrated into ADT, so you should not need to use this tool directly.

5.2.2 Dalvik Debug Monitor Server (DDMS)


Android ships with a debugging tool called the Dalvik Debug Monitor Server (DDMS), which provides port-forwarding services, screen capture on the device, thread and heap information on the device, logcat, process, and radio state information, incoming call and SMS spoofing, location data spoofing, and more. This page provides a modest discussion of DDMS features; it is not an exhaustive exploration of all the features and capabilities.

37 | P a g e

A C C L | Android Charting Component Library

How DDMS Interacts with a Debugger On Android, every application runs in its own process, each of which runs in its own virtual machine (VM). Each VM exposes a unique port that a debugger can attach to. When DDMS starts, it connects to adb. When a device is connected, a VM monitoring service is created between adb and DDMS, which notifies DDMS when a VM on the device is started or terminated. Once a VM is running, DDMS retrieves the the VM's process ID (pid), via adb, and opens a connection to the VM's debugger, through the adb daemon (adbd) on the device. DDMS can now talk to the VM using a custom wire protocol. DDMS assigns a debugging port to each VM on the device. Typically, DDMS assigns port 8600 for the first debuggable VM, the next on 8601, and so on. When a debugger connects to one of these ports, all traffic is forwarded to the debugger from the associated VM. You can only attach a single debugger to a single port, but DDMS can handle multiple, attached debuggers.

38 | P a g e

A C C L | Android Charting Component Library

5.3

Eclipse Platform Technical Overview

The Eclipse Platform is designed for building integrated development environments (IDEs) that can be used to create applications as diverse as web sites, embedded Java TM programs, C++ programs, and Enterprise JavaBeans TM. This paper is a general technical introduction to the Eclipse Platform. Part I presents a technical overview of its architecture. Part II is a case study of how the Eclipse Platform was used to build a full-featured Java development environment.

39 | P a g e

A C C L | Android Charting Component Library

The navigator view shows the files in the user's workspace; the text editor (top right) shows the content of a file; the tasks view (bottom right) shows a list of to-dos; the outline view (bottom left) shows a content outline of the file being edited (not available for plain text files). Although the Eclipse Platform has a lot of built-in functionality, most of that functionality is very generic. It takes additional tools to extend the Platform to work with new content types, to do new things with existing content types, and to focus the generic functionality on something specific. The Eclipse Platform is built on a mechanism for discovering, integrating, and running modules called plug-ins. A tool provider writes a tool as a separate plug-in that operates on files in the workspace and surfaces its tool-specific UI in the workbench. When the Platform is launched, the user is presented with an integrated development environment (IDE) composed of the set of

40 | P a g e

A C C L | Android Charting Component Library

available plug-ins.

The quality of the user experience depends significantly on how well the

tools integrate with the Platform and how well the various tools work with each other. The Eclipse Platform (or simply "the Platform" when there is no risk of confusion) is designed and built to meet the following requirements: Support the construction of a variety of tools for application development. Support an unrestricted set of tool providers, including independent software vendors (ISVs). Support tools to manipulate arbitrary content types (e.g., HTML, Java, C, JSP, EJB, XML, and GIF). Facilitate seamless integration of tools within and across different content types and tool providers. Support both GUI and non-GUI-based application development environments. Run on a wide range of operating systems, including Windows and Linux TM Capitalize on the popularity of the Java programming language for writing tools. The Eclipse Platform's principal role is to provide tool providers with mechanisms to use, and rules to follow, that lead to seamlessly-integrated tools. These mechanisms are exposed via welldefined API interfaces, classes, and methods. The Platform also provides useful building blocks and frameworks that facilitate developing new tools.

41 | P a g e

A C C L | Android Charting Component Library

Eclipse Platform Architecture

5.3.1 ADT Plug-in for Eclipse


Android Development Tools (ADT) is a plugin for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications. ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, add packages based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) .apk files in order to distribute your application. Developing in Eclipse with ADT is highly recommended and is the fastest way to get started. With the guided project setup it provides, as well as tools integration, custom XML editors, and debug output pane, ADT gives you an incredible boost in developing Android applications. This document provides step-by-step instructions on how to download the ADT plugin and install it into your Eclipse development environment. Note that before you can install or use ADT, you must have compatible versions of both the Eclipse IDE and the Android SDK installed.

42 | P a g e

A C C L | Android Charting Component Library

5.4

Android SDK Manager

5.4.1 Adding SDK Packages


Use the Android SDK Manager to set up your SDK and keep it up-to-date. Adding and updating packages in your Android SDK is fast and easy. To add or update the individual SDK packages that you need, use the Android SDK Manager (included in the SDK Tools). It only takes a couple of clicks to install individual versions of the Android platform, new development tools, new documentation, and SDK add-ons. The new SDK packages are automatically installed into your existing SDK directory, so you don't need to update your development environment to specify a new SDK location.

43 | P a g e

A C C L | Android Charting Component Library

Launching the Android SDK Manager The Android SDK Manager is the tool that you use to install and upgrade SDK packages in your development environment. You can launch the Android SDK Manager in one of the following ways. Launching from Eclipse/ADT If you are developing in Eclipse and have already installed the ADT Plugin, follow these steps to access the Android SDK Manager tool: Open Eclipse Select Window > Android SDK Manager.

5.4.2

INSTALLING THE ANDROID SDK (SOFTWARE KIT)

The Android Software Development Kit (SDK) allows developers to create applications for the Android platform. The Android SDK includes sample projects with source code, development tools, an emulator, and required libraries to build Android applications which are written using the Java programming language. Much of the info in this guide comes from the documentation on the Android Developers site. Follow this quick guide to successfully install Android SDK on your computer. If you are new to it, it is a bit complicated to install compared to your usual program. However if you are good in following instructions, its as easy as A-B-C. The process involves four general steps: Meeting System Requirements Fetching the Android SDK Package Installing the Android Development Tools (ADT) Plug-in for Eclipse

44 | P a g e

A C C L | Android Charting Component Library

Adding Android Platforms and Components

Step 1: Get Ready Your Computer


Before anything else, see to it that your computer meets the minimum system requirements. Specifically, you might need to install the Java Development Kit (JDK), if you dont have it yet. The following outlines the system and software requirements for developing Android applications using the Android SDK. Supported Operating Systems

Windows XP or Vista Mac OS X 10.4.8 or later (x86 only) Linux (tested on Linux Ubuntu Dapper Drake)

Supported Development Environments Eclipse Integrated Development Environment (IDE)

Eclipse 3.5 (Galileo) or greater. Note: Eclipse 3.4 (Ganymede) is no longer supported with the latest version of ADT.

Eclipse JDT plug-in (included in most Eclipse IDE packages) If you need to install or update Eclipse, you can download it here. Several types of Eclipse packages are available for each platform. For developing Android applications, we recommend that you install one of these packages:
o o o

Eclipse IDE for Java Developers Eclipse Classic (versions 3.5.1 and higher) Eclipse IDE for Java EE Developers

Note: Not compatible with GNU Compiler for Java (gcj)

45 | P a g e

A C C L | Android Charting Component Library

Other development environments or IDEs


JDK 5 or JDK 6 (JRE alone is not sufficient) Apache Ant 1.8 or later Note: Not compatible with GNU Compiler for Java (gcj)

If Java Development Kit (JDK) is already installed on your development computer, make sure that it meets the version requirements listed above. In particular, note that some Linux distributions may include JDK 1.4 or GNU Compiler for Java, both of which are not supported for Android development.

Step 2: Download the SDK Starter Package


The SDK Starter Package is not a full development environment. It only includes the core SDK Tools, which you can use to download the rest of the SDK components (such as the latest Android platform). To get the latest version of the SDK starter package, refer to the table below and download the package for your machines operating system:

Step 3: Install the ADT Plugin for Eclipse


Android offers a custom Eclipse IDE plugin called Android Development Tools (ADT) designed to give you a powerful, integrated environment in which to build Android applications. It extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, debug your applications using the Android SDK tools, and even export signed (or unsigned) APKs in order to distribute your application. In general, developing in Eclipse with ADT is a highly recommended approach and is the fastest way to get started with Android. If you will be developing in Eclipse with the Android Development Tools (ADT) Plugin, follow the steps to download the ADT. Otherwise, you do not need to install Eclipse or ADT. Instead, you can directly use the SDK tools to build and debug your application.

46 | P a g e

A C C L | Android Charting Component Library

Step 4: Download and Add Platforms and Other Components


The last step in setting up your SDK is using the Android SDK and AVD Manager (a tool included in the SDK starter package) to download essential SDK components into your development environment. Launching Android SDK and AVD Manager You can launch the Android SDK and AVD Manager in any of the following ways:

From within Eclipse, select Window > Android SDK and AVD Manager. On Windows, double-click the SDK Manager.exe file at the root of the Android SDK directory.

On Mac or Linux, open a terminal and navigate to the tools/ directory in the Android SDK. Then type android on the terminal window and press Enter.

To download components, use the graphical UI of the Android SDK and AVD Manager to browse the SDK repository and select new or updated components (see Figure ). The Android SDK and AVD Manager installs the selected components in your SDK environment.

47 | P a g e

A C C L | Android Charting Component Library

For SDK Install in Windows we have used the following steps: 1. Download the latest version of Android SDK for Windows 2. Unzip the package to the root of C:\. (NOTE: This will output a folder called androidsdk-windows) 3. Open up the android-sdk-windows folder and launch the SDK Manager. 4. When you launch the SDK Manager for the first time it will ask for which packages to install. The only package we are concerned with at this time is Android SDK Platform tools, revision 6. You can reject all the others if you are not interested in them. 5. Once that is finished, you will need to install the USB drivers included with the Android SDK. 1. Click on Available Packages on the left. 2. Expand Third party Add-ons.
48 | P a g e

A C C L | Android Charting Component Library

3. Expand Google Inc. add-ons. 4. Check Google USB Driver package, revision 4. 5. Click Installed Selected. 6. Once thats finished installing, you can close the SDK Manager. 7. Go to the Control Panel, and select the System Properties (Windows XP) or System (Windows Vista/7). 8. Select the Advanced settings. (On Windows XP: Click on the Advanced tab. On Windows Vista/7: Click on Advanced system settings on the left.) 9. Click on Environment Variables. 10. Under the System variable section, you will look for Path. Double-click on it. 11. In the Variable values section, add at the very end the location of the tools & package tools folder, with a semicolon separating these two paths from the rest. (e.g. %SystemRoot%;C:\android-sdk-windows\platform-tools;C:\android-sdk-windows\tools) 12. On your Android device, ensure that USB Debugging is enabled (Settings Applications Development). 13. Plug the device into the computer via USB cable. The computer will attempt to install the drivers automatically. 14. On success, open a command prompt on the computer, and type in the following command to sure everything is setup properly: adb devices 15. If it lists any devices, everything is fine and you are finished. If not, the drivers may not be installed correctly, please continue. 16. Open the Device Manager as follows: 1. Right-click on My Computer (Windows XP) or Computer (Windows Vista/7). 2. Click on Manage. 3. Click on Device Manager on the left. 17. You will probably see Unknown Device with ADB listed under it with a yellow exclamation mark. 18. Right-click on ADB. 19. Click on Update Driver Software. 20. Click on Browse my computer for driver software. 21. Click on Let me pick from a list of device drivers on my computer.
49 | P a g e

A C C L | Android Charting Component Library

22. Click on Have Disk. 23. Click on Browse. 24. Navigate to C:\android-sdk-windows\extras\google\usb_driver and select android_winusb.inf. 25. Click on Android ADB Interface. (NOTE: You will get an Update Driver Warning, click on Yes.) 26. Once finished installing the driver, open a command prompt on the computer, and type in the following command to sure everything is setup properly: adb devices 27. If it lists any devices, everything is fine and you are finished. If not, try restarting Windows. If you still cant see your device, you may have further issues and will have to do further research on your own.

50 | P a g e

A C C L | Android Charting Component Library

5.5

Android Emulator

The Android SDK includes a mobile device emulator a virtual mobile device that runs on your computer. The emulator lets you develop and test Android applications without using a physical device. The emulator supports a variety of options that you can specify when launching the emulator, to control its appearance or behavior. Google provides an Android emulator with their SDK, which is designed to let developers test their apps on Android before running them on handsets. We can use this to test drive Android on our computer, heres how to do it.

51 | P a g e

A C C L | Android Charting Component Library

6.0 6.1

Related Diagrams Class Diagram:

The purpose of the class diagram is to model the static view of an application. The class diagrams are the only diagrams which can be directly mapped with object oriented languages and thus widely used at the time of construction. The UML diagrams like activity diagram, sequence diagram can only give the sequence flow of the application but class diagram is a bit different. So it is the most popular UML diagram in the coder community. So the purpose of the class diagram can be summarized as:

Analysis and design of the static view of an application. Describe responsibilities of a system. Base for component and deployment diagrams. Forward and reverse engineering.

52 | P a g e

A C C L | Android Charting Component Library

6.2

Use Case Diagram:

The purpose of use case diagram is to capture the dynamic aspect of a system. But this definition is too generic to describe the purpose. Because other four diagrams (activity, sequence, collaboration and State chart) are also having the same purpose. So we will look into some specific purpose which will distinguish it from other four diagrams. Use case diagrams are used to gather the requirements of a system including internal and external influences. These requirements are mostly design requirements. So when a system is analyzed to gather its functionalities use cases are prepared and actors are identified. Now when the initial task is complete use case diagrams are modelled to present the outside view. So in brief, the purposes of use case diagrams can be as follows:

53 | P a g e

A C C L | Android Charting Component Library


Used to gather requirements of a system. Used to get an outside view of a system. Identify external and internal factors influencing the system. Show the interacting among the requirements are actors.

6.3

SEQUENCE DIAGRAM:

UML sequence diagrams are used to show how objects interact in a given situation. An important characteristic of a sequence diagram is that time passes from top to bottom: the interaction starts near the top of the diagram and ends at the bottom (i.e. Lower equals later). A popular use for them is to document the dynamics in an object-oriented system. For each key collaboration, diagrams are created that show how objects interact in various representative scenarios for that collaboration.

54 | P a g e

A C C L | Android Charting Component Library

7.0 7.1

External Interface Requirement User Interface:

Since ACCL is a component library it does not possess any user interface. As it is imported for development of Android charting applications, those applications can have their user interface according to the requirement of the users intended to use the charts.

55 | P a g e

A C C L | Android Charting Component Library

7.2

Hardware Interface:

The hardware interface could be any android-oriented device like mobile systems using Android platform could be an interface to the application using this component library. The interface could be extended to android tablets as well.

7.3

Software Interface:

The application developers use the ACCL in order to develop the applications intended for the user. the user implements it in his device using Android software. The gap between the ACCL and the application is bridged by importing ACCL in the development phase of the application.

56 | P a g e

A C C L | Android Charting Component Library

7.4

Other Non-Functional Interface:

7.4.1 Performance Requirement:


The ACCL gives real time charts and its respective values in response to the requested query. ACCL gives high performance by producing efficient charts. Real time variations in the input data are also reflected on the charts made with the help of ACCL. Different computations performed on data are reflected instantly in the charts. Further evaluation on the derived results can be done using charts made by ACCL. Instant refreshing of charts are also implemented in the library.

7.4.2 Software Quality Attributes:


The main quality of the ACCL is the responsiveness required in producing the requested results. The variations in real time are projected in the charts in as less time as possible. Any illegal input entered will not crash the system or degrade the performance of the system. Refreshing of charts produces new charts instantly according to the new input value given. On various events like mouse dragged or tap on the screen over the charts gives the actual value of that chart at its respective position, like dragging a mouse over a specific position over a pie-chart gives its actual value at that point.

57 | P a g e

A C C L | Android Charting Component Library

7.5

Other Requirements:

7.5.1 Testing Framework:


Lets look at the traditional software development cycle. The figure below depicts the same. Testing phase comes after the coding phase and before the software is launched.

But the recommended test process involves testing in every phase of the lifecycle. During the requirements phase the emphases is on validation to determine that the requirements meet the needs of organization. During the design and program phases the emphasis is on verification to ensure that the design and program accomplish the defined requirements. During the test and installation phases, the emphasis is on inception to determine that the implemented system meets
58 | P a g e

A C C L | Android Charting Component Library

the system specification.During the maintenance phases, the system will be restarted to determine that the changes work and the unchanged portion continues to work.

8.0

Execution of Application

The project is named as ANDROID CHARTING COMPONENT LIBRARY, which basically will be used to display charts and all the various features of a chart. The main purpose of ACCL is to develop a component library that could be used by an application developer to create, evaluate and implement various charts and charting features in the native Android platform. DESCRIPTION OF CLASSES: The main class is named as AcclDemoActivity which has been used in order to invoke the different classes and the methods in those class. The next step is our base to the project. It has been named as base class . This class includes the method to draw the axes of the display as well as the display of text along the axes. The basic chart called the line chart is the next step to it. So the class line has been included to display the line chart. Similarly other classes have been included like bar chart , area chart , column chart and of course the pie chart. The detailed execution of this application will be such that , the component library that is built need to be imported in the application. The library has been named as ACCL . Hence one can import the package using import accl.*; Once it is imported , the user can invoke the different classes and display any chart of his choice by simply invoking that method.

59 | P a g e

A C C L | Android Charting Component Library

For eg. If the user wants to display a pie chart then the following steps need to be followed: 1. Import the package named as ACCL. 2. Invoke the class named as piechart. 3. Invoke the parameterized constructor in that class. 4. Pass the parameters that the user wants to be displayed along the axes. 5. These parameters will be accepted by the library in an array format which corresponds to the x and y axis respectively. The different possibilities of data types along the axes has been taken care of . As we know the possible types can be integer , string and double. Therefore the possible combinations of data types has been given below: Integer-string Integer-integer Integer-double String-string String-integer String-double Double-double Double-integer Double-string.

6. The required chart will then be displayed accordingly. Similarly these steps can be used to display the other charts in the package as well. With the inclusion of all possible combinations of data types , the feature and appropriateness of the library has been enhanced. The relevant enclosures have also been added.

60 | P a g e

A C C L | Android Charting Component Library

9.0

Various Classes, Interfaces and Libraries Imported

Classes Used:
Some of the classes used throughout the completion of our project is numerous so it is not possible to explain them all here in the report so we are illustrating few classes which have been used .

Canvas:
public class Canvas extends Object java.lang.Object android.graphics.Canvas

Class Overview The Canvas class holds the "draw" calls. To draw something, you need 4 basic components: A Bitmap to hold the pixels, a Canvas to host the draw calls (writing into the bitmap), a drawing primitive (e.g. Rect, Path, text, Bitmap), and a paint (to describe the colors and styles for the drawing). Public Constructors Canvas() Construct an empty raster canvas. Canvas(Bitmap bitmap) Construct a canvas with the specified bitmap to draw into.

61 | P a g e

A C C L | Android Charting Component Library

RectF:
public class RectF extends Object implements Parcelable java.lang.Object

android.graphics.RectF

Class Overview RectF holds four float coordinates for a rectangle. The rectangle is represented by the coordinates of its 4 edges (left, top, right bottom). These fields can be accessed directly. Use width() and height() to retrieve the rectangle's width and height. Note: most methods do not check to see that the coordinates are sorted correctly (i.e. left <= right and top <= bottom). Public Constructors RectF() Create a new empty RectF. RectF(float left, float top, float right, float bottom) Create a new rectangle with the specified coordinates. RectF(RectF r) Create a new rectangle, initialized with the values in the specified rectangle (which is left unmodified). RectF(Rect r)

62 | P a g e

A C C L | Android Charting Component Library

Methods Used:
Some of the methods used throughout the completion of our project is numerous so it is not possible to explain them all here in the report so we are illustrating few classes which have been used . public void drawARGB (int a, int r, int g, int b) Fill the entire canvas' bitmap (restricted to the current clip) with the specified ARGB color, using srcover porterduff mode. Parameters a r g b alpha component (0..255) of the color to draw onto the canvas red component (0..255) of the color to draw onto the canvas green component (0..255) of the color to draw onto the canvas blue component (0..255) of the color to draw onto the canvas

public void drawArc (RectF oval, float startAngle, float sweepAngle, boolean useCenter, Paint paint) Draw the specified arc, which will be scaled to fit inside the specified oval. If the start angle is negative or >= 360, the start angle is treated as start angle modulo 360. If the sweep angle is >= 360, then the oval is drawn completely. Note that this differs slightly from SkPath::arcTo, which treats the sweep angle modulo 360. If the sweep angle is negative, the sweep angle is treated as sweep angle modulo 360 The arc is drawn clockwise. An angle of 0 degrees correspond to the geometric angle of 0 degrees (3 o'clock on a watch.)

63 | P a g e

A C C L | Android Charting Component Library

Parameters oval The bounds of oval used to define the shape and size of the arc Starting angle (in degrees) where the arc begins

startAngle

sweepAngle Sweep angle (in degrees) measured clockwise useCenter If true, include the center of the oval in the arc, and close it if it is being stroked.

This will draw a wedge paint The paint used to draw the arc

public void drawCircle (float cx, float cy, float radius, Paint paint) Draw the specified circle using the specified paint. If radius is <= 0, then nothing will be drawn. The circle will be filled or framed based on the Style in the paint. Parameters cx cy The x-coordinate of the center of the cirle to be drawn The y-coordinate of the center of the cirle to be drawn

radius The radius of the cirle to be drawn paint The paint used to draw the circle

public void drawColor (int color) Fill the entire canvas' bitmap (restricted to the current clip) with the specified color, using srcover porterduff mode.

64 | P a g e

A C C L | Android Charting Component Library

Parameters color the color to draw onto the canvas

public void drawLine (float startX, float startY, float stopX, float stopY, Paint paint) Draw a line segment with the specified start and stop x,y coordinates, using the specified paint. NOTE: since a line is always "framed", the Style is ignored in the paint. Parameters startX The x-coordinate of the start point of the line startY The y-coordinate of the start point of the line paint The paint used to draw the line

public void drawOval (RectF oval, Paint paint) Draw the specified oval using the specified paint. The oval will be filled or framed based on the Style in the paint. Parameters oval The rectangle bounds of the oval to be drawn

public void drawPaint (Paint paint) Fill the entire canvas' bitmap (restricted to the current clip) with the specified paint. This is equivalent (but faster) to drawing an infinitely large rectangle with the specified paint. Parameters

65 | P a g e

A C C L | Android Charting Component Library

paint The paint used to draw onto the canvas

public void drawPath (Path path, Paint paint) Draw the specified path using the specified paint. The path will be filled or framed based on the Style in the paint. Parameters path The path to be drawn

paint The paint used to draw the path

public void drawPicture (Picture picture) Save the canvas state, draw the picture, and restore the canvas state. This differs from picture.draw(canvas), which does not perform any save/restore. Parameters picture The picture to be drawn

public void drawPoint (float x, float y, Paint paint) Helper for drawPoints() for drawing a single point.

66 | P a g e

A C C L | Android Charting Component Library

10.0 Project Screenshots


10.1 Grid View

GRID VIEW: We need to create a base of the project that is axes x, y and grid lines for the reference of the values given by the user.

67 | P a g e

A C C L | Android Charting Component Library

10.2 Line Chart

LINE CHART: As per the values given by the user we get the desired Line Chart.

68 | P a g e

A C C L | Android Charting Component Library

10.3 Bar Chart

BAR CHART: As per the values given by the user we get the desired Bar Chart.

69 | P a g e

A C C L | Android Charting Component Library

10.4 Pie Chart

PIE CHART: As per the values given by the user we get the desired Pie Chart.

70 | P a g e

A C C L | Android Charting Component Library

11.0 Test Cases 11.1 Test Report


Line Chart

User Input 1: Array 1[X]: {1.0, 5.0, 10.0, 18.0} Array 2[Y]: {11.0, 15.0, 110.0, and 11.0}

Output:

71 | P a g e

A C C L | Android Charting Component Library

User Input 2: Array1[X] : {Jan, Feb., Mar, Apr } Array2[Y] : {10.0,15.0, 110.0, 118.0 }

Output:

72 | P a g e

A C C L | Android Charting Component Library

Bar Chart

User Input 1: Array1 [X]: {Jan, Feb., Mar} Array2[Y] : {15.0, 110.0, 11.0}

Output:

73 | P a g e

A C C L | Android Charting Component Library

User Input 2: Array1[X] : {2007, 2008, 2009} Array2[Y]: {2000, 3000, 1000}

Output:

74 | P a g e

A C C L | Android Charting Component Library

Column Chart:

User Input 1: Array1[X]:{1.0, 10.0, 5.0 } Array2[Y]:{ Jan, Feb., Mar }

Output:

75 | P a g e

A C C L | Android Charting Component Library

User Input 2: Array1[X]:{10, 30, 20 } Array2[Y]:{2007, 2008, 2009}

Output:

76 | P a g e

A C C L | Android Charting Component Library

Pie Chart

User Input 1: Array1 []:{USA, UK, INDIA, JAPAN, NEPAL } Array2 []:{ 35, 30, 15, 15, 5 }

Output:

77 | P a g e

A C C L | Android Charting Component Library

User Input 2: Array1[]:{abc, pqr, xyz} Array2[]:{ 33.33, 33.33, 33.33 }

Output:

78 | P a g e

A C C L | Android Charting Component Library

12.0 Conclusion and Future Improvement

79 | P a g e

A C C L | Android Charting Component Library

13.0 References

[1] http://en.wikipedia.org/wiki/Android_(operating_system) [2] http://info.singtel.com/android/library.php [3] opencv.willowgarage.com/wiki/Android [4] en.androidwiki.com/wiki/Applications

80 | P a g e

You might also like