ZoomCharts Documentation
ZoomCharts.Configuration.ItemsChartSettingsCustomShape
If display attribute is "customShape", SettingsCustomShape are required to determine how to render the custom shape
Methods
Properties
When drawing links/arrows to the shape it may be desirable to determine the point where the arrow reaches and touches the respective shape. Given the start point of the ray, this function should return the distance to the outer border of the shape
Parameters
radius
width
the ray towards shape
the ray towards shape
Return value
the distance from the shape center to the outer border of the shape
Function to test if hover action was over the respective shape. The function will be called in the context of the appropriate INode (i.e. "this"=INode).
Parameters
X coordinate of the hit test
Y coordinate of the hit test
Node scalign factor
Previous closest distance.
Return value
Method performed on update (such as hover). The function will be called in the context of the appropriate INode (i.e. "this"=INode).
Parameters
The canvas on which the node will be rendered
The node radius radius, also available as "this.radius"
Return value
Function to render the custom shape in canvas 2d context. The function will be called in the context of the appropriate INode (i.e. "this"=INode).
Parameters
The canvas 2d rendering context for rendering
The X value of the center coordinate, where node needs to be rendered
The Y value of the center coordinate where the node needs to be rendered
Half of the width of the node
Half of the height of the node
Image of the node, if any.
Whether or not to paint details (image, label). When the node is zoomed out far enough, the details aren't painted.
Function to render the selection shape for custom shape in canvas 2d context. The function will be called in the context of the appropriate INode (i.e. "this"=INode).
Parameters
The canvas 2d rendering context for rendering
The X value of the center coordinate, where node needs to be rendered
The Y value of the center coordinate where the node needs to be rendered
Half of the width of the node
Half of the height of the node