One Charts API

With One Charts API you can create, read, update, delete the charts in machine-readable JSON format.

To interact with the API, you need to send a HTTP-request to address https://onecharts.io/api with method-specific parameters. Each method description has an example URL.
Each method call returns a JSON-object with three possible fields: success, message and result (which is method specific).

  • success is either true or false.
  • If success is false then message contains the reason why the request failed. If success is true, then there is no message.
  • If success is true then result contains method-dependent JSON-element which will be described for each method separately. If success is false, then there is no result.


Authentication

The One Charts API uses API key to authenticate requests. You can view and manage your API keys in the dashboard. Authentication to the API is performed via bearer auth. Use -H "Authorization: Bearer <API_KEY>". All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.


API Methods



Get User Charts

Get charts owned by an user


Query Parameters

usernamestringRequired

Username of the user whose charts you want to fetch. Only the charts which are public or the charts for which you have the access will be retrieved.

qstring

Filter the charts with the title containing this query q as a substring.


Response status codes

Status CodeDescription
200OK
404Occurs when the username does not exist
400Occurs when the request is invalid, for example if the username field is missing in request, etc.,

Response Schema

chartsarray

successbool

Indicates whether the request has succeeded or failed.

messagestring

Briefly explains the error.

GET/api/user_charts


$ curl \
--location 'https://onecharts.io/api/user_charts?username=adam&q=stock' \
--request GET \
--header 'Authorization: Bearer <API_KEY>'

{
   "charts":[
      {
         "chart_id":"k-jOPzitp-MzB6",
         "chart_title":"top 10 stocks",
         "created_time":"2022-12-17T11:04:21.307Z",
         "chart_type":"pie",
         "chart_sub_type":"basic_pie",
         "thumbnail_path":"piechart",
         "cloned_from":"piechart"
      },
      {
         "chart_id":"o-SDEvxw9-7A0g",
         "chart_title":"dowjones Stocks daily trend",
         "created_time":"2022-12-17T11:04:21.307Z",
         "chart_type":"line",
         "chart_sub_type":"basicline",
         "thumbnail_path":"linechart",
         "cloned_from":"linechart"
      },
   ],
   "success":true
}

Create New Chart

creates new chart by cloning an existing chart.


Body Parameters

chart_idstringRequired

The ID of the chart to clone from.

chart_titlestring

Title of chart.

notesstring

Notes for this chart

visibilitystring

The visibility of the chart. It should be either public or private. By default, visibility is private. If the visibility is private, only the owner of the chart can view. If the visibility is public, anyone can view the chart.

dataobject

If data is not provided, the new chart will be created using the data of the provided chart_id. If data is provided, the new chart will be created with the provided data. Following is the data object based on different chart type and chart sub type. The chart type and chart sub type of the new chart are same as the existing chart.

Chart TypeChart Sub TypeData object
linebasic_lineLineChartDataObject
lineareaLineChartDataObject
linestackLineChartDataObject
linestacked_areaLineChartDataObject
barbasic_barBarChartDataObject
barbasic_bar_negative_valuesBarChartDataObject
barhorizontal_basic_barBarChartDataObject
barstackBarChartDataObject
barhorizontal_stackBarChartDataObject
heatmapcalendarCalendarHeatmapChartDataObject
candlestickbasic_candlestickCandleStickChartDataObject
piebasic_piePieChartDataObject
pienightingalePieChartDataObject
piedoughnutPieChartDataObject
funnelbasic_funnelFunnelChartDataObject
heatmapheatmapHeatmapChartDataObject
radarbasic_radarRadarChartDataObject
sankeybasic_sankeySankeyChartDataObject
scatterbasic_scatterScatterChartDataObject
punchcardpunchcardPunchcardChartDataObject
treebasic_treeTreeChartDataObject
treemaptreemapTreeMapChartDataObject
sunburstbasic_sunburstSunBurstChartDataObject

Response status codes

Status CodeDescription
200OK
400Occurs when the chart_id is missing or if there is an error with the provided parameters.

Response Schema

chart_idstring

The new chart ID.

successbool

Indicates whether the request has succeeded or not.

