About the Download


This HyperLoop module allows you to use highly customizable Line Charts with the MPAndroidChart library.




These instructions are being shipped with the module, so you can check later on your README file.


We recommend you taking a look at Appcelerator’s documentation on how to run HyperLoop in an Android Titanium project:Hyperloop_for_Android_Programming_Guide.

HyperLoop does a pretty good job in allowing you to use Java with Javascript syntax, but that doesn’t mean that you won’t need to learn Java if you want to customise the module / create your own. Take your time and look up Java tutorials on the internet – it will make everything easier in the long run.

Environment setup

This module was tested and developed with the following environment:

  • Titanium SDK 5.5.0.GA
  • HyperLoop 1.2.7

We included a full project within this zip so you can quickly build and run it.
The only thing you need to do is make sure that the GUID value in the TiApp.XML is valid, or copy all the properties defined in the provided TiApp.xml to an existing one.


Creating a Line Chart is simple. You can define it in your XML like this:

<View height="250">
    <LineChart module="LineChart"/>

Make sure to wrap it with a View element with the desired height. The chart will fill up that space.
Defining the property “module” in an Alloy component will cause the compiler to try and find a JavaScript file
with the same name as the value of that property. This .js file must export a method called “create<ComponentName>”. The componentName is the name of the component that you’ve used in your XML. Example:

var LineChart = require('com.github.mikephil.charting.charts.LineChart'),
    Activity = require('android.app.Activity');

exports.createLineChart = function(args) {
    return new LineChart(new Activity(Ti.Android.currentActivity));

Then all you have to do is start your Chart with a DataSet. Check the example index.js file to see how that is done.
The example project allows you to interact with a few settings of the chart. For more tips on how to customise the charts head to the library’s official wiki.


One of the things we want to offer you as a reward for joining LoopModules is the ability to contact us to discuss and get help with problems that you may come across.
We’ve tested this module a lot of times and we want to deliver something that will work for everyone (as long as the environments are the same, e.g. SDK, HL version, and so on).
If you come across one of the following:

  • Bugs
  • Suggestions
  • Issues while compiling this module

Feel free to contact us at contact@loopmodules.com.