You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The[!INCLUDE[ssRSnoversion](../../includes/ssrsnoversion-md.md)]Tree Map and sunburst visualizations are great for visually representing hierarchal data. This topic is an overview of how to add a Tree Map or Sunburst chart to a [!INCLUDE[ssRSnoversion](../../includes/ssrsnoversion-md.md)] report. The topic also includes a sample Adventureworks query to help get you started.
22
+
The SQL Server[!INCLUDE[ssRSnoversion](../../includes/ssrsnoversion-md.md)]treemap and sunburst visualizations are great for visually representing hierarchical data. This article is an overview of how to add a treemap or sunburst chart to a [!INCLUDE[ssRSnoversion](../../includes/ssrsnoversion-md.md)] report. The article also includes an AdventureWorks sample query to help you get started.
23
23
24
-
## <aname="bkmk_treemap_chart"></a> Tree Map Chart
A tree map chart divides the chart area into rectangles that represent the different levels and relative sizes of the data hierarchy. The map is similar to branches on a tree that start with a trunk and divide into smaller and smaller branches. Each rectangle is broken into smaller rectangles representing the next level in the hierarchy. The top level tree map rectangles are arranged with the largest rectangle in the upper left corner of the chart to the smallest rectangle in the lower right corner. Within a rectangle, the next level of the higher is also arranged with rectangles from the upper left to the lower right.
28
-
29
-
For example, in the following image of the sample tree map, the Southwest territory is the largest and Germany is the smallest. Within the Southwest, Road Bikes are larger than Mountain Bikes.
A treemap chart divides the chart area into rectangles that represent the different levels and relative sizes of the data hierarchy. The map is similar to branches on a tree that start with a trunk and divide into smaller and smaller branches. Each rectangle is broken into smaller rectangles that represent the next level in the hierarchy. The top-level treemap rectangles are arranged with the largest rectangle in the upper left corner of the chart to the smallest rectangle in the lower right corner. Within a rectangle, the next level of the higher is also arranged with rectangles from the upper left to the lower right.
27
+
28
+
For example, in the following image of the sample treemap, the Southwest territory is the largest and Germany is the smallest. Within the Southwest, Road Bikes are larger than Mountain Bikes.
### To insert a tree map chart and configure for the sample Adventureworks data
32
+
### To insert a treemap chart and set up the sample AdventureWorks data
34
33
35
-
[!NOTE] Before you add a chart to your report, create a data source and dataset. For sample data and a sample query, see the section [Sample Adventureworks data](#bkmk_sample_data) in this topic.
36
-
37
-
1. Right-click the design surface, click **Insert**, and then click **Chart** .
34
+
> [!NOTE]
35
+
> Before you add a chart to your report, create a data source and dataset. For sample data and a sample query, see [Sample AdventureWorks data](#bkmk_sample_data).
38
36
39
-
Select Tree Map .
For more information, see [Show ToolTips on a Series (Report Builder and SSRS)](../../reporting-services/report-design/show-tooltips-on-a-series-report-builder-and-ssrs.md).
65
+
For more information, see [Show ToolTips on a series (Report Builder and SSRS)](../../reporting-services/report-design/show-tooltips-on-a-series-report-builder-and-ssrs.md).
64
66
65
-
6. Change the default chart title to "Categorized Sales by Territory".
67
+
6. Change the default chart title to **Categorized Sales by Territory**.
66
68
67
-
7. The number of label values that are displayed are affected by the size of the font, the size of the overall chart area, and the size of specific rectangles. To see more of the labels, change the Label font property of LineTotal to 10pt instead of the default 8pt.
69
+
7. The number of label values that are displayed are affected by the size of the font, the size of the overall chart area, and the size of specific rectangles. To see more labels, change the **Label Font** property of **LineTotal** to **10pt** from the default of **8pt**.
In a sunburst chart, the hierarchy is represented by a series of circles. The highest level of the hierarchy is in the center, and lower levels of the hierarchy are rings displayed outside the center. The lowest level of the hierarchy is the outside ring.
72
75
73
-
In a sunburst chart, the hierarchy is represented by a series of circles, with the highest level of the hierarchy in the center and lower levels of the hierarchy as rings displayed outside the center. The lowest level of the hierarchy is the outside ring.
### To insert a sunburst chart and set up the sample AdventureWorks data
79
+
> [!NOTE]
80
+
> Before you add a chart to your report, create a data source and dataset. For sample data and a sample query, see [Sample AdventureWorks data](#bkmk_sample_data).
76
81
77
-
### To insert a sunburst chart and configure for the sample Adventureworks data
78
-
[!NOTE] Before you add a chart to your report, create a data source and dataset. For sample data and a sample query, see the section [Sample Adventureworks data](#bkmk_sample_data) in this topic.
82
+
1. Right-click the design surface, and then select **Insert** > **Chart**. Select the **Sunburst** icon.
||**Values:** LineTotal<br /><br /> **Category Groups:** Add them in the order of :<br /><br /> 1) CategoryName<br /><br /> 2) SubcategoryName,<br /><br /> 3) SalesReasonName<br /><br /> **Series Groups:** TerritoryName .|
93
-
94
-
4. To optimize the page size for the general shape of a Sunburst, set the legend position to the bottom.
99
+
4. To optimize the page size for the general shape of a sunburst chart, set the legend position to the bottom.
95
100
96
-
5. Change the default chart title to "Categorized Sales by Territory, with sales reason".
101
+
5. Change the default chart title to **Categorized Sales by Territory, with sales reason**.
97
102
98
-
6.
99
-
|||
100
-
|-|-|
101
-
||To add the values of the category groups to the sunburst as labels, set the label property **Visible** = true and the **UseValueAsLabel**=False.<br /><br /> The label values that are displayed are affected by the size of the font, the size of the overall chart area, and the size of specific rectangles. To see more of the labels, change the Label font property of LineTotal to 8pt instead of the default 10pt.|
103
+
6. To add the values of the category groups to the sunburst as labels, set the label properties **Visible=true** and **UseValueAsLabel=false**.<br /><br /> The label values that are displayed are affected by the size of the font, the size of the overall chart area, and the size of specific rectangles. To see more labels, change the **Label Font** property of **LineTotal** to **10pt** from the default of **8pt**.
## <a name="bkmk_sample_data"></a> Sample Adventureworks data
110
-
This sections includes a sample query and the basic steps for creating a data source and dataset in [!INCLUDE[ssRBnoversion](../../includes/ssrbnoversion-md.md)]. If your report already contains a data source and dataset you can skip this section.
112
+
## <a name="bkmk_sample_data"></a> Sample AdventureWorks data
113
+
This section includes a sample query and the basic steps for creating a data source and dataset in [!INCLUDE[ssRBnoversion](../../includes/ssrbnoversion-md.md)]. If your report already contains a data source and dataset, you can skip this section.
111
114
112
-
The query returns Adventureworks sales order detail data with sales territory, product category, product sub category, and sales reason data.
115
+
The query returns AdventureWorks sales order detail data with sales territory, product category, product subcategory, and sales reason data.
113
116
114
-
1. **Get the Data:**
117
+
1. **Get the data**.
115
118
116
-
The query in this section is based on the Adventureworks database which is available for download from [Adventure Works 2014 Full Database Backup](https://msftdbprodsamples.codeplex.com/releases/view/125550).
119
+
The query in this section is based on the AdventureWorks database, which is available for download from GitHub: [AdventureWorks 2016 full database backup](https://github.com/Microsoft/sql-server-samples/releases).
117
120
118
-
For more information on how to install the database, see [How to install Adventure Works 2014 Sample Databases.pdf](https://msftdbprodsamples.codeplex.com/releases/view/125550).
119
121
120
-
2. **Create a data source:**
122
+
2. **Create a data source**.
121
123
122
-
1. In the **Report Data** pane, right-click **Data Sources** and click **Add data source**.
124
+
1. Under **Report Data**, right-click **Data Sources**, and then select **Add data source**.
123
125
124
126
2. Select **Use a connection embedded in my report**.
125
127
126
-
3. Select the connection type of **Microsoft SQL Server**.
128
+
3. For connection type, select **Microsoft SQL Server**.
127
129
128
-
4. Type in the connection string to your server and database, for example the following:
130
+
4. Enter the connection string to your server and database. For example:
129
131
130
132
```
131
-
Data Source=[server name];Initial Catalog=AdventureWorks2014
133
+
Data Source=[server name];Initial Catalog=AdventureWorks2016
132
134
```
133
135
134
-
5. It is a good idea to verify with the **Test Connection** button and then click **OK**.
136
+
5. To verify the connection, select the **Test Connection** button, and then select **OK**.
135
137
136
-
For more information on creating a data source, see [Add and Verify a Data Connection (Report Builder and SSRS)](../../reporting-services/report-data/add-and-verify-a-data-connection-report-builder-and-ssrs.md)..
138
+
For more information about creating a data source, see [Add and verify a data connection (Report Builder and SSRS)](../../reporting-services/report-data/add-and-verify-a-data-connection-report-builder-and-ssrs.md).
137
139
138
-
3. **Create a dataset:**
140
+
3. **Create a dataset**.
139
141
140
-
- In the **Report Data** pane, right-click **Datasets** and click **Add dataset**.
142
+
1. Under **Report Data**, right-click **Datasets**, and then select **Add dataset**.
141
143
142
-
- Select **Use a dataset embedded in my report**.
144
+
2. Select **Use a dataset embedded in my report**.
143
145
144
-
- Select the data source you created in the previous steps.
146
+
3. Select the data source that you created.
145
147
146
-
- Select the **Text** query type and then copy and paste the following query into the **Query:** text box:
148
+
4. Select the **Text** query type, and then copy and paste the following query into the **Query** text box:
For more information on creating a dataset, see [Create a Shared Dataset or Embedded Dataset (Report Builder and SSRS)](../../reporting-services/report-data/create-a-shared-dataset-or-embedded-dataset-report-builder-and-ssrs.md).
[Show ToolTips on a Series (Report Builder and SSRS)](../../reporting-services/report-design/show-tooltips-on-a-series-report-builder-and-ssrs.md)
179
-
[Tutorial: Treemaps in Power BI](https://support.powerbi.com/knowledgebase/articles/556200-tutorial-treemaps-in-power-bi)
180
-
[Treemap: Microsoft Research Data Visualization Apps for Office](http://research.microsoft.com/en-us/projects/msrdatavis/treemap.aspx)
175
+
For more information about creating a dataset, see [Create a shared dataset or embedded dataset (Report Builder and SSRS)](../../reporting-services/report-data/create-a-shared-dataset-or-embedded-dataset-report-builder-and-ssrs.md).
* [Show ToolTips on a series (Report Builder and SSRS)](../../reporting-services/report-design/show-tooltips-on-a-series-report-builder-and-ssrs.md)
181
+
* [Tutorial: Treemaps in Power BI](https://support.powerbi.com/knowledgebase/articles/556200-tutorial-treemaps-in-power-bi)
182
+
* [Treemap: Microsoft Research Data Visualization Apps for Office](http://research.microsoft.com/en-us/projects/msrdatavis/treemap.aspx)
0 commit comments