No the display name must be set in the configuration plugin.json file. Typically in a situation like this you would have the metric name be something like "Folder size" and then you can report each folder name and value separately as a dimension which can be done dynamically. You can always filter down to that dimension on charts etc... and have the same result.
Only other option that comes to mind is if you decided not to use the built in methods for reporting metrics specifically for extensions and instead reported metrics over the API. This lets you define the metrics on the fly however you see fit but requires you write the extension to use this, you may need to supply an api token in the config if it is not reporting to the OneAgent metric API, and as of now you specify a key (which could be dynamic) but there is no 'display name.'
I'd stick with the dimension approach.
I am trying with the dimensions but I not able to see each folder name at the keychart.
This is the plugin.json file: