I am new to d3 as well as javascript, and I am having trouble updating the dataset, as well as redrawing the bars. This is the code I have been looking at so far.
I have a function clickEvent, that is evoked upon a click on any bar. This function prompts for a value.
function clickEvent()
{
var op = prompt("Please enter the value", "");
};
What I need to do is to update the dataset at the index of the click, and redraw the rects so that they will reflect the change to the dataset.
Any help would be appreciated. Thanks.
return
ing something from thatclickEvent
function (or, perhaps, changing an array index value in yourdataset
somewhere inside/related to theclickEvent
function) so that the value can be reflected in your dataset/graph. – Siderosis