Row

Row Chart reusable API class that renders a simple and configurable row chart.
Description:
  • Row Chart reusable API class that renders a simple and configurable row chart.
Source:
Tutorials:
  • Tutorial: row
Example
var rowChart = row();

rowChart
    .height(500)
    .width(800);

d3Select('.css-selector')
    .datum(dataset)
    .call(rowChart);

(require("Row"))(_selection, _data)

Description:
  • This function creates the graph using the selection as container
Source:
Parameters:
Name Type Description
_selection D3Selection A d3 selection that represents the container(s) where the chart(s) will be rendered
_data RowChartData The data to attach and generate the chart

Requires

  • module:d3-array,

Methods

module:Row(_selection, _data)

Description:
  • This function creates the graph using the selection as container
Source:
Parameters:
Name Type Description
_selection D3Selection A d3 selection that represents the container(s) where the chart(s) will be rendered
_data RowChartData The data to attach and generate the chart

(static) ariaDescription(_xopt) → {String|module}

Description:
  • Sets the accessible description announced for the chart.
Source:
Parameters:
Name Type Attributes Description
_x String <optional>
Description rendered in the SVG desc
Returns:
Current description or the chart for chaining
Type
String | module

(static) ariaLabel(_xopt) → {String|module}

Description:
  • Sets the accessible name announced for the chart.
Source:
Parameters:
Name Type Attributes Description
_x String <optional>
Label rendered in the SVG title
Returns:
Current label or the chart for chaining
Type
String | module

(static) autoResize(_xopt) → {Boolean|module}

Description:
  • Redraw when the parent container changes size.
Source:
Parameters:
Name Type Attributes Description
_x Boolean <optional>
true to follow the container with a ResizeObserver
Returns:
Current flag or the chart for chaining
Type
Boolean | module

(static) backgroundColor(_x) → {string}

Description:
  • Gets or Sets the background color of a row in the chart
Source:
Parameters:
Name Type Description
_x string desired color of the bar bg in hex
Returns:
current color
Type
string

(static) colorSchema(_x) → {colorSchema|module}

Description:
  • Gets or Sets the colorSchema of the chart
Source:
Parameters:
Name Type Description
_x Array.<String> Desired colorSchema for the graph
Returns:
Current colorSchema or Chart module to chain calls
Type
colorSchema | module

(static) downArrowColor(_x) → {string}

Description:
  • Gets or Sets the down arrow color of a row in the chart
Source:
Parameters:
Name Type Description
_x string desired color of the bar bg in hex
Returns:
current color
Type
string

(static) enableLabels(_xopt) → {Boolean|module}

Description:
  • If true, adds labels at the end of the rows
Source:
Parameters:
Name Type Attributes Default Description
_x Boolean <optional>
false
Returns:
Current value of enableLabels or Chart module to chain calls
Type
Boolean | module

(static) enableYAxisRight(_xopt) → {Boolean|module}

Description:
  • If true, adds right axis with the delta change
Source:
Parameters:
Name Type Attributes Default Description
_x Boolean <optional>
false
Returns:
Current value of enableYAxisRight or Chart module to chain calls
Type
Boolean | module

(static) exportChart(filename, title)

Description:
  • Chart exported to png and a download action is fired
Source:
Parameters:
Name Type Description
filename String File title for the resulting picture
title String Title to add at the top of the exported picture

(static) height(_x) → {height|module}

Description:
  • Gets or Sets the height of the chart
Source:
Parameters:
Name Type Description
_x number Desired width for the graph
Returns:
Current height or Chart module to chain calls
Type
height | module

(static) isAnimated(_x) → {isAnimated|module}

Description:
  • Gets or Sets the isAnimated property of the chart, making it to animate when render. By default this is 'false'
Source:
Parameters:
Name Type Description
_x Boolean Desired animation flag
Returns:
Current isAnimated flag or Chart module
Type
isAnimated | module

(static) isPrintMode(_x) → {boolean|module}

Description:
  • Gets or Sets whether the chart should show the expand toggles/eyeball
Source:
Parameters:
Name Type Description
_x boolean Should we show the expand toggles?
Returns:
do we expand toggles
Type
boolean | module

