BookmarkSubscribeRSS Feed

Tricks for SAS Visual Analytics Report Builders: Step 2 – Choose the Best Chart

Started ‎04-11-2024 by
Modified ‎04-11-2024 by
Views 693

This is the second part of a six part series that describes tips and tricks for building impactful reports in SAS Visual Analytics.

 

  • Draft a Plan
  • Choose the Best Chart (this article!)
    Bonus: Chart Best Practices
  • Focus on What’s Important
  • Consider the Layout
  • Test, Test, and Test Again

 

SAS Visual Analytics enables you to create compelling, interactive reports that can be viewed by anyone, anywhere. To create impactful reports that resonate with your audience you need to (1) draft a plan for the report, (2) choose the best chart type to display your data, (3) create your reports so viewers can focus on what’s important to them, (4) pick a layout that will best display your data and tell your data story, and (5) test the report to ensure it operates and looks the way you want. In this post, we will focus on the second step in the process: Choose the Best Chart.

 

When choosing the chart to best display your data and advance your data story, you need to think about the audience and the type of data you want to display (category, measure, date, datetime, time). You can ask yourself the following questions to determine the best chart: 

 

  • Am I highlighting one important fact?
  • Am I comparing two or more things?
  • Am I showing survey or questionnaire results?
  • Am I describing how parts relate to the whole?
  • Am I showing the relationship between data items?
  • Is a graph even required?

 

Highlighting One Important Fact

 

Choosing the best chart type can be determined by the type of data you want to display (category, measure, date, datetime, time) and what you are trying to showcase.

 

If you want to highlight one important fact, you can use a key value object or dynamic text to highlight a single number.

 

01_combined_2024-04-08_17-24-55.png

 

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

In this example, both objects highlight a single number without any unnecessary information detracting from the value.

 

You can use a donut graph or a faded bar chart to draw the viewer’s attention to a specific value.

 

02_combined_niball_bestpractices.png

 

In this example, both objects use display rules to highlight important values (Internet Sale in the donut chart and Golf in the bar chart). These objects also show other values in muted colors for comparison.

 

Pro Tip! Use display rules to highlight important values, but take care to choose colors that are easily distinguished which can be helpful for color blind users. For more information about display rules, see the SAS Visual Analytics Display Rules: Report-Level post.

 

Comparing Two or More Things

 

For general comparisons, bar charts can be used to compare multiple pieces of data, dot plots can be used to compare groups with values that are close together, butterfly charts can be used to compare two groups across different categories, and dual axis charts can be used to compare two measures with different ranges. However, be aware that some audience members might not be familiar with dual axis charts and might misinterpret them.

 

03_niball_bestpractices2_comparingtwoormorethings.png

 

In this example, the stacked bar chart uses the group role to compare quantity ordered for loyalty and non-loyalty members. For the dot plot, a zero baseline is not assumed, so it is useful for comparing values that are close together (like the number of orders by product line). The butterfly chart is useful for comparing two opposing groups (in this case, customer satisfaction for toy and novelty products). The dual axis chart makes it easy to compare two measures (like customer satisfaction and product sale) that have very different ranges. Viewing both these measures on the same axis will flatten the customer satisfaction data and make it difficult to see the relationship between the measures.

 

Pro Tip! Fixed axis ranges can be useful for accessibility because they enable users of sonification to understand the scale of data displayed in the object. This is especially useful when the values shown in the object can change due to filtering or drilling down in a hierarchy. However, if your data updates frequently or is likely to fall outside of the range when filtering or drilling, a fixed axis range is not recommended as values can unknowingly fall outside the fixed range.

 

For comparisons over time, use a line chart or a time series plot. Line charts are useful for comparing ordinal groups (like age ranges or loyalty levels), while time series plot are useful for displaying data over time (like year, month, or day). Time series plots can also be useful for spotting seasonal trends in the data.

 

Pro Tip! Time series plots and line charts include an option to add an overview axis. This is a scrolling axis that enables you to specify how much of the axis is displayed and what segment is displayed. While these are useful for focusing on smaller segments when there are a lot of data values, they can add clutter to the report. In addition, screen readers cannot interact with an overview axis. If an overview axis needs to be included, it’s a best practice to add another accessible object (like a list table or crosstab) that presents the same information in an accessible way. Alternatively, you can direct users to maximize the chart to view the details table.

 

