Overview
Version
Report Server Version |
---|
11.0 |
Application Scenario
A scatter chart with linear regression lines is a chart used to show the distribution and linear relationship between a single/multiple series of independent and dependent variables. By using a scatter chart and adding linear trend lines, you can clearly illustrate the linear relationship between two variables, as shown in the following figure.
Chart Feature
Advantage: simple and clear, enabling direct visualization of data distribution and linear trends
Disadvantage: unsuitable for large datasets
Example
Data Preparation
1. Sample table data: SOCR-HeightWeight.xlsx
2. Choose File > New General Report in the upper left corner of the designer and add an Excel dataset, as shown in the following figure.
Click OK. You can view the added Excel dataset in the Template Dataset area, as shown in the following figure.
Chart Insertion
Merge required cells, click the Insert Chart icon on the upper toolbar, select Scatter Chart, and click OK, as shown in the following figure.
Chart Design
Select the chart, click the Cell Element icon on the right property panel, and set the properties (Type, Data, Style, and Special Effect) for the chart.
Data Binding
Click Data and bind the required data to the chart, as shown in the following figure.
Style Setting
1. Choose Style > Title and enter Height/Weight Distribution, as shown in the following figure.
2. Choose Style > Legend, set Position to Top, and modify the font size to 8 in Character, as shown in the following figure.
3. Choose Style > Series.
Color: Set Color Scheme to Custom Combination, and modify the colors as needed. Set Opacity to 50%.
Mark Point: Set Point Style to General and Type to •.
Trend Line: Select the solid line in Line Style, select a relatively dark color in Color, and set Type to Linear Fitting.
4. Choose Style > Axis.
Label: Set the font size to 8 in Character for both X Axis and Y Axis.
Value Definition: Set Custom Minimum Value to 40 for Y Axis.
Format: Set Axis Label Format to Number and #0 cm for X Axis. Set Axis Label Format to Number and #0 kg for Y Axis.
Effect Display
PC
Save the report and click Pagination Preview. The section "Application Scenario" shows the effect.
Mobile Terminal
The report can be previewed on both the DataAnalyst app and the HTML5 terminal. The following figure shows the preview effect.