messagestring

Briefly highlights the error.

POST/api/chart


$ curl --location \
'https://onecharts.io/api/chart' \
--request POST \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "chart_id": "k-jOPzitp-MzB6",
    "chart_title": "monthly sales vs. revenue",
    "visibility": "private",
    "notes": "some notes"
    "data": {
        "labels": ["Jan"],
        "dimensions": ["Lions", "Deers"],
        "dataset": [
            {
                "name": "Jan",
                "dimensions": [
                    {
                        "name": "Lions",
                        "value": 20
                    },
                    {
                        "name": "Deers",
                        "value": 40
                    }
                ]
            }
        ]
    }
}'

{
   "chart_id":"k-IN26kbP-x30V",
   "success":true
}

Get Chart Config

Get the config of a chart. You need to be owner of the chart or you need to have the access inorder to view.


Query Parameters

chart_idstringRequired

ID of the chart that you want to retrieve.


Response status codes

Status CodeDescription
200OK
404Occurs when the chart_id does not exist
400Occurs when the chart_id is missing or if the provided parameters are invalid.
403Occurs when you do not have permission to view the chart

Response Schema

chartobject

successbool

Indicates whether the requests has succeeded or not.

messagestring

Briefly highlights the error.

GET/api/chart


$ curl \
--location 'https://onecharts.io/api/chart?chart_id=k-jOPzitp-MzB6' \
--request GET \
--header 'Authorization: Bearer <API_KEY>'

{
    "chart": {
        "chart_id": "k-jOPzitp-MzB6",
        "chart_title": "covid trend",
        "created_time": "2022-12-25T12:13:04.127Z",
        "modified_time": "2022-12-25T12:13:04.127Z",
        "chart_type": "bar",
        "chart_sub_type": "basic_bar_negative_values",
        "thumbnail_path": "https://static.onecharts.io/img/barchartwithnegativevalues.webp",
        "cloned_from": "barchartwithnegativevalues",
        "owner": "adam",
        "notes": "",
        "visibility": "private",
        "chart_options": {
            "title": {
                "text": "Line Chart",
                "textAlign": "center",
                "left": "50%",
                "top": "0%",
            },
            "legend": {
                "align": "auto",
                "left": "center",
                "bottom": "0%",
                "right": "0%"
            },
            "xAxis": {
                "type": "category",
                "boundaryGap": false
            },
        }
    },
    "success": true
}

Update Chart Config

Updates the config of a chart. You need to be owner of the chart inorder to update.


Body Parameters

chart_idstringRequired

Chart ID of a chart that you want to update.

chart_titlestring

The new title of the chart.

notesstring

The new notes.

visibilitystring

The new visibility of the chart

passwordstring

The new password for the chart

chart_optionsobject

The E-Charts compatible chart options.


Response status codes

Status CodeDescription
200OK
404Occurs when the chart_id does not exist
400Occurs when the chart_id field is missing.
403Occurs when you do not have permission to edit the chart

Response Schema

statusbool

Indicates whether the request has succeeded or not.

messagestring

Briefly highlights the error if the success is false.

PATCH/api/chart


$ curl \
--location 'https://onecharts.io/api/chart' \
--request PATCH  \
--header 'Authorization: Bearer <API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "chart_id": "k-jOPzitp-MzB6",
    "chart_options":  {
        "title": [{
            "text": "Line Chart",
            "textAlign": "center",
            "left": "50%",
            "top": "0%"
        }],
        "legend": [{
            "align": "auto",
            "left": "center",
            "bottom": "0%",
            "right": "0%"
        }],
        "xAxis": [{
            "type": "category",
            "boundaryGap": true
        }]
    },
    "notes": "New notes that needs to be added",
    "visibility": "public"
}' 

{
    "success": true
}

Get Chart Data

Get the data of a chart. You need to be owner of the chart or the chart needs to be public inorder to view.


Query Parameters

chart_idstringRequired

Chart ID for which we are about to delete.


Response status codes

Status CodeDescription
200OK
404Occurs when the chart_id does not exist
400The chart_id field is missing
403Occurs when you do not have permission to view the chart

