Charting on Mobile

By pjain      Published Dec. 30, 2019, 7:23 a.m. in blog AI-Analytics-Data   

==== WebView Friendly Others --> REVIEW OF HTML5/JS

JS in WebView

I've also considered using a WebView to use a JavaScript graphing library, but that's just a thought.

  • Also, if you want to get your hands dirty a bit if you don't know JS, you can try which has some great charts.

mWeb ---> Sencha Charts

Getting Started

To get started with Sencha Touch Charts download and unzip the Touch Charts package. Touch Charts builds on Sencha Touch, but includes a copy of it so you can get started right away. Once the package has been unzipped, open the index.html file inside of the folder to view the documentation and complete working examples. Any samples that use Ajax will need to be on a web server. Please visit our new Learning Center for product essentials, screencasts, demos, and documentation.

Axes, Titles

Line Chart, Multiple Y Axis


Remove decimal values on axes

If you have decimal values in numeric axes, if you specify maximum and minimum on axes.

minimum: 0,
maximum: 100,
majorTickSteps :5,
minorTickSteps :5

Here minimum defines minimum allowed value and maximum defines maximum allowed value on axes. Axes will not have value more than maximum. majorTickSteps defines number of steps on axes for example if you specify minimum to 0 and maximum to 100, 0 to 100 are divided in equal five steps according to axes data.

So if you have data in store which can not be distributed equally on axes. It will display decimal values with 10 decimal points. This is annoying when you are crating an application like dashboard and you are displaying more than one charts at a time in panel.

To overcome this problem, override Ext.chart.axis.Axis class method drawAxis as follow.

