ChartDirector 7.0 (Python Edition)

BaseChart.setResource


Usage

setResource(id, img)

Description

Assigns a resource ID to a DrawArea object to allow it to be referenced using a resource path.

Many ChartDirector features, such as BaseChart.setBgImage and the <*img*> tag in CDML, expect a filename for loading an image. The setResource method allows a DrawArea object to be used as the image by assigning it a resource ID. The DrawArea can then be referenced with the special path "@/res_id", in which res_id is the resource ID.

Arguments

ArgumentDefaultDescription
id(Mandatory)The resource ID to be used to reference the DrawArea object.
img(Mandatory)The DrawArea object to be used as a resource.

Return Value

None