04_niball_bestpractices2_comparingovertime.png

 

In this example, the line chart shows quantity ordered by age group (an ordinal value) and the time series plot shows total sales by day.

 

Pro Tip! Animation can also be used to make comparisons over time. Be aware that the animation toolbar is not fully accessible to users of screen readers. The details table displayed when maximizing the object, however, is fully accessible. If using animation in your charts, consider including a note that instructs users to maximize the object to view a table of the same information in the animated graph.

 

For comparing against a benchmark, you can add reference lines or display rules to most charts.

 

05_combined_niball_bestpractices2_displayrules.png

 

In this example, a reference line is added to the chart on the left to compare customer satisfaction values to a target (50%) for each continent and a display rule is added to the chart on the right to highlight continents where customer satisfaction falls below 50% in pink.

 

Alternatively, a needle plot can be used to compare values to a baseline. A bullet gauge or a targeted bar chart can be used to compare actual values to a target.

 

6_combined.png

 

In this example, a needle plot is used to compare profits to a set baseline ($50,000). The bullet gauge compares total sales (13M) to the goal (23M) and the targeted bar chart compares total sales for each unit to the target. For the targeted bar chart, a display rule is added to highlight the units where actual sales do not exceed target sales in pink.

 

Pro Tip! When working with gradients, three-color gradients (like the one used for the bullet gauge) are not accessible for color deficient users. Instead use two-color gradients and choose starting and ending colors with sufficient contrast or difference in luminosity.

 

Showing Survey or Questionnaire Results

 

If you want to display the results of a survey or questionnaire, you can use a stacked bar chart to compare Likert responses, a vertical bar chart (or column bar chart) for all that apply questions, or a table or crosstab if precision is important. A Likert is a global scale that is used to assess opinions, attitudes, and views; a 5-point example of a Likert scale would be the following choices: strongly agree, agree, neither agree nor disagree, disagree, and strongly disagree. Box plots can also be used to show the average response, the minimum and maximum values, and outliers. Many people might be unfamiliar with box plots, so it might be helpful to provide an explanation or display the same information in an alternative way.

 

07_niball_bestpractices2_surveyorquestionnaire.png

 

In this example, the stacked bar chart displays the response percentage for a Likert scale (choose one), the vertical bar chart shows the number of responses for a question where users can select all that apply, and the crosstab shows the average response. The box plot displays the average response (diamond), the median response (line), and the minimum and maximum responses (the whiskers).

 

Describing How Parts Relate to the Whole

 

When describing how parts relate to the whole, a donut chart or pie chart can be useful for comparing less than 5 data points and treemaps can display many more data points and two measures (one to size the tile and one to color the tile).

 

08_combined_niball_bestpractices2_relatetowholetreemap.png

 

In this example, the donut chart and pie chart show the percent quantity ordered for each age group (5 distinct values) and the treemap shows the number of orders and customer satisfaction by product make.

 

Pro Tip! Use pie charts sparingly. It is very difficult to compare the relative sizes of slices in the pie chart. To make the comparison easier, add data labels to each slice.

 

In addition, stacked bar charts can be normalized to show percent of total, histograms can be used to show ranges and intervals, and geo maps can be used when location is an important part of the analysis. Consider supplementing geo maps (which may be difficult to interpret) with more easily understood objects (like tables or crosstabs).

 

09_combined_niball_bestpractices2_histogram.png

 

In this example, the bar chart options are modified to set the Grouping style to Stacked (so one bar is displayed for each continent) and the Group scale to Normalize groups to 100% (so the bar shows the relative contribution for each order type). The histogram shows the range of values for vendor satisfaction, which can be useful for modeling, and shows the number of values that fall within each range.

 

10_niball_bestpractices2_geomap.png

 

In this example, the geo map shows customer locations on a map background which makes it easier to see areas with a high concentration of customers.

 

Showing the Relationship Between Data Items

 

To show the relationship between two measures, use a scatter plot or heat map. Scatter plots are great for low cardinality measures or small data sources and heat maps are better at displaying high cardinality measures or large data sources.

 

