Get startedGet started for free

Advanced layouts

1. Advanced layouts

We've covered the basics of controlling your dashboard layout. Now let's get into more advanced options.

2. Expanding Dashboards

We talked about dashboards as a collection of components arranged in a single visual display. But what if the content you need in your dashboard won’t fit on one page? Flexdashboard provides several ways to easily extend your dashboard.

3. Tabsets

One way to do this is with tabsets. Tabsets allow you to use the same space for multiple charts that the viewer can flip through. You can add charts to a column and put them all in the same tabset using the {.tabset} attribute on that column. As usual, it works the same way for rows. Note that this option applies to the all the charts in that row or column, so you can't do this and have multiple charts in different grid locations within the column.

4. Pages

Another way to expand your dashboard is by creating multiple pages. Just as charts belong to columns or rows, columns and rows belong to pages. By default, everything belongs to one page and you don’t have to specify this. But if you want to create multiple pages, you simply add the page designation indicated by 16 or more equals signs. Then group your columns or rows under each page. When you create multiple pages, flexdashboard adds those pages to a navigation bar across the top. This is how the user accesses the various pages of your dashboard.

5. Creating menus

If you have more than a few pages, you’ll want to group the pages in menus. You can do this with the data-navmenu page attribute. Pages with the same value will be in the same menu.

6. Setting page orientation

Some options that we’ve set in the header for our entire dashboard can be page-specific instead. An example is the orientation option. If you want row orientation for some pages and column orientation for others, you can override the header orientation with the page attribute data-orientation.

7. Let's practice!

Time to put this into practice.