Skip to main content

RadarChartStyle Enum

Lists radar chart styles.

Declaration

public enum RadarChartStyle extends Enum<RadarChartStyle> implements IIntEnum

Members

Name Description
FILLED

Indicates that the radar chart displays series as filled areas.

MARKER

Indicates that the radar chart displays series as lines with markers.

fromValue(int value)

Returns the RadarChartStyle enumeration constant with the specified integer value.

getName()

Returns the name of the RadarChartStyle enumeration constant.

getValue()

Returns the integer value of the RadarChartStyle enumeration constant.

toString()

Returns the string representation of the RadarChartStyle enumeration constant.

valueOf(String name)

Returns the RadarChartStyle enumeration constant with the specified name.

values()

Returns an array of all RadarChartStyle enumeration constants.

Remarks

Call the RadarChartView.getStyle() method to get the style of a radar chart. Call the RadarChartView.setStyle(value) method to specify the 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:

 Filled radar chart that compares two products created with the DevExpress Presentation API for Java

Implements

com.devexpress.java.enums.IIntEnum

Inherited Members

java.lang.Enum.<T>valueOf(java.lang.Class<T>,java.lang.String)
java.lang.Enum.clone()
java.lang.Enum.compareTo(E)
java.lang.Enum.describeConstable()
java.lang.Enum.equals(java.lang.Object)
java.lang.Enum.finalize()
java.lang.Enum.getDeclaringClass()
java.lang.Enum.hashCode()
java.lang.Enum.name()
java.lang.Enum.ordinal()
java.lang.Enum.toString()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
java.lang.Enum
RadarChartStyle