JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
data = JSON.parse('[{"project_title":"test project 44","project_ref_id":"113","amount":"13000.00","months":"Feb"},{"project_title":"sdsdsd","project_ref_id":"112","amount":"50000.00","months":"Mar"},{"project_title":"testing123","project_ref_id":"104","amount":"232323.00","months":"Mar"},{"project_title":"hello wolrd","project_ref_id":"111","amount":"30000.00","months":"Mar"},{"project_title":"road construction","project_ref_id":"108","amount":"1000.00","months":"Apr"},{"project_title":"sdsdsd","project_ref_id":"112","amount":"2000.00","months":"Apr"},{"project_title":"sdsdsd","project_ref_id":"112","amount":"354357.00","months":"May"}]');
var allMonths = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var allProjectNames = $.map(data,function(el){return el.project_title}).filter(function(el,index,arr){return arr.indexOf(el)==index});
//Comment the line below if you want all 12 months and not just the ones with actual data
allMonths = $.map(data,function(el){return el.months}).filter(function(el,index,arr){return arr.indexOf(el)==index});
var series = [];
$.each(allProjectNames,function(index2,projectName){ //cycling all projects
var dataSeries = [];
$.each(allMonths,function(index1,month){
var dati = data.filter(function(el){ //filtering the data for the current project and month
return el.project_title === projectName && el.months === month;
})
dati.length > 0 ? dataSeries.push(parseFloat(dati[0].amount)) : dataSeries.push(null); //if the project doesn't have data for the current montht i set the datapoint to null
});
series.push({name : projectName, data : dataSeries});
});
$('#container').highcharts({
xAxis: {
categories: allMonths
},
yAxis: {
title: {
text: 'clicks'
},
plotLines: [{
...