Response Schema

dataobject

Chart data. Depending on chart type and chart subtype, following is the schema of the chart data object.

Chart TypeChart Sub TypeData object
linebasic_lineLineChartDataObject
lineareaLineChartDataObject
linestackLineChartDataObject
linestacked_areaLineChartDataObject
barbasic_barBarChartDataObject
barbasic_bar_negative_valuesBarChartDataObject
barhorizontal_basic_barBarChartDataObject
barstackBarChartDataObject
barhorizontal_stackBarChartDataObject
heatmapcalendarCalendarHeatmapChartDataObject
candlestickbasic_candlestickCandleStickChartDataObject
piebasic_piePieChartDataObject
pienightingalePieChartDataObject
piedoughnutPieChartDataObject
funnelbasic_funnelFunnelChartDataObject
heatmapheatmapHeatmapChartDataObject
radarbasic_radarRadarChartDataObject
sankeybasic_sankeySankeyChartDataObject
scatterbasic_scatterScatterChartDataObject
punchcardpunchcardPunchcardChartDataObject
treebasic_treeTreeChartDataObject
treemaptreemapTreeMapChartDataObject
sunburstbasic_sunburstSunBurstChartDataObject

successbool

Indicates whether the requests has succeeded or not.

messagestring

Briefly highlights the error if the success is false.

GET/api/chart_data


$ curl \
--location 'https://onecharts.io/api/chart_data?chart_id=k-jOPzitp-MzB6' \
--request GET \
--header 'Authorization: Bearer <API_KEY>'

{
    "data": {
        "labels": [
            "Jan",
            "Feb",
            "Mar"
        ],
        "dimensions": [
            "Sales",
            "Revenue"
        ],
        "dataset": [
            {
                "name": "Jan",
                "dimensions": [
                    {
                        "name": "Sales",
                        "value": 1439
                    },
                    {
                        "name": "Revenue",
                        "value": 1200
                    }
                ]
            },
            {
                "name": "Feb",
                "dimensions": [
                    {
                        "name": "Sales",
                        "value": 1593
                    },
                    {
                        "name": "Revenue",
                        "value": 1693
                    }
                ]
            }
        ]
    },
    "success": true
}

Update Chart Data

Updates the data of a chart. You need to be owner of the chart inorder to update.


Body Parameters

chart_idstringRequired

Chart ID of the chart for which you are about to update.

overwritebool

If set to true, the existing data will be replaced completely with new data.

dataobjectRequired

The data that needs to be updated. Following is the data object based on different chart type and chart sub type.

Chart TypeChart Sub TypeData object
linebasic_lineLineChartDataObject
lineareaLineChartDataObject
linestackLineChartDataObject
linestacked_areaLineChartDataObject
barbasic_barBarChartDataObject
barbasic_bar_negative_valuesBarChartDataObject
barhorizontal_basic_barBarChartDataObject
barstackBarChartDataObject
barhorizontal_stackBarChartDataObject
heatmapcalendarCalendarHeatmapChartDataObject
candlestickbasic_candlestickCandleStickChartDataObject
piebasic_piePieChartDataObject
pienightingalePieChartDataObject
piedoughnutPieChartDataObject
funnelbasic_funnelFunnelChartDataObject
heatmapheatmapHeatmapChartDataObject
radarbasic_radarRadarChartDataObject
sankeybasic_sankeySankeyChartDataObject
scatterbasic_scatterScatterChartDataObject
punchcardpunchcardPunchcardChartDataObject
treebasic_treeTreeChartDataObject
treemaptreemapTreeMapChartDataObject
sunburstbasic_sunburstSunBurstChartDataObject

Response status codes

Status CodeDescription
200OK
404Occurs when the chart_id does not exist
400The chart_id field is missing
403Occurs when you do not have permission to update the chart

Response Schema

successbool

Indicates whether the requests has succeeded or not.

messagestring

Briefly highlights the error.

PATCH/api/chart_data


$ curl \
--location  'https://onecharts.io/api/chart_data' \
--request PATCH \
--header 'Authorization: Bearer API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "chart_id": "k-jOPzitp-MzB6",
    "data": {
        "labels": ["Jan"],
        "dimensions": ["Sales", "Revenue"],
        "dataset": [
            {
                "name": "Jan",
                "dimensions": [
                    {
                        "name": "Sales",
                        "value": 20
                    },
                    {
                        "name": "Revenue",
                        "value": 40
                    }
                ]
            }
        ]
    },
    "overwrite": true
}'

{
   "success":true
}

Delete Chart

Deletes a chart. You need to be owner of the chart inorder to delete.


Body Parameters

chart_idstringRequired

ID of the chart that you want to delete


Response status codes

Status CodeDescription
200OK
400The chart_id field is missing
403Occurrs when you do not have permission to delete the chart

Response Schema

successbool

Indicates whether the chart has been deleted or not

messagestring

Briefly highlights the error.

DELETE/api/chart


$ curl \
--location 'https://onecharts.io/api/chart' \
--request DELETE \
--header 'Authorization: Bearer APi_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "chart_id": "k-jOPzitp-MzB6"
}'

{
   "success":true
}

Chart Object


Schema

chart_idstring

Chart ID.


chart_titlestring

Title of the chart


created_timetimestamp

Time at which this chart was created.


modified_timetimestamp

Time at which this chart was last modified.


chart_typestring

Chart Type.


chart_sub_typestring

Chart Sub type.


thumbnail_pathstring

URL of the thumbnail.


cloned_fromstring

The chart from which this chart has been cloned.


ownerstring

The owner of the chart.


notesstring

The notes for this chart.


visibilitystring

Visibility of the chart.

{
    "chart_id": "k-jOPzitp-MzB6",
    "chart_title": "% of world population",
    "created_time": "2022-12-25T12:13:04.127Z",
    "modified_time": "2022-12-25T12:13:04.127Z",
    "chart_type": "pie",
    "chart_sub_type": "basic_pie",
    "thumbnail_path": "basic_pie",
    "cloned_from": "o-eOPSiu7-c9Id",
    "owner": "bob",
    "notes": "this chart contains the percentage of world population...",
    "visibility": "private"
}

Line Chart Data Object

The data object for line chart.


Schema

dataobjectRequired

data contains the three fields labels, dimensions and dataset as described below.


labelsArray of strings

The list of labels. Note that order matters


dimensionsArray of strings

The list of dimensions. Note that order matters


datasetArray of object

The list of data object, each object consists of name and dimensions as described below.


namestring

The label name


dimensionsArray of objects

The values for the dimensions corresponding to this label, each object consists of a name and value as described below.


namestring

The dimension name


valuefloat

The values

{
    "data": {
        "labels": [
            "Jan",
            "Feb",
            "Mar",
            "Apr"
        ],
        "dimensions": [
            "Sales",
            "Revenue"
        ],
        "dataset": [
            {
                "name": "Jan",
                "dimensions": [
                    {
                        "name": "Sales",
                        "value": 1439
                    },
                    {
                        "name": "Revenue",
                        "value": 1200
                    }
                ]
            },
            {
                "name": "Feb",
                "dimensions": [
                    {
                        "name": "Sales",
                        "value": 1593
                    },
                    {
                        "name": "Revenue",
                        "value": 1693
                    }
                ]
            },
            {
                "name": "Mar",
                "dimensions": [
                    {
                        "name": "Sales",
                        "value": 200
                    }
                ]
            },
            {
                "name": "Apr",
                "dimensions": [
                    {
                        "name": "Revenue",
                        "value": 900
                    }
                ]
            }
        ]
    }
}

Bar Chart Data Object

The data object for bar chart.


Schema

dataobjectRequired

data contains the three fields: labels, dimensions and dataset as described below.


labelsArray of strings

The list of labels. Note that order matters


dimensionsArray of strings

The list of dimensions. Note that order matters


datasetArray of object

The list of objects, each object consists of a name, dimensions as described below.


namestring

The label name


dimensionsArray of objects

The list of dimension objects corresponding to this label. Each dimension object contains a name and the value as described below.


namestring

The dimension name


valuefloat

The value.

