Successfully!

Error!

Map Drilling and Linkage

  • Last update:  2022-01-20
  • I. Overview

    1. Expected effect

    • The template contains a map and a table, the map can be drilled, and the data in the table can be linked with the map drilled province.

    • The map in the template is linked with the chart, click a city in the map, and the chart displays the data of the city.

    As shown below:

    Kapture 2021-01-15 at 10.30.13.gif


    2. Implementation ideas

    Linked drilling of maps and other data modules by setting parameters.

    Note: In general reports, it is not possible to directly transfer chart parameters to cells in a template. You need to use the web frame control. For details, please refer to the document  Data Drill to the Current Template   .

    II. Examples

    1. Data preparation

    Create a new dashboard, add two database query datasets to obtain map data

    The SQL statement of ds3 is select * from MapEN where 1 = 1 ${if (len (province) = 0 | province ='China (province), "order by Sales_volume desc", "and PID = '" + province +')}

    The SQL statement of ds4 is select * from MapEN

    The ds3 data set defines the parameter province. When the province is empty or China, all data are taken out and sorted in descending order by sales; if the province is not empty, the pid field value is used to match the input province, and the corresponding province data is taken out. And sort by sales in descending order.

    As shown below:

    1.png


    2. Design Map 

    1) Drag map component

    Drag the map from the chart management panel to the design body of the dashboard, as shown in the following figure:

    截屏2021-01-15 上午10.34.08.png

    2) Map types

    Edit the chart, select the Type in the chart property panel on the right, select theDrill map, and set the basic attributes of the map, as shown in the figure below:

    2.2.2.png

    3) Binding data

    In the right property panel, select Data > Frill Level to set 2 drill levels. For details, see Drill Map, as shown in the following figure:

    2.231.png

    Select Data > data in the right attribute panel to set the data of the Article1Layer, as shown in the following figure:

    Select Data > Data in the right attribute panel to set the data of the Article2Layer, as shown in the following figure:


    Note: Data can be summarized at the bottom or specified at each level. The former is selected by default. That is to say, data only need to be specified to drill through the bottom layer of the map, and the upper layer data is summarized according to the bottom layer.

    If you choose to specify each level separately, each level will have different chart types and interfaces according to different levels. Different series can be configured for different levels.

    4) Map style

    Select style > legend in the right property panel to modify the interval configuration, as shown in the following figure:

    截屏2021-01-15 上午10.42.05.png

    5) Map title

    Select the map component, select attributes > advanced in the right property panel, click the image.png button behind the style, select the frame style as custom, and set the title content, as shown in the following figure:

    225.png


    3. Report block making

    Drag the report block component to the right of the drill map, as shown in the figure below

    截屏2021-01-15 上午10.44.05.png

    There are many designs on the style and content of report block, you can refer to the design in template directly.

    2.31.gif

    The cell is set with parameter filtering and condition attributes, and its display value is controlled by the parameter province. 

    Note: Make sure you notice that there are couple conditonal formattings and double click the cells, there are filter settings. 


    4. Linkage setting

    As mentioned above, the map and report block have been set. If you want to achieve linkage, you need to set the interaction properties again.

    Edit the map, select Special Effect > interaction in the right property panel, turn on the Drill Directory, click Add Hyperlink button, select report0, and set the linkage between the drill directory and the table, as shown in the figure below:

    2.4.png

    You can also trun off the drilldirectory to set the linkage between map and table

    Note 1: Area_ Name is a parameter of the chart, corresponding to the name of the area.

    Note 2: the mobile terminal can also support the transfer of map name parameters, and the drill through directory is valid.

    Note 3: there are two places to set hyperlinks in drill map, drill and drill directory. If the first step is not set, only the directory in the upper left corner can be linked.


    5. Effect preview

    1) PC terminal

    Save the template and click pagination preview. The effect is as shown in I.1.

    2) Mobile terminal

    Kapture 2021-01-15 at 11.19.11.gif


    III. Template download

    Completed template, please refer to %fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Chart\Map\DrillMapLinkage.frm

    Click download template: 

    DrillMapLinkage.frm

    IV. Precautions

    1. Drilling back to the national linkage has no data

    1) Problem description

    After drilling the map, go back to the original China directory, and the linked tables and charts on the right are not displayed, 

    2) Cause analysis

    This is because the boundary of the map is set to China, which should be set to China (province).

    截屏2021-01-15 上午10.52.44.png

    3) Solutions

    Select China (province) from the map border drop-down list.

    4) Additional items

    If there is no China (province) option under the designer map boundary drop-down option, you can download:

    China(Province).zip

    , extract the compressed package to %FR_home%/webapps/Webroot/WEB-INF/assets/map/geographic/world.

    截屏2021-01-15 上午11.24.43.png

    Restart the designer to see the option of China (province) under the map boundary drop-down box, as shown in the following figure:

    截屏2021-01-15 上午10.52.44.png

    Attachment List


    Theme: Chart
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback