RadarChartView Class
Contains settings that apply to radar series in a chart view.
Declaration
public class RadarChartView extends ColorfulChartView
Remarks
When you add a RadarSeries object to a chart, the chart creates a RadarChartView object for the series. Call the Chart.getViews() method to access chart views.
Call the setStyle(RadarChartStyle value) method to specify the radar chart style.
Refer to the following help topic for additional information: Create Standard Charts — Presentation API for Java.
Example
Create a Filled Radar Chart
The following code snippet creates a filled radar chart that compares two products and displays a data label for one data point:
import java.io.*;
import java.nio.file.*;
import java.util.List;
import com.devexpress.docs.office.*;
import com.devexpress.docs.presentation.*;
public class Main {
public static void main(String[] args) throws Exception {
try (Presentation presentation = new Presentation()) {
// Add a blank slide.
presentation.getSlides().clear();
Slide slide = new Slide(SlideLayoutType.BLANK);
presentation.getSlides().add(slide);
// Insert a chart that fills the slide.
Chart chart = new Chart();
chart.setWidth(presentation.getSlideSize().getWidth());
chart.setHeight(presentation.getSlideSize().getHeight());
slide.getShapes().add(chart);
// Add a radar series for each product.
String[] names = { "Product A", "Product B" };
double[][] scores = { { 8, 6, 9, 5, 7 }, { 6, 9, 5, 8, 6 } };
for (int i = 0; i < names.length; i++) {
RadarSeries series = new RadarSeries();
series.setText(names[i]);
series.setArguments(new ChartStringData(List.of("Price", "Quality", "Design", "Support", "Delivery")));
series.setValues(new ChartNumericData(List.of(scores[i][0], scores[i][1], scores[i][2], scores[i][3], scores[i][4])));
chart.getSeries().add(series);
}
// Display series as filled areas.
RadarChartView view = (RadarChartView) chart.getViews().get(0);
view.setStyle(RadarChartStyle.FILLED);
// Display the Design score of the first product.
RadarDataLabel label = new RadarDataLabel();
label.setShowValue(true);
RadarSeries firstSeries = (RadarSeries) chart.getSeries().get(0);
firstSeries.getDataLabels().setLabel(2, label);
// Save the presentation.
Files.createDirectories(Path.of("output"));
try (OutputStream output = Files.newOutputStream(Path.of("output", "Chart.pptx"))) {
presentation.save(output);
}
}
}
}
The following screenshot illustrates the result:

Inherited Members
Inheritance
RadarChartView()
Initializes a new instance of the RadarChartView class.
Declaration
public RadarChartView()
Methods
getChartType() Method
Returns the chart type of the view.
Declaration
public ChartType getChartType()
Returns
| Type | Description |
|---|---|
| ChartType |
|
getStyle() Method
Returns the radar chart style.
Declaration
public RadarChartStyle getStyle()
Returns
| Type | Description |
|---|---|
| RadarChartStyle | The radar chart style. |
setStyle(RadarChartStyle value) Method
Sets the radar chart style.
Declaration
public void setStyle(RadarChartStyle value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | RadarChartStyle | The radar chart style. |
Exceptions
| Type | Description |
|---|---|
| NullPointerException | Thrown if the |
Remarks
The setStyle(value) method accepts the following values:
| Value | Description |
|---|---|
| MARKER | Indicates that the radar chart displays series as lines with markers. |
| FILLED | Indicates that the radar chart displays series as filled areas. |
If you do not call the setStyle(value) method, the API uses RadarChartStyle.MARKER.