Home Forums Chart Support Editable legends

Editable legends

Viewing 9 posts - 1 through 9 (of 9 total)
  • #23792

    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?

    • This topic was modified 5 years, 10 months ago by Tejal.
    #23796

    @tejal,

    Please take a look at this JSFiddle.


    Vishwas R
    Team CanvasJS

    #23872

    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.

    #23887

    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/

    #23888

    Hello Vishwas,

    As we are using an input box. It is disturb my ui too. Is there any other way.

    #23890

    Hello Vishwas,

    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.

    • This reply was modified 5 years, 10 months ago by Tejal.
    • This reply was modified 5 years, 10 months ago by Tejal.
    #23899

    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.


    Vishwas R
    Team CanvasJS

    #23910

    Hello Vishwas,

    https://jsfiddle.net/xw3p5k8b/23/

    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

    #23915

    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

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.