<p>Yesterday, the new version of D3partitionR was uploaded on CRAN, this version contains some major improvements.</p>
<h3>1. General layout:</h3>
<p>Before this update, the height and width of the widget were somehow messy and so was the global layout. The layout is now the following:<br>
<img sizes="(max-width: 366px) 100vw, 366px" alt="picture" class="wp-image-813" src="https://i1.wp.com/antoineguillot.files.wordpress.com/2016/12/picture.png?resize=366%2C338&ssl=1" data-recalc-dims="1"></p>
<ul>
<li>Area A: Title area (exists only if the user entered a title)</li>
<li>Area B: Trail area (Only if the user set the trail option to true)</li>
<li>Area C: Partition chart area</li>
<li>Area D: Legend area (only if the user selected a legend)</li>
</ul>
<p>In previous version, the chart size wasn’t responsive to the chart options (Title or not, trail or not, Legend or not).</p>
<h3>2. Bootstrap tooltip</h3>
<p>In previous versions, the tooltip was sometime badly positioned (for exemple when scrolling the page, or placing the chart in a box). I replaced the homemade tooltip with the one from <em>bootstrap</em> which use <em>tether.js</em> library for positioning, this should made the positioning much more robust (you can see it on the <a target="_blank" rel="nofollow" href="https://antoineguillot.wordpress.com/2016/11/20/an-extensive-tutorial-of-d3partitionr-0-2/">Japan trade app</a> for instance).</p>
<p><img alt="beforetooltip" class="wp-image-833" src="https://i1.wp.com/antoineguillot.files.wordpress.com/2016/12/beforetooltip.gif?resize=456%2C217&ssl=1" data-recalc-dims="1"></p>
<p><em>Before the update: Tooltip isn’t on the node</em></p>
<p><img alt="aftertooltip" class="wp-image-834" src="https://i2.wp.com/antoineguillot.files.wordpress.com/2016/12/aftertooltip.gif?resize=456%2C220&ssl=1" data-recalc-dims="1"></p>
<p><em>After the update: Tooltip is properly positioned</em></p>
<h3>3. Trail and sequence visualisation:</h3>
<p>Sometimes when you zoom on some part of the chart, you may forget where you’re really in the current sequence.</p>
<p>Using the breadcrumb trail from <a target="_blank" rel="nofollow" href="https://bl.ocks.org/kerryrodden/7090426">https://bl.ocks.org/kerryrodden/7090426</a> , you now can see where you are positioned in the chart and get the size of the different steps.</p>
<p><img alt="TrailD3.gif" class="wp-image-847" src="https://i0.wp.com/antoineguillot.files.wordpress.com/2016/12/traild3.gif?resize=456%2C382&ssl=1" data-recalc-dims="1"></p>
<p><em>Exemple of the new trail</em></p>
<pre>##Code used to create the visualisation above
library(D3partitionR)
D3partitionR(T,width=600,height=600,legend=list(type=&quot;sequential&quot;,
color=list(B=&quot;#e8ae46&quot;,C=&quot;#bf3a8e&quot;)),title=list(text=&quot;My Title&quot;),trail=TRUE)</pre>
<h3>4. Future developments</h3>
<p>One of the major improvement that could be made, would be to make the package compatible with hclust and other hierarchical data formats from R. Hopefully, v0.4.0 will make it possible to use D3partitionR with hclust objects and nested lists (instead of using the list format which can be tricky sometimes).<br>
The two main issues to be tackled to add these functionalities are:</p>
<ul>
<li>How to convert the hclust data to a nested list with the properties and values required for D3partitionR ?</li>
<li>What is useful to be shown from a hclust object in a D3partitionR ? For instance, keeping all the nodes would make the chart far too complicated and deep, so should the user provide a given cut-off ? Should it be computed automatically ?</li>
</ul>
<p> </p>
<p>Best,<br>
Antoine</p>
<p> </p>
<p> </p>
<p> </p>
<p> <a target="_blank" rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/antoineguillot.wordpress.com/806/"><img alt="" src="http://feeds.wordpress.com/1.0/comments/antoineguillot.wordpress.com/806/" border="0"></a> <img alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" border="0" data-recalc-dims="1"></p>
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/WLerY35UEsU">