Brunel-Visualization / Brunel

Brunel Visualization
Apache License 2.0
290 stars 77 forks source link

Graph Annotation #109

Closed suntong closed 8 years ago

suntong commented 8 years ago

treemap can use label to annotate the graph, but that doesn't work for heatmap.

Please consider adding the annotation capability to heatmap (and others like bar graphs) as well.

Thanks

danrope commented 8 years ago

Note, labeling does work for heatmaps--if there is enough space to draw the label: data("sample:US States.csv") x(Presidential_Choice) y(Region) color(#count:red) sort(#count) style('symbol:rect; size:100%; stroke:none') label(#count)

It also works for bars: data("sample:US States.csv") bar x(Region) y(Rain) sort(Rain) mean(Rain) label(rain)

suntong commented 8 years ago

Oh, that's the trick -- "if there is enough space", i.e., make it bigger. Thx.

danrope commented 8 years ago

I'm going to reopen this & filing as a bug. You can request a smaller font-size for the labels, but it seems it is too restrictive deciding when to not draw the label.

data('sample:BGG Top 2000 Games.csv') x(Categories) y(Mechanics) color(#count:red) style('symbol:rect; size:100%; stroke:none') sort(#count) label(#count) style('.label {font-size:5px}')

grahamwills commented 8 years ago

latest changes (for D3 4.0 compatibility) seems to have fixed this feature