Operating system requirements: iOS 5.0 or later.
Mobile device: iPad.
This example displays a bubble chart, sets dimension panel title and then hides the panel. The development environment console displays the following express report data:
Information about bubble chart data source, settings and state.
Information about bubble tree data source and settings.
Information about chart data source, settings and state.
Information about table data source, settings and state.
Information about map data source, settings and state.
Information about map and map type.
Information about tree map data source, settings and state.
Report title.
Number of report dimensions.
Current report view index.
Executing the example requires to place the following code in the body of the executeExample method of the ViewController class (see the Displaying of Express Report section):
// Get report view controller MAExpressAnalysisReportViewController *contr = (MAExpressAnalysisReportViewController*)m_controller; // Determine type of displayed view MADataViewType viewType = kViewModeBubble; if([[contr delegate] isBubbleEnabled]){ if([[contr delegate] mode] != viewType){ // Display bubble chart [contr setDataViewMode:viewType]; // Inform delegate that controller changed dimension [[contr delegate] willSwitchToViewMode:viewType]; // Inform delegate that controller displayed view [[contr delegate] controllerViewDidLoaded]; // Refresh pivot for building data tables [[contr delegate] refreshPivot]; } // Display information about bubble chart data source, settings and state BubbleDataViewDatasource *dataSource = (BubbleDataViewDatasource*)[[contr delegate] bubbleDatasource]; NSDictionary *settings = [[contr delegate] bubbleSettings]; NSData *state = [[contr delegate] bubbleState]; NSLog(@"Bubble chart series name: %@", [dataSource seriesTitleWithID:[dataSource seriesIDs][0]]); NSLog(@"Bubble chart number format: %@", [[settings valueForKey:@"visualSettings"] valueForKey:@"NumberFormat"]); if(state != nil) NSLog(@"Size of data describing bubble chart state: %i", [state length]); } // Display information about bubble tree data source and settings if([[contr delegate] isBubbleTreeEnabled]){ DataViewDatasource *dataSource = [[contr delegate] bubbleTreeDatasource]; NSDictionary *settings = [[contr delegate] bubbleTreeSettings]; NSLog(@"Description of bubble tree data sample: %@", [dataSource dataSelectionTitle]); NSLog(@"Number of bubble tree settings: %i", [[settings allKeys] count]); } // Display information about chart data source, settings and state if([[contr delegate] isChartEnabled]){ ChartDataViewDatasource *dataSource = (ChartDataViewDatasource*)[[contr delegate] chartDatasource]; NSDictionary *settings = [[contr delegate] chartSettings]; NSData *state = [[contr delegate] chartState]; NSLog(@"Chart series key: %@", [dataSource seriesKeys][0]); NSLog(@"Whether chart legend is displayed: %@", [settings valueForKey:@"legendVisible"]); if(state != nil) NSLog(@"Size of data describing chart state: %i", [state length]); } // Display information about table data source, settings and state if([[contr delegate] isGridEnabled]){ GridDataViewDatasource *dataSource = (GridDataViewDatasource*)[[contr delegate] gridDatasource]; NSDictionary *settings = [[contr delegate] gridSettings]; NSData *state = [[contr delegate] gridState]; NSLog(@"Description of table data sample: %@", [dataSource dataSelectionTitle]); NSLog(@"Whether table filter is used: %@", [[settings valueForKey:@"gridFilter"] valueForKey:@"enabled"]); if(state != nil) NSLog(@"Size of data describing table state: %i", [state length]); } // Display information about map data source, settings and state if([[contr delegate] isMapEnabled]){ MapDataViewDatasource *dataSource = (MapDataViewDatasource*)[[contr delegate] mapDatasource]; NSDictionary *settings = [[contr delegate] mapSettings]; NSData *state = [[contr delegate] mapState]; NSLog(@"Name of metric used to determine map element color: %@", [dataSource colorMetricName]); NSLog(@"No data color: %@", [[settings valueForKey:@"scale"] valueForKey:@"noDataColor"]); // Display information about map and map type NSData *topo = [[contr delegate] mapTopobase]; NSData *bubbleTopo = [[contr delegate] mapBubbleTopobase]; EAMapType mapType = [[contr delegate] mapType]; if(state != nil) NSLog(@"Size of data describing table state: %i", [state length]); if(topo != nil) NSLog(@"Map data size: %i", [topo length]); if(bubbleTopo != nil) NSLog(@"Apple map data size: %i", [bubbleTopo length]); switch (mapType) { case EAMapSVG: NSLog(@"Map is presented in SVG format"); break; case EAMapOpenGL: NSLog(@"Map is presented as a triangulated map"); break; case EAMapBubble: NSLog(@"Map is presented as an Apple map"); break; default: break; } } // Display information about tree map data source, settings and state if([[contr delegate] isTreeMapEnabled]){ DataViewDatasource *dataSource = [[contr delegate] treeMapDatasource]; NSDictionary *settings = [[contr delegate] treeMapSettings]; NSLog(@"Description of tree map data sample: %@", [dataSource dataSelectionTitle]); NSLog(@"Number of tree map settings: %i", [[settings allKeys] count]); } // Display report title NSLog(@"Report title: %@", [[contr delegate] olapTitle]); // Display number of dimensions NSLog(@"Number of panel dimensions: %i", [[[contr delegate] dimensionsPanel] dimensionsCount]); // Display current view index NSLog(@"Current view index: %i", [[[contr delegate] expressReportController] selectedDataViewControllerIndex]); // Hide dimension panel [[contr splitViewController] setFirstViewVisible:NO]; // Set dimension panel title [[contr panelViewController] setPanelTitle:@"Dimension panel"];
After executing the example the bubble chart is displayed, the dimension panel title is set, after that the panel is hidden. The development environment console displays express report data:
Name of a bubble chart series: SAR
Format of bubble chart numbers: #,##0.00
Chart series key: 0
Whether chart legend is displayed: true
Description of table data sample: GDP per capita, PPP (constant 2005 international $)
Whether table filter is used: true
Name of metric used to determine map element color: GDP per capita, PPP (constant 2005 international $)
No data color: #BFBFBF
Map data size: 1883755
Apple map data size: 92408
Map is presented as a triangulated map
Report title: OLAP
Number of panel dimensions: 3
Current view index: 3
See also: