Hiding Specific Legend Entries

clearstone
edited February 11, 2022 in Analytics #1
I have managed to hide the text associated with a specific legend item with the following chart script (I am using BIRT 2.1):

function beforeDrawLegendEntry( label, icsc ){
var label_text = label.getCaption().getValue();
if (label_text == 'null')
{label.setVisible(false);
} else {
label.setVisible(true);
};
}

But how to I hide the colored shape that corresponds to the series in the chart? It is a grouped y-axis chart. I need the 'null' series in the chart so that my x-axis time series doesn't skip any hours of the day where there is no data for the other data series.

Thanks,

JT

Comments