I don't think we have any written documentation about how to make a JMC plug-in as advanced as this,
but JMC itself is now open source - JMC Open Sourced! so you can view the entire source code.
In the Slack workspace, I believe there are also others interested in making a flame graph plugin for the JFR data.
I can invite you to the Slack, just email me your preferred email address to my firstname.lastname@example.org email address.
I know that you already know this Isuru, but I thought I'd document this here so that others can find it...
Here is an example of a Flame Graph plug-in for OpenJDK JMC: