Easy way to make pie chart labels clickable

39 views
Skip to first unread message

Brendan

unread,
Sep 30, 2013, 10:36:04 AM9/30/13
to gf...@googlegroups.com
Hi, 

Is there an easy way to make pie chart labels clickable like the rest of the pie slice it represents?

I have a pie chart that at some points will take up most of the screen and will have large labels inside each slice but I noticed that the labels are not clickable like the rest of the pie slice is, it just shows you the typical text line cursor.
I supposed I could do something with the divs that the labels are in but i wanted to see if there was a better way using the gflot library.

Thanks.

Nicolas Morel

unread,
Oct 1, 2013, 12:47:56 PM10/1/13
to gf...@googlegroups.com
Hi,

I don't think that's possible out of the box. The pie plugin doesn't draw the label inside the canvas like the regular axis label. 
But you can achieve this using css only on modern browser (pointer-events). Add this to your css file :

.pieLabel, .pieLabelBackground {
    pointer-events:none;
}

And the alternative is to get the div with jQuery or GQuery and add click event listener.
Reply all
Reply to author
Forward
0 new messages