com.aspose.words
Class MarkerSymbol

java.lang.Object
    extended by com.aspose.words.MarkerSymbol

public class MarkerSymbol 
extends java.lang.Object

Utility class containing constants. Specifies marker symbol style.

Example:

Shows how to customize chart data points.
@Test
public void chartDataPoint() throws Exception {
    Document doc = new Document();
    DocumentBuilder builder = new DocumentBuilder(doc);

    // Add a line chart, which will have default data that we will use
    Shape shape = builder.insertChart(ChartType.LINE, 500.0, 350.0);
    Chart chart = shape.getChart();

    // Apply diamond-shaped data points to the line of the first series
    for (ChartSeries series : chart.getSeries()) {
        applyDataPoints(series, 4, MarkerSymbol.DIAMOND, 15);
    }

    // We can further decorate a series line by smoothing it
    chart.getSeries().get(0).setSmooth(true);

    // Get the enumerator for the data point collection from one series
    Iterator<ChartDataPoint> enumerator = chart.getSeries().get(0).getDataPoints().iterator();

    // And use it to go over all the data labels in one series and change their separator
    while (enumerator.hasNext()) {
        Assert.assertFalse(enumerator.next().getInvertIfNegative());
    }

    // If the chart looks too busy, we can remove data points one by one
    chart.getSeries().get(1).getDataPoints().removeAt(2);

    // We can also clear an entire data point collection for one whole series
    chart.getSeries().get(2).getDataPoints().clear();

    doc.save(getArtifactsDir() + "Charts.ChartDataPoint.docx");
}

/// <summary>
/// Applies a number of data points to a series
/// </summary>
private void applyDataPoints(ChartSeries series, int dataPointsCount, /*MarkerSymbol*/int markerSymbol, int dataPointSize) {
    for (int i = 0; i < dataPointsCount; i++) {
        ChartDataPoint point = series.getDataPoints().add(i);
        point.getMarker().setSymbol(markerSymbol);
        point.getMarker().setSize(dataPointSize);

        Assert.assertEquals(point.getIndex(), i);
    }
}

Field Summary
static final intDEFAULT = 0
           Specifies a default marker symbol shall be drawn at each data point.
static final intCIRCLE = 1
           Specifies a circle shall be drawn at each data point.
static final intDASH = 2
           Specifies a dash shall be drawn at each data point.
static final intDIAMOND = 3
           Specifies a diamond shall be drawn at each data point.
static final intDOT = 4
           Specifies a dot shall be drawn at each data point.
static final intNONE = 5
           Specifies nothing shall be drawn at each data point.
static final intPICTURE = 6
           Specifies a picture shall be drawn at each data point.
static final intPLUS = 7
           Specifies a plus shall be drawn at each data point.
static final intSQUARE = 8
           Specifies a square shall be drawn at each data point.
static final intSTAR = 9
           Specifies a star shall be drawn at each data point.
static final intTRIANGLE = 10
           Specifies a triangle shall be drawn at each data point.
static final intX = 11
           Specifies an X shall be drawn at each data point.
 

Field Detail

DEFAULT = 0

public static final int DEFAULT
Specifies a default marker symbol shall be drawn at each data point.

CIRCLE = 1

public static final int CIRCLE
Specifies a circle shall be drawn at each data point.

DASH = 2

public static final int DASH
Specifies a dash shall be drawn at each data point.

DIAMOND = 3

public static final int DIAMOND
Specifies a diamond shall be drawn at each data point.

DOT = 4

public static final int DOT
Specifies a dot shall be drawn at each data point.

NONE = 5

public static final int NONE
Specifies nothing shall be drawn at each data point.

PICTURE = 6

public static final int PICTURE
Specifies a picture shall be drawn at each data point.

PLUS = 7

public static final int PLUS
Specifies a plus shall be drawn at each data point.

SQUARE = 8

public static final int SQUARE
Specifies a square shall be drawn at each data point.

STAR = 9

public static final int STAR
Specifies a star shall be drawn at each data point.

TRIANGLE = 10

public static final int TRIANGLE
Specifies a triangle shall be drawn at each data point.

X = 11

public static final int X
Specifies an X shall be drawn at each data point.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.