The ASP.NET MVC Charts Suite offers you a comprehensive set of 2D and 3D charts to address a broad range of business needs with ease. Regardless of data source or the manner in which application information is stored on disk, the Chart Control promises flexibility and speed in its consumption of input data as well as its ability to output/render information on-screen or on the printed page.
The code samples below demonstrate how to bind the WebChartControl to the HistoricPopulationModel object that implements the IList interface. The HistoricPopulationModel defines a data source with data that shows population dynamic by years. To provide chart data, you need to create a series (the "Area" series view, for example) and specify series data members. In addition, you can create a title for the chart and Y-axis and specify its text.
Note that the chart control provides a built-in crosshair cursor (available for an XYDiagram2D chart type only) that is enabled automatically. Thus, you do not need to write any line of a code to implement this feature in your application.
Partial View code:
The Controller code implements the action that will obtain data from a datasource.