ChartMancer - PHP library to charts generation using GD
Nightfly fe9fddf05d pffff | 1 dag sedan | |
---|---|---|
assets | 1 år sedan | |
examples | 1 dag sedan | |
src | 1 dag sedan | |
.gitignore | 1 år sedan | |
LICENSE | 1 år sedan | |
README.md | 2 månader sedan | |
composer.json | 1 år sedan |
ChartMancer class automates the generation of graphs based on data provided in an array. It utilizes the GD library to create visually appealing charts, allowing developers to easily visualize and display data trends. With ChartMancer, you can customize various aspects of the graph, such as colors, labels, and other chart properties, providing a versatile tool for data representation in PHP applications.
$cm=new ChartMancer();
$data=array('Mon'=>8,'Tue'=>4,'Wed'=>7,'Thu'=>3,'Fri'=>6,'Sat'=>4,'Sun'=>0);
$cm->renderChart($data);
$data = array();
for ($i = 0; $i <= 249; $i++) {
$data[$i] = array(rand(0, 129), rand(0, 79), rand(0, 54), rand(0, 4));
}
$cm=new ChartMancer();
$cm->renderChart($data);
$legend=array('Total','Disk 1','Disk 2','Disk 3','Disk 4','Disk 5','Disk 6');
$chartMancer->setDebug(true);
$chartMancer->setDrawFirstColumn(true);
$chartMancer->setChartLegend($legend);
$chartMancer->setPalette('0-M-G!!!');
$chartMancer->setChartTitle('Disks IO');
$chartMancer->setChartYaxisName('w/s');
$chartMancer->renderChart($data);
The recommended method of installing this library is via Composer
composer require chartmancer/chartmancer
MIT