Last.fm and Google Charts: Examples
Further examples for the Last.fm and Google Charts class. The images on this page are dynamically generated by the class.
All-time listening share of your 15 top artists
$chart1 = new lastfmChart();
$chart1->setDataFile('http://ws.audioscrobbler.com/1.0/user/mister-brown/topartists.xml');
$chart1->setType('pie');
$chart1->setTitle('Top Artists Shares');
$chart1->doChart();
Listening shares of this weeks top 10 artists:
$chart2 = new lastfmChart();
$chart2->setDataFile('http://ws.audioscrobbler.com/1.0/user/mister-brown/weeklyartistchart.xml');
$chart2->setType('pie');
$chart2->setDataPoints('10');
$chart2->setTitle('Weekly Artists Shares');
$chart2->setColors('0000FF');
$chart2->doChart();
Total listens of the 8 top artists this week:
$chart3 = new lastfmChart();
$chart3->setDataFile('http://ws.audioscrobbler.com/1.0/user/mister-brown/weeklyartistchart.xml');
$chart3->setType('bar');
$chart3->setDataPoints('8');
$chart3->setSize('400x300');
$chart3->setTitle('Weekly Listens');
$chart3->setColors('CF0F0F');
$chart3->doChart();
Number of all-time listens for top 15 artists:
$chart4 = new lastfmChart();
$chart4->setDataFile('http://ws.audioscrobbler.com/1.0/user/mister-brown/topartists.xml');
$chart4->setType('bar');
$chart4->setSize('400x520');
$chart4->setTitle('Top Artists');
$chart4->setColors('00AF33');
$chart4->doChart();