Is it possible to get the technical debt per file in Sonar and preferably export it so it is possible to put in a chart?
Yes, thanks to the SQALE plugin. See http://www.sonarsource.com/products/plugins/governance/sqale/