{
    "data": {
        "labels": [
            "Jan",
            "Feb",
            "Mar",
            "Apr"
        ],
        "dimensions": [
            "Sales",
            "Revenue"
        ],
        "dataset": [
            {
                "name": "Jan",
                "dimensions": [
                    {
                        "name": "Sales",
                        "value": 1439
                    },
                    {
                        "name": "Revenue",
                        "value": 1200
                    }
                ]
            },
            {
                "name": "Feb",
                "dimensions": [
                    {
                        "name": "Sales",
                        "value": 1593
                    },
                    {
                        "name": "Revenue",
                        "value": 1693
                    }
                ]
            },
            {
                "name": "Mar",
                "dimensions": [
                    {
                        "name": "Sales",
                        "value": 200
                    }
                ]
            },
            {
                "name": "Apr",
                "dimensions": [
                    {
                        "name": "Revenue",
                        "value": 900
                    }
                ]
            }
        ]
    }
}

Pie Chart Data Object

The data object for pie chart.


Schema

dataobjectRequired

data contains the two fields labels and dataset as described below.


labelsArray of strings

The list of labels. Note that order matters


datasetArray of object

The list of data objects, each object consists of name and value as described below.


namestring

The label name


valuefloat

The values for this label

{
    "data": {
        "labels": [
            "Jan",
            "Feb",
            "Mar",
            "Apr"
        ],
        "dataset": [
            {
                "name": "Jan",
                "value": 12
            },
            {
                "name": "Feb",
                "value": 16
            },
            {
                "name": "Mar",
                "value": 19
            },
            {
                "name": "Apr",
                "value": 22
            }
        ]
    }
}

Scatter Chart Data Object

The data object for scatter chart.


Schema

dataobjectRequired

data contains the two fields labels and dataset as described below.


labelsArray of strings

The list of labels. Note that order matters


datasetArray of object

The list of data objects, each object consists of two fields name and points as described below.


namestring

The label name


pointsArray of objects

The coordinates of the points, each point consists of x and y fields as described below.


xfloat

The X coordinate of the point.


yfloat

The Y coordinate of the point.

{
   "data":{
      "labels":[
         "Points A",
         "Points B"
      ],
      "dataset":[
         {
            "name":"Points A",
            "points":[
               {
                  "x":1.49,
                  "y":-9.12
               },
               {
                  "x":-4.5,
                  "y":-3.09
               },
               {
                  "x":7.83,
                  "y":-0.76
               }
            ]
         },
         {
            "name":"Points B",
            "points":[
               {
                  "x":3.68,
                  "y":1.95
               },
               {
                  "x":6.84,
                  "y":-4.6
               },
               {
                  "x":-4.9,
                  "y":-3.43
               }
            ]
         }
      ]
   },
   "success":true
}

Punchcard Chart Data Object

The data object for punchcard chart.


Schema

dataobjectRequired

data contains the three fields x_axis_labels, y_axis_labels and dataset as described below.


x_axis_labelsArray of strings

The X Axis Labels


y_axis_labelsArray of strings

The Y Axis labels


datasetArray of object

The list of data objects, each object consists of x_axis_label, y_axis_label and value ad described below.


x_axis_labelstring

The x_axis_label name


y_axis_labelstring

The y_axis_label name


valuefloat

The value.

{
   "data":{
      "x_axis_labels":[
         "9am",
         "10am",
         "11am",
         "12pm",
      ],
      "y_axis_labels":[
         "Sun",
         "Mon",
         "Tue",
      ],
      "dataset":[
         {
            "x_axis_label":"9am",
            "y_axis_label":"Mon",
            "value":5
         },
         {
            "x_axis_label":"9am",
            "y_axis_label":"Tue",
            "value":10
         },
         {
            "x_axis_label":"12pm",
            "y_axis_label":"Wed",
            "value":8
         }
      ]
   },
   "success":true
}

Heatmap Chart Data Object

The data object for heatmap chart.


Schema

dataobjectRequired

data contains the three fields x_axis_labels, y_axis_labels and dataset as described below.


x_axis_labelsArray of strings

The X Axis Labels


