<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Motion Chart and 3D Cube in PowerBI in R Script Showcase</title>
    <link>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Motion-Chart-and-3D-Cube-in-PowerBI/m-p/3075874#M372</link>
    <description>&lt;P&gt;Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Sat, 11 Feb 2023 05:16:45 GMT</pubDate>
    <dc:creator>odeddror</dc:creator>
    <dc:date>2023-02-11T05:16:45Z</dc:date>
    <item>
      <title>Motion Chart and 3D Cube in PowerBI</title>
      <link>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Motion-Chart-and-3D-Cube-in-PowerBI/m-p/2972452#M369</link>
      <description>&lt;P class="lia-align-center"&gt;&lt;STRONG&gt;Select between the visuals using the select boxes at the top of the screen.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I always wanted to be able to have a decent motion chart and draggable 3D cube in Power BI.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Select between the visuals using the select boxes at the top of the screen.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use code from the packages that render these visualizations using MS R and Power BI, but my efforts were unsuccessful.&lt;/P&gt;&lt;P&gt;What did work was using the HTML visualizer from the PBI Marketplace. &amp;nbsp;I exported the HTML from the R Studio for the motion cart and the cube, and then dropped the files into webspace. &amp;nbsp;Once I added the URLs to the visualizer in PBI and published it to the web, I finally got what I wanted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yeah, it’s quite a bit of a hack, but I’m happy anyway.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that you can rotate the cube, select items on the legend, and push the play button on the motion chart.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiMTAyOGYwYzctZTNiOC00YWIyLTkwOWItNTZkOTU4Yjg5NTBiIiwidCI6ImI2YjQ5MDAxLThiM2YtNDNmYS05OWExLTcwNmU4YzdlMzU5OCIsImMiOjZ9&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Aug 2026 14:00:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Motion-Chart-and-3D-Cube-in-PowerBI/m-p/2972452#M369</guid>
      <dc:creator>boosalis</dc:creator>
      <dc:date>2026-08-15T14:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Motion Chart and 3D Cube in PowerBI</title>
      <link>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Motion-Chart-and-3D-Cube-in-PowerBI/m-p/3075313#M370</link>
      <description>&lt;P&gt;Nice jub, can you please share the R code?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 19:39:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Motion-Chart-and-3D-Cube-in-PowerBI/m-p/3075313#M370</guid>
      <dc:creator>odeddror</dc:creator>
      <dc:date>2023-02-10T19:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Motion Chart and 3D Cube in PowerBI</title>
      <link>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Motion-Chart-and-3D-Cube-in-PowerBI/m-p/3075665#M371</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="455797" data-lia-user-login="odeddror" class="lia-mention lia-mention-user"&gt;odeddror&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suely! I cant seem to add the .r file, so I will just post it here. After running the code in R studio, exporting the plots in HTML, and uploading the files to a server, I dropped the URLs in the sample .pbi file that comes with the HTML 5 widget from the market place. Hope that it helps others.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3D Cube in R&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;####################################################
#I loaded each section by hand to avoid errors in R Studio

library(plotly)
library(htmltools)
library(htmlwidgets)
library(rmarkdown)
library(xfun)
library(iris)
library(stringr)
library(datasets)
data(iris)

#This is the famous iris dataset.
rep_str = c('setosa'='1','versicolor'='2','virginica'='3')
iris$Species &amp;lt;- str_replace_all(iris$Species, rep_str)
iris$Species

#I changed the species to suit my demo. 
iris$Species &amp;lt;- as.numeric(as.character(iris$Species))
iris$Species[which(iris$Species == 1)] &amp;lt;- '1. Initial Observation';
iris$Species[which(iris$Species == 2)] &amp;lt;- '2. Midterm Observation';
iris$Species[which(iris$Species == 3)] &amp;lt;- '3. Final Observation';
iris$Species &amp;lt;- as.factor(iris$Species)

#Color the plot points. 
fig &amp;lt;- plot_ly(iris, type= "scatter3d", mode = "markers",
                x = ~Sepal.Length, 
                y = ~Sepal.Width, 
                z = ~Petal.Length, 
                color = ~iris$Species,
                colors = c('#BF382A', '#0C4B8E', '#0bfc03'))
               
#Legend Labels
g &amp;lt;- fig %&amp;gt;% add_markers()
g &amp;lt;- fig %&amp;gt;% layout(scene = 
  list(xaxis = list(title = 'Supervisor Evaluation'),
  yaxis = list(title = 'Student Self-Evaluation'),
  zaxis = list(title = 'Months in Program')))

#Generate the plot
g

####################################################
#The code was cobbled together from various help forums; I merely cobbled. 
#I saved the plot as a webpage and dropped the files into a web host.
#PowerbI needs the URL to the html file to load the plot in the HTML 5 Widget.
#Repeat for Motion Chart&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GapMinder Motion Chart&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#This is all from plotly. 

library(plotly)
library(gapminder)

df &amp;lt;- gapminder 
fig &amp;lt;- df %&amp;gt;%
  plot_ly(
    x = ~gdpPercap, 
    y = ~lifeExp, 
    size = ~pop, 
    color = ~continent, 
    frame = ~year, 
    text = ~country, 
    hoverinfo = "text",
    type = 'scatter',
    mode = 'markers'
  )
fig &amp;lt;- fig %&amp;gt;% layout(
  xaxis = list(
    type = "log"
  )
)

fig&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the HTML Content thingy from the market place to create the demo. The sample file is there, and I just modified the links and the look in PBI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chris B.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2023 01:00:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Motion-Chart-and-3D-Cube-in-PowerBI/m-p/3075665#M371</guid>
      <dc:creator>boosalis</dc:creator>
      <dc:date>2023-02-11T01:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Motion Chart and 3D Cube in PowerBI</title>
      <link>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Motion-Chart-and-3D-Cube-in-PowerBI/m-p/3075874#M372</link>
      <description>&lt;P&gt;Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2023 05:16:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/R-Script-Showcase/Motion-Chart-and-3D-Cube-in-PowerBI/m-p/3075874#M372</guid>
      <dc:creator>odeddror</dc:creator>
      <dc:date>2023-02-11T05:16:45Z</dc:date>
    </item>
  </channel>
</rss>

