0

How can I put the figure on left and text on right and align it left (the text)?

---
title: "Untitled"
author: "George"
date: "12/3/2018"
output:
    flexdashboard::flex_dashboard:
    orientation: rows
runtime: shiny
---

    ```{r global, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(flexdashboard)
library(dplyr)
library(GGally)


x <- c(1,2,3)
y <- c(11,22,33)
z <- data.frame(x, y)
```

Introduction
=======================================================================

### General info

- A

- B



Corr
=======================================================================

### Correlation

Here is some text

- One
- Two

```{r}
renderPlot({
    GGally::ggpairs(z)
})

```
George
  • 5,808
  • 15
  • 83
  • 160

1 Answers1

0

try this, this layout fills the page completely and gives prominence to a single chart on the left where you can have your img and two secondary charts included to the right- where you can have your text

 title: "Focal Chart (Left)"
    output: flexdashboard::flex_dashboard
    ---

    Column {data-width=600}
    -------------------------------------

    ### Chart 1

    ```{r}
    ```

    Column {data-width=400}
    -------------------------------------

    ### Chart 2

    ```{r}
    ```   

    ### Chart 3

    ```{r}
    ```
  • Hi, even though your approach works for my example, it doesn't work for my updated question example.Is there any solution for this?I want to have a tabset and in each of them have a figure and text. – George Dec 03 '18 at 13:25
  • I figured that what I want is not possible yet (https://github.com/flexdashboard/issues/37).Is there a way to align the text? Or color it? I tried to use `renderText({"hello", ""})` but it doesn't work – George Dec 03 '18 at 13:55
  • you could create a seperate css file and import it --- output: flexdashboard::flex_dashboard: css: styles.css and in your css file put .text{ color:red; align: left;} – TheSearcher Dec 03 '18 at 14:30
  • im quite new with using flexdashboard aswel, but hope that helps abit. – TheSearcher Dec 03 '18 at 14:35