Let me explain you what i got from the same issue long time ago.
Current Qlik Sense API does not provide an export image functionality as it does with exportData method which only exports data in table format. If you want to create a similar functionality as in the hub you will l need to:
1. Create the functionality that gets a specific screenshot of your chart.
2. Create a right click menu (most probably will override the default right click functionality of browsers).
As per the first point, I achieved to get a snapshot of the visualization by using html2canvas. Look around for some basic examples. See the behavior below:
// Get object
var qObject = document.getElementById(model.id);
// Transform qObject to canvas
// Download in png format
// .empty is a html class that will render the canvas of your object into the <div> tag
// give the file a name
Hope this helped you :-)