FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
quickchart-php/examples/api_key_simple.php at main · typpo/quickchart-php · GitHub
typpo
/
quickchart-php
Public
Notifications
You must be signed in to change notification settings
Fork
21
Star
46
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
quickchart-php
/
examples
/
api_key_simple.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
20 lines (18 loc) · 695 Bytes
Breadcrumbs
quickchart-php
/
examples
/
api_key_simple.php
Copy path
File metadata and controls
20 lines (18 loc) · 695 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
require_once
(
'
../QuickChart.php
'
);
$
qc
=
new
QuickChart
();
$
qc
->
setConfig
(
"
{
type: 'bar',
data: {
labels: ['Q1', 'Q2', 'Q3', 'Q4'],
datasets: [{
label: 'Users',
data: [50, 60, 70, 180]
}]
}
}
"
);
$
qc
->
setApiKey
(
'
abc123
'
);
echo
$
qc
->
getUrl
();
// Prints:
// https://quickchart.io/chart?c=%7B%0A++++type%3A+%27bar%27%2C%0A++++data%3A+%7B%0A++++++labels%3A+%5B%27Q1%27%2C+%27Q2%27%2C+%27Q3%27%2C+%27Q4%27%5D%2C%0A++++++datasets%3A+%5B%7B%0A++++++++label%3A+%27Users%27%2C%0A++++++++data%3A+%5B50%2C+60%2C+70%2C+180%5D%0A++++++%7D%5D%0A++++%7D%0A++%7D&w=500&h=300&devicePixelRatio=1.000000&format=png&bkg=transparent&key=abc123
?>
Back
|
FazBrowse Home
|
New Git URL