MX-Frame Library Send comments on this topic.
ChartViewer
MX-Developer > User Interface - MxPart > Controls > ChartViewer

Glossary Item Box

Control is used for integrating charts in user interfaces. Using this control it is possible to present the chart, created and designed with MxChart component, to the end user. Chart presents data in a graphical manner therefore it is often used for quick data analysis.

ChartViewer must be bound to a data source which provides data for the chart component. There are two ways of binding a chart to the data. One is through adapter component. In this case chart must have series defined, axis, y and x members, etc. 

The second method is to bind pivot grid with chart viewer. In this case there is no need to define MxChart component. Pivot grid is responsible for designing data in the chart.

For implementing different strategies of chart several properties are available.

Context Properties

Properties in this section define the appearance of the control in Personalization Directory and the behaviour of the control when in edit mode.

Property Description
Category Define the name by which the control is displayed in Personalization Directory.
Entity Defines the name of the group in which the control is located in Personalization Directory.
NavigationVisible The feature is obsolete.
TrackDirty Defines whether user interface can be closed while the control is in edit mode.

Data Properties

Properties in this section define how and which data is bound to the control.

Property Description
Adapter Defines the MxAdapter component from which data can be retrieved and used for any kind of manipulation.
Chart Defines the Chart component containing chart definition.
DataSourceName Defines the data source which will be used to display and manipulate data.
DrillDownProvider Defines the Pivot control which provides data for the chart.

Design Property

Properties in this section define basic properties of the control, appearance and functionality of the control.

Property Description
Name Defines the name of the control or the component.

NOTE: Properties described here are related exclusively to Mx Controls. For the description of other properties please see Developer Express documentation.

Example (MxSpace)

To see the implementation of ChartViewer control open MxSpace solution project in Visual Studio. In Solution Explorer expand node Parts and double click StockPart.cs. See the ChartViewer control in Stock Chart section.

To implement ChartViewer control

  1. In Solution Explorer open MxPart component (StockPart) and add ChartViewer control from the Toolbox to the desired location on the canvas.
  2. From the Toolbox add previously created MxAdapter component (StockAdapter) which will provide data for the chart.
  3. From the Toolbox add previously created MxChart component (StockChart) which contains design definitions for the chart.
  4. Click ChartViewer control on the canvas and open Property Window
  5. In the Adapter property select previously added MxAdapter component (stockAdapter1).
  6. In the Chart property select previously added MxChart component (stockChart1).
  7. In the DataSourceName property select the data source containing data for the chart (Stock).
©2009 Metronik. All Rights Reserved.