Example of Creating the DataMiningMaster Component

To execute the example, the HTML page must contain the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component).

In the HEAD tag of the HTML page add links to the following JS and CSS files:

After express report loading, open the Advanced Analytics tool ribbon tab and create the data mining wizard by entering the following code in the console:

// Get tool ribbon
ribbon = expressBox.getRibbonView();
// Get the Advanced Analytics tab
analyticsCat = ribbon.getAnalyticsCategory();
// Get data analysis panel
dmPanel = analyticsCat.getPanels()[3];
// Get data source and service for working with data analysis
dmSource = dmPanel.getSource();
dmService = dmPanel.getSettings().Service;
// Determine column headers (column headers are returned as response from services)
cols = ["Objects", "1998", "1999", "2000", "2001", "2002", "2003"];
// Determine data analysis method
method = "AssociationRules";
// Determine event of getting data analysis results
 
// Create wizard
var dmMaster = new PP.Mb.Ui.DataMiningMaster({
    IsRTL: dmPanel.getIsRTL(),
    CaptionIcon: "favicon.ico",
    Cols: cols,
    RecordCount: 5,
    Source: dmSource,
    Service: dmService,
    DMMethod: method,
    OnGetDataMiningResult: PP.Delegate(dmPanel.OnGetDataMiningResult, dmPanel),
});
// Display wizard
dmMaster.show();

After executing the example the Data Mining wizard opens on the page.

See also:

ImportDataWizard