if ((dataSeriesC[dataSeriesC.length - 1] > thresholdValue)
|| (dataSeriesB[dataSeriesB.length - 1] > thresholdValue)) {
// Add an alarm message as a custom text box on top-right corner of the
// plot area if the latest data value exceeds threshold.
c.addText(575, 62, "Alarm - Latest Value Exceeded Threshold",
"Arial Bold Italic", 10, 0xffffff, Chart.TopRight).setBackground(0xdd0000);
}
// Fill the region above the threshold as semi-transparent red (80ff8888)
c.addInterLineLayer(layer.getLine(1), m.getLine(), 0x80ff8888, Chart.Transparent);