title: What is required to make this treemap plot work?
body: <p>Been trying to get treemap to work but the output is blank and not sure why.
  If I take an example from the web and place it into my code the the output works fine - but when I try to use my data it does not output.</p>
  <p>The sample code is..</p>
  <pre><code>library(plotly)
  
  labels = c(&quot;A1&quot;, &quot;A2&quot;, &quot;A3&quot;, &quot;A4&quot;, &quot;A5&quot;, &quot;B1&quot;, &quot;B2&quot;)
  parents = c(&quot;&quot;, &quot;A1&quot;, &quot;A2&quot;, &quot;A3&quot;, &quot;A4&quot;, &quot;&quot;, &quot;B1&quot;)
  values = c(&quot;11&quot;, &quot;12&quot;, &quot;13&quot;, &quot;14&quot;, &quot;15&quot;, &quot;20&quot;, &quot;30&quot;)
  
  fig &lt;- plot_ly(
    type=&quot;treemap&quot;,
    labels=labels,
    parents=parents,
    values=values,
    marker=list(colorscale='Reds'))
  
  fig
  
  </code></pre>
  <p>The data source I am using is data frame and when I apply the data sources to the above example it simply does not work. So, I can only assume it is my data frame and I don't know why as I have tried all I know.</p>
  <p>My data Code..</p>
  <pre><code>Continents_tmap &lt;- df1 %&gt;%
      group_by(Continent,Country.x) %&gt;%
      summarise(Deaths = sum(Deaths))## %&gt;%
  
  Continents_tmap &lt;- data.frame(Continents_tmap)
  
  labels &lt;- Continents_tmap$Country.x
  parents &lt;- Continents_tmap$Continent
  values &lt;- Continents_tmap$Deaths
  
  </code></pre>
  <p>My ui code  ..</p>
  <pre><code>tabPanel( &quot;TreeMap&quot;,  plotlyOutput(&quot;tmap1&quot;)
                          )
  </code></pre>
  <p>My server side code....</p>
  <pre><code>output$tmap1 &lt;- renderPlotly({
          plot_ly(
          type=&quot;treemap&quot;,
          labels=labels,
          parents=parents,
          values=values,
          marker=list(colorscale='Reds'))
      })
  </code></pre>
  <p>Regards</p>
  <p>I got it to work using highchart but still not in plotly - my code for highchart is</p>
  <pre><code> output$tmap1 &lt;- renderHighchart({
          Continents_tmap %&gt;%
              filter(Continent == input$continent_2) %&gt;%
              group_by(Country.x) %&gt;%
              summarise(pts = sum(Deaths), fgpct = sum(Deaths)) %&gt;%
              hchart(&quot;treemap&quot;,
                     hcaes(
                         name = Country.x,
                         value = pts,
                         color = fgpct
                     )) %&gt;%
              hc_title(text = &quot;Continent- Country Deaths&quot;) %&gt;%
              hc_subtitle(text = &quot;Deaths Rating&quot;)
          
      })
      
  
  </code></pre>