API description

La documentation API est disponible en Anglais.

Get chart with URL

Get a chart for your data into your web page, by simple URL access. To use this service, your have to be registered at IntChart. Get your API user ID. The chart uses pure JS, and can be customised using the parameters described below.

Example URL

To view the example chart : click here , or copy this URL and paste it into your browser address bar.

https://www.intchart.com/api/ABCDEFGH/chart?file=https://www.intchart.com/public/data/url_example.txt&width=1000&smooth=0.6

ABCDEFGH is an example user id to use only with this chart. To get your own API user ID : register or login .

Chart Layout

If you use a file present at Intchart, the same layout will be used as specified at Intchart. You can change the layout of your chart by adapting the settings at Intchart, or by specifying extra parameters in the URL as described below.

Headers

No headers needed.

Parameters

{id} API user ID
file Mandatory Determines the file providing the data. 3 sorts of resources can be used to show your chart:

1. Files uploaded at IntChart Files can be used once they are uploaded manually or with the API. The URL can be used directly in the browser or included in your webpage. Parameter example : file=UploadedFile.txt URL example : https://www.intchart.com/api/ABCDEFGH/chart?file=File1.txt&width=1000

2. Local webserver files In this case, the URL can only be used included in your webpage. The path relative to your webroot should be given. Parameter example : file=path/to/your/file.txt URL example : https://www.intchart.com/api/ABCDEFGH/chart?file=path/to/your/file.txt&width=1000 Remark : in this case do not use an iframe (the webroot is not accessible from within the iframe).

3. Any web resource The URL can be used directly in the browser or included in your webpage. Parameter example : file=https://www.intchart.com/public/data/url_example.txt URL example : https://www.intchart.com/api/ABCDEFGH/chart?file=https://www.intchart.com/public/data/url_example.txt&width=1000 Remark : the webresource has to include the scheme (example : https://)

To use the URL in your webpage The content can be loaded into your web page with jQuery using .load().

width Optional - in px Determines the width of the chart. The height is adapted automatically. Example : width=1200
lang Optional - Default : en Determines the language used for the dates. Possible values : de, en, es, fr, nl Example : lang=nl
line Optional - Default : 2 Determines the width of the lines (stroke-width). Possible values : 0.5 - 20 Example : line=4
point Optional - Default : 2 Determines the radius of the data points. Possible values : 0.5 - 20 Example : point=4
smooth Optional - Default : 0.8 Determines the smoothness of the line. Possible values : 0.65 - 1 Example : smooth=0.9
legend Optional - Default : y Indicates if the legend is shown. Possible values : y / n Example : legend=n
title Optional - Default : empty Gives the title of chart. Example : title=Chart 1
difference Optional - Default : n Calculates the difference of two consecutive values ( e.g. for consumption ) Example : difference=y
group Optional - Default : y Indicates if the data has to be grouped according to g_type ( described below ). group=n is only possible for less than 1000 lines. Possible values : y / n Example : group=n
g_type Optional - Default : av Group type : determines the way to group the data. Possible values : av, max, min, sum Example : g_type=sum
s_scale Optional - Default : n Indicates if the x-axis and the y-axis has to be drawn with the same scale. (only useful for numeric x-values) Possible values : y / n Example : s_scale=y
decimal Optional - Default : p Determines the decimal character to be used (point or comma). Possible values : p / c Example : decimal=c
hour Optional - Default : 12 Indicates if the 12-hour or the 24-hour clock system has to be used. Possible values : 12 / 24 Example : hour=24
x_ticks Optional - Default : 7 Determines the (approximate) number of ticks used for the horizontal x-axis. Possible values : 3 - 31 Example : x_ticks=20
x_grid Optional - Default : y Indicates if the horizontal grid has to be shown. Possible values : y / n Example : x_grid=n
x_zero Optional - Default : n Indicates if the value 0 has to be shown on the horizontal x-axis. (only useful for numeric x-values) Possible values : y / n Example : x_zero=y
x_bottom Optional - Default : n Indicates if the horizontal x-axis has to be drawn at the bottom of the chart. (only useful with negative y-values) Possible values : y / n Example : x_bottom=y
x_label Optional - Default : empty Gives the label for the horizontal x-axis. Example : x_label=date
y_ticks Optional - Default : 7 Determines the (approximate) number of ticks used for the vertical y-axis. Possible values : 3 - 31 Example : y_ticks=20
y_grid Optional - Default : y Indicates if the vertical grid has to be shown. Possible values : y / n Example : y_grid=n
y_zero Optional - Default : n Indicates if the value 0 has to be shown on the vertical y-axis. Possible values : y / n Example : y_zero=y
y_left Optional - Default : n Indicates if the vertical y-axis has to be drawn on the left side of the chart. (only useful with negative x-values) Possible values : y / n Example : y_left=y
y_label Optional - Default : empty Gives the label for the vertical y-axis. Example : y_label=value