(static) labelsFocusTitle(_x) → {String|module}

Description:
  • Gets or Sets the labelsFocusTitle of the chart
Source:
Parameters:
Name Type Description
_x String Desired labelsFocusTitle for the graph
Returns:
Current labelsFocusTitle or Chart module to chain calls
Type
String | module

(static) labelsInterval(_x) → {labelsInterval|module}

Description:
  • Gets or Sets the labelsInterval of the chart
Source:
Parameters:
Name Type Description
_x String Desired labelsInterval for the graph, month, year, etc
Returns:
Current labelsInterval or Chart module to chain calls
Type
labelsInterval | module

(static) labelsMargin(_xopt) → {number|module}

Description:
  • Offset between end of row and start of the percentage rows
Source:
Parameters:
Name Type Attributes Default Description
_x number <optional>
7 margin offset from end of row
Returns:
Current offset or Chart module to chain calls
Type
number | module

(static) labelsNumberFormat(_xopt) → {string|module}

Description:
  • Gets or Sets the labels number format
Source:
Parameters:
Name Type Attributes Default Description
_x string <optional>
",f" desired label number format for the row chart
Returns:
Current labelsNumberFormat or Chart module to chain calls
Type
string | module

(static) labelsSize(_xopt) → {number|module}

Description:
  • Get or Sets the labels text size
Source:
Parameters:
Name Type Attributes Default Description
_x number <optional>
12 label font size
Returns:
Current text size or Chart module to chain calls
Type
number | module

(static) labelsSizeChild(_xopt) → {number|module}

Description:
  • Get or Sets the labels text size for child rows
Source:
Parameters:
Name Type Attributes Default Description
_x number <optional>
12 label font size
Returns:
Current text size or Chart module to chain calls
Type
number | module

(static) labelsSuffix(_xopt) → {string|module}

Description:
  • Gets or Sets the labelsSuffix format
Source:
Parameters:
Name Type Attributes Default Description
_x string <optional>
"" desired suffix. Complaint(s)
Returns:
Current labelsSuffix or Chart module to chain calls
Type
string | module

(static) labelsTotalCount(_x) → {String|module}

Description:
  • Gets or Sets the labelsTotalCount of the chart the count Total complaints NNNN
Source:
Parameters:
Name Type Description
_x String Desired labelsTotalCount for the graph
Returns:
Current labelsTotalCount or Chart module to chain calls
Type
String | module

(static) labelsTotalText(_x) → {String|module}

Description:
  • Gets or Sets the labelsTotalText of the chart. label that goes in front of the total count Total complaints XXXXXX
Source:
Parameters:
Name Type Description
_x String Desired labelsTotalText for the graph
Returns:
Current labelsTotalText or Chart module to chain calls
Type
String | module

(static) loadingState(markup) → {loadingState|module}

Description:
  • Gets or Sets the loading state of the chart
Source:
Parameters:
Name Type Description
markup string Desired markup to show when null data
Returns:
Current loading state markup or Chart module to chain calls
Type
loadingState | module

(static) margin(_x) → {margin|module}

Description:
  • Gets or Sets the margin of the chart
Source:
Parameters:
Name Type Description
_x object Margin object to get/set
Returns:
Current margin or Chart module to chain calls
Type
margin | module

(static) nameLabel(_x) → {nameLabel|module}

Description:
  • Gets or Sets the nameLabel of the chart
Source:
Parameters:
Name Type Description
_x Number Desired nameLabel for the graph
Returns:
Current nameLabel or Chart module to chain calls
Type
nameLabel | module

(static) numberFormat(_x) → {numberFormat|module}

Description:
  • Gets or Sets the number format of the row chart
Source:
Parameters:
Name Type Description
_x string Desired number format for the row chart
Returns:
Current numberFormat or Chart module to chain calls
Type
numberFormat | module

(static) on() → {module}

Description:
  • Exposes an 'on' method that acts as a bridge with the event dispatcher We are going to expose this events: customMouseOver, customMouseMove, customMouseOut, and customClick
Source:
Returns:
Row Chart
Type
module

(static) outerPadding(_x) → {valueLabel|module}

Description:
  • Gets or Sets the outerPadding of the chart
