Methods
(inner) buildAxisLabel(group, label, charLimit) → {Array}
- Source:
Returns the d3 html element after appending axis label text
Parameters:
Name | Type | Description |
---|---|---|
group |
Array | d3 html element |
label |
string | Label text |
charLimit |
number | character limit of label with respect to axis size |
Returns:
d3 html element
- Type
- Array
(inner) formatLabel(label, charLimit) → {string}
- Source:
Checks if the Axis label needs to be truncated and returns the truncated value
Parameters:
Name | Type | Description |
---|---|---|
label |
string | Axis label display property |
charLimit |
number | label character limit on axis |
Returns:
if more than character limit then truncates, normal label otherwise
- Type
- string
(inner) isValidAxisType(x, xAxisType) → {boolean}
- Source:
Checks if provided input has valid axis type
Parameters:
Name | Type | Description |
---|---|---|
x |
string | input x value |
xAxisType |
string | x axis type |
Returns:
- returns true if valid, false if invalid
- Type
- boolean
(inner) prepareHorizontalAxis(scale, tickValues, config, orientationopt) → {object}
- Source:
Helper function to Create the axis using the scale provided for X Axis using d3 svg axis.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
scale |
object | d3 scale calculated using domain and range |
|
tickValues |
Array | Array of values that represent the tick values |
|
config |
object | config object derived from input JSON |
|
orientation |
string |
<optional> |
Axis orientation |
Returns:
- d3 Object which forms the axis scale
- Type
- object