Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Titanium and Charts

Hi,
Is there a way to plot charts and manage related gestures using titanium framework like apple iStocks native application?

Has someone tried to integrate charts in a titanium application for iphone/ipad?

Many regards in advance

— asked July 19th 2010 by Massimiliano Pidoto
  • chart
  • charting
  • ipad
  • iphone
1 Comment
  • I too am looking for something lie this. Any suggestions?

    — commented July 14th 2011 by Marc Wickens

12 Answers

  • Another great solution in javascript is to use the Raphael svg library with its Charting plugin

    good luck

    — answered September 21st 2010 by Victor van Rijn
    permalink
    3 Comments
    • does this require using a web view?

      — commented November 6th 2010 by Bradley Joyce
    • Android doesn't support canvas

      — commented June 29th 2012 by Rainer Schleevoigt
    • Just to update this: rgraph works on my android 2.3 device as well as android 4.1. raphaeljs does not work on android 2.3, but it does work on android 4.1. So don't rule out the possibility of using libraries like these in your Ti solutions.

      — commented August 28th 2012 by Jason Priebe
  • There is now a charts Ti-module for this :)

    — answered July 20th 2011 by Sharry Stowell
    permalink
    2 Comments
    • Only for iOS at the moment. Apparently they're working on an android one too!

      — commented July 22nd 2011 by Ross McKinley
    • I tried the ti.chart module. It has a 14 day trail so I gave it a try. It was quite bad and has not documentation so I decided not to go further with it after a couple of days. Titanium charged me instantly $29 even though they had a trail, and now they are refusing paying my money back. They are not even responding to my emails anymore. I would recommend staying away from this package and for sure not believe in their 14 day trail

      — commented June 29th 2012 by Dennis Jakobsen
  • The best way I have found to add charts is by using a web view and then loading in a chart component like Google charts or a jquery plugin.

    — answered July 19th 2010 by Andrew Burgess
    permalink
    0 Comments
  • Is there another way than using webview? I'm developing an iPad app that displays some charts alongside of some feeds and putting the chart on a webview really disrupts the flow.

    thx

    — answered October 8th 2010 by Aria Rajasa
    permalink
    0 Comments
  • Which would be better. Doing an HTTP request to an online service like Google Charts API and get an image returned that you could use natively in the UI? Or, using an on-device javascript chart library, like RGraph or RaphaelJS, embedded in a webview? What are the performance trade-offs? What are the flexibility considerations?

    — answered February 13th 2011 by Bryce Haymond
    permalink
    0 Comments
  • I am using RGraph charting library. Here is a sample implementation http://pastie.org/1601154 here i've passed the array of price data to generate a chart. for the complete documentation on RGraph visit www.rgraph.net. Hope it might help you.

    — answered February 24th 2011 by Manaday Mavani
    permalink
    0 Comments
  • Thanks… have you already tried it?
    Is the user experience well?
    are you able to manage in this way user gestures?
    Is there an example in the web ?

    many thanks

    — answered July 19th 2010 by Massimiliano Pidoto
    permalink
    1 Comment
    • var window = Ti.UI.createWindow({
      backgroundColor:'white'
      });

      window.open();

      var hwchartengine = require('ti.hwchartengine');

      if (Ti.Platform.name == "android") {

      var datas =  
         " [  { data : [ [1,1],[5,3],[9,5],[13,6],[17,4]  ],  label:'Apple' }, " +
         "    { data : [ [2,2],[6,3],[10,4],[14,3.5],[18,3.3]  ],   label:'Banana'  }, " + 
         "    { data : [ [3,3],[7,4],[11,4.5],[15,4],[19,3.5]  ],  label:'Watermelon'   } " +
         " ]";
      
      var proxy = hwchartengine.createHWChartengine({
      
          width: 'auto',
          height: 'auto',
          datas: datas ,
          top: 10//,
          //left: 150
      });
      
      
      
      window.add(proxy);
      

      }

      — commented May 10th 2012 by h w
  • Does ti support jquery without webview?

    — answered August 12th 2010 by Peter Lum
    permalink
    1 Comment
    • no

      — commented August 13th 2010 by Sindre Sorhus
  • Any recommendations?

    check out this page:
    http://www.ajaxline.com/10-best-free-javascript-charts-solutions

    Not sure if they will work in titanium

    — answered September 21st 2010 by Peter Lum
    permalink
    0 Comments
  • Google example…

    http://chart.apis.google.com/chart?cht=p3&chd=s:hW&chs=250x100&chl=Hello|World

    jQuery…

    http://www.reach1to1.com/sandbox/jquery/jqchart/

    — answered July 19th 2010 by Raul Magdaleno
    permalink
    0 Comments
  • Solutions:

    1. webview = nix good
    2. native embedding of google graphics = delay because transfer thrue net
    3. dynamic adding of views in views
    4. native with objectiv-C

    My thougts are going in direction of topic 3.

    — answered May 18th 2011 by Rainer Schleevoigt
    permalink
    0 Comments
  • I hope you help

    https://marketplace.appcelerator.com/apps/2530?1603823144

    — answered May 9th 2012 by h w
    permalink
    1 Comment
    • var window = Ti.UI.createWindow({ backgroundColor:'white' });

      window.open();

      var hwchartengine = require('ti.hwchartengine');

      if (Ti.Platform.name == "android") {

      var datas =
      " [ { data : [ [1,1],[5,3],[9,5],[13,6],[17,4] ], label:'Apple' }," +
      " { data : [ [2,2],[6,3],[10,4],[14,3.5],[18,3.3] ], label:'Banana' }, " +
      " { data : [ [3,3],[7,4],[11,4.5],[15,4],[19,3.5] ], label:'Watermelon' }" +
      " ]";

      var proxy = hwchartengine.createHWChartengine({

      width: 'auto',
      height: 'auto',
      datas: datas ,
      top: 10//,
      //left: 150
      

      });

      window.add(proxy);
      }

      — commented May 16th 2012 by h w
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.