To help end users easily create a chart using MindTouch Charts, a template has been developed that can accept just a few paramaters and a dataset and return a fully-rendered chart. The template can be seen here: MindTouch Chart Template
The template will use the following parameters (although only the chart type and dataset are mandatory, and not all parameters apply to every chart):
| Parameter | Description | Notes |
|---|---|---|
| Type ("type") | Required. Defines the type of chart displayed |
|
| Data ("data") | Required. Dataset to generate chart. | Varies by chart type; input formats outlined below. |
| Height ("height") | Optional. Total outside chart height, including title, labels, and legend. | Default is 450. |
| Width ("width") | Optional. Total outside chart width, including title, labels, and legend. | Default is 450. |
| X-Axis Label ("xaxis") | Optional. Text label for the X-axis. | |
| Y-Axis Label ("yaxis") | Optional. Text label for the Y-axis. | |
| Range Minimum ("min") | Optional. For charts that have a scale associated with them, the starting (lowest) number. | Default is 0. |
| Range Maximum ("max") | Optional. For charts that have a scale associated with them, the ending (highest) number. | Default is 100. |
| Interval Markers ("interval") | Optional. For charts that have a scale associated with them, the intervals between the min and max numbers that have denotation markers. | Default is 10. |
| ID ("id") | Optional. Used to identify specific charts for interaction with outside sources (Javascript/DekiScript calls, dynamic chart updating, etc.) | |
| Chart Title ("title") | The name that will be displayed at the top of the chart |
var pie_chart_data = {Emily:111, Bob:333, Damien:555, Roy:777};
Chart{
type:"pie",
data:pie_chart_data,
height: 450,
width: 450
};
var line_chart_data = {
Damien:[{p1:17},{p2:21},{p3:13},{p4:41},{p5:17},{p6:1},{p7:61},{p8:21},{p9:11}],
Roy:[{p1:16},{p2:21},{p3:14},{p4:4},{p5:1},{p6:12},{p7:31},{p8:41},{p9:16}],
Bob:[{p1:32},{p2:2},{p3:63},{p4:-14},{p5:1},{p6:12},{p7:13},{p8:21},{p9:7}]
};
Chart{
type:"line",
data: line_chart_data,
height:"450",
width:"450"
};
var column_chart_data = [{Damien:17}, {Roy:31}, {Bob:63}];
Chart{
type:"column",
data: column_chart_data,
height:"450",
width:"450"
};
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"
};
var bar_chart_data = [{Damien:117}, {Roy:131}, {Bob:93}, {Emily:143}];
Chart{
type:"bar",
data: bar_chart_data,
height:"450",
width:"450"
};
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"
};
var circular_gauge_chart_data = 67;
Chart{
type:"circulargauge",
data: circular_gauge_chart_data,
height:"450",
width:"450"
};
var linear_gauge_chart_data = 42;
Chart{
type:"lineargauge",
data: linear_gauge_chart_data,
height:"450",
width:"450"
};
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"
};
var pyramid_chart_data = {Damien:1543, Roy:1011, Bob:833, Emily:1323};
Chart{
type:"pyramid",
data:pyramid_chart_data,
height:"450",
width:"450"
};
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by
/content/body/pre, reference to undefined name 'anychart': line 867
Do i need an extension or template?
Thanks!