Optional printing of data value in popover
The data value of a bubble was always printed in the popover. We needed to disable the printing of the data in the popover because the absolute values were not relevant for a few of our graphs. This was caused by the absolute values be approximations. This pull request introduces a key in the popoverOpts configuration dict with the name popoverShowData which can be set to false to disable the printing of data in the popover.
Thanks for this. Seems like an interesting approach and certainly fits your needs, but I think it's not quite generic enough a solution.
I'd like to see this solved with a detailTemplate potentially, where we allow the user to specify how the popover text should be displayed. Something like...
var chart = new BubbleChart({
canvasId: "bubblechart",
metric: "Kb",
usedArea: 0.35,
contain: true,
popoverOpts: {
textFont: "Open Sans",
detailTemplate: "{data} {metric}" // <------------- Default
},
data : myCustomData()
});
That way it would solve your case (by providing just "{metric}") but it would also solve many other custom implementations.
For example if someone is doing work with percentages and they want the metric first.
detailTemplate: "{metric} {data}%"
Also, make sure all pull requests are targeted at the develop branch. Thanks!
(should probably update CONTRIBUTING.md)