AxChartDataSource

Applies To: Microsoft Dynamics AX 2012 R2

An AxChartDataSource component provides access to a data set in the AOT for a chart. The Chart Control will use the AxChartDataSource to retrieve data in the data set.

Properties

The AxChartDataSource component has the following properties:

Property

Description

Expressions

The expressions that are bound to properties of the control. This property is inherited from the base control. It is not used in Enterprise Portal scenarios.

ID

A string value that is the programmatic name of the control. The ID naming convention is <ChartName>DataSource. For example, EPChartControl1DataSource.

CommandText

The query text for the chart data source that determines the data that gets returned. The DataType property determines which picker will launch when you click the CommandText ellipsis (…) button.

  1. When the DataType property is set to MDXQuery, the MDX Query editor will open and you will enter an MDX query to access Analysis Services cube data.

  2. When the DataType property is set to ReportDataProvider, the Select a Microsoft Dynamics AX Report Data Provider dialog will open and you will select an RDP class with logic to access data.

DataType

The type of the data queried by the chart data source. The following data types are supported by the AxChartDataSource component:

  • MDXQuery - An analysis cube consists of a set of measures and dimension attributes that provides the data to display in a chart. Using an analysis cube as a data source allows you to provide a snapshot of data from when the cube was processed. You must provide an MDX query to access data from a deployed and processed cube.

    For more information, see How to: Create a Chart with Data from an Analysis Services Cube.

  • ReportDataProvider (RDP) - An RDP class contains X++ business logic to process data to display in a chart. Using an RDP class as a data source lets you process the data at the time the chart is displayed, so that the data is real time. You must provide an RDP class, data contract class, and a temp table to access data from an RDP class data source.

    For more information, see How to: Create a Chart with Data from a Report Data Provider Class.

EnableViewState

Boolean value that indicates whether the control automatically saves its state for use in round-trips. This property is inherited from the base control. It is not used in Enterprise Portal scenarios.

Parameters

The parameters collection for the chart data source. Add the parameters that are required for the chart to render. You can set a default value for each parameter. You must evaluate the data to know what parameters are required.

Events

A Chart Control can raise life-cycle events at each processing step, such as Init, Load, and PreRender. You can take advantage of these life-cycle events in your application. For example, in a Load event, you can set default values for controls.

The events that occur for Chart Controls are based on the ASP.NET Server Controls. The following section describes the event information that is specific to the Chart Control. For information about ASP.NET Server Control events, see ASP.NET Web Server Control Event Model. The AxChartDataSource component has the events listed in the following table:

Event

Description

DataBinding

Occurs before the data binding expressions are evaluated.

DataSourceChanged

Occurs when the data source is changed.

Disposed

Occurs after the chart control is disposed.

Init

Occurs when the page is initialized, which is the first step in its life-cycle. Use this event to read or initialize control properties.

Load

Occurs when the page is loaded into the System.Web.UI.Page object. For example, you can set default values for controls in a Load event.

PostProcessData

Occurs after the data is processed for the chart control.

PreRender

Occurs before the chart control is rendered.

Unload

Occurs when the page is unloaded from memory.

See also

Chart Controls Overview