Skip to content

Charts




GET/api/charts/pie_chart
Terminal window
https://api.cookie-api.com/api/charts/pie_chart

URL Parameters
labelsLabels in the pie chart.
sizesSize of each pie slice. Comma-separated list of numerical values.
colors optionalColors of each pie slice. Comma-separated list of color names (e.g., "red", "blue") or hexadecimal color codes (e.g., "#FF5733").
explode optionalSeparation of a part from the pie chart. Comma-separated list of float values.


example.cURL
curl --location 'https://api.cookie-api.com/api/charts/pie_chart?labels=Label1,Label2,Label3&sizes=30,40,30&colors=red,blue,green&explode=0,0.1,0'

Responses

Pie Chart Example

Pie Chart



GET/api/charts/bar_chart
Terminal window
https://api.cookie-api.com/api/charts/bar_chart

URL Parameters
labelsLabels for each bar in the chart.
valuesValues corresponding to each bar. Comma-separated list of numerical values.
colors optionalColors for each bar. Comma-separated list of color names (e.g., "red", "blue") or hexadecimal color codes (e.g., "#FF5733").
example.cURL
curl --location 'https://api.cookie-api.com/api/charts/bar_chart?labels=Label1,Label2,Label3&values=10,20,30&colors=red,blue,green'

Responses

Pie Chart Example

Pie Chart




GET/api/charts/line_chart
Terminal window
https://api.cookie-api.com/api/charts/line_chart
URL Parameters
labelsLabels for each data point on the x-axis.
valuesValues corresponding to each data point on the y-axis. Comma-separated list of numerical values.
colors optionalColor for the line. Color name (e.g., "red", "blue") or hexadecimal color code (e.g., "#FF5733").


example.cURL
curl --location 'https://api.cookie-api.com/api/charts/line_chart?labels=Label1,Label2,Label3&values=5,10,15&colors=blue'

Responses

Line Chart Example

Line Chart example




GET/api/charts/scatter_plot
Terminal window
https://api.cookie-api.com/api/charts/scatter_plot

URL Parameters
x_valuesValues for the x-axis. Comma-separated list of numerical values.
y_valuesValues for the y-axis. Comma-separated list of numerical values.
colors optionalColors for each data point. Comma-separated list of color names (e.g., "red", "blue") or hexadecimal color codes (e.g., "#FF5733").

example.cURL
curl --location 'https://api.cookie-api.com/api/charts/scatter_plot?x_values=1,2,3,4,5&y_values=10,15,20,25,30&colors=red,blue,green,yellow,purple'

Responses

Scatter Plot Example

Scatter Plot


GET/api/charts/histogram
Terminal window
https://api.cookie-api.com/api/charts/histogram
URL Parameters
valuesValues to be plotted in the histogram. Comma-separated list of numerical values.
bins optionalNumber of bins in the histogram. Integer value.
colors optionalColor for the histogram bars. Color name (e.g., "red", "blue") or hexadecimal color code (e.g., "#FF5733").


example.cURL
curl --location 'https://api.cookie-api.com/api/charts/histogram?values=10,15,20&bins=3&colors=blue'

Responses

Histogram Example

Histogram