My pie slices are too small to click on. What can I do?

If a pie slice is too thin to click on, you can instead register a click somewhere else and that will detach the pie slice. I would suggest using the valueBox associated to the slice to click on. You can start out by putting the valueBox outside of the pie chart.

plot:{
  valueBox:{
    placement:'out'...

Now that we have placed our text outside of the pie chart we want to make it clickable. All text are considered labels in our library so to make text clickable you must set the false attribute to false.

plot:{
  valueBox:{
    flat:false...

Last, we want to grab the click event and manually click on the pie slice to detach it from the graph.

zingchart.label_click = function(e) {
  zingchart.exec('myChart', 'clicknode', {
      plotindex:e.plotindex,
      nodeindex:e.nodeindex
  });
}

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.