javascript - Dynamically display User Input as tool-tip in Highcharts -
i want take 12 inputs user using multiple areas in popup dialog box.i want these inputs shown tool-tips multiple points of graph http://www.highcharts.com/demo/line-labels whichever examples have come across till don't mention how this.does have idea how implement tooltips using text-area input given user ???
you can use tooltip formatter
option of chart render custom tooltip each point of graph. in example every point corresponding value of nth input using eq
selector , use value in tooltip.
the code this:
tooltip: { formatter: function() { var index = datavalues.indexof(this.y); var comment=$("input:eq("+(index)+")").val() return 'the value <b>'+ this.x + '</b> <b>'+ this.y +'</b> -->'+comment; } },
here working fiddle: http://jsfiddle.net/irvindominin/rbenu/1/
obviously can change logic according needs.
Comments
Post a Comment