Réserver une Démo

SVP notez : Cette page d’aide n’est pas pour la dernière version d’Enterprise Architect. La dernière aide peut être trouvée ici.

Pré. Proc.

Chart Class

The Chart Class is the primary interface for Chart elements; it is used to create a series, add datapoints to a series and configure the chart appearance.

Chart Attributes

Attribute

Description

See also

Title

String

Notes: Read/Write

The title of the chart.

Category

ChartCategory

Notes: Read only

The chart category; provided in the SetChartType method.

ChartCategory

Type

ChartType

Notes: Read only

The chart type; provided in the SetChartType method.

ChartType

Chart Methods

Method

Description

See also

AddChartDataYXZ(double Y, double X, double Z, long seriesIndex)

long

Adds a datapoint to an existing series.

Parameters:

  • Y: double, the primary Y axis value
  • X: double, the primary X axis value
  • Z: double, the primary Z axis value
  • seriesIndex: long, the index of the series (returned by the CreateSeries methods)

AddChartDataYY1(string category, double Y, double Y1, long seriesIndex)

long

Adds a datapoint to an existing series.

Parameters:

  • category: string - the x axis group, column or label
  • Y: double, the primary Y axis value
  • Y1: double, the secondary Y axis value
  • seriesIndex: long, the index of the series (returned by the CreateSeries and CreateSeriesEx methods)

CreateSeries(string name)

LDISPATCH

Adds a new series to the chart. Returns an interface that can be used to add data to the series and configure its appearance.

Parameters:

  • name: string, the displayed name of the series

CreateSeriesEx(string name, long color, ChartType type, ChartCategory category)

LDISPATCH

Creates a series of a particular chart category and type and returns an IChartSeries interface. This allows charts to form multiple series in various ways. The CombinedCharts in the EAExample Model are an example of this, displaying three series for the Area, Column and Line categories respectively.

Parameters:

  • name: string, the name of the series
  • color: long, RGB color value,-1 for default
  • type: ChartType, one of the ChartType enumerations
  • category: ChartCategory, one of the ChartCategory enumerations

EnableResizeAxes(boolean bEnable)

void

Grants or denies the ability to resize axes.

Parameters:

  • bEnable: boolean

GetChartAxis(ChartAxisType type)

LDISPATCH

Returns an IChartAxis interface for the specified axis.

Parameters:

  • type: ChartAxisType, one of the ChartAxisType enumerations
ChartAxisType

GetDiagram3D()

LDISPATCH

Returns an IChartDiagram interface that can be used to specify the rendering engine; Software or OpenGL.

GetSeries(long index)

LDISPATCH

Returns an IChartSeries interface for the given index. Indices for series begin at zero.

Parameters:

  • index: long

GetSeriesCount()

long

Returns the number of series represented by the chart.

Redraw()

void

Redraws the chart.

SetChartType(ChartType type, ChartCategory category, boolean bRedraw, boolean bResizeAxis)

void

This is typically the first call made on the Chart interface. It defines the style and appearance of the Chart when it is rendered.

Parameters:

  • type: ChartType
  • category: ChartCategory
  • bRedraw: Boolean
  • bResizeAxis: Boolean

SetCurveType(ChartCurveType type)

void

Sets the interpolation method of drawing the curve.

Parameters:

  • type: ChartCurveType, one of the ChartCurveType enumerations, such as Line, Spline or SplineHermite.

SetSeriesShadow(boolean bShow)

void

Displays or hides shadows on series.

Parameters:

  • bShow: Boolean

SetThemeOpacity(long percentage)

void

Sets the opacity of the chart.

Parameters:

  • percentage: long, chart transparency as a percentage

ShowAxis(long index)

void

Shows the axis for the given index.

Parameters:

  • index: long, one of the ChartAxisType enumerations
ChartAxisType

ShowDataLabels(boolean show, boolean border, boolean dropLineTomarker)

void

Shows or hides data labels on the chart.

Parameters:

  • show: Boolean, show or hide labels
  • border: Boolean, show or hide border on labels
  • dropLineTomarker: Boolean, changes position of label with respect to line

ShowDataMarkers(boolean show, long size, ChartmarkerShape shape)

void

Shows or hides data markers on the chart. Also allows setting the appearance of markers.

Parameters:

  • show: Boolean, show or hide markers
  • size: long, size of markers in pixels
  • shape: ChartmarkerShape, one of the ChartmarkerShape enumerations
ChartMarkerShape