Canvas Interface

class epyk.interfaces.graphs.CompChartsCanvas.Canvas(ui)
new(height: Optional[Union[tuple, int, str]] = (400, 'px'), width: Optional[Union[tuple, int, str]] = (100, '%'), profile: Optional[Union[bool, dict]] = None, options: Optional[Union[bool, dict]] = None, html_code: Optional[str] = None)

The HTML <canvas> tag is used to draw graphics, on the fly, via scripting (usually JavaScript).

However, the <canvas> element has no drawing abilities of its own (it is only a container for graphics) - you must use a script to actually draw the graphics.

The getContext() method returns an object that provides methods and properties for drawing on the canvas.

This reference will cover the properties and methods of the getContext(“2d”) object, which can be used to draw text, lines, boxes, circles, and more - on the canvas

Tags:

Categories:

Related Pages:

Usage:

:param width: Optional. A tuple with the integer for the component width and its unit
:param height: Optional. A tuple with the integer for the component height and its unit
:param html_code: Optional. An identifier for this component (on both Python and Javascript side)
:param profile: Optional. A flag to set the component performance storage
:param options: Optional. Specific Python options available for this component
:param html_code: Optional. An identifier for this component (on both Python and Javascript side)