This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Chart API Details
The Swivel chart data format
To chart data in Swivel, you need to follow two simple rules.
- Headers (dates, string labels) in the top row and first column
- Numbers in the middle (everywhere else)
Swivel understands a broad range of date and number formats. The most common Excel formats are supported, as well as some other typical technical formats. If you’re not sure if Swivel will understand a format, we encourage you to create a new spreadsheet and paste the data into the interface to see if Swivel gets it.
Chart create parameters
| Parameter | Required | Example |
data | N | |
| The data for this chart. | ||
description | N | |
| The description of this chart. | ||
group_id | N | |
The id of the group that you want to publish the chart to. If this parameter is not passed, it will default to your drafts group. Pass an empty group_id to publish the chart publicly. |
||
name | N | |
| The name of the chart. Appears in the browse interface. | ||
options | N | |
| A set of options, stored in JSON, that describe the look and feel of the chart. To understand the options, it’s probably easiest to manually create the look and feel that you want in the web interface, do a GET to see what the saved JSON is, and then copy and modify the JSON from that chart as needed. | ||
XML format of the HTTP response
<?xml version="1.0" encoding="UTF-8"?>
<chart>
<created-at type="datetime">2009-05-15T17:41:20-07:00</created-at>
<description nil="true"></description>
<group-id type="integer">1</group-id>
<id type="integer">CHART_ID</id>
<name>Profit and Revenue</name>
<options nil="true"></options>
<person-id type="integer">1</person-id>
<secret>zbNpCIOEZqqL7KtfRY8imA==</secret>
<updated-at type="datetime">2009-05-15T17:41:20-07:00</updated-at>
</chart>
| Parameter | Data type |
created-at | datetime |
| When the chart was created. | |
description | string |
| The description of the chart given by the chart creator. | |
group-id | integer |
| The id of the group that this chart is in. Public charts have a nil group id. | |
id | integer |
| The id of the chart. Use this id to access the chart in GET, PUT and DELETE queries. | |
name | string |
| The name for this chart that is displayed in the browsing interface. | |
options | string |
| A set of options, stored in JSON, that describe the look and feel of the chart. To understand the options, it’s probably easiest to manually create the look and feel that you want in the web interface, do a GET to see what the saved JSON is, and then copy and modify the JSON from that chart as needed. | |
person-id | integer |
| The id of the person who owns this chart. | |
secret | string |
A random string that provides temporary (5 minute) anonymous access to the chart. A request to charts/1.xml?secret=secret will work for 5 minutes. Useful for embedding charts without providing a username and password. For longer-term embedding, you can use the embed code provided through the web interface. |
|
updated-at | datetime |
| When the chart was updated. | |
Chart update parameters
Chart update parameters are the same as chart create parameters, with one additional option:
| Parameter | Required | Example |
mode | N | |
replace: Default. Removes existing data from the chart and replaces it with new data passed in the data parameter.append: Adds new data, passed in the data, parameter to the bottom row of your data set. |
||






