Home forums Using CanvasJS Editable legends

This topic contains 8 replies, has 3 voices, and was last updated by  Indranil Deo 2 weeks, 6 days ago.

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

    Tejal
    Member

    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 1 month ago by  Tejal.
    #23796

    Vishwas R
    Keymaster

    @tejal,

    Please take a look at this JSFiddle.


    Vishwas R
    Team CanvasJS

    #23872

    Tejal
    Member

    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

    Tejal
    Member

    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

    Tejal
    Member

    Hello Vishwas,

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

    #23890

    Tejal
    Member

    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 3 weeks, 2 days ago by  Tejal.
    • This reply was modified 3 weeks, 2 days ago by  Tejal.
    #23899

    Vishwas R
    Keymaster

    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

    Tejal
    Member

    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

    Indranil Deo
    Member

    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.