danvk / source-map-explorer

Analyze and debug space usage through source maps
Apache License 2.0
3.84k stars 101 forks source link

Add background coloring to treemap view #21

Open hammer opened 9 years ago

danvk commented 9 years ago

Are you imagining alternative white/gray (ala a table)?

Are there any examples you can point to of tree maps on the web whose design you like?

hammer commented 9 years ago

Something like https://upload.wikimedia.org/wikipedia/commons/3/39/Finland_Export_Treemap.jpg

JamesMessinger commented 8 years ago

Maybe do the color coding based on the directory name? That way, for example, if lodash is being included multiple times, it'll be more obvious because all occurrences would be the same color.

danvk commented 8 years ago

You'd need a lot of colors if you had one per unique directory name!

JamesMessinger commented 8 years ago

Lol. True that. But I'm not thinking about having a huge array of pre-defined colors. Instead, I'm thinking of an algorithm that generates hex color codes from file names. Similar to this algorithm.

paulirish commented 8 years ago

most d3 treemaps don't do unique for everything, but use color/shades to communicate the groupings: image

I'm +1 on color, but it'll require some care to make sure it works most effectively.