You must be logged in to post your query.
Home › Forums › Chart Support › Editable legends
Hello CanvasJS team,
https://jsfiddle.net/cwmx4azj/1/
In above snippet, I want to make my legends editable i.e. on click of legend present at the bottom of the canvas a small window will open to edit the legend.
Is this possible?
@tejal,
Please take a look at this JSFiddle.
— Vishwas R Team CanvasJS
Hello Vishwas,
I have tried the same thing for doubleclick event. But in this case I can not focusout with single click. Can you please suggest solution for this.
https://jsfiddle.net/xw3p5k8b/7/
As we are using an input box. It is disturb my ui too. Is there any other way.
https://jsfiddle.net/xw3p5k8b/23/
My canvas are getting generated dynamically because of which I am not getting the element. In my snippet I am adding a doubleclick event on container itself but I am not getting exact event object and even its not working.
In short I want to attach event on container div itself and I should be able to find out the title of the legend on which I have clicked on.
Tejal,
I have tried the same thing for doubleclick event. But in this case I can not focusout with single click. Can you please suggest solution for this. https://jsfiddle.net/xw3p5k8b/7/
You can attach double-click event to the chart-container as and fire focus-out on single-click as shown in this updated JSFiddle.
My canvas are getting generated dynamically because of which I am not getting the element. In my snippet I am adding a doubleclick event on container itself but I am not getting exact event object and even its not working. In short I want to attach event on container div itself and I should be able to find out the title of the legend on which I have clicked on.
Binding double-click event on window-load should work fine in this case. Please take a look at this updated JSFiddle.
In above snippet, event is not getting binded. In my current project I am able to bind the event but e.offsetX is not getting.
Please suggest a solution for event binding.
Thanks, Tejal
You can overcome this issue by defining the myMethod(e) outside the window.onload event handler. Please take a look at this updated jsfiddle.
___________ Indranil Deo, Team CanvasJS
You must be logged in to reply to this topic. Login/Register