Source:
Parameters:
Name Type Description
_x Number Desired pctChangeLabel for the graph
Returns:
Current pctChangeLabel or Chart module to chain calls
Type
valueLabel | module

(static) padding(_x) → {valueLabel|module}

Description:
  • Gets or Sets the padding of the chart
Source:
Parameters:
Name Type Description
_x Number Desired pctChangeLabel for the graph
Returns:
Current pctChangeLabel or Chart module to chain calls
Type
valueLabel | module

(static) paddingBetweenGroups(_x) → {valueLabel|module}

Description:
  • Gets or Sets the paddingBetweenGroups of the chart to give it a bigger or smaller gap
Source:
Parameters:
Name Type Description
_x Number Desired pctChangeLabel for the graph
Returns:
Current pctChangeLabel or Chart module to chain calls
Type
valueLabel | module

(static) pctChangeLabel(_x) → {String|module}

Description:
  • Gets or Sets the pctChangeLabel of the chart
Source:
Parameters:
Name Type Description
_x String Desired pctChangeLabel for the graph
Returns:
Current pctChangeLabel or Chart module to chain calls
Type
String | module

(static) pctChangeLabelSize(_xopt) → {number|module}

Description:
  • Get or Sets the labels text size for the percentages
Source:
Parameters:
Name Type Attributes Default Description
_x number <optional>
12 label font size
Returns:
Current text size or Chart module to chain calls
Type
number | module

(static) percentageAxisToMaxRatio(_x) → {ratio|module}

Description:
  • Configurable extension of the x axis if your max point was 50% you might want to show x axis to 60%, pass 1.2
Source:
Parameters:
Name Type Description
_x number ratio to max data point to add to the x axis
Returns:
Current ratio or Chart module to chain calls
Type
ratio | module

(static) upArrowColor(_x) → {string}

Description:
  • Gets or Sets the up arrow color of a row in the chart
Source:
Parameters:
Name Type Description
_x string desired color of the bar bg in hex
Returns:
current color
Type
string

(static) valueLabel(_x) → {String|module}

Description:
  • Gets or Sets the valueLabel of the chart
Source:
Parameters:
Name Type Description
_x String Desired valueLabel for the graph
Returns:
Current valueLabel or Chart module to chain calls
Type
String | module

(static) width(_x) → {width|module}

Description:
  • Gets or Sets the width of the chart
Source:
Parameters:
Name Type Description
_x number Desired width for the graph
Returns:
Current width or Chart module to chain calls
Type
width | module

(static) wrapLabels(_x) → {boolean|module}

Description:
  • Gets or Sets whether we need to wrap labels. In some instances we want to manually do this after chart is rendered there is an issue in React where we cannot find the width of the bounding box until the chart is finished added to the DOM (Default is true)
Source:
Parameters:
Name Type Description
_x boolean Whether to wrap labels or not
Returns:
Current wrapLabels or Chart module to chain calls
Type
boolean | module

(static) xTicks(_x) → {Number|module}

Description:
  • Gets or Sets the number of ticks of the x axis on the chart (Default is 5)
Source:
Parameters:
Name Type Description
_x Number Desired horizontal ticks
Returns:
Current xTicks or Chart module to chain calls
Type
Number | module

(static) yAxisLineWrapLimit(_x) → {Number|module}

Description:
  • Gets or Sets the yAxisLineWrapLimit of the chart, default 2
Source:
Parameters:
Name Type Description
_x Number Desired yAxisLineWrapLimit for the graph
Returns:
Current valueLabel or Chart module to chain calls
Type
Number | module

(static) yAxisPaddingBetweenChart(_x) → {Number|module}

Description:
  • Space between y axis and chart (Default 10)
Source:
Parameters:
Name Type Description
_x Number Space between y axis and chart
Returns:
Current value of yAxisPaddingBetweenChart or Chart module to chain calls
Type
Number | module

(static) yTicks(_x) → {Number|module}

Description:
  • Gets or Sets the number of vertical ticks on the chart (Default is 6)
Source:
Parameters:
Name Type Description
_x Number Desired number of vertical ticks for the graph
Returns:
Current yTicks or Chart module to chain calls
Type
Number | module