radar-chart-d3
radar-chart-d3 copied to clipboard
Is there a way to specify a label for a given value
First of all, thanks, your lib is great. I'd like to know if it is possible to add a custom label on mouseover.
Taking an example, it would be :
d = [
[
{axis: "strength", value: 13, mylabel: "Congratulations"},
{axis: "intelligence", value: 1, mylabel: "So bad"},
{axis: "charisma", value: 8, mylabel: "Not that bad"},
{axis: "dexterity", value: 4, mylabel: "Some efforts are needed"},
{axis: "luck", value: 9, mylabel: "Not that bad"}
]
];
Is that possible? On the roadmap ? Easy to implement ?
Thanks for your reply
Hi!,
I'm afraid I don't have much time to work in rachar-chart-d3 for the next months, but I think it would be a nice pull request ;-)
I can imagine passing something like
d = [
metadata: {
title: "Title of this serie",
foo: "bar"
},
data: [
{axis: "strength", value: 13, mylabel: "Congratulations"},
{axis: "intelligence", value: 1, mylabel: "So bad"},
{axis: "charisma", value: 8, mylabel: "Not that bad"},
{axis: "dexterity", value: 4, mylabel: "Some efforts are needed"},
{axis: "luck", value: 9, mylabel: "Not that bad"}
]
];
My only concern would be to keep it backwards compatible with existing configurations, so you would need to check if what you are receiving is an array or an object with data/metadata keys.
Thanks for your quick reply. I'm sorry but I had to switch to a non d3 library. I keep your lib and the idea in mind in case of I need it for another project.