Using Microsoft’s Chart Controls In An ASP.NET Application: Creating Drill Down Reports

Posted by 4GuysFromRolla.com Headlines on Oct 27, 2009 in - Dotnet  | View Original Article |

Each series in a chart is composed of a set of data points, which are modeled via the DataPoint class. For most chart types, the two key attributes of a data point are its X and Y value. For example, in a line chart the X value indicates the position of the data point along the X axis, while the Y value represents the position of the data point along the Y axis. Ditto for a column chart, although it may help to think of the Y value as the height of the column.

In addition to X and Y values, data points can include additional bits of information, including an associated URL. As you would expect, when a data point has an associated URL it becomes click-able in the rendered chart image, and clicking the data point whisks the user to the specified URL. By specifying URLs, it's possible to create drill down reports, which are reports that let the user click a particular data point in a chart to explore its details.

This article examines how to build drill down reports. Specifically, we'll walk through two demos that display the same data using a column chart. The charts' X axes list the categories in the Northwind database's Categories table, with the height of each category's column indicating the number of products associated with said category. Clicking on one of these columns in the chart takes the user to a second web page, which displays a grid showing the products that belong to the selected category. The second demo enhances the chart to display the corresponding category's products when hovering the mouse over the category column. Read on to learn more!
Read More >

Reply

Copyright © 2010 Answer My Query All rights reserved. Maintained by Orange Brains .