Worksheet sheet = _spreadsheet.getSelectedSheet();
if (sheet != null && isValidSelection(selection)) {
if (!sheet.getProtect()) {
int row = selection.getTop();
int col = selection.getLeft();
ChartData data = fillCategoryData(new XSSFBar3DChartData(), selection);
Ranges.range(sheet)
.addChart(getClientAnchor(row, col, 600, 300), data, ChartType.Bar3D, ChartGrouping.STANDARD, LegendPosition.RIGHT);
} else {
showProtectMessage();