Have you heard of Google's "Chart API"? No? Well, the Google Chart API lets you dynamically generate charts. Using only a browser. But why use a browser when you can use PowerShell instead? :-) Click here to learn more about Google Chart API.
I had been playing around with Google Chart API for some time, when I decided to create a small PowerShell script to obtain a pie chart - sort of a poor mans replacement for Microsoft Excel or PowerGadgets:
Lets start by writing a small function to download and display an image. This will be a very basic function, so the only input in the function will be an URL.
Next, we need a function to create a valid Google Chart API url. Input parameters will be two arrays (data values and text), the desired size of the chart and an option to create a 3D pie chart insted of a plain 2D one:
I work as a Database Administrator for JN Data (www.jndata.dk), as well as a freelance SQL Server consultant.
My main use of PowerShell is as a Windows and SQL Server automation tool. But I also use it to do web monitoring, data extraction as well as other administrative tasks.
In my spare time i enjoy building with LEGO with and without my son.