Vertical Bar Graph with XSLT in Data View Web Part (DVWP)

As part of a recent project, I needed to create a dashboard page for the requests for executive management. However, since the data was in a list and not a database this was easier said than done. So I started off by researching my options and I found this post on MSDN. This post explains very well how to modify the XSL of a DVWP to create a bar graph. I used this post and the code below to do as such. You will noticed that I overwrote the .ms-selected CSS class so that I could control the image as well as the colors of the chart.

Example Bar Graphs:

My second issue was that I wanted a vertical bar graph too. I was unable to find an example anywhere on the web, so I sat down and started playing with the code.

I used the code from the MSDN article, but overwrite the CSS class in order to control the color of the chart: