We're implementing a jet chart with 3 series. In javascript callback function of chart region, we execute this code for hiding one serie:
function( options ) {
options.dataFilter = function( data ) {
data.series[ 2 ].visibility = "hidden";
data.series[ 2 ].displayInLegend = "off";
return data;
};
return options;
}
We want to make visible this serie when press a button. We're trying with this code but it doesn't run ok:
-- Dynamic Action with execute javascript
$("#SystemMetrics_jet").ojChart(
{
series: [{ id:2, "visibility":"visible"}]
}
);
I've read ojChart options and I know that series is an array of objects. Can somebody help me about how-to write the correct code for achieving this?
A lot of thanks