开发者

Is it possible to store plain text in flot jquery datasets?

please take a quick look at this sample script (it wont work in iexplorer)

http://jsfiddle.net/VpGnS/10/

Now take a look at where the coordinates are printed out on that page under the graph. Is it possible that instead of printing out plain integers, write out another dataset that is containing a string in that place??

Like for example say that I do something like this, I add

 "COSTestNames": {
        label: "Testnames",
        data: [[1, "test1-a1"], [2,  "test1-a2" ], [3, "test1-a3"], [4,  "test1-a4" ]]}

&

"CASTestNames": {
    label: "Testnames",
    data: [[1, "test2-a1"], [2,  "test2-a2" ], [3, "test2-a3"], [4,  "test2-a4" ]]}

&

"MVETestNames": {
    label: "Testnames",
    data: [[1, "test3-a1"], [2,  "test3-a2" ], [3, "test3-a3开发者_StackOverflow"], [4,  "test3-a4" ]]}

etc... to datasets[0], datasets[ 1] & datasets[2]

And when I hover a certain X interval I am in, say I am in the intervall 1-2 in the X cordinates, I then want it to print out, if MVETest3failed is displayed on the graph, then print out "test3-a2". When I'm finished it won't be able to show objects from both MVE,COS and CAS, so don't bother that scenario =)

Or if its not possible to do like this, is there any other way to accomplish this in a similar way? =)


Solution:

http://jsfiddle.net/VpGnS/47/

This does as you would like.

I modified the mouseActiveRadius property of the grid and modified your plothover function.

Up vote if this is what you wanted. I know it's been several weeks since you asked, but I figured I would send out an answer, anyway.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