Tovább a tartalomhoz

Charts

Ez a tartalom még nem érhető el a jelenlegi nyelven.




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

ParameterTypeRequiredDescription
labels array YesLabels for the pie chart slices
sizes array YesSizes of each pie slice; comma-separated numerical values
colors array NoColors for each slice; comma-separated names or hex codes (e.g., “red”, “#FF5733”)
explode array NoSlice separations; comma-separated 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'

Pie Chart Example

Pie Chart



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

ParameterTypeRequiredDescription
labels array YesLabels for each bar in the chart
values array YesValues for each bar; comma-separated numerical values
colors array NoColors for each bar; comma-separated names or hex codes (e.g., “red”, “#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'

Pie Chart Example

Pie Chart




GET /api/charts/line_chart
https://api.cookie-api.com/api/charts/line_chart
ParameterTypeRequiredDescription
labels array YesLabels for each data point on the x-axis
values array YesY-axis values for each point; comma-separated numerical values
colors string NoColor for the line; name (e.g., “red”) or hex 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'

Line Chart Example

Line Chart example




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

ParameterTypeRequiredDescription
x_values array YesX-axis values; comma-separated numerical values
y_values array YesY-axis values; comma-separated numerical values
colors array NoColors for each point; comma-separated names or hex codes (e.g., “red”, “#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'

Scatter Plot Example

Scatter Plot


GET /api/charts/histogram
https://api.cookie-api.com/api/charts/histogram
ParameterTypeRequiredDescription
values array YesValues for the histogram; comma-separated numerical values
bins integer NoNumber of bins in the histogram
colors string NoColor for histogram bars; name (e.g., “red”) or hex code (e.g., “#FF5733”)


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

Histogram Example

Histogram