11_combined_niball_bestpractices2_scatterplot.png

 

In this example, the scatter plot displays the relationship between two measures (total profit and annual salary) and uses color to show differences between job titles. The heat map displays the relationship between two measures (product sale and customer satisfaction) and uses color to show the number of observations within each range.

 

Use a bubble plot to show the relationship between three measures or a correlation matrix to show the linear relationship between many measures.

 

12_combined_niball_bestpractices2_bubbleplot.png

 

In this example, the bubble plot shows the relationship between three measures and uses color to show differences between age groups: two measures (profit and days to delivery) determine bubble placement and one measure (quantity ordered) determines bubble size. The correlation matrix shows the linear relationship between many measures and uses color to shows the strength of the relationship (where lighter cells indicate a weak relationship or correlation value near 0 and darker cells indicate a strong relationship or correlation values near 1 or -1).

 

Pro Tip! It’s a best practice to limit the number of digits displayed after decimal points in your charts unless they are required for precision.

 

In addition, you can use a network diagram to show many relationships (like relationships between users of social media or parties of interest in a terrorist network), a path analysis object to show process flows (like steps in a process), or a text object to add a detailed description when no visual is possible.

 

13_combined_bestpractices2_networkdiagram.png

 

In this example, the network diagram shows the relationship between employees in an organization and uses color to indicate the department of each employee. The text object shows a bulleted list of steps to complete when moving, which don’t need to be completed in a specific order.

 

14_niball_bestpractices2_pathanalysis.png

 

In this example, the path analysis object shows the steps in the drug approval process, which do need to be completed in a specific order and uses color to show where drugs dropped off or did not move on to the next phase.

 

Pro Tip! It’s especially important to ensure that legends are displayed on all screen sizes. If legends are not displayed in the chart, they can only be viewed when the user activates a collapsed button. This button does not have an accessible name or role, so it’s not useful for users of screen reader technology.

 

Is a Graph Even Required?

 

In some cases, a graph might not need to be used to display your data. Word clouds, images, or illustrations created with the Data-driven content object might better communicate your point. In addition, a Text object can be used to give context to certain data values or state the conclusions that can be inferred from the data.

 

15_niball_bestpractices2_wordcloud.png

 

In this example, the word cloud is used to show the top recipe searches on a website. Recall that word clouds should be avoided if analytical accuracy is desired because it is difficult to compare the relative sizes of different words due to the number of letters in each word and the size of the letters.

16_combined_niball_bestpractices2_image.png

 

In this example, the Image object is used to show the components of a model car and to display an illustration, and the text object summarizes the data presented in other objects and draws conclusions based on those values.

 

Pro Tip! When using text to provide instructions, avoid using sensory characteristics (like the size of the object, the shape of an item, or the position of the object on the screen) as the sole means of conveying information or identifying a portion of the report. This makes the report more accessible for users of screen reader technology.

 

Summary

 

After you have drafted a plan for your report, you need to choose the best chart for displaying your data. Choosing an appropriate chart is more of an art than a science, but several rules are available to aid you in showcasing your data and recommendations are made for charts that most closely aligns with the data you want to present and the details you want to showcase. There is no correct choice when choosing a chart type, but there are many incorrect choices. If you don’t believe me, listen to two experts on data visualization:

 

“… the only thing worse than a pie chart is several of them.” – Edward Tufte

 

“Save the pies for dessert.” – Stephen Few

 

If you want to apply the skills learned in this post to a report created in SAS Visual Analytics, take the report design challenge.

 

In the next part of this series, we discuss some chart best practices.

 

References

 

Beautiful Reports

 

Envisioning Information by Edward Tufte

 

The Visual Display of Quantitative Information by Edward Tufte

 

Visual Explanations by Edward Tufte

 

Documentation: Keyboard Shortcuts for SAS Visual Analytics

 

Documentation: Viewing Objects with SAS Graphics Accelerator

 

Documentation: Creating Accessible Reports Using SAS Visual Analytics

 

Documentation: Accessibility Features for SAS Visual Analytics

 

 

 

Find more articles from SAS Global Enablement and Learning here.

Version history
Last update:
‎04-11-2024 01:12 PM
Updated by:
Contributors

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags