whitespace COMPANY whitespace SERVICES whitespace PRODUCTS whitespace PURCHASE whitespace SUPPORT whitespace CONTACTS whitespace Home whitespace Contact Us whitespace Site Map whitespace
whitespace
WHY ARTFULBITS
whitespace
OUR APPROACH
whitespace
OUR TEAM
whitespace
FACT SHEET
whitespace
NEWS & EVENTS
whitespace
PRIVACY
whitespace
whitespace

Line Chart Type

Overview

A line chart or line graph is a type of graph created by connecting a series of data points together with a line. It is a most simple way to summarize how two pieces of information are related and how they vary depending on one another. A line chart is the most basic type of chart used in finance. This chart type is often used to visualize a trend in data over intervals of time. For example, a line chart of a stock would display the stock's closing prices over a period of time, connected by a line.

Creating the Line Chart

aiCharts allows you to easily create detailed line charts which can be generated using a small amount of code. To create simple line chart is needed to create an instance of chart series and fill this series with some data points. The source code should have the following view:

zip archive Download sample

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
  <com.artfulbits.aiCharts.ChartView
    android:id="@+id/chartView"
    chart="@xml/chart"
    android:background="@android:drawable/alert_dark_frame" 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"/>
</LinearLayout>
package com.artfulbits.aiCharts.linesample;

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);
    }
}
<?xml version="1.0" encoding="utf-8"?>
<ai:chart xmlns:ai="http://www.artfulbits.com/android/aiCharts">
	<ai:area>
		<area.xaxis grid_visible="false" labels_visible="false" title="Life"/>
		<area.yaxis grid_visible="false" labels_visible="false" title="Quality"/>
	</ai:area>
	<ai:series type="Line" points="0, 60, 40, 100"/>
	<ai:title text="Life gets better!!!" dock="Top"/>
</ai:chart>
Company | Services | Practices | Technologies | Career | Contacts | Privacy
© 2005-2016 ArtfulBits. All rights reserved.