Skip to content

Bar chart

Bar charts are used to compare categories of data. (For instance, comparing the number of men vs. women in our subject pool that eat breakfast daily.)

Bar Chart

The data requested to build the chart will vary based on the data type you wish to graph (medications, procedures, observations, and so on).

The settings in the clip below were used to build the bar chart in the above image using the data in our project.

Bar Chart Settings

Note: In the chart above, we compared two cohorts (female subject and male subjects). Cohorts are a good way to compare specific subject populations in insights layouts. There is more information regarding cohort comparisons at the bottom of this article.

Add a Bar Chart to Your Layout:

  1. If you are not already in Edit Layout mode, enter it by clicking the Edit Layout icon in the blue header.
  2. Click the Add Module button at the bottom right of the screen.
  3. Select Bar Chart.
  4. In the window that opens, three tabs are available to customize your Bar Chart: General, Style, and Advanced.

    Bar Settings

General

Title - Give your bar chart a name. This will be displayed on the top left of this module within the layout (optional).

X-Axis Categories - Label - Tell what you are grouping by or what we want the columns to represent. This label cannot be changed.

  • Data Type - Select one of the following from the dropdown menu (other info requested varies based on data type):

    • Medications

      1. Use the Search box to further filter your selection - your selection will show up as a chip beneath the search bar
      2. Specify the sort order (Descending or Ascending)
      3. Select checkbox for Graph Bar Chart as Histogram (optional)
        • Give Histogram Start Value
        • Give Histogram End Value
        • Specify Histogram Bin Size
    • Procedures

      1. Use the Search box to further filter your selection - your selection will show up as a chip beneath the search bar
      2. Specify the sort order (Descending or Ascending)
      3. Select checkbox for Graph Bar Chart as Histogram (optional)
        • Give Histogram Start Value
        • Give Histogram End Value
        • Specify Histogram Bin Size
    • Observations (such as lab values, LX data, questions, and survey data)
      1. Use the Search box to further filter your selection - your selection will show up as a chip beneath the search bar
      2. Specify the Group by Value (Quantities or Total Observations)
      3. Specify your Subset (All, Earliest, or Latest) - available when creating a bar chart comparing observation (x-axis) to observation (y-axis)
      4. Specify the Sort Order (Descending or Ascending)
      5. Select checkbox for Graph Bar Chart as Histogram (optional)
        • Give Histogram Start Value
        • Give Histogram End Value
        • Specify Histogram Bin Size
    • Patients
      1. Select the Property you wish to Group by: Age, Gender, Race, Ethnicity, or Patient
      2. Select Sort Order (Descending or Ascending )
      3. Select checkbox for Graph Bar Chart as Histogram (optional)
        • Give Histogram Start Value
        • Give Histogram End Value
        • Specify Histogram Bin Size
    • Conditions
      1. Use the Search box to further filter your selection - your selection will show up as a chip beneath the search bar
      2. Specify the sort order (Descending or Ascending)
      3. Select checkbox for Graph Bar Chart as Histogram (optional)
        • Give Histogram Start Value
        • Give Histogram End Value
        • Specify Histogram Bin Size
    • Genes
      • Choose Specific Genes checkbox, if selected you ask for further information (multiple can be graphed by clicking the Add Gene button)
        • Barchart Gene Search box
        • Add Gene button if you wish to add more to the graph
      • If Choose Specific Genes checkbox is left unchecked:
        • Select the Sort Function (Standard Deviation, Average, Median)
        • Specify Sort Order (Ascending or Descending)
        • Specify # of Genes

