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

RangeColumn Chart Type

Overview

Range-column chart is similar to the column chart, except that each column is rendered over a range. Therefore, the user must specify the y-axis' start and end values for each point, with each column spanning over a range.

Creating the RangeColumn Chart

In order to create a range column chart, first create an instance of chart series, set ChartType as RangeColumn and fill series with required 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.RangeColumn;

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

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[] ds = { 90, 70, 50, 30, 10, 30, 50, 70, 50, 30, 10, 30, 50, 70, 90 };

		for (int i = 1; i < ds.length; i++)
		{
			series.getPoints().addXY(i, ds[i - 1], ds[i]);
		}
	}
}
<?xml version="1.0" encoding="utf-8"?>
<ai:chart xmlns:ai="http://www.artfulbits.com/android/aiCharts">
	<ai:area/>
	<ai:series type="RangeColumn"/>
</ai:chart>
Company | Services | Practices | Technologies | Career | Contacts | Privacy
© 2005-2016 ArtfulBits. All rights reserved.