OChart draws charts based on a simple Xml data structure or a DataTable.

 

 

Xml data can be passed to the OChart component in 3 different ways.

Data can be supplied to the OChart from a DataTable by setting the following properties

ChartDataSource - Set to "DataTable"

PrimaryKey - Set to the name of the primary key in the data table

ParentField - Set to the name of the parent field in the data table

StartValue - Set to the primary key value you wish to start charting from

DataTable - The data table that you wish to chart

 

Properties and Usage

Name Type

Usage

XmlData XmlDocument gets or sets the XmlDocument used to draw this chart
XmlDocumentPath string full path to the XmlDocument, start the property with a ~ to use a path relative from the root of the web, otherwise all paths are treated as absolute
UserControlTemplate string full path and name ( including the .ascx extension ) of a user control to be used as the cell template for this chart.  Overrides CellTemplate
CellTemplate string Defines a style of the cell template
Chart HtmlTable Gets the HTML table containing the chart.  This will only be populated after the control has been rendered.
ImagePath string Path to the graphics required by OChart
StyleSheet string

Defines a style sheet used by the OChart, this contains two main styles

OChartCellStyle and OChartCellPadding

MaximumDepth int Restricts the OChart to a specific depth.
ChartDataSource ChartDataSource Determines whether the OChart is drawn from an XML document or DataTable
ChartHeadingHTML string The title of the chart
ChartFooterHTML string Chart footer
DataTable Binding
PrimaryKey string name of the primary key field
StartValue object value of primary key to begin charting from
ParentField string name of the parent field
DataTable System.Data.DataTable The DataTable to chart
Advanced Charting Options
VerticalCount int If the number of child nodes exceeds the VerticalCount then those nodes are drawn vertically. Setting this property to 1 will force the entire chart to be drawn vertically.

Additional Information

Additional information can be supplied to OChart on a per node basis to further customise the display of the chart.  For XML based chart this information is passed as additional XML attributes, for a database based chart it is an extra column in the data table.

Attribute/Column Name Type

Usage

UserControl string Specifies which user control should be used to draw this node.
VerticalChildren bool/int Indicates that this nodes children should be drawn vertically.


OChart home page

Loads of Nodes Demo

DataTable bound Demo

Different Templates

* New * Vertical Charts

OChart documentation

Download this demo

To purchase this component click here

411ASP.NET aspwire.com totalasp.net