y_axis_labelsArray of strings

The Y Axis labels


datasetArray of object

The list of data object, each object consists of x_axis_label, y_axis_label and value as described below.


x_axis_labelstring

The x_axis_label name


y_axis_labelstring

The y_axis_label name


valuefloat

The value.

{
   "data":{
      "x_axis_labels":[
         "9am",
         "10am",
         "11am",
         "12pm",
      ],
      "y_axis_labels":[
         "Sun",
         "Mon",
         "Tue",
      ],
      "dataset":[
         {
            "x_axis_label":"9am",
            "y_axis_label":"Mon",
            "value":5
         },
         {
            "x_axis_label":"9am",
            "y_axis_label":"Tue",
            "value":10
         },
         {
            "x_axis_label":"12pm",
            "y_axis_label":"Wed",
            "value":8
         }
      ]
   },
   "success":true
}

Candlestick Chart Data Object

The data object for candlestick chart.


Schema

dataobjectRequired

data contains the two fields: labels and dataset as described below.


datasetArray of object

The list of objects, each object consists of a day, high, open, close and low as described below.


daystring

The timestamp as string in TZ format.


highfloat

The high value


openfloat

The open value


closefloat

The close value


lowfloat

The low value

{
   "data":{
      "dataset":[
         {
            "day":"2022-04-01",
            "high":38,
            "open":20,
            "close":34,
            "low":10
         },
         {
            "day":"2022-04-02",
            "high":50,
            "open":40,
            "close":35,
            "low":30
         },
         {
            "day":"2022-04-03",
            "high":44,
            "open":31,
            "close":38,
            "low":33
         },
         {
            "day":"2022-04-04",
            "high":42,
            "open":38,
            "close":15,
            "low":5
         }
      ]
   },
   "success":true
}

Radar Chart Data Object

The data object for radar chart.


Schema

dataobjectRequired

data contains two fields, indicators and dataset as described below.


indicatorsArray of object

The list of indicators objects, each object consists of a name and max value.


namestring

The name of the indicator.


maxfloat

The maximum value of the indicator.


datasetArray of object

The list of data objects, each object consists of a name and dimensions as described beloe

namestring

Name of the dataset


dimensionsArray of object

The list of dimensions, each object consists of a name and value.

namestring

The name of the indicator.


valuefloat

The value of the indicator.

{
   "data":{
      "indicators":[
         {
            "name":"Sales",
            "max":6500,
         },
         {
            "name":"Administration",
            "max":16000,
         },
         {
            "name":"Information Technology",
            "max":30000,
         }
      ],
      "dataset":[
         {
            "name":"Predicted",
            "dimensions":[
               {
                  "name":"Sales",
                  "value":4200
               },
               {
                  "name":"Administration",
                  "value":3000
               },
               {
                  "name":"Information Technology",
                  "value":20000
               }
            ]
         },
         {
            "name":"Actual",
            "dimensions":[
               {
                  "name":"Sales",
                  "value":5000
               },
               {
                  "name":"Administration",
                  "value":14000
               },
               {
                  "name":"Information Technology",
                  "value":28000
               }
            ]
         }
      ]
   },
   "success":true
}

Calendar Heatmap Chart Data Object

The data object for calendar heatmap chart.


Schema

dataobjectRequired

data contains the two fields: labels and dataset as described below.


datasetArray of object

The list of objects. Each object contains a day and value as described below.


daystring

Day in the form of YYYY-MM-DD.


valuefloat

Value for the day.

{
   "data":{
      "dataset":[
         {
            "day":"2022-12-01",
            "value":10
         },
         {
            "day":"2022-12-02",
            "value":12
         },
         {
            "day":"2022-12-03",
            "value":16
         }
      ]
   },
   "success":true
}

Sankey Chart Data Object

The data object for sankey chart.


Schema

dataobjectRequired

data contains the two fields nodes and links as described below.


nodesArray of strings

The list of nodes


linksArray of objects

The list of edges, each edge object consists of three fields source, target and value as described below.


sourcestring

Source node.


targetstring

Target node.


valuefloat

Value of the edge.

{
   "data":{
      "nodes":[
         "Node 1",
         "Node 2",
         "Node 3",
      ],
      "links":[
         {
            "source":"Node 2",
            "target":"Node 1",
            "value":5
         },
         {
            "source":"Node 1",
            "target":"Node 3",
            "value":3
         },
         {
            "source":"Node 2",
            "target":"Node 3",
            "value":8
         }
      ]
   },
   "success":true
}

Funnel Chart Data Object

The data object for funnel chart.


Schema

dataobjectRequired

data contains one field: dataset as described below.


datasetArray of object

The list of data object, each object consists of name and value as described below.


namestring

The label name


valuefloat

The values for this label

{
    "data": {
        "dataset": [
            {
                "name": "Jan",
                "value": 12
            },
            {
                "name": "Feb",
                "value": 16
            },
            {
                "name": "Mar",
                "value": 19
            },
            {
                "name": "Apr",
                "value": 22
            }
        ]
    }
}

Sun Burst Chart Data Object

The data object for sun burst chart.


Schema

dataobjectRequired

data contains the three fields roots, nodes and edges as described below.


rootsArray of strings

The list of root nodes


nodesArray of objects

The list of nodes, each node object consists of two fields node and value as described below.


nodestring

Node name.


valuefloat

Value of the node.


edgesArray of objects

The list of edges, each edge object consists of two fields source and target as described below.


sourcestring

Source node.


targetstring

Target node.

{
   "data":{
      "roots":[
         "Root 1",
         "Root 2"
      ],
      "nodes": [
        {
            "node": "Root 1",
            "value": 1
        },
        {
            "node": "Root 2",
            "value": 2
        },
        {
            "node": "node 1",
            "value": 3
        },
        {
            "node": "node 2",
            "value": 4
        },
        {
            "node": "node 3",
            "value": 5
        },
        {
            "node": "node 4",
            "value": 6
        },
      ],
      "edges":[
         {
            "source":"Root 1",
            "target":"node 1",
         },
         {
            "source":"node 1",
            "target":"node 2",
         },
         {
            "source":"node 1",
            "target":"node 3",
         },
         {
            "source":"Root 2",
            "target":"node 4",
         },
      ]
   },
   "success":true
}

Tree Chart Data Object

The data object for tree chart.


Schema

dataobjectRequired

data contains the two fields root and edges as described below.


rootstring

The root node.


edgesArray of objects

The list of edges, each edge object consists of two fields source and target as described below.


sourcestring

Source node.


targetstring

Target node.

{
   "data":{
      "root": "Root 1",
      "edges":[
         {
            "source":"Root 1",
            "target":"node 1",
         },
         {
            "source":"node 1",
            "target":"node 2",
         },
         {
            "source":"node 1",
            "target":"node 3",
         },
         {
            "source":"Root 2",
            "target":"node 4",
         },
      ]
   },
   "success":true
}

Tree Map Chart Data Object

The data object for tree map chart.


Schema

dataobjectRequired

data contains the three fields roots, nodes and edges as described below.


rootsArray of strings

The list of root nodes


nodesArray of objects

The list of nodes, each node object consists of two fields node and value as described below.


nodestring

Node name.


valuefloat

Value of the node.


edgesArray of objects

The list of edges, each edge object consists of two fields source and target as described below.


sourcestring

Source node.


targetstring

Target node.

{
   "data":{
      "roots":[
         "Root 1",
         "Root 2"
      ],
      "nodes": [
        {
            "node": "Root 1",
            "value": 1
        },
        {
            "node": "Root 2",
            "value": 2
        },
        {
            "node": "node 1",
            "value": 3
        },
        {
            "node": "node 2",
            "value": 4
        },
        {
            "node": "node 3",
            "value": 5
        },
        {
            "node": "node 4",
            "value": 6
        },
      ],
      "edges":[
         {
            "source":"Root 1",
            "target":"node 1",
         },
         {
            "source":"node 1",
            "target":"node 2",
         },
         {
            "source":"node 1",
            "target":"node 3",
         },
         {
            "source":"Root 2",
            "target":"node 4",
         },
      ]
   },
   "success":true
}