I am creating a treemap to visualize code complexity in a codebase using the treemap tool provided by the google visualization api. By default, the text displayed in each node is the value of the ID column in the data. For my data set the ID is very long (file paths) so I'd like to only display the Filename (with the complexity in brackets if possible). Is there a way to specify an alternative text to display each treemap node?
It turns out this is quite simple, all you need to do is give a value/format pair for the ID column.
[{v:'src/AppCore/3DAnisotropy', f:'3DAnisotropy'}, 'src/AppCore', 0, 0],
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With