Y-Axis

  • Label - This label represents the rows

  • Data Type - Select one of the following from the dropdown menu (other info requested varies based on data type):

    • Medications

      1. Use the Search box to further filter your selection - your selection will show up as a chip beneath the search bar
      2. Select Property from dropdown (Patient or Medication)
      3. Select Function (Count)
      4. Select Display As (Percent or Count) Count is more commonly used but when you compare cohorts and one cohort is larger than the other, it's useful to view it as a percent for a more balanced size

      Bar Compare

      As seen in the image above, the bar chart on the left shows the data as a Count and the one on the right shows the data as a Percent.

    • Procedures

      1. Use the Search box to further filter your selection - your selection will show up as a chip beneath the search bar
      2. Select Property from dropdown (Patient or Procedure)
      3. Select Function (Count)
      4. Select Display As (Percent or Count) Count is more commonly used but when you compare cohorts and one cohort is larger than the other, it's useful to view it as a percent for a more balanced size
    • Observations (such as lab values, LX data, questions, and survey data)

      1. Use the Search box to further filter your selection - your selection will show up as a chip beneath the search bar
      2. Select Property from dropdown (Patient, Observation, Value String, or Value Quantity)
      3. Select Function (Standard Deviation, Average, Minimum, Maximum, First Quartile, Second Quartile, Median, Third Quartile)
      4. If you choose "Standard Deviation", there are no other selections, but if you choose Average, Minimum, Maximum, or First Quartile, you can click the Graph with Standard Deviation checkbox (optional)
      5. Select Display As (Percent or Count) Count is more commonly used but when you compare cohorts and one cohort is larger than the other, it's useful to view it as a percent for a more balanced size
    • Patients

      1. Select the Property you wish to Group by (Age, Gender, Race, Ethnicity, or Patient)
      2. Select Function (Count)
      3. Select Display As (Percent or Count) Count is more commonly used but when you compare cohorts and one cohort is larger than the other, it's useful to view it as a percent for a more balanced size
    • Conditions

      1. Use the Search box to further filter your selection - your selection will show up as a chip beneath the search bar
      2. Select Property from dropdown (Patient or Condition)
      3. Select Function (Count)
      4. Select Display As (Percent or Count) Count is more commonly used but when you compare cohorts and one cohort is larger than the other, it's useful to view it as a percent for a more balanced size
    • Genes

      1. Select Function (Standard Deviation, Average, Minimum, Maximum, First Quartile, Second Quartile, Median, Third Quartile)
      2. If you choose "Standard Deviation", there are no other selections; but if you choose Average, Minimum, Maximum, or First Quartile, you can click the Graph with Standard Deviation checkbox (optional)

Cohort Comparisons

When you click this checkbox, it sets a default comparison between two cohorts and keeps it as part of the module until you remove it. The bars of your chart split to represent the different cohorts in the given module.

Setting a Cohort Comparison within a module keeps the comparison specific only to this module and remains here until you remove it. But using the cohorts expansion icon in the blue header applies the cohort comparison to all modules in the layout and resets when you click away from the screen. Click here for more information on Cohorts.

To set Cohort Comparisons for this module only:

  1. Click the Compare Cohorts checkbox
  2. Set what Cohorts you want to compare from the existing cohorts by choosing Cohort 1 and Cohort 2
  3. Click the Apply button in the top right of the module settings window

Note: The Cohorts expander in the header overrides the Compare Cohorts checkbox option in the individual graph module settings. Only a “layout administrator” can modify the cohorts in the module editor where the Cohorts expander in the page header is accessible to all.

In the image below, we selected Cohort 1 = Living Men and Cohort 2 = Living Women. By doing this, we can compare how many living men vs. women see a Mental Health Therapist. The graph reflects that of the four subjects in our project, one man and two women see a Mental Health Therapist and only one woman does not.

Bar Cohorts

Style

The Style tab allows you to adjust the colors of your bar chart. You can also load a palette for more color options.

Style

Advanced

The Advanced tab allows you to adjust the margins of your module, though this function is not commonly used.

Advanced

  1. Click Preview at the top of the module settings to view it.
  2. If everything looks good, click Apply to apply the new settings. This will NOT save the module. If you click away, you will lose this module.
  3. To save this module and its settings to the layout, click the Save Changes icon found in the blue header at the top of the page. Or if you need to make changes, click the Edit icon in the top right corner of the module.

Note

Clicking Apply will create your chart. It does not save the layout. To save the layout, you must click the Save Changes icon (found in the blue header). Navigating away from this page before clicking the icon will cause you to lose all changes since your last save.


Last update: 2021-04-20