new Pie()
- Source:
A Pie chart is a circular statistical graphic, which is divided into slices to illustrate numerical proportion.
Lifecycle functions include:
- BeforeInit
- Init
- Render
- AfterInit
Methods
destroy() → {Pie}
- Source:
Destroys the graph: Container and canvas.
Returns:
- Pie instance
- Type
- Pie
generate(input) → {HTMLElement}
- Source:
Since we dont have the concept of z-index in visualization, the order of rendering should be following:
- SVG container
- Legend
- Data [In our case we have load and unload]
Parameters:
Name | Type | Description |
---|---|---|
input |
object | Input JSON |
Returns:
d3 selection node of svg.
- Type
- HTMLElement
loadContent(input) → {Pie}
- Source:
Loads the content onto the graph. The content serves as a 1to1 relationship. For rendering multiple data sets respective number of content needs to be provided.
Parameters:
Name | Type | Description |
---|---|---|
input |
object | Array | Pie content |
Returns:
- Pie instance
- Type
- Pie
resize() → {Pie}
- Source:
Resizes the graph canvas. Uses the clipPath def.
Returns:
- Pie instance
- Type
- Pie
unloadContent(input) → {Pie}
- Source:
Unloads the content from the graph. The content serves as a 1to1 relationship. For rendering multiple data sets respective number of content needs to be provided.
Parameters:
Name | Type | Description |
---|---|---|
input |
object | Pie content to be removed |
Returns:
- Pie instance
- Type
- Pie