In this article, we will show you how to create an Area Chart in SSRS, How to change the Title, Legend Position, Legend Title, Font style, Model, and 3D Area Chart in SSRS or SQL Reporting Services with an example.
For this SSRS Area Chart example, we used the Custom SQL query:
-- Query that we use in SSRS Area Chart SELECT Cat.[EnglishProductCategoryName] AS ProductCategory, SubCat.[EnglishProductSubcategoryName] AS ProductSubCategory, Prod.EnglishProductName AS ProductName, Prod.Color, Fact.OrderQuantity, Fact.TotalProductCost, Fact.SalesAmount, Fact.TaxAmt, Fact.[Freight] FROM FactInternetSales AS Fact INNER JOIN DimProduct AS Prod ON Fact.ProductKey = Prod.ProductKey INNER JOIN DimProductSubcategory AS SubCat ON Prod.ProductSubcategoryKey = SubCat.ProductSubcategoryKey INNER JOIN DimProductCategory AS Cat ON SubCat.ProductCategoryKey = Cat.ProductCategoryKey
and the SQL Data that it’s going to return is:
Create an Area Chart in SSRS
In this example, we will create an Area Chart in SSRS to display the Sales Amount and Total Product Cost grouped by Product Name. The below image shows you the Data Source and Dataset we used for this Area Chart Report.
In the SSRS report design, we can add an Area Chart by dragging the Chart property from the Toolbox to the Design space or right-clicking on the report designer to open the context menu. Please select the Insert -> Chart option from the context menu, as shown below.
Once you select the Chart option, the Select Chart Type window will open to choose the necessary chart. For this example, we have chosen an Area Chart, as shown in the below screenshot.
Once you click on the Ok button, the Area chart will show in the design region with dummy data.
Click on the empty space around the SSRS Area Chart will open the Chart Data window.
- Values: Any Numeric (Metric) value such as Total Sales, Sale Amount, Number of Customers, or Tax. All these values will aggregate using an aggregate function like Sum, Avg, and Count because we are grouping them with the category group items.
- Category Group: Please specify the Column name on which you want to partition the Area Chart.
- Series Group: Specify the Dimension that further groups the individual category
Drag and drop the Sales Amount column from the data set to chart data values, Product Name to category group.
Click on the Preview tab to see the report preview.
If you observe the above screenshot, It is giving a perfect result. Let me add one more metric value Total Product Cost to the Values section.
Now you can see that our Area chart shows the difference between the Product Cost and it’s sales Amount.
Format an Area Chart in SSRS
The following list of examples will show you the steps involved in formatting the Area Chart.
Change Axis properties of an Area Chart
Right-click on the Axis of an Area Chart and select the Horizontal Axis Properties.. option from the context menu to format the Axis values.
Here we changed the Font style and font size of the SSRS Area chart Horizontal Axis.
Next, Right click on the Vertical Axis of an Area Chart, and select the Vertical Axis Properties.. option to format the Axis values.
Please use the above-specified technique to change the font of the vertical Axis. Next, format the Numbers in the vertical axis by selecting the Number tab.
Change Axis Titles
To change the SSRS Area Chart Axis title, Please select the Axis title region, and change it as you need. OR, right-click on it to select the Axis Title properties..option.
It opens a new window called the Axis Title Properties window. Under the General section, we can change the Title text as per our requirements. For now, we are changing it to PRODUCT NAME
Under the Font tab, we can change the Font style, size, and color. For now, we are changing the Color to Dark Green, Font to Century Gothic, Size to 12pt, and style to Bold
Please apply the same properties to Y-Axis as well. Once you completed, click on the Preview tab to see the report preview.
Change SSRS Area Chart Title
To change the SSRS Area Chart title, Please select the Chart title region, and change it. OR, right-click on it and select the Title properties.. option.
Here we are changing the title as SSRS Area Chart Example because the report is displaying the same
Format SSRS Area Chart Title Font
It explains how to change the tilt font of an Area chart in SSRS. To dod so, within the Font tab, we can change the Font Size, Font Family, Font Style, and Color of an Area Chart Title.
Here, we are changing the Font to Century Gothic, Font size to 14pt, and color to Brown as shown in below screenshot
To format the SSRS Area chart Legend region, Please Select the Legend region, and right-click on it will open the context menu. From the menu, please select the Legend Properties option.
It opens a new window called the Legend Properties. Within the General Tab, use Legend Position to change the Legend Position by changing the dot positions.
For now, we are changing the position from default right corner to Middle.
Under the Font tab, we can change the Font style, size, and color of a Legend. For now, we are changing the Font to Century Gothic, and Size to 10pt
Click the OK button to close the legend Properties window. Next, hit the SSRS Area chart preview tab to see the report preview
3D Area Charts in SSRS
You have an option to add one more dimension to the Series group to further divide the SSRS Area Chart. For now, we are adding Color to the Series group
Let me show you the area chart preview
SSRS allows us to change the chart type even after creating an Area Chart. To do so First, select the Area Chart, and right-click on it and select the Change Chart Type… option from a context menu
Once you select the Change Chart Type… option, it will open a new window called Select Chart Type to select the change. Here we are selecting the 3D Area Chart
Click on the preview to see the Area chart report preview
From the above screenshot, you can observe that We successfully changed the Chart Type from 2D Area Chart to 3D Area Chart in SSRS.