Little refactor of ChartController::panelAction