class anychart.core.graph.elements.Layout Improve this Doc
Extends: anychart.core.Base
Graph chart layout class.
Methods Overview
Miscellaneous | |
iterationCount() | iteration count setting. |
type() | layout type setting. |
Methods Description
iterationCount
Returns:
number - iteration count See listing
var iterationCount = chart.layout().iterationCount();
Try it:
Detailed description
Iteration count for force layout.
Note: If you have graph chart with small count of edges and nodes you can try decrease iteration count number.
Note: Increase of this param increase chart rendering time too.
Note: If you have graph chart with small count of edges and nodes you can try decrease iteration count number.
Note: Increase of this param increase chart rendering time too.
Params:
Name | Type | Default | Description |
---|---|---|---|
value | number | 500 | Iteration count |
Returns:
anychart.core.graph.elements.Layout - Self instance for method chaining. See listing
chart.layout().iterationCount(0); //Now nodes place radially
Try it:
type
Returns:
anychart.enums.layoutType - Layout type See listing
var layoutType = chart.layout().type(); Getter for layout type.
Try it:
Setter for layout type.
Detailed description
All unknown type will fallback to 'forced'
Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.enums.layoutType | string | 'forced' | Layout type |
Returns:
anychart.core.graph.elements.Layout - Self instance for method chaining. See listing
chart.layout().type('fixed'); //Chart now takes coordinates for nodes from data.
Try it: