Class: SVGDrawer

bcdui.component.chart. SVGDrawer

A SVG drawer, drawing basic geometries

abstractnew bcdui.component.chart.SVGDrawer(args)

Name Type Description
args Object Parameter object
Name Type Default Description
doc DomDocument Document for creating the SVG drawing
scale Object {x:1,y:1} optional Default is no scaling { x: 1, y: 1}
transform Object optional Default is no shifting { x: 0, y: 0 }
createToolTipCb function optional Call back getting the source element, returning the tool tip HTML
addAttr Object optional A set of additional string attributes to be attached to the root element
Deprecated
  • Yes

Extends

Methods

Draw a SVG arc
Name Type Description
args Object Parameter object
Name Type Default Description
x number Center
y number Center
radius number Radius
start number Start
end number End
effect string optional An effect to be used for areas. Possible values: linearGradient, radialPlate, linearRound, linearPlate
percWidth number optional Inner radius
rgb string "black" optional Fill color
stroke string "black" optional Border color
isFilled boolean false optional Fill area
onClick function optional On click callback
addAttr Object optional A set of additional string attributes to be attached to the root element
Draw a SVG box
Name Type Description
args Object Parameter object
Name Type Default Description
x number Left
y number Top
width number Width
height number Height
effect string optional An effect to be used for areas. Possible values: linearGradient, radialPlate, linearRound, linearPlate
rgb string "black" optional Color
isFilled boolean false optional Fill area
onClick function optional On click callback
addAttr Object optional A set of additional string attributes to be attached to the root element
Draw a SVG circle
Name Type Description
args Object Parameter object
Name Type Default Description
x number Center
y number Center
radius number Radius
effect string optional An effect to be used for areas. Possible values: linearGradient, radialPlate, linearRound, linearPlate
rgb string "black" optional Color
isFilled boolean false optional Fill area
onClick function optional On click callback
addAttr Object optional A set of additional string attributes to be attached to the root element
Returns the a DOM element containing the SVG drawing
Returns:
Type Description
DomElement Returns the a DOM element containing the VML or SVG drawing
Draw an SVG image element
Name Type Description
args Object Parameter object
Name Type Description
x number Left
y number Top
width number Width
height number Height
href string optional The image
onClick function optional On click callback
addAttr Object optional A set of additional string attributes to be attached to the root element
Draw a SVG line
Name Type Description
args Object Parameter object
Name Type Default Description
points Array.<Array.<number>> 2 dimensional array with x,y points, args.points[0][0] being the first one
effect string optional An effect to be used for areas. Possible values: linearGradient, radialPlate, linearRound, linearPlate
rgb string "black" optional Line color
width number 1 optional Line width
isFilled boolean false optional Fill area
onClick function optional On click callback
addAttr Object optional A set of additional string attributes to be attached to the root element
Set transform and scale
Name Type Description
args Object parameter Object
Name Type Default Description
scale Object {x:1,y:1} optional Default is no scaling \{ x: 1, y: 1\}
transform Object optional Default is no shifting \{ x: 0, y: 0 \}
Draw a SVG text
Name Type Description
args Object Parameter object
Name Type Description
x number Position
y number Position
text string The text
cssClass string optional A css class to be used
align string optional Possible values middle, end
layoutFlow string optional A css value lie vertical-ideographic