0

每当我单击它时,我都想更改饼图的单个切片的颜色(例如被突出显示),从而给人一种被主动选择的印象。

我知道它必须放在我的某个地方

$(selector).bind('jqplotDataClick', function (ev, seriesIndex, pointIndex, data) {...}

你们知道怎么做吗???

4

1 回答 1

1

你可以尝试这样的事情:

$(selector).bind('jqplotDataClick', function(ev, seriesIndex, pointIndex, data) {
   plot.series[seriesIndex].seriesColors[pointIndex]="#FFF"; // FFF is white, you could add any color here to change it
   plot.replot();
});

其中“情节”是持有情节的变量。

于 2013-10-23T13:59:16.313 回答