ActiveReports 16 .NET Edition
ActiveReports 16 User Guide / Concepts / Page Report/RDL Report Concepts / Toolbox / Chart / Plots / Scatter and Bubble Charts / Create Bubble Chart
In This Topic
    Create Bubble Chart
    In This Topic

    This walkthrough creates a Bubble Chart. The chart shows the correlation between the height, diameter, and volume of the trees. The final chart appears like this:

    Bubble Chart

    Create a Report

    In the ActiveReports Designer, create a new RDL report.

    Bind Report to Data

    The Report Data Source dialog is invoked when a new report is created if you keep the default check on for the Launch Data Source Wizard option. You can also access this dialog by right-clicking the Data Sources node in the Report Explorer and then selecting the Add Data Source option.

    Connect to a Data Source

    1. In the Report Data Source dialog, select the General page and enter the name of the data source.
    2. Under Type, select 'Json Provider'.
    3. Go to the Content tab under Connection and set the type of JSON data to 'Embedded'.
    4. In the Select or type the file name or URL or enter the data to be embedded field, enter the following data:

      JSON Data

      Copy Code
      [
        {
          "Girth": 8.3,
          "Height": 70,
          "Volume": 10.3
        },
        {
          "Girth": 8.6,
          "Height": 65,
          "Volume": 10.3
        },
        {
          "Girth": 8.8,
          "Height": 63,
          "Volume": 10.2
        },
        {
          "Girth": 10.5,
          "Height": 72,
          "Volume": 16.4
        },
        {
          "Girth": 10.7,
          "Height": 81,
          "Volume": 18.8
        },
        {
          "Girth": 10.8,
          "Height": 83,
          "Volume": 19.7
        },
        {
          "Girth": 11,
          "Height": 66,
          "Volume": 15.6
        },
        {
          "Girth": 11,
          "Height": 75,
          "Volume": 18.2
        },
        {
          "Girth": 11.1,
          "Height": 80,
          "Volume": 22.6
        },
        {
          "Girth": 11.2,
          "Height": 75,
          "Volume": 19.9
        },
        {
          "Girth": 11.3,
          "Height": 79,
          "Volume": 24.2
        },
        {
          "Girth": 11.4,
          "Height": 76,
          "Volume": 21
        },
        {
          "Girth": 11.4,
          "Height": 76,
          "Volume": 21.4
        },
        {
          "Girth": 11.7,
          "Height": 69,
          "Volume": 21.3
        },
        {
          "Girth": 12,
          "Height": 75,
          "Volume": 19.1
        },
        {
          "Girth": 12.9,
          "Height": 74,
          "Volume": 22.2
        },
        {
          "Girth": 12.9,
          "Height": 85,
          "Volume": 33.8
        },
        {
          "Girth": 13.3,
          "Height": 86,
          "Volume": 27.4
        },
        {
          "Girth": 13.7,
          "Height": 71,
          "Volume": 25.7
        },
        {
          "Girth": 13.8,
          "Height": 64,
          "Volume": 24.9
        },
        {
          "Girth": 14,
          "Height": 78,
          "Volume": 34.5
        },
        {
          "Girth": 14.2,
          "Height": 80,
          "Volume": 31.7
        },
        {
          "Girth": 14.5,
          "Height": 74,
          "Volume": 36.3
        },
        {
          "Girth": 16,
          "Height": 72,
          "Volume": 38.3
        },
        {
          "Girth": 16.3,
          "Height": 77,
          "Volume": 42.6
        },
        {
          "Girth": 17.3,
          "Height": 81,
          "Volume": 55.4
        },
        {
          "Girth": 17.5,
          "Height": 82,
          "Volume": 55.7
        },
        {
          "Girth": 17.9,
          "Height": 80,
          "Volume": 58.3
        },
        {
          "Girth": 18,
          "Height": 80,
          "Volume": 51.5
        },
        {
          "Girth": 18,
          "Height": 80,
          "Volume": 51
        },
        {
          "Girth": 20.6,
          "Height": 87,
          "Volume": 77
        }
      ]
      
      For more information, see the JSON Provider topic.
    5. Go to the Connection String tab and verify the generated connection string by clicking the Validate DataSource Validate Icon icon.
    6. Click OK to save the changes and open the DataSet dialog.

    Add a Dataset

    1.    
    2. In the Dataset dialog, select the General page and enter the name of the dataset, 'Measurements'.
    3. Go to the Query page and enter the following query to fetch the required fields:
      Query
      Copy Code
      $.[*]
    4. Click OK to save the changes.

    Create a Chart

    We will use the Chart Wizard dialog to configure chart data values. The wizard appears by default if you have a dataset added to your report. See the topic on Chart Wizard for more information.

    1. Drag-drop Chart data region onto the design area. The Chart Wizard dialog appears with an option to select the data and the chart type.
    2. Select the Dataset Name as 'Measurements' and the Chart Type as 'Bubble'.
    3. Click Next to proceed. Here, you need to specify the bubble settings.
    4. In Choose Data values section, we will define three data values to show the 'Girth', 'Height', and 'Volume' of the trees.
      1. From the drop-down, set the X Field to =[Girth].
      2. From the drop-down, set the Y Field to =[Height].
      3. From the drop-down, set the Size Field to =[Volume].
    5. Click Next to preview your chart.
       Bubble Chart Dialog Box
      You can also modify the chart palette and do other customizations as the last step in the process of chart creation. Or, you can exit the wizard and access these smart panels as explained below.         

    Set Advanced Customization

    Now that the chart is configured with data values, let us do some customizations on the chart elements using the smart panels.

    Y-Axis

    1. To open the smart panel for advanced Y-axis settings, right-click 'Y-axis' on the Report Explorer and choose Property Dialog.
    2. Go to the Title page and set the following properties:
      • Title: Height (ft.)
      • Font > Size: 12pt
      • Font > Color: Gray
    3. Go to the Labels page and set the following properties:
      • Font > Size: 12pt
      • Font > Color: Gray
    4. Go to the Line page and uncheck the Show Line option.
    5. Go to the Major Gridline page and set the following properties:
      • Grid Interval: 5
      • Show Grid: Check-on
      • Grid appearance > Width: 0.25pt
      • Grid appearance > Color: #cccccc
      • Grid appearance > Style: Dashed
    6. Go to the Scale page and set the following properties:
      • Scale Type: Linear
      • Minimum scale value: 60
    7. Click OK to complete setting up the Y-axis.

    X-Axis

    1. To open the smart panel for advanced X-axis settings, right-click 'X-axis' on the Report Explorer and choose Property Dialog.
    2. Go to the Title page and set the following properties.
      • Title: Diameter (in.)
      • Font > Size: 12pt
      • Font > Color: Gray
    3. Go to the Labels page and set the following properties.
      • Font > Size: 12pt
      • Font > Color: Gray
    4. Go to the Line page and set the following properties.
      • Color: #cccccc
      • Width: 2pt
    5. Click OK to complete setting up the X-axis.

    Chart Palette

    1. To open the smart panel for advanced chart settings, right-click 'Chart' on the Report Explorer and choose Property Dialog.
    2. Go to the Palette page, select Custom from the drop-down and add the following colors.
      • #f26324
      • #1fd537
      • #e40010
      • #8fcd37
      • #00b32c
      • #b3000c
      • #ffca3a
    3. Click OK to complete setting up the custom palette.

    Legend- Size

    1. To open the smart panel for the legend, right-click 'Legend - Size' on the Report Explorer and choose Property Dialog.
    2. Go to the Title page and set the following properties.
      • Title: Volume (cubic ft.)
      • Font > Size: 12pt
      • Font >Color: Gray
    3. Go to the Appearance page and set the following properties.
      • Font > Size: 12pt
      • Background Fill Color > Icon Color: DimGray
    4. Click OK to complete setting up the chart legend.

    Chart Header

    1. To open the smart panel for the chart header, right-click 'Header' on the Report Explorer and choose Property Dialog.
    2. Go to the General page and set Text to 'Tree Measurements'.
    3. Go to the Font page and set the properties as below.
      • Size: 24pt
      • Color: #3da7a8
    4. Click OK to complete setting up the chart header.
      You may want to resize the chart.
         Bubble Chart at Design Time
      Note: We use stub data at design time and not real data. So to view the actual final chart, you need to view the chart on the preview.
    5. Once you are done with configuring and customizing the chart, press F5 to preview the report.