To create a new Dynamic Chart, it’s easiest to copy an existing one as a baseline and make your changes as necessary. To see what a Dynamic Chart record looks like, navigate to VividCharts > Dynamic Charts and click into Donut - Incidents by category based on current user. Here, you’ll see various options under the Chart Options tab. Click to the Script tab and you’ll see that this script is leveraging the Service Portal Util scripts, in particular: $sp.getParameter('sys_id');. Since this script will be run on the Service Portal widget’s server script we can use Service Portal features. Here, we’re grabbing the URL parameter ‘sys_id’ and creating a GlideAggregate call off of it.