Chart API
#
What is Charts APIAs you know, we have charts inside dclist.net. Charts are good for comparing data day by day.
If you haven't seen our charts, they are on any bot's page under "Charts" tab.
The best part about our charts is, you can use them too.
#
How to use Charts APICharts API is simply a rest api witch renders and exports charts for you. It also caches them, so you can access them much quickly.
The base url for Charts API is : https://charts.dclist.net/
#
Bot ChartsBot charts are available under "/bots/$botId/$chartId.$ext" path.
An example bot chart url looks like this : https://charts.dclist.net/bots/690214077490004030/views.svg
#
Chart TypesThere are two types of public chart you can access via Charts API
#
Bot Views Chart#
Bot Votes Chart#
File FormatCharts API supports 3 type of files :
- Scalable Vector Graphics (.svg)
- Portable Network Graphics (.png)
- JavaScript Object Notation (.json)
You can control the file type by changing the extension in the url like views.svg, views.json etc.
#
CustomizingYou can customize the chart via query strings.
All the query strings are optional.
Property | Default | Description | Example |
---|---|---|---|
width | 1000 | Sets width of the chart | /bots/690214077490004030/views.svg?width=1280 |
height | 500 | Sets height of the chart | /bots/690214077490004030/views.svg?height=720 |
theme | dark | Changes the color of texts. dark or light. | /bots/690214077490004030/views.svg?theme=light |
locale | en | Changes language of the date strings. en or tr. | /bots/690214077490004030/views.svg?locale=tr |
#
Bot AliasesIf it has, you can use bots alias as botId.
Like this : https://charts.dclist.net/bots/technobot/views.svg?width=1280&height=720