}
if (stats != null) {
// A HACK for some "graphs"!!!
DataChart dataChart = new DataChart(registry, "Duty Cycle", "Duty Cycle");
registry.registerComponent("dutychart", dataChart);
DataSourceSampler dss = dataChart.setupChipFrame(cpu);
dataChart.addDataSource(dss, "LEDS", stats.getDataSource(getID(), 0, OperatingModeStatistics.OP_INVERT));
dataChart.addDataSource(dss, "Listen", stats.getDataSource(radio.getID(), CC2420.MODE_RX_ON));
dataChart.addDataSource(dss, "Transmit", stats.getDataSource(radio.getID(), CC2420.MODE_TXRX_ON));
dataChart.addDataSource(dss, "CPU", stats.getDataSource(cpu.getID(), MSP430.MODE_ACTIVE));
}