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

Point Chart Type

Overview

A point chart is used to show interrelations between two sets of values. Point charting is unique in that it does not plot price against time as all other techniques do. The scatter chart allows you to create a chart showing one piece of information long the x-axis and another piece of information along the y-axis. The point charts are used for displaying and comparing numeric values, such as scientific,or statistical data. This chart type is most suitable for comparing large numbers of data points without regard to time. One of the most powerful aspects of a point chart is its ability to show nonlinear relationships between variables. Although the point charts cannot determine the cause of such a relationship, it can show whether or not such a relationship exists, and if so, just how strong it is. Furthermore, if the data is represented by a mixture model of simple relationships, these relationships will be visually evident as superimposed patterns.

Creating the Point Chart

In order to create a simple line chart is needed to create an instance of chart series, set ChartType as Line and fill series with some data, like in the following sample:

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.pointsample;

import java.util.Random;

import android.app.Activity;
import android.os.Bundle;

import com.artfulbits.aiCharts.ChartView;
import com.artfulbits.aiCharts.Base.ChartArea;
import com.artfulbits.aiCharts.Base.ChartAxisStripLine;
import com.artfulbits.aiCharts.Base.ChartSeries;

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);
		
		Random random = new Random();
		
		for (int i = 0; i < 20; i++)
		{
			series.getPoints().addXY(i, random.nextInt(20));
		}
		
		ChartAxisStripLine vStripLine = new ChartAxisStripLine();
		ChartAxisStripLine hStripLine = new ChartAxisStripLine();
		
		vStripLine.setStart(8);
		vStripLine.setWidth(4);

		hStripLine.setStart(8);
		hStripLine.setWidth(4);
		
		ChartArea area = chartView.getAreas().get(0);
		
		area.getDefaultXAxis().getStripLines().add(vStripLine);
		area.getDefaultYAxis().getStripLines().add(hStripLine);
	}
}
<?xml version="1.0" encoding="utf-8"?>
<ai:chart xmlns:ai="http://www.artfulbits.com/android/aiCharts">
	<ai:area>
		<area.xaxis labels_visible="false"/>
		<area.yaxis labels_visible="false"/>
	</ai:area>
	<ai:series type="Point" marker="@drawable/bullet" markerSize="24"/>	
	<ai:title text="Dammit! I have missed!" dock="Right"/>
</ai:chart>
Company | Services | Practices | Technologies | Career | Contacts | Privacy
© 2005-2016 ArtfulBits. All rights reserved.