3.0.5src/js/components/mixins/ChartRendererMixin.js
_applySettingsToData
+Our d4 chart renderers expect any additional settings to be in the data
+that is passed to it, so we merge them in (from a separate
+chartSettings object). An optional additional parameter adds an
+arbitray object to this
Current data and series settings
+ +Optional additional object to apply
+ +object
+ :
+ Data with settings applied
+ +src/js/components/mixins/ChartRendererMixin.js
_handleStateUpdate +Update a key in the renderer component's state
+ +this.state key
this.state value
src/js/components/chart-xy/XYRenderer.jsx
XYLabels#_getPrevUndraggedNode +Recursively traverse through previous labels to find one that is undragged +This is used to calculate the default placement of a label (ie to the +right of the previous undragged node)
+ +src/js/components/chart-grid/ChartGrid_xScaleSettings.jsx
object scale
+ :
+ chartProps.scale object of the current chart.
+See this component's PropTypes
function onUpdate
+ :
+ Pass the updated scale back to the parent
+ +string className
+ :
+ CSS class to apply to this component
+ +string stepNumber
+ :
+ Number to display in Editor interface
+ +<ChartGrid_xScaleSettings
+ scale={chartProps.scale}
+ onUpdate={this._handlePropAndReparse.bind(null, "scale")}
+ className="scale-options"
+ key="xScale"
+ stepNumber="4"
+/>
+
+ #_handleDomainUpdate(k, v)
+
+ _handleDomainUpdate
+Update the domain with a new custom maximum or mimimum. Like
+_handleScaleUpdate this passes an updated scale object to the parent
src/js/components/chart-grid/ChartGrid_xScaleSettings.jsx
_handleDomainUpdate
+ Update the domain with a new custom maximum or mimimum. Like
+ _handleScaleUpdate this passes an updated scale object to the parent
+ #_handleScaleUpdate(k, v)
+
+ _handleScaleUpdate
+Apply new values to the scale object and pass it to the parent's callback
src/js/components/chart-grid/ChartGrid_xScaleSettings.jsx
_handleScaleUpdate
+ Apply new values to the scale object and pass it to the parent's callback
string k
+ :
+ New scale property's key
+ +New scale proptery's value
+ +src/js/components/mixins/ChartEditorMixin.js
_handlePropAndReparse +Initiate a flux action that updates a prop and then triggers a reparse
+ +chartProp key
chartProp value
src/js/components/mixins/ChartEditorMixin.js
_handlePropUpdate +Initiate a flux action that updates a prop, that doesn't require reparsing
+ +chartProp key
chartProp value
src/js/components/mixins/ChartEditorMixin.js
_handleStateUpdate +Update a key in the editor component's state
+ +this.state key
this.state value
src/js/components/Chartbuilder.jsx
boolean autosave
+ :
+ Save to localStorage after every change
+ +boolean showMobilePreview
+ :
+ Show mobile preview underneath default chart
+ +function onStateChange
+ :
+ Callback when state is changed
+ +Object additionalComponents
+ :
+ Optional additional React components
+ +string renderedSVGClassName
+ :
+ Optional class name for chart SVG class
+ +var React = require("react");
+var Chartbuilder = require("./components/Chartbuilder.jsx");
+var container = document.querySelector(".chartbuilder-container");
+
+React.render(
+ <Chartbuilder
+ autosave={true}
+ showMobilePreview={true}
+ />,
+container );
+
+ #_onChange
+
+ Function that is fired any time a change is made to a chart. By default it
+fetches the latest chart state from the stores and updates the Chartbuilder
+component with that state. If autosave is set to true, it will also
+update localStorage with the new state.
src/js/components/Chartbuilder.jsx
Function that is fired any time a change is made to a chart. By default it
+ fetches the latest chart state from the stores and updates the Chartbuilder
+ component with that state. If autosave is set to true, it will also
+ update localStorage with the new state.
Global config not specific to a chart type
+ +
+ .breakpoints
+
+ Configuration of breakpoints for Chartbuilder renderers.
+ +src/js/config/chart-breakpoints.js
Configuration of breakpoints for Chartbuilder renderers.
+ +
+ .chart_sizes
+
+ Default dimensions for non-responsive chart sizes.
+ +Default dimensions for non-responsive chart sizes.
+ +
+ .chart_style
+
+ Global style config that is not specific to any one chart type
+ +Global style config that is not specific to any one chart type
+ +
+ .default_input
+
+ Tabular data that is loaded in when Chartbuilder loads initially
+ +src/js/config/default-input.js
Tabular data that is loaded in when Chartbuilder loads initially
+ +src/js/charts/cb-xy/xy-config.js
+ .display
+
+ display
+ +src/js/charts/cb-xy/xy-config.js
display
+ +Nem or number labelRectSize
+ :
+ Size of the legend label rectangle
+ +Nem or number labelXMargin
+ :
+ Horiz distance btwn labels
+ +Nem or number labelTextMargin
+ :
+ Horiz distance btwn label rect and text
+ +Nem or number labelRowHeight
+ :
+ Vert distance btwn rows of labels + items with colors the appropriate indexed CSS class
+ +Nem or number afterTitle
+ :
+ Distance btwn top of title and top of legend or chart
+ +Nem or number afterLegend
+ :
+ Distance btwn top of legend and top of chart
+ +Nem or number blockerRectOffset
+ :
+ Distance btwn text of axis and its background blocker
+ +Nem or number columnPaddingCoefficient
+ :
+ Distance relative to + width that column charts should be from edge of the chart
+ +Nem or number minPaddingOuter
+ :
+ Minimum distance between the + outside of a chart and a graphical element
+ +Nem or number bottomPaddingWithoutFooter
+ :
+ Bottom padding if footer is not drawn
+ +object aspectRatio
+ aspectRatio.wide number or fraction
+ aspectRatio.longSpot number or fraction
+ aspectRatio.smallSpot number or fraction
+ object margin
+ :
+ Distances btwn outer chart elements and container
+ +object padding
+ :
+ Distances btwn inner chart elements and container
+ +
+ .xy_defaultProps
+
+
+ #calculate_xy_dimensions(width, opts)
+
+ src/js/charts/cb-xy/xy-dimensions.js
see ChartConfig#calculateDimensions
+ +
+ #parseXY(config, _chartProps, callback, parseOpts)
+
+ src/js/charts/cb-xy/parse-xy.js
Set up a configuration object for a given chart type
+ +object settings
+ settings.displayName string
+ How this type's name should be displayed in the interface
+settings.parser function
+ Func to parse input for this chart type
+settings.calculateDimensions function
+ Func to calculate dimensions of this chart type
+settings.display object
+ Static display config for this chart type, such as positioning and spacing
+settings.defaultProps object
+ Defaults for dynamic properties that will be used to draw the chart
+
+ #calculateDimensions(width, model, chartConfig, enableResponsive, extraHeight)
+
+ Func that returns an object of {width: N, height: N} that will determine
+dimensions of a chart
Func that returns an object of {width: N, height: N} that will determine
+ dimensions of a chart
number width
+ :
+ Width of container or area that will contain the chart
+ +object model
+ :
+ The chartProps and metadata of the current chart
object chartConfig
+ :
+ Parsed chart configuration
+ +boolean enableResponsive
+ :
+ Should we make dimensions relative to + container or use preset sizes
+ +number extraHeight
+ :
+ Additional height we need to account for, eg + from wrapped text at the footer
+ +Object
+ :
+ dimensions - Dimensions returned by calculation
+ +number
+ :
+ dimensions.width
+ +number
+ :
+ dimension.height
+ +
+ #parser(config, _chartProps, callback, parseOpts)
+
+ Func that parses input and settings to return newly parsed chartProps
Func that parses input and settings to return newly parsed chartProps
object config
+ :
+ The parsed configuration for this chart type
+ +object _chartProps
+ :
+ Previous chartProps
function callback
+ :
+ Function to pass new chartProps to upon parse completion
object parseOpts
+ :
+ Additional parse options
+ +Object
+ :
+ chartProps - Updated chartProps
src/js/charts/cb-chart-grid/chart-grid-config.js
+ .chart_grid_defaultProps
+
+
+ .display
+
+ display
+ +src/js/charts/cb-chart-grid/chart-grid-config.js
display
+ +Nem or number afterTitle
+ :
+ Distance btwn top of title and top of legend or chart
+ +Nem or number afterLegend
+ :
+ Distance btwn top of legend and top of chart
+ +Nem or number blockerRectOffset
+ :
+ Distance btwn text of axis and its background blocker
+ +Nem or number paddingBerBar
+ :
+ Space btwn two bars in a bar grid
+ +Nem or number barHeight
+ :
+ Height of an individual bar in a bar grid
+ +Nem or number afterXYBottom
+ :
+ Vert distance btwn two chart grids that are stacked
+ +Nem or number afterXYRight
+ :
+ Horiz distance btwn two chart grids that are next to each other
+ +Nem or number columnExtraPadding
+ :
+ Extra padding given if a chart grid XY has columns
+ +Nem or number bottomPaddingWithoutFooter
+ :
+ Bottom padding if footer is not drawn
+ +Nem or number bottomPaddingWithoutFooter
+ :
+ Bottom padding if footer is not drawn
+ +object xy
+ :
+ Copy of xy_config.display, used in XY chart grids
object margin
+ :
+ Distances btwn outer chart elements and container
+ +object padding
+ :
+ Distances btwn inner chart elements and container
+ +
+ #chartGridDimensions(width, opts)
+
+ src/js/charts/cb-chart-grid/chart-grid-dimensions.js
see ChartConfig#calculateDimensions
+ +
+ #parseChartgrid(config, _chartProps, callback, parseOpts)
+
+ src/js/charts/cb-chart-grid/parse-chart-grid.js
src/js/components/Chartbuilder.jsx
Function to query Flux stores for all data. Runs whenever the stores are
+updated, usually by the Editor but occassionally by Renderers that allow
+direct editing of the chart, eg draggable legend labels in XYRenderer.jsx
Object
+ :
+ Chartbuilder state
+ +src/js/dispatcher/dispatcher.js
Flux dispatcher handles incoming payloads and sends them to flux stores. +Usually data come from the UI, but can also come from localStorage or a +server
+ +
+ #handleServerAction(action)
+
+ Incoming server action. Normally a localStorage object
+See ./actions/ChartServerActions.js
src/js/dispatcher/dispatcher.js
Incoming server action. Normally a localStorage object
+ See ./actions/ChartServerActions.js
Object action
+ :
+ { eventName: "string", :
+ #handleViewAction(action)
+
+ Incoming view action. Normally comes from a React component.
+See ./actions/ChartPropertiesActions.js
src/js/dispatcher/dispatcher.js
Incoming view action. Normally comes from a React component.
+ See ./actions/ChartPropertiesActions.js
Object action
+ :
+ { eventName: "string", :
src/js/components/mixins/ChartEditorMixin.js
src/js/components/ChartExport.jsx
src/js/components/chart-grid/ChartGridEditor.jsx
src/js/components/ChartMetadata.jsx
Edit a chart's metadata
+ +object metadata
+ :
+ Current metadata
+ +string stepNumber
+ :
+ Step in the editing process
+ +Additional React components.
+Anything passed here will be given a callback that updates the metadata
+field. This is useful for adding custom input fields not provided.
src/js/components/ChartTypeSelector.jsx
Select a new chart type, copying shared settings over to the new type.
+ +src/js/components/shared/DataInput.jsx
src/js/components/shared/DateScaleSettings.jsx
src/js/components/shared/NumericScaleSettings.jsx
Y scale settings for XY charts. Used in both XY and chart grid, and most +likely for future charts as well
+ +src/js/components/shared/ScaleReset.jsx
src/js/components/shared/XY_yScaleSettings.jsx
Y scale settings for XY charts. Used in both XY and chart grid, and most +likely for future charts as well
+ +src/js/components/chart-xy/XYEditor.jsx
src/js/components/RendererWrapper.jsx
Wrapper component that determines which type of chart to render, wrapping it +in Svg and telling it to draw.
+ +
+ #SvgRectLabel
+
+ Render labels that are either automatically placed into a legend, or can be +dragged manually by the user
+ +src/js/components/svg/SvgRectLabel.jsx
Render labels that are either automatically placed into a legend, or can be + dragged manually by the user
+ +
+ #SvgText
+
+ An Svg
src/js/components/svg/SvgText.jsx
An Svg
src/js/components/chart-grid/ChartGridEditor.jsx
Series-specific settings drawn for each column in data
+ +src/js/components/chart-grid/ChartGridEditor.jsx
Settings that control the grid layout and type
+ +src/js/components/chart-grid/ChartGridEditor.jsx
Button to toggle universal setting that applies series settings to all series
+ +src/js/components/chart-grid/ChartGridBars.jsx
src/js/components/chart-grid/ChartGridXY.jsx
boolean editable
+ :
+ Allow the rendered component to interacted with and edited
+ +object styleConfig
+ :
+ Parsed global style config
+ +object displayConfig
+ :
+ Parsed visual display configuration for chart grid
+ +object chartProps
+ :
+ Properties used to draw this chart
+ +src/js/components/chart-grid/ChartGridRenderer.jsx
passes props to that renderer
+ +src/js/components/mixins/ChartRendererMixin.js
src/js/components/chart-xy/XYRenderer.jsx
boolean editable
+ :
+ Allow the rendered component to interacted with and edited
+ +object displayConfig
+ :
+ Parsed visual display configuration for chart grid
+ +object chartProps
+ :
+ Properties used to draw this chart
+ +object metadata
+ :
+ Title, data source, etc
+ +src/js/stores/ChartMetadataStore.js
Flux store for chart metadata such as title, source, size, etc.
+ +
+ #clear
+
+ clear +Set metadata to empty
+ +src/js/stores/ChartMetadataStore.js
clear + Set metadata to empty
+ +
+ #get(k)
+
+ get
+ +src/js/stores/ChartMetadataStore.js
get
+ +any
+ :
+ Return value at key k
+ #getAll
+
+ getAll
+ +src/js/stores/ChartMetadataStore.js
getAll
+ +object
+ :
+ Return all metadata
+ +src/js/stores/ChartPropertiesStore.js
Flux store for chart properties such as data, settings, scale
+ +
+ #clear
+
+ clear +Set chartProps to empty
+ +src/js/stores/ChartPropertiesStore.js
clear + Set chartProps to empty
+ +
+ #get(k)
+
+ get
+ +src/js/stores/ChartPropertiesStore.js
get
+ +any
+ :
+ Return value at key k
+ #getAll
+
+ getAll
+ +src/js/stores/ChartPropertiesStore.js
getAll
+ +object
+ :
+ Return all chartProps
+ +src/js/charts/cb-chart-grid/chart-grid-config.js
object scale
+ :
+ Default settings for date and primary scales
+ +object input
+ array chartSettings
+ :
+ Default settings for a given series (column) of data
+ +object extraPadding
+ :
+ Additional padding. This is a dynamic +value and is mostly changed within the component itself
+ +object _grid
+ :
+ Grid settings
+ +_grid.rows number
+ Number of rows in the grid
+_grid.cols number
+ Number of columns in the grid
+_grid.type string
+ Grid type (bars|lines|dots|columns)
object mobile
+ :
+ Mobile-specific override settings
+ +src/js/charts/cb-chart-grid/chart-grid-config.js
src/js/charts/cb-xy/xy-config.js
object scale
+ :
+ Default settings for date and primary scales
+ +array data
+ object input
+ Array<object> chartSettings
+ :
+ Default settings for a given series (column) of data
+ +object extraPadding
+ :
+ Additional padding. This is a dynamic +value and is mostly changed within the component itself
+ +object _annotations
+ :
+ Additional informative graphical elements
+ +_annotations.labels object
+ If labels are dragged, their +position settings are saved here
+object mobile
+ :
+ Mobile-specific override settings
+ +src/js/charts/cb-xy/xy-config.js
src/js/actions/ChartServerActions.js
Send data from some external API, usually localStorage in our case
+ +
+ .receiveModel(model, chartModel)
+
+ Update the whole chart model
+ +src/js/actions/ChartServerActions.js
Update the whole chart model
+ +src/js/actions/ChartViewActions.js
Send data from React views to Flux dispatcher, and on to the stores
+ +
+ .updateAllChartProps(Object, newChartProps)
+
+ Update all chart props
+ +src/js/actions/ChartViewActions.js
Update all chart props
+ +chartProps
+ .updateAndReparse(key, newProp)
+
+ Update a single chart prop and reparse the input
+ +src/js/actions/ChartViewActions.js
Update a single chart prop and reparse the input
+ +
+ .updateChartProp(key, newProp)
+
+ Update a single chart prop
+ +src/js/actions/ChartViewActions.js
Update a single chart prop
+ +
+ .updateInput(key, newInput)
+
+ Update a data input and reparse it
+ +src/js/actions/ChartViewActions.js
Update a data input and reparse it
+ +
+ .updateMetadata(newMetadata, k, v)
+
+ Update metadata
+ +src/js/actions/ChartViewActions.js
Update metadata
+ +object newMetadata
+ :
+ The property's value
+ +Store for errors/warnings to users about the bad/dumb things they are +probably doing
+ +
+ #clear
+
+ clear +Set errors to empty
+ +clear + Set errors to empty
+ +
+ #get(k)
+
+ get
+ +get
+ +any
+ :
+ Return value at key k
+ #getAll
+
+ getAll
+ +getAll
+ +object
+ :
+ Return all errors
+ +Helper functions!
+ +
+ .combine_margin_pading(m, p)
+
+ combine_margin_pading
+ +combine_margin_pading
+ +object
+
+
+ .compute_scale_domain(scaleObj, data, opts)
+
+ compute_scale_domain
+ +compute_scale_domain
+ +Current scale before generating new domain
+ +Array<number> data
+ :
+ All values in the current scale
+ +object opts
+ :
+ Whether to return nice values or force a minimum of 0 + or below
+ +object
+ :
+ { domain: [min, max], custom:
+ .exact_ticks(domain, numticks)
+
+ Generate an exact number of ticks given a domain
+ +
+ .merge_or_apply(defaults, source)
+
+ Given a defaults object and a source object, copy the value from the source +if it contains the same key, otherwise return the default. Skip keys that +only exist in the source object.
+ +Given a defaults object and a source object, copy the value from the source + if it contains the same key, otherwise return the default. Skip keys that + only exist in the source object.
+ +object defaults
+ :
+ Default schema
+ +object source
+ :
+ Source object to copy properties from
+ +object
+ :
+ Result has identical keys to defaults
+ +
+ .precision(a)
+
+ precision
+ +precision
+ +undefined
+
+
+ .round_to_precision(num, precision, supress_thou_sep)
+
+ round_to_precision +Round a number to N decimal places
+ +round_to_precision + Round a number to N decimal places
+ +number num
+ :
+ Number to be rounded
+ +number precision
+ :
+ Desired precision
+ +boolean supress_thou_sep
+ :
+ number
+ :
+ Rounded number
+ +
+ .suggest_tick_num(domain)
+
+ Given a the domain of a scale suggest the most numerous number +of round number ticks that it cold be divided into while still containing +values evenly divisible by 1, 2, 2.5, 5, 10, or 25.
+ +Given a the domain of a scale suggest the most numerous number + of round number ticks that it cold be divided into while still containing + values evenly divisible by 1, 2, 2.5, 5, 10, or 25.
+ +array domain
+ :
+ An array of two number like objects
+ +integer
+ :
+ Result is a single integer representing a nice number of ticks to use
+ +
+ .transform_coords(transformString)
+
+ transform_coords
+ +transform_coords
+ +undefined
+
+
+ .tz_offset_to_minutes(offset)
+
+ Given a timezone offset in an hour:minute format and return the equivalent +number of minutes as a number +only exist in the source object.
+ +Given a timezone offset in an hour:minute format and return the equivalent + number of minutes as a number + only exist in the source object.
+ +object offset
+ :
+ A string in a hh:mm format or "Z" for no offset
+ +number
+ :
+ Number of minutes
+ +
+ .validate_chart_model(modelStr)
+
+ Test whether a string is a valid Chartbuilder model
+ +src/js/util/validate-chart-model.js
Test whether a string is a valid Chartbuilder model
+ +string modelStr
+ :
+ unparsed string of chart model JSON
+ +generateScale
+ +Flux store for the current session, ie session data that persits regardless +interaction. Includes locale-aware settings and are unrelated to the actual +rendering of the chart.
+ +
+ #get(k)
+
+ get
+ +get
+ +any
+ :
+ Return value at key k
+ #getAll
+
+ getAll
+ +getAll
+ +object
+ :
+ Return all session data
+ +get_tick_widths
+ +object
+ +string
+ +src/js/components/LocalStorageTimer.jsx
Button that persists for TIMER_DURATION and allows user to re-load the
+chart currently saved in localStorage. On click, it updates the
+SessionStore.
make_mults
+ +{ array? of base components that data will be passed to }
+ +{ data for each chart }
+ +{grid option }
+ +{ func that tells how to evaluate the components?? }
+ +src/js/components/chart-xy/XYEditor.jsx
Series-specific settings for each column in data
+ +boolean allowSecondaryAxis
+ :
+ Should a secondary axis be allowed
+ +Array<object> chartSettings
+ :
+ Current settings for data series
+ +function onUpdate
+ :
+ Callback that handles new series settings
+ +function onUpdateReparse
+ :
+ Callback that handles new series settings,
+but which need to be sent back to parse-xy
number numColors
+ :
+ Total number of possible colors
+ +src/js/components/chart-xy/XYEditor.jsx
When labels are dragged, this component appears and allows you to reset them
+ +src/js/components/chart-xy/XYRenderer.jsx
See React.PropTypes declaration for properties:
propTypes: {
+chartProps: PropTypes.object.isRequired,
+editable: PropTypes.bool,
+displayConfig: PropTypes.object.isRequired,
+styleConfig: PropTypes.object.isRequired,
+xScale: PropTypes.func.isRequired,
+yScale: PropTypes.func.isRequired,
+dimensions: PropTypes.object,
+labelYMax: PropTypes.number,
+updateLabelYMax: PropTypes.func
+},
+>1)+c+e+g+M.slice(w)}return M+c+e+g}e=s(e);var n=e.fill,r=e.align,a=e.sign,c=e.symbol,l=e.zero,p=e.width,d=e.comma,f=e.precision,h=e.type,v="$"===c?i[0]:"#"===c&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===c?i[1]:/[%p]/.test(h)?"%":"",_=g[h],x=!h||/[defgprs%]/.test(h);return f=null==f?h?6:12:/[gprs]/.test(h)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),t.toString=function(){return e+""},t}function a(e,r){var a=t((e=s(e),e.type="f",e)),o=3*Math.max(-8,Math.min(8,Math.floor(n(r)/3))),i=Math.pow(10,-o),u=b[8+o/3];return function(e){return a(i*e)+u}}var o=e.grouping&&e.thousands?r(e.grouping,e.thousands):c,i=e.currency,u=e.decimal;return{format:t,formatPrefix:a}}function p(t){return y=l(t),e.format=y.format,e.formatPrefix=y.formatPrefix,y}function d(e){return Math.max(0,-n(Math.abs(e)))}function f(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(n(t)/3)))-n(Math.abs(e)))}function h(e,t){return e=Math.abs(e),t=Math.abs(t)-e,
+Math.max(0,n(t)-n(e))+1}var m,g={"":a,"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return i(100*e,t)},r:i,s:o,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},v=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;u.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var y,b=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];p({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),e.formatDefaultLocale=p,e.formatLocale=l,e.formatSpecifier=s,e.precisionFixed=d,e.precisionPrefix=f,e.precisionRound=h,Object.defineProperty(e,"__esModule",{value:!0})})},{}],17:[function(e,t,n){!function(r,a){"object"==typeof n&&"undefined"!=typeof t?a(n,e("d3-color")):"function"==typeof define&&define.amd?define(["exports","d3-color"],a):a(r.d3=r.d3||{},r.d3)}(this,function(e,t){"use strict";function n(e,t,n,r,a){var o=e*e,i=o*e;return((1-3*e+3*o-i)*t+(4-6*o+3*i)*n+(1+3*e+3*o-3*i)*r+i*a)/6}function r(e,t){return function(n){return e+n*t}}function a(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function o(e,t){var n=t-e;return n?r(e,n>180||n<-180?n-360*Math.round(n/360):n):S(isNaN(e)?t:e)}function i(e){return 1===(e=+e)?s:function(t,n){return n-t?a(t,n,e):S(isNaN(t)?n:t)}}function s(e,t){var n=t-e;return n?r(e,n):S(isNaN(e)?t:e)}function u(e){return function(n){var r,a,o=n.length,i=new Array(o),s=new Array(o),u=new Array(o);for(r=0;r=1?1:e(t)}}function wr(e){return function(t){return 1-e(1-t)}}function Mr(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function Er(e){return e*e}function kr(e){return e*e*e}function Sr(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function Tr(e){return function(t){return Math.pow(t,e)}}function Dr(e){return 1-Math.cos(e*Vi)}function Nr(e){return Math.pow(2,10*(e-1))}function Rr(e){return 1-Math.sqrt(1-e*e)}function Ar(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/zi*Math.asin(1/e):(e=1,n=t/4),function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*zi/t)}}function Pr(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function Or(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function jr(e,t){e=ci.hcl(e),t=ci.hcl(t);var n=e.h,r=e.c,a=e.l,o=t.h-n,i=t.c-r,s=t.l-a;return isNaN(i)&&(i=0,r=isNaN(r)?t.c:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return pe(n+o*e,r+i*e,a+s*e)+""}}function Ir(e,t){e=ci.hsl(e),t=ci.hsl(t);var n=e.h,r=e.s,a=e.l,o=t.h-n,i=t.s-r,s=t.l-a;return isNaN(i)&&(i=0,r=isNaN(r)?t.s:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return ce(n+o*e,r+i*e,a+s*e)+""}}function Lr(e,t){e=ci.lab(e),t=ci.lab(t);var n=e.l,r=e.a,a=e.b,o=t.l-n,i=t.a-r,s=t.b-a;return function(e){return fe(n+o*e,r+i*e,a+s*e)+""}}function Fr(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Ur(e){var t=[e.a,e.b],n=[e.c,e.d],r=zr(t),a=qr(t,n),o=zr(Br(n,t,-a))||0;t[0]*n[1]u;l--);i=i.slice(c,l)}return i},i.tickFormat=function(e,n){if(!arguments.length)return Su;arguments.length<2?n=Su:"function"!=typeof n&&(n=ci.format(n));var r=Math.max(1,t*e/i.ticks().length);return function(e){var i=e/o(Math.round(a(e)));return i*t=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),Ai.hasOwnProperty(n)?{space:Ai[n],local:e}:e}},Ni.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return e=ci.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(R(t,e[t]));return this}return this.each(R(e,t))},Ni.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=O(e)).length,a=-1;if(t=n.classList){for(;++a0&&(ja(La(i,e,n),e,r),c+=r,l+=r),p+=i.m,c+=a.m,d+=u.m,l+=o.m;i&&!Oa(o)&&(o.t=i,o.m+=p-l),a&&!Pa(u)&&(u.t=a,u.m+=c-d,n=e)}return n}function o(e){e.x*=u[0],e.y=e.depth*u[1]}var i=ci.layout.hierarchy().sort(null).value(null),s=Aa,u=[1,1],c=null;return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(c=null==(u=t)?o:null,e):c?null:u},e.nodeSize=function(t){return arguments.length?(c=null==(u=t)?null:o,e):c?u:null},oa(e,i)},ci.layout.cluster=function(){function e(e,o){var i,s=t.call(this,e,o),u=s[0],c=0;sa(u,function(e){var t=e.children;t&&t.length?(e.x=Ua(t),e.y=Fa(t)):(e.x=i?c+=n(e,i):0,e.y=0,i=e)});var l=qa(u),p=za(u),d=l.x-n(l,p)/2,f=p.x+n(p,l)/2;return sa(u,a?function(e){e.x=(e.x-u.x)*r[0],e.y=(u.y-e.y)*r[1]}:function(e){e.x=(e.x-d)/(f-d)*r[0],e.y=(1-(u.y?e.y/u.y:1))*r[1]}),s}var t=ci.layout.hierarchy().sort(null).value(null),n=Aa,r=[1,1],a=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(a=null==(r=t),e):a?null:r},e.nodeSize=function(t){return arguments.length?(a=null!=(r=t),e):a?r:null},oa(e,t)},ci.layout.treemap=function(){function e(e,t){for(var n,r,a=-1,o=e.length;++aa&&(a=n));return r*=r,t*=t,r?Math.max(t*a*h/r,r/(t*o*h)):1/0}function a(e,t,n,r){var a,o=-1,i=e.length,s=n.x,c=n.y,l=t?u(e.area/t):0;if(t==n.dx){for((r||l>n.dy)&&(l=n.dy);++on.dx)&&(l=n.dx);++o1);return e+t*n*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var e=ci.random.normal.apply(ci,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=ci.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;n