Comments (4)
I only see three categories of ShipMode:
> table(Sample_Superstore$ShipMode)
Delivery Truck Express Air Regular Air
1146 983 6270
Notice that Tableau not only aggregates the tiles by SubCategory, but also by ShipMode itself (as main category). Without doing this, each subcategory is assigned to one (arbitrarily chosen) category.
This should work:
treemap(grouped,
index=c("ShipMode", "SubCategory"),
vSize="Total_Sales",
vColor="ShipMode",
type="categorical"
)
I'll have to fix the data.table
warning though
from treemap.
Thanks for the prompt reply. I actually put a wrong link for the data.
This is the correct link and the "Ship Mode" has four categories: 'Second Class' 'Standard Class' 'First Class' 'Same Day'. However, the treemap shows only 'First Class' .
https://community.tableau.com/servlet/JiveServlet/download/351988-57774/Sample%20-%20Superstore.xls
from treemap.
My code also works for this one:
You can use fontsize.labels
to omit the labels of ShipMode in the treemap itself.
from treemap.
Thank you! Is it possible to use a color palette in each category? I want the bigger rectangles to be deeper color. I mean one color palette in each category. I have data that has "failed" and "warning" categories and I want to use different color palettes for each one of them. I am looking for something like this:
from treemap.
Related Issues (20)
- Color for NA
- data.table warning when `vColor = "color", type = "color"` HOT 1
- warning message when type="color" HOT 2
- Treemap doesn't try hard enough to fit text into the last box.
- Enhancement: add strip algorithm HOT 1
- crosstalk?
- click url - tooltip
- fontsize.labels inconsistent
- Bug for legend HOT 1
- Hover treemap in a shinyapp not showing the right values
- treemaps in RStudio / macOS seem to fail
- Warning message when using type="color", not solved in version 2.4-2 HOT 1
- Dynamically Click TreeMap Point
- Legend Reverse Order HOT 1
- Can't install development version HOT 2
- update CRAN package HOT 2
- Is there a way to automatically save my treemap as a simple png in my code? HOT 1
- Installation impossible HOT 1
- CRAN version throws error on color usage HOT 1
- Caption Argument HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from treemap.