Report Authors / Report Controls / Report Controls in Page/RDLX Report / Chart / Plots / Spiral Chart / Create Simple Spiral Chart
Create Simple Spiral Chart

This walkthrough creates a Simple Spiral Chart. The chart shows the total sales for different product categories. The final chart appears like this:

Spiral Chart

Create a Report and Bind Report to Data

In the ActiveReports Designer, create a new RDLX report and follow the New Report wizard to bind the report to data. You can also perform data binding later using the Report Data Source dialog accessed from the Report Explorer.

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 'External file or URL'.
  4. In the Select or type the file name or URL field, enter the following URL:
    https://demodata.mescius.io/contoso/odata/v1/FactSales
    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 Data Source icon.
  6. Click OK to save the changes and open the DataSet dialog.

Add a Dataset   

  1. In the Dataset dialog, select the General page and enter the name of the dataset, 'FactSales'.
  2. Go to the Query page and enter the following query to fetch the required fields:
    Query
    Copy Code
    $.value[*]
  3. On the same page, add a calculated field:
    Field Name Value
    Product Category =Switch([ProductKey] < 116, "Audio", [ProductKey] >= 116 And [ProductKey] < 338, "TV and Video", [ProductKey] >= 338 And [ProductKey] < 944, "Computers", [ProductKey] >= 944 And [ProductKey] < 1316, "Cameras", [ProductKey] >= 1316, "Cell Phones")
  4. Click OK to save the changes.

Create Basic Structure of Chart

We will use the Chart Wizard dialog to configure chart data values and basic customization. If you have a dataset added to your report, on Chart's drag-drop operation, the wizard appears. See the topic on Chart Wizard for more information. You can make further adjustments to the chart after you exit the wizard by accessing the properties of chart elements through dialogs, property panels, and adorners.

  1. Drag-drop Chart data region onto the design area. The New Chart dialog appears with an option to select the query and the plot type.
  2. Select the Query as the dataset name (Stats)  and the Plot Type as 'Spiral'.
  3. Click Next to configure data values.
  4. Under Configure Chart Data Values, add the following value from the drop-down, set the corresponding captions, and click Next.    
    Field Aggregate Caption
    [SalesAmount] Sum Sales Amount
  5. In the Configure Chart Data Groupings, set the Series > Group By to [Product Category]. Keep the remaining settings as it is. Ensure that Series > Layout Type is 'Cluster'.
  6. Click Next and Choose Report Colors from Theme and Style, and preview your chart.

             Spiral Chart at Preview Time

    Now that the basic structure of your chart is ready, let us add more meaning to the chart using the properties via the Chart Panels, Adorners, and Property Panel.

Add Customizations to Chart

Series Groups

  1. In the Series Groups area, right-click the [Product Category] and from the adorner, click Edit.    
  2. In the Chart Data - Series Groups dialog, go to Sorting tab and add the following expression to sort the product category based on this expression:
         =Sum([SalesAmount])
           
  3. Set the Direction as 'Ascending'.
  4. Click OK to complete setting up the category groups.

Plot Settings

  1. Select 'Plot - Chart' on the Report Explorer.
  2. From the Properties Panel, set StartAngle property to '90'.   

Y-Axis

  1. To open the smart panel, right-click 'Y Axis' on the Report Explorer and choose Property Dialog.
  2. Go to the Title page and remove the text from the Title field to hide the Y-axis title in the chart.
  3. Go to the Labels page > General tab and set the Format to 'Currency (with 0 decimal places)'.
  4. Then, navigate to the Appearance tab and set the following properties.
    • Font > Size: 12pt
    • Font > Color: DimGray
  5. Go to the Line page and set the following properties.
    • Show Line: Check-on
    • Appearance > Color: #cccccc
    • Appearance > Width: 2pt
    • Appearance > Style: Solid
       
  6. Go to the Major Gridline page and set the Grid Interval to '100000'.
  7. In the Major Gridline page, set the following properties under Grid appearance.
    • Show Grid: Check-on
    • Width: 0.25pt
    • Color: #cccccc
    • Style: Dashed
  8.  Click OK to complete setting up the Y-axis.

X-Axis

  1. To open the smart panel, right-click 'X Axis' on the Report Explorer and choose Property Dialog.
  2. Go to the Title page and remove the text from the Title field to hide the X-axis title in the chart.
  3. Go to the Labels page and uncheck the Show Labels option to hide the data labels.
  4. Go to the Line page and uncheck the Show Line option.
  5. Go to the Major Gridline page and set Grid Interval to '1'.
  6. In the Major Gridline page, set the following properties under Grid appearance.
    • Show Grid: Check-on
    • Width: 0.25pt
    • Color: #cccccc
    • Style: Solid
  7. Click OK to complete setting up the X-axis.

Legend   

  1. In the Legend Data, right-click Color and from the adorner, click Edit.
  2. Go to the General page and select SeriesGroups as Legend Mode.      
  3. Go to the Appearance page and set the following properties.
    • Font > Size: 12pt
    • Font > Color: DimGray
  4. Go to the Layout page and set the following properties.
    • Position: Top
    • Orientation: Horizontal
  5. Click OK to complete setting up the chart legend.

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 Title to 'Sales by Category'.
  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, change the chart palette, and customize other chart elements. Once you are done, press F5 to preview the report.
     
    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.