1. Go to this page and download the library: Download blumilksoftware/heatmap library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$builder = new HeatmapBuilder();
$result = $builder->build($data);
// Define a custom period for the entire month of January 2025
$period = CarbonPeriod::create(
Carbon::parse('2025-01-01'),
'1 day',
Carbon::parse('2025-01-31')
);
// Instantiate the HeatmapBuilder with the custom period
$builder = new HeatmapBuilder(
now: Carbon::now(),
periodInterval: PeriodInterval::Daily,
period: $period // Include the custom period
);
// Generate the heatmap data
$result = $builder->build($data);