Ext.override(Ext.chart.axis.Axis, {
    drawAxis: function (init) {

Search code of this function in touch-charts-debug.js and paste the same code here and do the following modifications.

Search for the following line in code

me.labels.push(+(me.labels[me.labels.length - 1] + step).toFixed(10));

Change parameter in toFixed function to 0

me.labels.push(+(me.labels[me.labels.length - 1] + step).toFixed(0));

That's it and you will have integer values in charts.

Setting Axis, Chart Title

How do I dynamically change a chart's axis title? I would like to change the title on the bottom axis of a column chart. I would like to do this when a user clicks on a column in the chart. I have a listener set up but what code do I put in there to update the title?

axes: [{
        type: 'Numeric',
        position: 'left',
        fields: ['total'],
        title: false,
        grid: true
}, {
        type: 'Category',
        position: 'bottom',
        fields: ['title'],
        title: 'Title to be Changed Dynamically'                       
series: [{
    type: 'column',
    axis: 'left',    
    listeners: {
        itemmousedown: function(o){
            //what goes here to update title of bottom axis?

//ANSWER .. 
var ba = this.chart.axes.get('bottom');
ba.setTitle('new title');

Dash, Gauge

  • Basics

Ext.require(['Ext.chart.', 'Ext.chart.axis.Gauge', 'Ext.chart.series.', 'Ext.Window']);

Ext.onReady(function () {

Ext.create('Ext.Window', {
    width: 800,
    height: 250,
    minWidth: 650,
    minHeight: 225,
    title: 'Gauge Charts',
    tbar: [{
        text: 'Reload Data',
        handler: function() {
    layout: {
        type: 'hbox',
        align: 'stretch'
    items: [{
        xtype: 'chart',
        style: 'background:#fff',
        animate: {
            easing: 'elasticIn',
            duration: 1000
        store: store1,
        insetPadding: 25,
        flex: 1,
        axes: [{
            type: 'gauge',
            position: 'gauge',
            minimum: 0,
            maximum: 100,
            steps: 10,
            margin: -10
        series: [{
            type: 'gauge',
            field: 'data1',
            donut: false,
            colorSet: ['#F49D10', '#ddd']
    }, {
        xtype: 'chart',
        style: 'background:#fff',
        animate: true,
        store: store3,
        insetPadding: 25,
        flex: 1,
        axes: [{
            type: 'gauge',
            position: 'gauge',
            minimum: 0,
            maximum: 100,
            steps: 10,
            margin: 7
        series: [{
            type: 'gauge',
            field: 'data1',
            donut: 30,
            colorSet: ['#82B525', '#ddd']
    }, {
        xtype: 'chart',
        style: 'background:#fff',
        animate: {
            easing: 'bounceOut',
            duration: 500
        store: store4,
        insetPadding: 25,
        flex: 1,
        axes: [{
            type: 'gauge',
            position: 'gauge',
            minimum: 0,
            maximum: 100,
            steps: 10,
            margin: 7
        series: [{
            type: 'gauge',
            field: 'data1',
            donut: 80,
            colorSet: ['#3AA8CB', '#ddd']


Display Options

Put label in base of chart - to appear in donut


I would like to; 1) Increase the size of the title and numeric indexes on the gauge. 2) Append a number from ['calls'] to the end of the axes title and refresh each time the store is reloaded via ajax. 3) Append the value from ['calls'] (What the gauge is based on) to the axes title.

Ext.create('Ext.Window', { width: 400, height: 250, maximizable: true, title: '<?=$CCTrimmed?>', renderTo: Ext.getBody(), layout: { type: 'hbox', align: 'stretch' }, items: [{ xtype: 'chart', style: 'background:#B3D2FF', animate: { easing: 'elasticIn', duration: 1000 }, store: cc<?=$CCTrimmed?>Store, insetPadding: 25, flex: 1, axes: [{ type: 'gauge', position: 'gauge', minimum: 0, maximum: 10, steps: 10, margin: -10, title: '<?=$CCTrimmed?>' }], series: [{ type: 'gauge', title: '<?=$CCTrimmed?>', field: ['calls'], donut: false, colorSet: ['#3AA8CB', '#ddd'], label: { field: '<?=$CCTrimmed?>', display: 'middle', renderer: Ext.util.Format.numberRenderer('0'), color: '#333', 'text-enchor': 'middle' } }] }] }).show();

Gauge Chart Step Labels

  • don't display properly and if you resize the chart the labels appear all over the place and multiply.

Event Handling

Did you try using interactions for charts/?

Tap event caputre

  • How to catch "tap" event for chart "gauge"

Ext.define("TBB.util.gaugeChart", {
extend: "Ext.chart.Chart",
xtype: "gaugechart",
config: {
xtype: 'gaugechart', id: 'gaugechart', style: 'background:#F3F4E7', height: 180, insetPadding: 20, animate: { easing: 'elasticIn', duratuion: 5000 }, store: 'TbbPs2Store', axes: [ { type: 'gauge', position: 'gauge', title: '', steps: 10, minimum: 0, maximum: 100, margin: -16, label: { font: "0.7em 'Helvetica Neue', HelveticaNeue, Helvetica-Neue, Helvetica, 'BBAlpha Sans', sans-serif", contrast: true } } ], series: [ { type: 'gauge', angleField: 'ps', donut: 90, colorSet: ['#3FFF00', '#ddd'], listener:{ itemtap: function(){ debugger; } } } ] }, initialize: function() { this.callParent(arguments); } });

Ext.define("TBB.view.kontod.KontodMain",{ extend: 'Ext.Panel', xtype: 'KontodMainPanel',

config: {
    locales : {
        title : 'kontod.toolbarTitle',
        loadingText : 'loadmask.text'
        style: 'background:#F3F4E7',
    scrollable: true,
    items: [
            xtype: 'panel',
            flex: 1,
            margin: '15 0 0 0', 
           style: 'background:#F3F4E7',
           items: [
                    } ,
                        xtype: 'image', 
                       src: "resources/images/tbb-logo-s@2x.png",
                        centered: true,
                        style: 'background-size: 100% 100%;',
                        width: 70,
                        height: 70,
                        margin: '85 0 0 0',
            xtype: 'list',
            id: 'kontodMainList',
            loadingText: '',
            masked: false,
            disableSelection: true,
            scrollable      : false,
            itemTpl: new Ext.XTemplate(
                '&lt;tpl if="order[0] == \'A\'"&gt;',
                    '&lt;div style="display: none;"&gt;{ps}%&lt;/div&gt;',
                '&lt;tpl else&gt;',
                    '&lt;div style="text-align:center;"&gt;{ps}%&lt;br /&gt;&lt;span style="font-size:0.5em"&gt;{nickname}&lt;/span&gt;&lt;/div&gt;',
initialize: function() {
    var store = this.down('list').getStore();


=== Android Charting

Andr mpChart- MAJOR

Mp Android Chart

PhilJay/MPAndroidChart: A powerful Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, dragging and animations. Date on X axis. · Issue #789 · PhilJay/MPAndroidChart Android | Study Tutorial Android Pie Chart using MpAndroid Library Tutorial | Study Tutorial Android Bar Chart or Bar Graph using MpAndroid Library Tutorial | Study Tutorial android - DateTime axis in MPAndroidChart - Stack Overflow android - MPAndroidChart LineChart: Using dates instead of Strings for X-axis - Stack Overflow


MAIN: good Android Beginner Tutorial #17 – Graphing With An Android Chart Library Creating a Simple Bar Graph for your Android Application (part 1/2) Creating a Simple Bar Graph for your Android Application (part 2/2) Creating a Line Graph with multiple data sets in Android Studio Creating a Simple Pie Chart in Android Studio

MpAndroid Realm


Custom GraphView in Android

Creating a Simple Graph in Android Studio with GraphView Changing the View Window with Androids GraphView Library Plotting Multiple Data Sets and Adding Focus Points with GraphView Making a Scatter Plot (Android GraphView Lib) OnClickListener Scatter Plot (Android GraphView Lib) Adding Data Points in REAL-TIME to a Graph (Android GraphView Lib)


Open source Android chart library with line chart, graph (fillable), histogram, pie chart, radar map, a total of 5 kinds of chart types. And can combine charts.

achartengine - MAJOR

Achartengine of the line chart --- simple usage - AexLinda column - CSDN blog Achartengin use - AexLinda's column - CSDN blog

  • Flot

Flotr2 - MAJOR

  • shape diagram


  • PHP -

Charting Custom

  • Point/Line series ..

  • !IMP Gfit like Circurlar


  • Polar

MPAndroidChart - MAJOR

  • 5/16 RECENT MPAndroidChart - A powerful Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, dragging and animations.

Add Charts to Your Android App Using MPAndroidChart Updated on Feb 15, 2015


  • This is a charting software library for Android applications HoloGraphLibrary - Newer graphing library


EazeGraph - Another newer library with potential AndroidCharts - Easy to use charts AndroidGraphView - library to create flexible and nice-looking diagrams. AndroidPlot - plotting library for Android WilliamChart - Flexible charting library with useful motion capabilities. HelloCharts - Charts/graphs library for Android with support for scaling, scrolling and animations.

OceanLife v2.2 is out! Flashier charts, faster syncs, a load of refactoring, bug fixes & missed sleep. @JakeWharton's Dagger retrofit next. - v2.2 swell-period chart. - Tidal curve interpolation in OceanLife v2.2.

Custom Charting



  • JS

MPAndroidChart Code

rOS Andr Charting, Dashboard

Android native Charting

!ok ~Andr/charting/MPAndroidChart !ok All rages - fragments & gridview ~zAndr/aCoreUIFragments/AllTheRages !ok ~zAndr/MaterialUXDTabs/MaterialTabs

  • mpandroid - disabled due to versions
  • Bar

MPAndroidChart/ at master · PhilJay/MPAndroidChart MPAndroidChart/ at 3398cf4462bc7f49bb1156ef22040e8a0d63369f · PhilJay/MPAndroidChart MPAndroidChart/ at 23e0178dbbf873f4dcc99f94a77b8fa2af7aa224 · PhilJay/MPAndroidChart MPAndroidChart/ at a3c1fe6bbf7d48b79b42b3a447f946af850d86f0 · PhilJay/MPAndroidChart mpandroid time series example - Google Search android - Timeseries chart in MPAndroidChart - Stack Overflow android - Handling the timeseries graph in MPAndroid Chart - Stack Overflow .java Highest Voted 'mpandroidchart' Questions - Stack Overflow Plot time series on android - Google Search android - Timeseries chart in MPAndroidChart - Stack Overflow Androidplot Building a streaming chart in Android | shinobicontrols java - How to plot a graph with Time in x-axis and value on the other in android? - Stack Overflow Android Graph View plotting library appsthatmatter/GraphView: Android Graph Library for creating zoomable and scrollable line and bar graphs. GraphView Demos - Android Apps on Google Play

  • GraphView - line,bar ..

Core Examples, Tutes

Resources, Official


  • Andr Core:

  • IOS Version Tips

  • Interation

MPAndroidChart-Realm allows to directly plot / draw data from mobile database.


  • Include



  • LineDataSet dataset = new LineDataSet(entries, "# of Calls"); LineData data = new LineData(labels, dataset);

    dataset.setColors(ColorTemplate.COLORFUL_COLORS); dataset.setDrawCubic(true); dataset.setDrawFilled(true);

    LineChart lc = ..; lc.setData(data); lc.animateY(5000); //ACTUALLY DRAW

  • Animations

  • Y Axis animation - bottom to up in 5 secs lc.animateY(5000); //ACTUALLY DRAW duration (in milliseconds) of the animation

  • X Axis animation - lc.animateX(2500, Easing.EasingOption.EaseInOutQuart);

  • animateXY method is used to animate both axes of the chart

Data Techniques

  • Upper & Lower Limit on YAxis given a LineChart lc

    LimitLine upper_limit = new LimitLine(130f, "Upper Limit"); upper_limit.setLineWidth(4f); upper_limit.enableDashedLine(10f, 10f, 0f); upper_limit.setLabelPosition(LimitLine.LimitLabelPosition.RIGHT_TOP); upper_limit.setTextSize(10f);

    LimitLine lower_limit = new LimitLine(-30f, "Lower Limit"); lower_limit.setLineWidth(4f); lower_limit.enableDashedLine(10f, 10f, 0f); lower_limit.setLabelPosition(LimitLine.LimitLabelPosition.RIGHT_BOTTOM); lower_limit.setTextSize(10f);

    YAxis leftAxis = lc.getAxisLeft(); // reset all limit lines to avoid overlapping lines leftAxis.removeAllLimitLines(); leftAxis.addLimitLine(upper_limit); leftAxis.addLimitLine(lower_limit); leftAxis.setAxisMaxValue(220f); leftAxis.setAxisMinValue(-50f); //leftAxis.setYOffset(20f); leftAxis.enableGridDashedLine(10f, 10f, 0f); leftAxis.setDrawZeroLine(false); leftAxis.setDrawLimitLinesBehindData(true); // limit lines are drawn behind data (and not on top)


  • Make Chart full screen

    onCreate getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.activity_main);

Abstracting & Separting drawing from Model Data

  • FindView & Link to chart - pass it in t

    private LineChart mChart; onCreate super.onCreate(savedInstanceState); mChart = (LineChart) findViewById(; //-- DailyHealthLog.weightSu ArrayList yentries = new ArrayList<>(); yentries.add(new Entry(4f, 0)); yentries.add(new Entry(8f, 1)); yentries.add(new Entry(6f, 2)); yentries.add(new Entry(2f, 3)); yentries.add(new Entry(18f, 4)); yentries.add(new Entry(9f, 5));

    ArrayList&lt;String&gt; xlabels = new ArrayList&lt;String&gt;();

    public void wtLineChart(LineChart lc, ArrayList entries,ArrayList labels) { //Simple weight chart with ALL data ..

    LineDataSet dataset = new LineDataSet(entries, "# of Calls");
    LineData data = new LineData(labels, dataset);
        dataset.setColors(ColorTemplate.COLORFUL_COLORS); //
    lc.animateY(5000); //ACTUALLY DRAW


MPAndroidChart Code Examples

MPAndroidChart A+ - IOS also,

If motion takes an important role in your app design. In other hand if you want featured charts, then go for MPAndroidChart.

Also available for iOS: Charts (API works the same way)

To powerful Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, dragging and animations.Use this.

comprehensive charting, zooming, animating features. (but not so fancy name)

  • DEMOS Example Project (code for demo-application) Google-PlayStore Demo Application



  • CORE:

  • LINE:


LineChart, BarChart (vertical, horizontal, stacked, grouped), PieChart, ScatterChart, CandleStickChart (for financial data), RadarChart (spider web chart), BubbleChart Combined Charts (e.g. lines and bars in one) Scaling on both axes (with touch-gesture, axes separately or pinch-zoom) Dragging / Panning (with touch-gesture) Separate (dual) y-axes Highlighting values (with customizeable popup-views) Support for dynamic & realtime data plotting Save chart to SD-Card (as image) Predefined color templates Legends (generated automatically, customizeable) Customizeable Axes (both x- and y-axis) Animations (build up animations, on both x- and y-axis) Limit lines (providing additional information, maximums, ...) Listeners for touch, gesture & selection callbacks Fully customizeable (paints, typefaces, legends, colors, background, dashed lines, ...) Smooth rendering for up to 30.000 data points in Line- and BarChart Lightweight (method count ~1.4K) Available as .jar file (only 500kb in size) Available as gradle dependency and via maven Good documentation Widely used, great support on both GitHub and stackoverflow - mpandroidchart

mobile database support via MPAndroidChart-Realm library

Line Chart Examples

Bar Chart - works - no db connection

public void createRandomBarGraph(String Date1, String Date2){
    barChart = (BarChart) findViewById(;
    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd");
    try {
        Date date1 = simpleDateFormat.parse(Date1);
        Date date2 = simpleDateFormat.parse(Date2);

        Calendar mDate1 = Calendar.getInstance();
        Calendar mDate2 = Calendar.getInstance();


        dates = new ArrayList&lt;&gt;();
        dates = getList(mDate1,mDate2);

        barEntries = new ArrayList&lt;&gt;();
        float max = 0f;
        float value = 0f;
        random = new Random();
        for(int j = 0; j&lt; dates.size();j++){
            max = 100f;
            value = random.nextFloat()*max;
            barEntries.add(new BarEntry(value,j));

    }catch(ParseException e){

    BarDataSet barDataSet = new BarDataSet(barEntries,"Dates");
    BarData barData = new BarData(dates,barDataSet);
    barChart.setDescription("My First Bar Graph!");


Line Chart - crashes

import com.github.mikephil.charting.charts.LineChart;
import com.github.mikephil.charting.charts.BarChart;
import com.github.mikephil.charting.utils.ColorTemplate;
LineChart lineChart = (LineChart) findViewById(;

        // creating list of entry
    ArrayList&lt;Entry&gt; entries = new ArrayList&lt;&gt;();
    entries.add(new Entry(4f, 0));
    entries.add(new Entry(8f, 1));
    entries.add(new Entry(6f, 2));
    entries.add(new Entry(2f, 3));
    entries.add(new Entry(18f, 4));
    entries.add(new Entry(9f, 5));
    LineDataSet dataset = new LineDataSet(entries, "# of Calls");
    dataset.setColors(ColorTemplate.COLORFUL_COLORS); //
    // dataset.setDrawCubic(true);
  LineData data = new LineData(dataset); // was new LineData(labels, dataset);
    // lineChart.animateY(5000);
    //lineChart.invalidate(); // refresh

Android OTHERS


  • SOURCES & Comparisons - A+ MPAndroidChart 1.7% of installs AChartengine 0.53% AndroidPlot 0.1% ooking at the usage metrics on, currently AChartEngine is used by 0.61% of the 700K applications while AndroidPlot is used by 0.17%. All the other metrics show an even higher difference in usage. Hmmmm....

PhilJay/MPAndroidChart: A powerful Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, dragging and animations. mpandroidchart LineData api change - Google Search Setting Data · PhilJay/MPAndroidChart Wiki Adding Entries or DataSets dynamically (real time graph) · Issue #87 · PhilJay/MPAndroidChart Getting Started · PhilJay/MPAndroidChart Wiki DataSet classes in detail · PhilJay/MPAndroidChart Wiki How to add String label to x and y axes? · Issue #234 · PhilJay/MPAndroidChart LineData constructor doesn't have string value entry anymore?? · Issue #1956 · PhilJay/MPAndroidChart

Passing value from activity to Android webview for Javascript method Passing data between activities Android JSON Parser Intent.getByteArrayExtra Android code examples | Codota android webview Best way to pass array data - Google Search Collecting and Processing Barcode Data in an Android WebView Using the EPX Barcode Scanning Framework and a JavascriptInterface - SDG Blog Bridge Android WebView with native Mobile Engagement Android SDK | Microsoft Docs Calling Objective-C code from JavaScript in iOS applications | Ram\'s Blog Using Web Content | The Android Developer's Cookbook: Networking | InformIT Using Web View in Android and Loading Data Over network | Technology Portal Advanced Uses of WebView javascript - Passing array from js to android - Stack Overflow android - Passing Array from Activity to Javascript - Stack Overflow java - Passing a JavaScript object using addJavascriptInterface() on Android - Stack Overflow : Recipe Exchanging Array Data between Java and JavaScript (Recipe 4426, Revision 4427) | Android Tutorial Pass complex object or array to WebView to be used in JavaScript — Xamarin Forums Using XML and JSON with Android, Part 2: Deliver hybrid Android applications with JSON Building Web Apps in WebView | Android Developers java - Webview with JavaScript interface - Stack Overflow java - Passing an array of values from Android Activity to JavaScript in a WebView - Stack Overflow Pass an array from android to JavaScript - Stack Overflow

r Data VIZ Native Android <-- MpCharts + Custom

Data Visualization with Python and JavaScript: ProQuest Tech Books

AChart Engine

Android Drawing Time Chart with TimeSeries in AChartEngine | Knowledge by Experience

  • Line chart with cubic curve fit EX:

  • it supports all kinds of graphs (line, bar, pie etc.) and provides a sample demo which makes it pretty easy to start off with.

Lots of Functionality to make better. Pan Enable of both side. XYMultipleSeriesRenderer support lots of method various option to set the graph method to set style

  • PIE Chart tutre

  • Simple Bar

  • Stacked I suggest you download the AChartEngine demo source code and take a look at SalesStackBarChart. Then, on the last line, you can change Type.STACKED to Type.HEAP for an even better stacked bar charts experience.

LineChart - Shows but not connected to DB

/this is for achartEndinge Line Chart // private String[] mMonth = new String[] { "Jan", "Feb" , "Mar", "Apr", "May", "Jun", "Jul", "Aug" , "Sep", "Oct", "Nov", "Dec" }; private void drawChart(){ int[] x_values = { 1,2,3,4,5,6,7,8 }; int[] y_values = { 1000,1500,1700,2000,2500,3000,3500,3600}; // Creating an XYSeries for Expense XYSeries expenseSeries = new XYSeries("Expense"); // Adding data to Expense Series for(int i=0;i<x_values.length;i++){ expenseSeries.add(x_values[i], y_values[i]); } // Creating a dataset to hold each series XYMultipleSeriesDataset xyMultipleSeriesDataset = new XYMultipleSeriesDataset(); // Adding Expense Series to the dataset xyMultipleSeriesDataset.addSeries(expenseSeries); // Creating XYSeriesRenderer to customize expenseSeries XYSeriesRenderer renderer = new XYSeriesRenderer(); renderer.setColor(Color.RED); renderer.setPointStyle(PointStyle.CIRCLE); renderer.setFillPoints(true); renderer.setLineWidth(3); renderer.setDisplayChartValues(true); // Creating a XYMultipleSeriesRenderer to customize the whole chart XYMultipleSeriesRenderer multiRenderer = new XYMultipleSeriesRenderer(); multiRenderer.setXLabels(0); multiRenderer.setChartTitle("Expense Chart"); multiRenderer.setXTitle("Year 2016"); multiRenderer.setYTitle("Amount in Dollars"); multiRenderer.setZoomButtonsVisible(true); for(int i=0;i<x_values.length;i++){ multiRenderer.addXTextLabel(i+1, mMonth[i]); } // Adding expenseRenderer to multipleRenderer multiRenderer.addSeriesRenderer(renderer); // Getting a reference to LinearLayout of the MainActivity Layout LinearLayout chartContainer = (LinearLayout) findViewById(; // Creating a Line Chart View chart = ChartFactory.getLineChartView(getBaseContext(), xyMultipleSeriesDataset, multiRenderer); // Adding the Line Chart to the LinearLayout chartContainer.addView(chart); }

Androidplot A

It is really simple and straightforward to use; Supports zooming (pinch-and-zoom); It is fully customizable; Supports many kinds of graphs/plotting (e.g. multiple bars, pie); Supports dynamic plotting (which comes in hand if you are trying to develop any sensor-related app); Documentation includes easy-to-follow tutorials covering the basics.

ChartDroid B

Custom Canvas drawing

  • They are probably using custom views overrinding the onDraw method to plot lines, shapes and paths using the canvas or the surface of the view. I stumbled upon this site today and found it quite intriguing.. Some of these apps have really stunning display of data, especially the norton mobile utilities. I want to graphically represent the information in my android application. I have researched a lot about graph librarioes available for android and have used chartdroid and achartengine, but still am not satisfied with the end result.

GraphView B?

aFreeChart B?


WilliamChart C

OS Can Try


$? Syncfusion Chart for Android is a visually stunning charting component that is also easy to use. It includes all the common chart types ranging from line charts to financial charts.

Holo Graph Librar ChartView charts4j Drawing the 3D piechart Using Google chart Api HelloCharts


The charting library created by me is easy to use, highly customizable and interactive with easy installation using Cocoa Pods.

JBChartView OS, uses cocoaPods RVW:

Jawbone's iOS-based charting library for both line and bar graphs. It is easy to set-up, and highly customizable.

Drop-in UIView subclass supported across all devices.
Lie and bar graph support.
Simple to use protocols modeled after a UITableView.
Highly customizable.
Expand &amp; collapse animation support.

Disadvantage : Requires iOS 7 or later. Requires Automatic Reference Counting (ARC)

SM2DGraphView OS

  • x GraphX > I've used this one, and it'll work, but for very basic data sets. Some of the issues I ran into though was it's inability to plot values below zero, and it had a tendency to round any non-integer values.

  • PowerPlot which is available under a dual-license model. You can just follow the above link to install the demo app which shows off several sample charts. You can also download the GPL-version of the library and check out if it fits your needs. With the exception of horizontal bar charts it has the features requested - specifically, bar charts, stacked bar charts, various axis label positions and orientations.

    This is a phenomenal library

  • Pie Chart 3D library. 3D charts which you can rotate and scale with fingers + protocol for getting information about tapped slice

  • slightly less sophisticated ECGraph, b

  • demo projects for line, pi, bar chart from below link

--- IOS Chart Frameworks

Swift OS

  • SwiftCharts is open source, easy to use and highly customisable. It comes with many examples.

chart-plot OS

Core Plot :

Core Plot is a plotting framework for OS X and iOS. It provides 2D visualisation of data, and is tightly integrated with Apple technologies like Core Animation, Core Data, and Cocoa Bindings.

Advantage: Core Plot is a free, open source charting library available under the New BSD License.

Example Graphs :

After a bit of googling , i have found that Core-plot is one of most flexible libraries and free of cost .



Line Chart with Movable Points - etecting user touch on screen -(BOOL)plotSpace:(CPTXYPlotSpace *)space shouldHandlePointingDeviceDraggedEvent:(id)event atPoint:(CGPoint)point{ NSLog(@"point.x=%lf,point.y=%lf",point.x,point.y); return YES; } - this will handle drag points...‌​lot-on-ipad-part-2


  • Core Plot is highly customizable. Both of those charts can be made (and possibly were) using that framework. Just because the default charts in the sample applications weren't to your liking doesn't mean that's all you can do with the framework. Look through the highly customized charts in some of the applications using the framework, for example:

SO, Support

  • FORUM -

  • Does CorePlot support zooming and panning of Charts? >> YES: you have to set the allowsUserInteraction bool of your plot space to YES. Also, if you want to test zooming in the simulator, you can do this by pressing the alt button and click+drag with your mouse. Panning is just normal click+drag. See:

    just to refresh my mind, you zoom in on the simulator by double clicking, and zoomn out by right clicking using the mouse ? Double tapping DID NOT WORK!

    no, that does not seem to work (at least in my app). But the other ways should work perfectly fine.

  • how to set touch event, when user click the CandleStick on the chart, then it can show the Candle X and Y Value?

  • You can still use Core Plot in your project even though it's manual reference counting. In your Target -> Buld Phases -> Compile Sources you can add a compiler flag to disable ARC on Core Plot related files. Core Plot should now work in your ARC enabled project.

    Navigate to Target -> Build Phases -> Compile Sources Select your desired files Add the compiler flag -fno-objc-arc

You can turn ARC off for CorePlot by setting this -fno-objc-arc flag to it's source files by selecting your project file in XCode, selecting your target, going to 'Build Phases'->'Compile Sources'.

I would really suggest you use Core Plot and simply disable ARC for those files, or link the project as a reference. ARC binaries are compatible with non-ARC binaries.

In your .h files you can declare properties using @property (strong) in an ARC project, in a MRC project you can't use that, you need to use retain.

property declarations simply direct the compiler on what to do. If the compiler has already done the work (as in the case of a static binary), they have no meaning. Also, I would suggest you read up on strong vs retain. Your ARC enabled project will work with both. – Paul de Lange Sep 26 '12 at 9:21

Yes I know that, but for Core Plot you need to copy a folder with uncompiled header files to your project, even if you're using the binary, for some reason. I have had issues with declaring properties in a way that wasn't supported in an ARC project, possibly it wasn't because of using retain, I don't remember exactly. But having ARC enabled does have some impact on uncompiled header files surely?

  • Custom labels on the x-axis for bar charts so:


  • Jan'13> I think the generated charts look poor.

  • Mar'13> CorePlot is ok feature-wise, but it is painfully slow. Mutli touch interactions are very sluggish. Totally spoils the experience in an otherwise slick iPhone or iPad app. - shinobi guy

  • Jul'10> Now it is possible to do a stacked bar chart by rendering multiple bar charts on top of eachother and adding the height of the frontmost values to the rear values (hope that made some sense, search the Core Plot google group for more details)

  • I used Core-Plot in one of my apps, and it was easy enough to use, but I have to agree that it isn't the prettiest. – Josh Dec 10 '10

  • Feb'10> To counter the lack of good plotting frameworks on the iPhone. Core Plot also encompases many other use cases including desktop systems, but its design has included iPhone support from the beginning. It's getting pretty close to useable and is currently in use in several shipping iPhone and OS X applications. Core Plot has come a long way since I first posted the summary. The framework now has bar charts (including horizontal bar charts, I believe), axis labels (including aribrarty rotations), and fills and backgrounds for graphs. I'm not sure about stacked bar charts, but it wouldn't be hard to add to the CPBarPlot class that implements bar charts. As for annotations, there is a CPAnotation class which you could subclass to add your annotations, if there isn't the exact functionality you need.

  • Dec'09> many features have been added to Core Plot, including bar charts, horizontal bar charts, custom plot labels, angled labels, and themes (including custom backgrounds).

Core Plot

(core-plot - Cocoa plotting framework for OS X and iOS - Google Project Hosting

The documentation isn't that great and there may be a decent amount of code to get up and going, but it seems to be the most flexible (both visually and feature wise) and most popular native framework that I've used.

core-plot's API is a hideous maze of delegates and it's default rendering is tacky

iOS Charts API

How to Use iOS Charts API to Create Beautiful Charts in Swift. iOS Charts API: How to Use iOS Charts API to Create Beautiful Charts in


There are no comments yet

Add new comment

Similar posts

Markov Models Quickstart

Monte Carlo Models, Chains and Monte Carlo Simulation

Datascience, Big Data, Analytics and Visualization Learning Guide

Sales, Marketing and AI