Skip to main content
Sympraxis Consulting

Demos

Go Search
Home
Services
Clients
About
Demos
Contact
  

Sympraxis Consulting > Demos > Demo Pages > DVWPBarChart

 Sales Opportunities

By Lead Source

Lead SourcePotential Value
Web Site
  $1,738
Personal Referral
  $1,613
Newspaper Advertising
  $481

If you'd like to see the effect of changing data on this graph, go to the Cascading Dropdowns demo to add new items to the Sales Opportunities list.

 
 

 DVWP Bar Chart Page Overview

This page shows how you can create a simple bar graph with just a Data View Web Part (DVWP).

The DVWP uses the Sales Opportunities list as its Data Source. Using this simple DVWP, we can graph list data in slick ways. By clicking one of the buttons, a new sort column is passed back to the page on the Query String and the graph changes to reflect the selected column, with the items sorted based upon the highest total Potential Value. Then we show a bar for each sort value simply by displaying a table cell with a background image and its width set using the value of a calculated variable. For the demo, we're using the /_layouts/images/topnavselected.gif image for the bars to give them a nice rounded look like the top nav tabs.

  • You can download the DVWP's XSL for this demo here.
  • My blog post which introduces this demo is here.