ChartDirector 7.0 (Python Edition)

XYChart.addScatterLayer


Usage

addScatterLayer(xData, yData [, name [, symbol [, symbolSize [, fillColor [, edgeColor ]]]]])

Description

Adds a scatter chart layer to the XYChart.

A scatter chart can be considered as a special configuration of a line chart, in the data symbols are enabled and the line width is set to zero. Therefore only the data symbols are visible and the chart appears as scattered.

Arguments

ArgumentDefaultDescription
xData(Mandatory)An array of numbers representing the x values of the data points. If no explicit x coordinates are used in the chart (eg. using an enumerated x-axis), an empty array may be used for this argument.
yData(Mandatory)An array of numbers representing the y values of the data points.
name""The name of the data set. The name will be used in the legend box, if one is available. An empty string means the data set has no name.
symbolSquareShapeOne of the predefined symbol constants to specify the symbol to use. (See Shape Specification for available built-in shapes.)
symbolSize5The size of the symbol in pixels. By default, the width and height will be of the same size. If you want to use different size for width and height, you can pass the width and height to pychartdir.xySize and use the return value as the size.
fillColor-1The color used to fill the symbol. -1 means that the color is automatically selected from the palette.
edgeColor-1The edge color used to draw the edge of the symbol. -1 means using LineColor as the edge color.

Return Value

A ScatterLayer object representing the scatter layer created.