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

Funnel Chart Type

Overview

Represent the funnel chart type. Funnel chart type displays data that equals 100% when totaled. This is a single series chart representing the data as portions of 100%. This chart type does not require coordinate system to be displayed. Funnel charts often used to represent stages in a sales process and show the amount of potential revenue for each stage. This type of chart can also be useful in identifying potential problem areas in an organizations sales processes. The funnel chart shows a process that starts at 100% and ends with a lower percentage, where it is demonstrable where significant changes occur, and at what rate. For example, funnel chart can be used to display Web site visitor trends.

Creating the Funnel Chart

In order to create a simple spline area chart is needed to create an instance of chart series, set ChartType as Funnel 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.funnelsample;

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

import com.artfulbits.aiCharts.ChartView;
import com.artfulbits.aiCharts.Base.ChartPalette;
import com.artfulbits.aiCharts.Base.ChartPoint;
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);
		
		ChartPalette pallete = ChartPalette.rangePalette(0xFFD10508, 0xFFD68F5A, 4);
		
		chartView.setPalette(pallete);
		
		double[] ingredients = {1.5, 3, 1.5, 4};
		String[] ingredientNames = { "Fresh Lime juice", 
		    "Cranberry juice", "Cointreau", "Vodka" };
		
		for (int i = 0; i < ingredientNames.length; i++)
		{
			ChartPoint point = series.getPoints().addXY(i, ingredients[i]);
			
			point.setLabel(ingredientNames[i]);
		}
	}
}
	
<?xml version="1.0" encoding="utf-8"?>
<ai:chart xmlns:ai="http://www.artfulbits.com/android/aiCharts">
	<ai:area/>
	<ai:series type="Funnel" showlabel="true"/>
	<ai:title text="Cosmopolitan (cocktail)" dock="Top"/>
</ai:chart>
Company | Services | Practices | Technologies | Career | Contacts | Privacy
© 2005-2016 ArtfulBits. All rights reserved.