# Chart Area

Work with DsExcel to configure the chart area style by changing its font, format, and other attributes and set the chart area format in your worksheet.

## Content

In DsExcel Java, you can use the methods of the [IChartArea](/document-solutions/java-excel-api/api/online/com/grapecity/documents/excel/drawing/IChartArea.html) interface in order to set up the chart area as per your preferences.
You can work with Chart Area in the following ways:

* [Configure Chart Area Style](/document-solutions/java-excel-api/docs/online/Features/UseChart/ConfigureChart/ChartArea#configure-chart-area-style)
* [Set Chart Area Format](/document-solutions/java-excel-api/docs/online/Features/UseChart/ConfigureChart/ChartArea#set-chart-area-format)

## Configure Chart Area Style

You can configure the chart area style by changing its font, format and other attributes using the [getFont](/document-solutions/java-excel-api/api/online/com/grapecity/documents/excel/drawing/IChartArea.html#getFont) method, [getFormat](/document-solutions/java-excel-api/api/online/com/grapecity/documents/excel/drawing/IChartArea.html#getFormat) method and [setRoundedCorners](/document-solutions/java-excel-api/api/online/com/grapecity/documents/excel/drawing/IChartArea.html#setRoundedCorners) method of the [IChartArea](/document-solutions/java-excel-api/api/online/com/grapecity/documents/excel/drawing/IChartArea.html) interface.
To configure chart area style in your worksheet, refer to the following example code.

```Java
// Configure chart area style
IShape shape = worksheet.getShapes().addChart(ChartType.ColumnClustered, 250, 20, 360, 230);
worksheet.getRange("A1:D6").setValue(
        new Object[][] { { null, "S1", "S2", "S3" }, { "Item1", 10, 25, 25 }, { "Item2", -51, -36, 27 },
                { "Item3", 52, -85, -30 }, { "Item4", 22, 65, 65 }, { "Item5", 23, 69, 69 } });
shape.getChart().getSeriesCollection().add(worksheet.getRange("A1:D6"), RowCol.Columns, true, true);
IChartArea chartarea = shape.getChart().getChartArea();
        
// Font
chartarea.getFont().getColor().setRGB(Color.GetMediumSeaGreen());
chartarea.getFont().setName("Times New Roman");
chartarea.getFont().setSize(12);
        
// Rounded corners.
chartarea.setRoundedCorners(true);
```

## Set Chart Area Format

To set chart area format in your worksheet, refer to the following example code.

```Java
chartarea.getFormat().getFill().getColor().setRGB(Color.GetLightGray());
chartarea.getFormat().getLine().getColor().setRGB(Color.GetMediumSeaGreen());
chartarea.getFormat().getLine().setWeight(1.5);
```

![](https://cdn.mescius.io/document-site-files/images/dd59ea42-cd61-4fa6-a018-6231c2a9c598/images/chart-area-style.png)