Analytics API Chart Example

HTML

<script src="https://rally1.rallydev.com/apps/2.0p/sdk-debug.js"></script>
<script src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
<script src="http://code.highcharts.com/2.1.6/highcharts.js"></script>
<script src="https://raw.github.com/JoeKuan/Highcharts_ExtJs_4/master/Chart/ux/HighChart.js"></script>
<script src="https://raw.github.com/lmaccherone/Lumenize/master/deploy/lumenize.js"></script>
<!DOCTYPE html>
<html>
<head>
    <title>Analytics Charting Example</title>
</head>
<body>
</body>
</html>

JavaScript

//------------------- App.js ------------------------
var lumenize = require('./lumenize');

Ext.define('CustomApp', {
    extend: 'Rally.app.App',
    componentCls: 'app',
    layout: {
        type: 'vbox',
        align: 'stretch'
    },
    items:[
        {
            xtype: 'panel',
            layout: 'anchor',
            border: true,
            fieldDefaults: {
                labelWidth: 40
            },
            defaultType: 'textfield',
            bodyPadding: 5,
            items: [
                {
                    fieldLabel: 'Query',
                    itemId: 'queryField',
                    anchor:'100%',
                    width: 700,
                    height: 100,
                    xtype: 'textarea',
                    value: '{\n'+
                            '    "$and": [ {"KanbanState": {"$gte":"In Dev"}}, {"KanbanState": {"$lt":"Accepted"}} ],\n'+
                            '    "__At": "current"\n'+
                            '}'
                },
                {
                    fieldLabel: 'Fields',
                    itemId: 'fieldsField',
                    anchor: '100%',
                    width: 700,
                    value: "ObjectID, KanbanState"
                },
                {
                    fieldLabel: 'Sort',
                    itemId: 'sortField',
                    anchor: '100%',
                    width: 700,
                    value: "{'ObjectID' : -1, '_ValidFrom': 1}"
                },
                {
                    fieldLabel: 'Page Size',
                    itemId: 'pageSizeField',
                    anchor: '100%',
                    width: 700,
                    value: '1000'
                }
            ],
            
            buttons: [
                {
                    xtype: 'rallybutton',
                    text: 'Chart It!',
                    itemId: 'chartButton'
                }
            ]
        },
        {
            xtype:...