Was this page helpful?

Charting Examples

    MindTouch introduced an advanced charting tool in the Noatak release. Below are the sample outputs from the charting package, as well as sample code to invoke this functionality.

    Pie Chart

    Get Adobe Flash player
    Code Example
    var pie_chart_data = { Beverages: 9, Desserts: 15, Sandwiches: 40, Salads: 21, Soups: 15 };
    
    Chart{
        title: "Lunch Sales",
        type: "pie",
        data: pie_chart_data,
        height: 450,
        width: 450
    };

    Single/Multi-Series Line Chart

    Get Adobe Flash player
    Code Example
    var line_chart_data = {
                Europe:[{Q1:17},{Q2:21},{Q3:13},{Q4:41}], 
                US:[{Q1:20},{Q2:18},{Q3:13},{Q4:25}],
                Japan:[{Q1:12},{Q2:24},{Q3:18},{Q4:33}]
               };
    
    Chart {
        type:"line", 
        data: line_chart_data, 
        xaxis: "2009", 
        yaxis: "Price (in US Dollars)",
        title: "Price per widget",
        height:"450", 
        width:"450"
    };

    Column Chart

    Get Adobe Flash player
    Code Example
    var column_chart_data = [{Damien:17}, {Roy:31}, {Bob:63}];
    
    Chart{
        type:"column", 
        data: column_chart_data, 
        height:"450", 
        width:"450"
    };

    Multi-Series Column

    Get Adobe Flash player
    Code Example
    var multiseriescolumn_chart_data = {
        Damien:[
            {Q1:17},
            {Q2:31},
            {Q3:63},
            {Q4:6}
        ],
        Roy:[
            {Q1:27},
            {Q2:13},
            {Q3:16},
            {Q4:63}
        ],
        Bob:[
            {Q1:72},
            {Q2:21},
            {Q3:43},
            {Q4:19}
        ],
        Emily:[
            {Q1:69},
            {Q2:14},
            {Q3:7},
            {Q4:23}
        ]
    };
    
    Chart{
        type:"multiseriescolumn",
        data: multiseriescolumn_chart_data,
        height:"450",
        width:"450"
    };

    Bar Chart

    Get Adobe Flash player
    Code Example
    var bar_chart_data = [{Damien:117}, {Roy:131}, {Bob:93}, {Emily:143}];
    
    Chart{
        type:"bar",
        data: bar_chart_data,
        height:"450",
        width:"450"
    };

    Multi-Series Bar Chart

    Get Adobe Flash player
    Code Example
    var multiseriesbar_chart_data = {
         Damien:[
               {Q1:17}, 
               {Q2:31}, 
               {Q3:63},
               {Q4:6}
         ], 
         Roy:[
               {Q1:27}, 
               {Q2:13}, 
               {Q3:16},
               {Q4:63}
         ], 
         Bob:[
               {Q1:72}, 
               {Q2:21}, 
               {Q3:43},
               {Q4:19}
         ],
         Emily:[
               {Q1:69}, 
               {Q2:14}, 
               {Q3:7},
               {Q4:23}
        ]
    };
    
    Chart{
        type:"multiseriesbar", 
        data: multiseriesbar_chart_data, 
        height:"450", 
        width:"450"
    };
       

    Circular Gauge

    Get Adobe Flash player
    Code Example
    var circular_gauge_chart_data = 67;
    
    Chart{
        type:"circulargauge", 
        data: circular_gauge_chart_data, 
        height:"450", 
        width:"450"
    };

    Linear Gauge Chart

    Get Adobe Flash player
    Code Example
    var linear_gauge_chart_data = 42;
    
    Chart{
        type:"lineargauge", 
        data: linear_gauge_chart_data, 
        height:"450", 
        width:"450"
    };

    Funnel Chart

    Get Adobe Flash player
    Code Example
    var funnel_chart_data = [{"Website Visits":528756}, {Downloads:164052}, {"Valid Contacts":112167}, {"Interested to Buy":99128}, {Purchased:63876}];
    
    Chart{
        type:"funnel",
        data:funnel_chart_data,
        height:"450",
        width:"450"
    };

    Pyramid Chart

    num is not valid; expected list or map or xml or nil: /content/body/pre, line 103, column 26 (click for details)
    Code Example
    var pyramid_chart_data = {Damien:1543, Roy:1011, Bob:833, Emily:1323};
    
    Chart{
        type:"pyramid",
        data:pyramid_chart_data,
        height:"450",
        width:"450"
    };
    Was this page helpful?
    Tag page
    Viewing 6 of 6 comments: view all
    None of these examples work!
    Posted 12:43, 9 Mar 2010
    @jonverve are the examples not working on the page or not working for you when you paste them into your site?
    Posted 15:42, 9 Mar 2010
    @SteveB Updating a commercial installation to Noatak is enough to get the AnyChart extension working? I've done it and no AnyChart is avaiable in the control panel.
    Posted 02:15, 10 Mar 2010
    Hi, Excellent Template but I got this error:
    /content/body/pre, reference to undefined name 'anychart': line 867

    I'm Running MindTouch Core v.9.08.3
    Do i need to Upgrade to comercial version?
    Thanks!
    Posted 09:45, 22 Mar 2010
    @gabriel84 - yes, you need the commercial version of mindtouch, as well as the charting add-on (it's sold separately) edited 10:43, 22 Mar 2010
    Posted 10:43, 22 Mar 2010
    :(
    Posted 10:38, 5 Nov 2010
    Viewing 6 of 6 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by