lprun to html with chart
Hi, is it possible to use LinqPad chart when running lprun with html output? (LinqPad5)
In GUI all is perfect, but with lprun I get HTML files with images like img src="C:\TEMP\LINQPad5\_cguwfjvw\ukrbpe"
which is not there after lprun is done..
Comments
You could convert the chart to a Bitmap object - look at the Chart() - customization sample in LINQPad's built-in samples for a demo - and then save the Bitmap to a location of your choice:
Hi Joe,
with that I was successful. Looks a bit like a hack, as I have to do different things in lprun compared to GUI, but I think I can live with that. Thanks for the hint to bitmap.Save()
@Achim there is a batter way to have self-contained dump output, as previously mentioned at https://forum.linqpad.net/discussion/comment/2562#Comment_2562, though I had to make a slight modification.
Put the following code to your "My Extensions":
Then output chart as bitmap and you will have all resources in the same output:
@lexxsoft After small modification, this worked great, thanks. I did not understand your last line, if I use that I don't get the image in the generated HTML. But using simply bitmap.Dump() it worked perfectly
@Achim last line generates output document that can be saved/sent as a self-contained report without any use of UI, all images are encoded inside Html.