@ -1,73 +1,88 @@
import {
ChartInternal
} from './chart-internal' ;
import {
Chart
} from './chart' ;
import {
AxisInternal
} from './axis-internal' ;
import Axis from './axis' ;
import Axis from './axis' ;
import CLASS from './class' ;
import CLASS from './class' ;
import {
import {
c3 ,
isEmpty ,
notEmpty ,
isValue ,
isFunction ,
isString ,
isUndefined ,
isDefined ,
ceil10 ,
asHalfPixel ,
asHalfPixel ,
diffDomain ,
getOption ,
getOption ,
hasValue ,
getPathBox ,
sanitise ,
isFunction ,
getPathBox
isValue ,
notEmpty
} from './util' ;
} from './util' ;
export { c3 } ;
var c3 = {
version : "0.6.4" ,
export var c3 _chart _fn ;
chart : {
export var c3 _chart _internal _fn ;
fn : Chart . prototype ,
internal : {
fn : ChartInternal . prototype ,
axis : {
fn : Axis . prototype ,
internal : {
fn : AxisInternal . prototype
}
}
}
} ,
generate : function ( config ) {
return new Chart ( config ) ;
}
} ;
c3 _chart _fn = c3 . chart . fn ;
export {
c3 _chart _internal _fn = c3 . chart . internal . fn ;
c3
} ;
c3 _chart _internal _fn . beforeInit = function ( ) {
ChartInternal . prototype . beforeInit = function ( ) {
// can do something
// can do something
} ;
} ;
c3 _chart _internal _fn . afterInit = function ( ) {
ChartInternal . prototype . afterInit = function ( ) {
// can do something
// can do something
} ;
} ;
c3 _chart _internal _fn . init = function ( ) {
ChartInternal . prototype . init = function ( ) {
var $$ = this , config = $$ . config ;
var $$ = this ,
config = $$ . config ;
$$ . initParams ( ) ;
$$ . initParams ( ) ;
if ( config . data _url ) {
if ( config . data _url ) {
$$ . convertUrlToData ( config . data _url , config . data _mimeType , config . data _headers , config . data _keys , $$ . initWithData ) ;
$$ . convertUrlToData ( config . data _url , config . data _mimeType , config . data _headers , config . data _keys , $$ . initWithData ) ;
}
} else if ( config . data _json ) {
else if ( config . data _json ) {
$$ . initWithData ( $$ . convertJsonToData ( config . data _json , config . data _keys ) ) ;
$$ . initWithData ( $$ . convertJsonToData ( config . data _json , config . data _keys ) ) ;
}
} else if ( config . data _rows ) {
else if ( config . data _rows ) {
$$ . initWithData ( $$ . convertRowsToData ( config . data _rows ) ) ;
$$ . initWithData ( $$ . convertRowsToData ( config . data _rows ) ) ;
}
} else if ( config . data _columns ) {
else if ( config . data _columns ) {
$$ . initWithData ( $$ . convertColumnsToData ( config . data _columns ) ) ;
$$ . initWithData ( $$ . convertColumnsToData ( config . data _columns ) ) ;
}
} else {
else {
throw Error ( 'url or json or rows or columns is required.' ) ;
throw Error ( 'url or json or rows or columns is required.' ) ;
}
}
} ;
} ;
c3 _chart _internal _fn . initParams = function ( ) {
ChartInternal . prototype . initParams = function ( ) {
var $$ = this , d3 = $$ . d3 , config = $$ . config ;
var $$ = this ,
d3 = $$ . d3 ,
config = $$ . config ;
// MEMO: clipId needs to be unique because it conflicts when multiple charts exist
// MEMO: clipId needs to be unique because it conflicts when multiple charts exist
$$ . clipId = "c3-" + ( + new Date ( ) ) + '-clip' ,
$$ . clipId = "c3-" + ( + new Date ( ) ) + '-clip' ;
$$ . clipIdForXAxis = $$ . clipId + '-xaxis' ,
$$ . clipIdForXAxis = $$ . clipId + '-xaxis' ;
$$ . clipIdForYAxis = $$ . clipId + '-yaxis' ,
$$ . clipIdForYAxis = $$ . clipId + '-yaxis' ;
$$ . clipIdForGrid = $$ . clipId + '-grid' ,
$$ . clipIdForGrid = $$ . clipId + '-grid' ;
$$ . clipIdForSubchart = $$ . clipId + '-subchart' ,
$$ . clipIdForSubchart = $$ . clipId + '-subchart' ;
$$ . clipPath = $$ . getClipPath ( $$ . clipId ) ,
$$ . clipPath = $$ . getClipPath ( $$ . clipId ) ;
$$ . clipPathForXAxis = $$ . getClipPath ( $$ . clipIdForXAxis ) ,
$$ . clipPathForXAxis = $$ . getClipPath ( $$ . clipIdForXAxis ) ;
$$ . clipPathForYAxis = $$ . getClipPath ( $$ . clipIdForYAxis ) ;
$$ . clipPathForYAxis = $$ . getClipPath ( $$ . clipIdForYAxis ) ;
$$ . clipPathForGrid = $$ . getClipPath ( $$ . clipIdForGrid ) ,
$$ . clipPathForGrid = $$ . getClipPath ( $$ . clipIdForGrid ) ;
$$ . clipPathForSubchart = $$ . getClipPath ( $$ . clipIdForSubchart ) ,
$$ . clipPathForSubchart = $$ . getClipPath ( $$ . clipIdForSubchart ) ;
$$ . dragStart = null ;
$$ . dragStart = null ;
$$ . dragging = false ;
$$ . dragging = false ;
@ -81,14 +96,28 @@ c3_chart_internal_fn.initParams = function () {
$$ . dataTimeParse = ( config . data _xLocaltime ? d3 . timeParse : d3 . utcParse ) ( $$ . config . data _xFormat ) ;
$$ . dataTimeParse = ( config . data _xLocaltime ? d3 . timeParse : d3 . utcParse ) ( $$ . config . data _xFormat ) ;
$$ . axisTimeFormat = config . axis _x _localtime ? d3 . timeFormat : d3 . utcFormat ;
$$ . axisTimeFormat = config . axis _x _localtime ? d3 . timeFormat : d3 . utcFormat ;
$$ . defaultAxisTimeFormat = function ( date ) {
$$ . defaultAxisTimeFormat = function ( date ) {
if ( date . getMilliseconds ( ) ) { return d3 . timeFormat ( ".%L" ) ( date ) ; }
if ( date . getMilliseconds ( ) ) {
if ( date . getSeconds ( ) ) { return d3 . timeFormat ( ":%S" ) ( date ) ; }
return d3 . timeFormat ( ".%L" ) ( date ) ;
if ( date . getMinutes ( ) ) { return d3 . timeFormat ( "%I:%M" ) ( date ) ; }
}
if ( date . getHours ( ) ) { return d3 . timeFormat ( "%I %p" ) ( date ) ; }
if ( date . getSeconds ( ) ) {
if ( date . getDay ( ) && date . getDate ( ) !== 1 ) { return d3 . timeFormat ( "%-m/%-d" ) ( date ) ; }
return d3 . timeFormat ( ":%S" ) ( date ) ;
if ( date . getDate ( ) !== 1 ) { return d3 . timeFormat ( "%-m/%-d" ) ( date ) ; }
}
if ( date . getMonth ( ) ) { return d3 . timeFormat ( "%-m/%-d" ) ( date ) ; }
if ( date . getMinutes ( ) ) {
return d3 . timeFormat ( "%I:%M" ) ( date ) ;
}
if ( date . getHours ( ) ) {
return d3 . timeFormat ( "%I %p" ) ( date ) ;
}
if ( date . getDay ( ) && date . getDate ( ) !== 1 ) {
return d3 . timeFormat ( "%-m/%-d" ) ( date ) ;
}
if ( date . getDate ( ) !== 1 ) {
return d3 . timeFormat ( "%-m/%-d" ) ( date ) ;
}
if ( date . getMonth ( ) ) {
return d3 . timeFormat ( "%-m/%-d" ) ( date ) ;
}
return d3 . timeFormat ( "%Y/%-m/%-d" ) ( date ) ;
return d3 . timeFormat ( "%Y/%-m/%-d" ) ( date ) ;
} ;
} ;
$$ . hiddenTargetIds = [ ] ;
$$ . hiddenTargetIds = [ ] ;
@ -126,27 +155,37 @@ c3_chart_internal_fn.initParams = function () {
$$ . axes . subx = d3 . selectAll ( [ ] ) ; // needs when excluding subchart.js
$$ . axes . subx = d3 . selectAll ( [ ] ) ; // needs when excluding subchart.js
} ;
} ;
c3 _chart _internal _fn . initChartElements = function ( ) {
ChartInternal . prototype . initChartElements = function ( ) {
if ( this . initBar ) { this . initBar ( ) ; }
if ( this . initBar ) {
if ( this . initLine ) { this . initLine ( ) ; }
this . initBar ( ) ;
if ( this . initArc ) { this . initArc ( ) ; }
}
if ( this . initGauge ) { this . initGauge ( ) ; }
if ( this . initLine ) {
if ( this . initText ) { this . initText ( ) ; }
this . initLine ( ) ;
}
if ( this . initArc ) {
this . initArc ( ) ;
}
if ( this . initGauge ) {
this . initGauge ( ) ;
}
if ( this . initText ) {
this . initText ( ) ;
}
} ;
} ;
c3 _chart _internal _fn . initWithData = function ( data ) {
ChartInternal . prototype . initWithData = function ( data ) {
var $$ = this , d3 = $$ . d3 , config = $$ . config ;
var $$ = this ,
d3 = $$ . d3 ,
config = $$ . config ;
var defs , main , binding = true ;
var defs , main , binding = true ;
$$ . axis = new Axis ( $$ ) ;
$$ . axis = new Axis ( $$ ) ;
if ( ! config . bindto ) {
if ( ! config . bindto ) {
$$ . selectChart = d3 . selectAll ( [ ] ) ;
$$ . selectChart = d3 . selectAll ( [ ] ) ;
}
} else if ( typeof config . bindto . node === 'function' ) {
else if ( typeof config . bindto . node === 'function' ) {
$$ . selectChart = config . bindto ;
$$ . selectChart = config . bindto ;
}
} else {
else {
$$ . selectChart = d3 . select ( config . bindto ) ;
$$ . selectChart = d3 . select ( config . bindto ) ;
}
}
if ( $$ . selectChart . empty ( ) ) {
if ( $$ . selectChart . empty ( ) ) {
@ -192,8 +231,12 @@ c3_chart_internal_fn.initWithData = function (data) {
// Define svgs
// Define svgs
$$ . svg = $$ . selectChart . append ( "svg" )
$$ . svg = $$ . selectChart . append ( "svg" )
. style ( "overflow" , "hidden" )
. style ( "overflow" , "hidden" )
. on ( 'mouseenter' , function ( ) { return config . onmouseover . call ( $$ ) ; } )
. on ( 'mouseenter' , function ( ) {
. on ( 'mouseleave' , function ( ) { return config . onmouseout . call ( $$ ) ; } ) ;
return config . onmouseover . call ( $$ ) ;
} )
. on ( 'mouseleave' , function ( ) {
return config . onmouseout . call ( $$ ) ;
} ) ;
if ( $$ . config . svg _classname ) {
if ( $$ . config . svg _classname ) {
$$ . svg . attr ( 'class' , $$ . config . svg _classname ) ;
$$ . svg . attr ( 'class' , $$ . config . svg _classname ) ;
@ -211,16 +254,30 @@ c3_chart_internal_fn.initWithData = function (data) {
// Define regions
// Define regions
main = $$ . main = $$ . svg . append ( "g" ) . attr ( "transform" , $$ . getTranslate ( 'main' ) ) ;
main = $$ . main = $$ . svg . append ( "g" ) . attr ( "transform" , $$ . getTranslate ( 'main' ) ) ;
if ( $$ . initPie ) { $$ . initPie ( ) ; }
if ( $$ . initPie ) {
if ( $$ . initSubchart ) { $$ . initSubchart ( ) ; }
$$ . initPie ( ) ;
if ( $$ . initTooltip ) { $$ . initTooltip ( ) ; }
}
if ( $$ . initLegend ) { $$ . initLegend ( ) ; }
if ( $$ . initSubchart ) {
if ( $$ . initTitle ) { $$ . initTitle ( ) ; }
$$ . initSubchart ( ) ;
if ( $$ . initZoom ) { $$ . initZoom ( ) ; }
}
if ( $$ . initTooltip ) {
$$ . initTooltip ( ) ;
}
if ( $$ . initLegend ) {
$$ . initLegend ( ) ;
}
if ( $$ . initTitle ) {
$$ . initTitle ( ) ;
}
if ( $$ . initZoom ) {
$$ . initZoom ( ) ;
}
// Update selection based on size and scale
// Update selection based on size and scale
// TODO: currently this must be called after initLegend because of update of sizes, but it should be done in initSubchart.
// TODO: currently this must be called after initLegend because of update of sizes, but it should be done in initSubchart.
if ( $$ . initSubchartBrush ) { $$ . initSubchartBrush ( ) ; }
if ( $$ . initSubchartBrush ) {
$$ . initSubchartBrush ( ) ;
}
/*-- Main Region --*/
/*-- Main Region --*/
@ -242,7 +299,9 @@ c3_chart_internal_fn.initWithData = function (data) {
. attr ( 'class' , CLASS . chart ) ;
. attr ( 'class' , CLASS . chart ) ;
// Grid lines
// Grid lines
if ( config . grid _lines _front ) { $$ . initGridLines ( ) ; }
if ( config . grid _lines _front ) {
$$ . initGridLines ( ) ;
}
// Cover whole with rects for events
// Cover whole with rects for events
$$ . initEventRect ( ) ;
$$ . initEventRect ( ) ;
@ -257,7 +316,9 @@ c3_chart_internal_fn.initWithData = function (data) {
$$ . updateTargets ( $$ . data . targets ) ;
$$ . updateTargets ( $$ . data . targets ) ;
// Set default extent if defined
// Set default extent if defined
if ( config . axis _x _selection ) { $$ . brush . selectionAsValue ( $$ . getDefaultSelection ( ) ) ; }
if ( config . axis _x _selection ) {
$$ . brush . selectionAsValue ( $$ . getDefaultSelection ( ) ) ;
}
// Draw with targets
// Draw with targets
if ( binding ) {
if ( binding ) {
@ -279,10 +340,10 @@ c3_chart_internal_fn.initWithData = function (data) {
$$ . api . element = $$ . selectChart . node ( ) ;
$$ . api . element = $$ . selectChart . node ( ) ;
} ;
} ;
c3 _chart _internal _fn . smoothLines = function ( el , type ) {
ChartInternal . prototype . smoothLines = function ( el , type ) {
var $$ = this ;
var $$ = this ;
if ( type === 'grid' ) {
if ( type === 'grid' ) {
el . each ( function ( ) {
el . each ( function ( ) {
var g = $$ . d3 . select ( this ) ,
var g = $$ . d3 . select ( this ) ,
x1 = g . attr ( 'x1' ) ,
x1 = g . attr ( 'x1' ) ,
x2 = g . attr ( 'x2' ) ,
x2 = g . attr ( 'x2' ) ,
@ -298,9 +359,9 @@ c3_chart_internal_fn.smoothLines = function (el, type) {
}
}
} ;
} ;
ChartInternal . prototype . updateSizes = function ( ) {
c3 _chart _internal _fn . updateSizes = function ( ) {
var $$ = this ,
var $$ = this , config = $$ . config ;
config = $$ . config ;
var legendHeight = $$ . legend ? $$ . getLegendHeight ( ) : 0 ,
var legendHeight = $$ . legend ? $$ . getLegendHeight ( ) : 0 ,
legendWidth = $$ . legend ? $$ . getLegendWidth ( ) : 0 ,
legendWidth = $$ . legend ? $$ . getLegendWidth ( ) : 0 ,
legendHeightForBottom = $$ . isLegendRight || $$ . isLegendInset ? 0 : legendHeight ,
legendHeightForBottom = $$ . isLegendRight || $$ . isLegendInset ? 0 : legendHeight ,
@ -344,17 +405,27 @@ c3_chart_internal_fn.updateSizes = function () {
bottom : 0 ,
bottom : 0 ,
left : 0
left : 0
} ;
} ;
if ( $$ . updateSizeForLegend ) { $$ . updateSizeForLegend ( legendHeight , legendWidth ) ; }
if ( $$ . updateSizeForLegend ) {
$$ . updateSizeForLegend ( legendHeight , legendWidth ) ;
}
$$ . width = $$ . currentWidth - $$ . margin . left - $$ . margin . right ;
$$ . width = $$ . currentWidth - $$ . margin . left - $$ . margin . right ;
$$ . height = $$ . currentHeight - $$ . margin . top - $$ . margin . bottom ;
$$ . height = $$ . currentHeight - $$ . margin . top - $$ . margin . bottom ;
if ( $$ . width < 0 ) { $$ . width = 0 ; }
if ( $$ . width < 0 ) {
if ( $$ . height < 0 ) { $$ . height = 0 ; }
$$ . width = 0 ;
}
if ( $$ . height < 0 ) {
$$ . height = 0 ;
}
$$ . width2 = config . axis _rotated ? $$ . margin . left - $$ . rotated _padding _left - $$ . rotated _padding _right : $$ . width ;
$$ . width2 = config . axis _rotated ? $$ . margin . left - $$ . rotated _padding _left - $$ . rotated _padding _right : $$ . width ;
$$ . height2 = config . axis _rotated ? $$ . height : $$ . currentHeight - $$ . margin2 . top - $$ . margin2 . bottom ;
$$ . height2 = config . axis _rotated ? $$ . height : $$ . currentHeight - $$ . margin2 . top - $$ . margin2 . bottom ;
if ( $$ . width2 < 0 ) { $$ . width2 = 0 ; }
if ( $$ . width2 < 0 ) {
if ( $$ . height2 < 0 ) { $$ . height2 = 0 ; }
$$ . width2 = 0 ;
}
if ( $$ . height2 < 0 ) {
$$ . height2 = 0 ;
}
// for arc
// for arc
$$ . arcWidth = $$ . width - ( $$ . isLegendRight ? legendWidth + 10 : 0 ) ;
$$ . arcWidth = $$ . width - ( $$ . isLegendRight ? legendWidth + 10 : 0 ) ;
@ -362,14 +433,16 @@ c3_chart_internal_fn.updateSizes = function () {
if ( $$ . hasType ( 'gauge' ) && ! config . gauge _fullCircle ) {
if ( $$ . hasType ( 'gauge' ) && ! config . gauge _fullCircle ) {
$$ . arcHeight += $$ . height - $$ . getGaugeLabelHeight ( ) ;
$$ . arcHeight += $$ . height - $$ . getGaugeLabelHeight ( ) ;
}
}
if ( $$ . updateRadius ) { $$ . updateRadius ( ) ; }
if ( $$ . updateRadius ) {
$$ . updateRadius ( ) ;
}
if ( $$ . isLegendRight && hasArc ) {
if ( $$ . isLegendRight && hasArc ) {
$$ . margin3 . left = $$ . arcWidth / 2 + $$ . radiusExpanded * 1.1 ;
$$ . margin3 . left = $$ . arcWidth / 2 + $$ . radiusExpanded * 1.1 ;
}
}
} ;
} ;
c3 _chart _internal _fn . updateTargets = function ( targets ) {
ChartInternal . prototype . updateTargets = function ( targets ) {
var $$ = this ;
var $$ = this ;
/*-- Main --*/
/*-- Main --*/
@ -384,25 +457,36 @@ c3_chart_internal_fn.updateTargets = function (targets) {
$$ . updateTargetsForLine ( targets ) ;
$$ . updateTargetsForLine ( targets ) ;
//-- Arc --//
//-- Arc --//
if ( $$ . hasArcType ( ) && $$ . updateTargetsForArc ) { $$ . updateTargetsForArc ( targets ) ; }
if ( $$ . hasArcType ( ) && $$ . updateTargetsForArc ) {
$$ . updateTargetsForArc ( targets ) ;
}
/*-- Sub --*/
/*-- Sub --*/
if ( $$ . updateTargetsForSubchart ) { $$ . updateTargetsForSubchart ( targets ) ; }
if ( $$ . updateTargetsForSubchart ) {
$$ . updateTargetsForSubchart ( targets ) ;
}
// Fade-in each chart
// Fade-in each chart
$$ . showTargets ( ) ;
$$ . showTargets ( ) ;
} ;
} ;
c3 _chart _internal _fn . showTargets = function ( ) {
ChartInternal . prototype . showTargets = function ( ) {
var $$ = this ;
var $$ = this ;
$$ . svg . selectAll ( '.' + CLASS . target ) . filter ( function ( d ) { return $$ . isTargetToShow ( d . id ) ; } )
$$ . svg . selectAll ( '.' + CLASS . target ) . filter ( function ( d ) {
return $$ . isTargetToShow ( d . id ) ;
} )
. transition ( ) . duration ( $$ . config . transition _duration )
. transition ( ) . duration ( $$ . config . transition _duration )
. style ( "opacity" , 1 ) ;
. style ( "opacity" , 1 ) ;
} ;
} ;
c3 _chart _internal _fn . redraw = function ( options , transitions ) {
ChartInternal . prototype . redraw = function ( options , transitions ) {
var $$ = this , main = $$ . main , d3 = $$ . d3 , config = $$ . config ;
var $$ = this ,
var areaIndices = $$ . getShapeIndices ( $$ . isAreaType ) , barIndices = $$ . getShapeIndices ( $$ . isBarType ) , lineIndices = $$ . getShapeIndices ( $$ . isLineType ) ;
main = $$ . main ,
d3 = $$ . d3 ,
config = $$ . config ;
var areaIndices = $$ . getShapeIndices ( $$ . isAreaType ) ,
barIndices = $$ . getShapeIndices ( $$ . isBarType ) ,
lineIndices = $$ . getShapeIndices ( $$ . isLineType ) ;
var withY , withSubchart , withTransition , withTransitionForExit , withTransitionForAxis ,
var withY , withSubchart , withTransition , withTransitionForExit , withTransitionForAxis ,
withTransform , withUpdateXDomain , withUpdateOrgXDomain , withTrimXDomain , withLegend ,
withTransform , withUpdateXDomain , withUpdateOrgXDomain , withTrimXDomain , withLegend ,
withEventRect , withDimension , withUpdateXAxis ;
withEventRect , withDimension , withUpdateXAxis ;
@ -410,8 +494,10 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
var drawArea , drawBar , drawLine , xForText , yForText ;
var drawArea , drawBar , drawLine , xForText , yForText ;
var duration , durationForExit , durationForAxis ;
var duration , durationForExit , durationForAxis ;
var transitionsToWait , waitForDraw , flow , transition ;
var transitionsToWait , waitForDraw , flow , transition ;
var targetsToShow = $$ . filterTargetsToShow ( $$ . data . targets ) , tickValues , i , intervalForCulling , xDomainForZoom ;
var targetsToShow = $$ . filterTargetsToShow ( $$ . data . targets ) ,
var xv = $$ . xv . bind ( $$ ) , cx , cy ;
tickValues , i , intervalForCulling , xDomainForZoom ;
var xv = $$ . xv . bind ( $$ ) ,
cx , cy ;
options = options || { } ;
options = options || { } ;
withY = getOption ( options , "withY" , true ) ;
withY = getOption ( options , "withY" , true ) ;
@ -487,7 +573,7 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
break ;
break ;
}
}
}
}
$$ . svg . selectAll ( '.' + CLASS . axisX + ' .tick text' ) . each ( function ( e ) {
$$ . svg . selectAll ( '.' + CLASS . axisX + ' .tick text' ) . each ( function ( e ) {
var index = tickValues . indexOf ( e ) ;
var index = tickValues . indexOf ( e ) ;
if ( index >= 0 ) {
if ( index >= 0 ) {
d3 . select ( this ) . style ( 'display' , index % intervalForCulling ? 'none' : 'block' ) ;
d3 . select ( this ) . style ( 'display' , index % intervalForCulling ? 'none' : 'block' ) ;
@ -529,7 +615,9 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
. style ( 'opacity' , targetsToShow . length ? 0 : 1 ) ;
. style ( 'opacity' , targetsToShow . length ? 0 : 1 ) ;
// event rect
// event rect
if ( withEventRect ) { $$ . redrawEventRect ( ) ; }
if ( withEventRect ) {
$$ . redrawEventRect ( ) ;
}
// grid
// grid
$$ . updateGrid ( duration ) ;
$$ . updateGrid ( duration ) ;
@ -551,10 +639,14 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
}
}
// title
// title
if ( $$ . redrawTitle ) { $$ . redrawTitle ( ) ; }
if ( $$ . redrawTitle ) {
$$ . redrawTitle ( ) ;
}
// arc
// arc
if ( $$ . redrawArc ) { $$ . redrawArc ( duration , durationForExit , withTransform ) ; }
if ( $$ . redrawArc ) {
$$ . redrawArc ( duration , durationForExit , withTransform ) ;
}
// subchart
// subchart
if ( $$ . redrawSubchart ) {
if ( $$ . redrawSubchart ) {
@ -596,22 +688,25 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
$$ . redrawText ( xForText , yForText , options . flow , true , transition ) ,
$$ . redrawText ( xForText , yForText , options . flow , true , transition ) ,
$$ . redrawRegion ( true , transition ) ,
$$ . redrawRegion ( true , transition ) ,
$$ . redrawGrid ( true , transition ) ,
$$ . redrawGrid ( true , transition ) ,
] . forEach ( function ( transitions ) {
] . forEach ( function ( transitions ) {
transitions . forEach ( function ( transition ) {
transitions . forEach ( function ( transition ) {
transitionsToWait . push ( transition ) ;
transitionsToWait . push ( transition ) ;
} ) ;
} ) ;
} ) ;
} ) ;
// Wait for end of transitions to call flow and onrendered callback
// Wait for end of transitions to call flow and onrendered callback
waitForDraw = $$ . generateWait ( ) ;
waitForDraw = $$ . generateWait ( ) ;
transitionsToWait . forEach ( function ( t ) {
transitionsToWait . forEach ( function ( t ) {
waitForDraw . add ( t ) ;
waitForDraw . add ( t ) ;
} ) ;
} ) ;
waitForDraw ( function ( ) {
waitForDraw ( function ( ) {
if ( flow ) { flow ( ) ; }
if ( flow ) {
if ( config . onrendered ) { config . onrendered . call ( $$ ) ; }
flow ( ) ;
} ) ;
}
if ( config . onrendered ) {
config . onrendered . call ( $$ ) ;
}
}
else {
} ) ;
} else {
$$ . redrawBar ( drawBar ) ;
$$ . redrawBar ( drawBar ) ;
$$ . redrawLine ( drawLine ) ;
$$ . redrawLine ( drawLine ) ;
$$ . redrawArea ( drawArea ) ;
$$ . redrawArea ( drawArea ) ;
@ -619,19 +714,25 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
$$ . redrawText ( xForText , yForText , options . flow ) ;
$$ . redrawText ( xForText , yForText , options . flow ) ;
$$ . redrawRegion ( ) ;
$$ . redrawRegion ( ) ;
$$ . redrawGrid ( ) ;
$$ . redrawGrid ( ) ;
if ( flow ) { flow ( ) ; }
if ( flow ) {
if ( config . onrendered ) { config . onrendered . call ( $$ ) ; }
flow ( ) ;
}
if ( config . onrendered ) {
config . onrendered . call ( $$ ) ;
}
}
}
}
}
// update fadein condition
// update fadein condition
$$ . mapToIds ( $$ . data . targets ) . forEach ( function ( id ) {
$$ . mapToIds ( $$ . data . targets ) . forEach ( function ( id ) {
$$ . withoutFadeIn [ id ] = true ;
$$ . withoutFadeIn [ id ] = true ;
} ) ;
} ) ;
} ;
} ;
c3 _chart _internal _fn . updateAndRedraw = function ( options ) {
ChartInternal . prototype . updateAndRedraw = function ( options ) {
var $$ = this , config = $$ . config , transitions ;
var $$ = this ,
config = $$ . config ,
transitions ;
options = options || { } ;
options = options || { } ;
// same with redraw
// same with redraw
options . withTransition = getOption ( options , "withTransition" , true ) ;
options . withTransition = getOption ( options , "withTransition" , true ) ;
@ -656,7 +757,7 @@ c3_chart_internal_fn.updateAndRedraw = function (options) {
// Draw with new sizes & scales
// Draw with new sizes & scales
$$ . redraw ( options , transitions ) ;
$$ . redraw ( options , transitions ) ;
} ;
} ;
c3 _chart _internal _fn . redrawWithoutRescale = function ( ) {
ChartInternal . prototype . redrawWithoutRescale = function ( ) {
this . redraw ( {
this . redraw ( {
withY : false ,
withY : false ,
withSubchart : false ,
withSubchart : false ,
@ -665,23 +766,26 @@ c3_chart_internal_fn.redrawWithoutRescale = function () {
} ) ;
} ) ;
} ;
} ;
c3 _chart _internal _fn . isTimeSeries = function ( ) {
ChartInternal . prototype . isTimeSeries = function ( ) {
return this . config . axis _x _type === 'timeseries' ;
return this . config . axis _x _type === 'timeseries' ;
} ;
} ;
c3 _chart _internal _fn . isCategorized = function ( ) {
ChartInternal . prototype . isCategorized = function ( ) {
return this . config . axis _x _type . indexOf ( 'categor' ) >= 0 ;
return this . config . axis _x _type . indexOf ( 'categor' ) >= 0 ;
} ;
} ;
c3 _chart _internal _fn . isCustomX = function ( ) {
ChartInternal . prototype . isCustomX = function ( ) {
var $$ = this , config = $$ . config ;
var $$ = this ,
config = $$ . config ;
return ! $$ . isTimeSeries ( ) && ( config . data _x || notEmpty ( config . data _xs ) ) ;
return ! $$ . isTimeSeries ( ) && ( config . data _x || notEmpty ( config . data _xs ) ) ;
} ;
} ;
c3 _chart _internal _fn . isTimeSeriesY = function ( ) {
ChartInternal . prototype . isTimeSeriesY = function ( ) {
return this . config . axis _y _type === 'timeseries' ;
return this . config . axis _y _type === 'timeseries' ;
} ;
} ;
c3 _chart _internal _fn . getTranslate = function ( target ) {
ChartInternal . prototype . getTranslate = function ( target ) {
var $$ = this , config = $$ . config , x , y ;
var $$ = this ,
config = $$ . config ,
x , y ;
if ( target === 'main' ) {
if ( target === 'main' ) {
x = asHalfPixel ( $$ . margin . left ) ;
x = asHalfPixel ( $$ . margin . left ) ;
y = asHalfPixel ( $$ . margin . top ) ;
y = asHalfPixel ( $$ . margin . top ) ;
@ -705,66 +809,72 @@ c3_chart_internal_fn.getTranslate = function (target) {
y = config . axis _rotated ? 0 : $$ . height2 ;
y = config . axis _rotated ? 0 : $$ . height2 ;
} else if ( target === 'arc' ) {
} else if ( target === 'arc' ) {
x = $$ . arcWidth / 2 ;
x = $$ . arcWidth / 2 ;
y = $$ . arcHeight / 2 - ( $$ . hasType ( 'gauge' ) ? 6 : 0 ) ; // to prevent wrong display of min and max label
y = $$ . arcHeight / 2 - ( $$ . hasType ( 'gauge' ) ? 6 : 0 ) ; // to prevent wrong display of min and max label
}
}
return "translate(" + x + "," + y + ")" ;
return "translate(" + x + "," + y + ")" ;
} ;
} ;
c3 _chart _internal _fn . initialOpacity = function ( d ) {
ChartInternal . prototype . initialOpacity = function ( d ) {
return d . value !== null && this . withoutFadeIn [ d . id ] ? 1 : 0 ;
return d . value !== null && this . withoutFadeIn [ d . id ] ? 1 : 0 ;
} ;
} ;
c3 _chart _internal _fn . initialOpacityForCircle = function ( d ) {
ChartInternal . prototype . initialOpacityForCircle = function ( d ) {
return d . value !== null && this . withoutFadeIn [ d . id ] ? this . opacityForCircle ( d ) : 0 ;
return d . value !== null && this . withoutFadeIn [ d . id ] ? this . opacityForCircle ( d ) : 0 ;
} ;
} ;
c3 _chart _internal _fn . opacityForCircle = function ( d ) {
ChartInternal . prototype . opacityForCircle = function ( d ) {
var isPointShouldBeShown = isFunction ( this . config . point _show ) ? this . config . point _show ( d ) : this . config . point _show ;
var isPointShouldBeShown = isFunction ( this . config . point _show ) ? this . config . point _show ( d ) : this . config . point _show ;
var opacity = isPointShouldBeShown ? 1 : 0 ;
var opacity = isPointShouldBeShown ? 1 : 0 ;
return isValue ( d . value ) ? ( this . isScatterType ( d ) ? 0.5 : opacity ) : 0 ;
return isValue ( d . value ) ? ( this . isScatterType ( d ) ? 0.5 : opacity ) : 0 ;
} ;
} ;
c3 _chart _internal _fn . opacityForText = function ( ) {
ChartInternal . prototype . opacityForText = function ( ) {
return this . hasDataLabel ( ) ? 1 : 0 ;
return this . hasDataLabel ( ) ? 1 : 0 ;
} ;
} ;
c3 _chart _internal _fn . xx = function ( d ) {
ChartInternal . prototype . xx = function ( d ) {
return d ? this . x ( d . x ) : null ;
return d ? this . x ( d . x ) : null ;
} ;
} ;
c3 _chart _internal _fn . xv = function ( d ) {
ChartInternal . prototype . xv = function ( d ) {
var $$ = this , value = d . value ;
var $$ = this ,
value = d . value ;
if ( $$ . isTimeSeries ( ) ) {
if ( $$ . isTimeSeries ( ) ) {
value = $$ . parseDate ( d . value ) ;
value = $$ . parseDate ( d . value ) ;
}
} else if ( $$ . isCategorized ( ) && typeof d . value === 'string' ) {
else if ( $$ . isCategorized ( ) && typeof d . value === 'string' ) {
value = $$ . config . axis _x _categories . indexOf ( d . value ) ;
value = $$ . config . axis _x _categories . indexOf ( d . value ) ;
}
}
return Math . ceil ( $$ . x ( value ) ) ;
return Math . ceil ( $$ . x ( value ) ) ;
} ;
} ;
c3 _chart _internal _fn . yv = function ( d ) {
ChartInternal . prototype . yv = function ( d ) {
var $$ = this ,
var $$ = this ,
yScale = d . axis && d . axis === 'y2' ? $$ . y2 : $$ . y ;
yScale = d . axis && d . axis === 'y2' ? $$ . y2 : $$ . y ;
return Math . ceil ( yScale ( d . value ) ) ;
return Math . ceil ( yScale ( d . value ) ) ;
} ;
} ;
c3 _chart _internal _fn . subxx = function ( d ) {
ChartInternal . prototype . subxx = function ( d ) {
return d ? this . subX ( d . x ) : null ;
return d ? this . subX ( d . x ) : null ;
} ;
} ;
c3 _chart _internal _fn . transformMain = function ( withTransition , transitions ) {
ChartInternal . prototype . transformMain = function ( withTransition , transitions ) {
var $$ = this ,
var $$ = this ,
xAxis , yAxis , y2Axis ;
xAxis , yAxis , y2Axis ;
if ( transitions && transitions . axisX ) {
if ( transitions && transitions . axisX ) {
xAxis = transitions . axisX ;
xAxis = transitions . axisX ;
} else {
} else {
xAxis = $$ . main . select ( '.' + CLASS . axisX ) ;
xAxis = $$ . main . select ( '.' + CLASS . axisX ) ;
if ( withTransition ) { xAxis = xAxis . transition ( ) ; }
if ( withTransition ) {
xAxis = xAxis . transition ( ) ;
}
}
}
if ( transitions && transitions . axisY ) {
if ( transitions && transitions . axisY ) {
yAxis = transitions . axisY ;
yAxis = transitions . axisY ;
} else {
} else {
yAxis = $$ . main . select ( '.' + CLASS . axisY ) ;
yAxis = $$ . main . select ( '.' + CLASS . axisY ) ;
if ( withTransition ) { yAxis = yAxis . transition ( ) ; }
if ( withTransition ) {
yAxis = yAxis . transition ( ) ;
}
}
}
if ( transitions && transitions . axisY2 ) {
if ( transitions && transitions . axisY2 ) {
y2Axis = transitions . axisY2 ;
y2Axis = transitions . axisY2 ;
} else {
} else {
y2Axis = $$ . main . select ( '.' + CLASS . axisY2 ) ;
y2Axis = $$ . main . select ( '.' + CLASS . axisY2 ) ;
if ( withTransition ) { y2Axis = y2Axis . transition ( ) ; }
if ( withTransition ) {
y2Axis = y2Axis . transition ( ) ;
}
}
}
( withTransition ? $$ . main . transition ( ) : $$ . main ) . attr ( "transform" , $$ . getTranslate ( 'main' ) ) ;
( withTransition ? $$ . main . transition ( ) : $$ . main ) . attr ( "transform" , $$ . getTranslate ( 'main' ) ) ;
xAxis . attr ( "transform" , $$ . getTranslate ( 'x' ) ) ;
xAxis . attr ( "transform" , $$ . getTranslate ( 'x' ) ) ;
@ -772,14 +882,18 @@ c3_chart_internal_fn.transformMain = function (withTransition, transitions) {
y2Axis . attr ( "transform" , $$ . getTranslate ( 'y2' ) ) ;
y2Axis . attr ( "transform" , $$ . getTranslate ( 'y2' ) ) ;
$$ . main . select ( '.' + CLASS . chartArcs ) . attr ( "transform" , $$ . getTranslate ( 'arc' ) ) ;
$$ . main . select ( '.' + CLASS . chartArcs ) . attr ( "transform" , $$ . getTranslate ( 'arc' ) ) ;
} ;
} ;
c3 _chart _internal _fn . transformAll = function ( withTransition , transitions ) {
ChartInternal . prototype . transformAll = function ( withTransition , transitions ) {
var $$ = this ;
var $$ = this ;
$$ . transformMain ( withTransition , transitions ) ;
$$ . transformMain ( withTransition , transitions ) ;
if ( $$ . config . subchart _show ) { $$ . transformContext ( withTransition , transitions ) ; }
if ( $$ . config . subchart _show ) {
if ( $$ . legend ) { $$ . transformLegend ( withTransition ) ; }
$$ . transformContext ( withTransition , transitions ) ;
}
if ( $$ . legend ) {
$$ . transformLegend ( withTransition ) ;
}
} ;
} ;
c3 _chart _internal _fn . updateSvgSize = function ( ) {
ChartInternal . prototype . updateSvgSize = function ( ) {
var $$ = this ,
var $$ = this ,
brush = $$ . svg . select ( ".c3-brush .overlay" ) ;
brush = $$ . svg . select ( ".c3-brush .overlay" ) ;
$$ . svg . attr ( 'width' , $$ . currentWidth ) . attr ( 'height' , $$ . currentHeight ) ;
$$ . svg . attr ( 'width' , $$ . currentWidth ) . attr ( 'height' , $$ . currentHeight ) ;
@ -803,8 +917,7 @@ c3_chart_internal_fn.updateSvgSize = function () {
$$ . selectChart . style ( 'max-height' , $$ . currentHeight + "px" ) ;
$$ . selectChart . style ( 'max-height' , $$ . currentHeight + "px" ) ;
} ;
} ;
ChartInternal . prototype . updateDimension = function ( withoutAxis ) {
c3 _chart _internal _fn . updateDimension = function ( withoutAxis ) {
var $$ = this ;
var $$ = this ;
if ( ! withoutAxis ) {
if ( ! withoutAxis ) {
if ( $$ . config . axis _rotated ) {
if ( $$ . config . axis _rotated ) {
@ -821,23 +934,26 @@ c3_chart_internal_fn.updateDimension = function (withoutAxis) {
$$ . transformAll ( false ) ;
$$ . transformAll ( false ) ;
} ;
} ;
c3 _chart _internal _fn . observeInserted = function ( selection ) {
ChartInternal . prototype . observeInserted = function ( selection ) {
var $$ = this , observer ;
var $$ = this ,
observer ;
if ( typeof MutationObserver === 'undefined' ) {
if ( typeof MutationObserver === 'undefined' ) {
window . console . error ( "MutationObserver not defined." ) ;
window . console . error ( "MutationObserver not defined." ) ;
return ;
return ;
}
}
observer = new MutationObserver ( function ( mutations ) {
observer = new MutationObserver ( function ( mutations ) {
mutations . forEach ( function ( mutation ) {
mutations . forEach ( function ( mutation ) {
if ( mutation . type === 'childList' && mutation . previousSibling ) {
if ( mutation . type === 'childList' && mutation . previousSibling ) {
observer . disconnect ( ) ;
observer . disconnect ( ) ;
// need to wait for completion of load because size calculation requires the actual sizes determined after that completion
// need to wait for completion of load because size calculation requires the actual sizes determined after that completion
$$ . intervalForObserveInserted = window . setInterval ( function ( ) {
$$ . intervalForObserveInserted = window . setInterval ( function ( ) {
// parentNode will NOT be null when completed
// parentNode will NOT be null when completed
if ( selection . node ( ) . parentNode ) {
if ( selection . node ( ) . parentNode ) {
window . clearInterval ( $$ . intervalForObserveInserted ) ;
window . clearInterval ( $$ . intervalForObserveInserted ) ;
$$ . updateDimension ( ) ;
$$ . updateDimension ( ) ;
if ( $$ . brush ) { $$ . brush . update ( ) ; }
if ( $$ . brush ) {
$$ . brush . update ( ) ;
}
$$ . config . oninit . call ( $$ ) ;
$$ . config . oninit . call ( $$ ) ;
$$ . redraw ( {
$$ . redraw ( {
withTransform : true ,
withTransform : true ,
@ -853,23 +969,28 @@ c3_chart_internal_fn.observeInserted = function (selection) {
}
}
} ) ;
} ) ;
} ) ;
} ) ;
observer . observe ( selection . node ( ) , { attributes : true , childList : true , characterData : true } ) ;
observer . observe ( selection . node ( ) , {
attributes : true ,
childList : true ,
characterData : true
} ) ;
} ;
} ;
c3 _chart _internal _fn . bindResize = function ( ) {
ChartInternal . prototype . bindResize = function ( ) {
var $$ = this , config = $$ . config ;
var $$ = this ,
config = $$ . config ;
$$ . resizeFunction = $$ . generateResize ( ) ; // need to call .remove
$$ . resizeFunction = $$ . generateResize ( ) ; // need to call .remove
$$ . resizeFunction . add ( function ( ) {
$$ . resizeFunction . add ( function ( ) {
config . onresize . call ( $$ ) ;
config . onresize . call ( $$ ) ;
} ) ;
} ) ;
if ( config . resize _auto ) {
if ( config . resize _auto ) {
$$ . resizeFunction . add ( function ( ) {
$$ . resizeFunction . add ( function ( ) {
if ( $$ . resizeTimeout !== undefined ) {
if ( $$ . resizeTimeout !== undefined ) {
window . clearTimeout ( $$ . resizeTimeout ) ;
window . clearTimeout ( $$ . resizeTimeout ) ;
}
}
$$ . resizeTimeout = window . setTimeout ( function ( ) {
$$ . resizeTimeout = window . setTimeout ( function ( ) {
delete $$ . resizeTimeout ;
delete $$ . resizeTimeout ;
$$ . updateAndRedraw ( {
$$ . updateAndRedraw ( {
withUpdateXDomain : false ,
withUpdateXDomain : false ,
@ -878,11 +999,13 @@ c3_chart_internal_fn.bindResize = function () {
withTransitionForTransform : false ,
withTransitionForTransform : false ,
withLegend : true ,
withLegend : true ,
} ) ;
} ) ;
if ( $$ . brush ) { $$ . brush . update ( ) ; }
if ( $$ . brush ) {
$$ . brush . update ( ) ;
}
} , 100 ) ;
} , 100 ) ;
} ) ;
} ) ;
}
}
$$ . resizeFunction . add ( function ( ) {
$$ . resizeFunction . add ( function ( ) {
config . onresized . call ( $$ ) ;
config . onresized . call ( $$ ) ;
} ) ;
} ) ;
@ -923,17 +1046,18 @@ c3_chart_internal_fn.bindResize = function () {
}
}
} ;
} ;
c3 _chart _internal _fn . generateResize = function ( ) {
ChartInternal . prototype . generateResize = function ( ) {
var resizeFunctions = [ ] ;
var resizeFunctions = [ ] ;
function callResizeFunctions ( ) {
function callResizeFunctions ( ) {
resizeFunctions . forEach ( function ( f ) {
resizeFunctions . forEach ( function ( f ) {
f ( ) ;
f ( ) ;
} ) ;
} ) ;
}
}
callResizeFunctions . add = function ( f ) {
callResizeFunctions . add = function ( f ) {
resizeFunctions . push ( f ) ;
resizeFunctions . push ( f ) ;
} ;
} ;
callResizeFunctions . remove = function ( f ) {
callResizeFunctions . remove = function ( f ) {
for ( var i = 0 ; i < resizeFunctions . length ; i ++ ) {
for ( var i = 0 ; i < resizeFunctions . length ; i ++ ) {
if ( resizeFunctions [ i ] === f ) {
if ( resizeFunctions [ i ] === f ) {
resizeFunctions . splice ( i , 1 ) ;
resizeFunctions . splice ( i , 1 ) ;
@ -944,20 +1068,24 @@ c3_chart_internal_fn.generateResize = function () {
return callResizeFunctions ;
return callResizeFunctions ;
} ;
} ;
c3 _chart _internal _fn . endall = function ( transition , callback ) {
ChartInternal . prototype . endall = function ( transition , callback ) {
var n = 0 ;
var n = 0 ;
transition
transition
. each ( function ( ) { ++ n ; } )
. each ( function ( ) {
. on ( "end" , function ( ) {
++ n ;
if ( ! -- n ) { callback . apply ( this , arguments ) ; }
} )
. on ( "end" , function ( ) {
if ( ! -- n ) {
callback . apply ( this , arguments ) ;
}
} ) ;
} ) ;
} ;
} ;
c3 _chart _internal _fn . generateWait = function ( ) {
ChartInternal . prototype . generateWait = function ( ) {
var transitionsToWait = [ ] ,
var transitionsToWait = [ ] ,
f = function ( callback ) {
f = function ( callback ) {
var timer = setInterval ( function ( ) {
var timer = setInterval ( function ( ) {
var done = 0 ;
var done = 0 ;
transitionsToWait . forEach ( function ( t ) {
transitionsToWait . forEach ( function ( t ) {
if ( t . empty ( ) ) {
if ( t . empty ( ) ) {
done += 1 ;
done += 1 ;
return ;
return ;
@ -970,18 +1098,21 @@ c3_chart_internal_fn.generateWait = function () {
} ) ;
} ) ;
if ( done === transitionsToWait . length ) {
if ( done === transitionsToWait . length ) {
clearInterval ( timer ) ;
clearInterval ( timer ) ;
if ( callback ) { callback ( ) ; }
if ( callback ) {
callback ( ) ;
}
}
}
} , 50 ) ;
} , 50 ) ;
} ;
} ;
f . add = function ( transition ) {
f . add = function ( transition ) {
transitionsToWait . push ( transition ) ;
transitionsToWait . push ( transition ) ;
} ;
} ;
return f ;
return f ;
} ;
} ;
c3 _chart _internal _fn . parseDate = function ( date ) {
ChartInternal . prototype . parseDate = function ( date ) {
var $$ = this , parsedDate ;
var $$ = this ,
parsedDate ;
if ( date instanceof Date ) {
if ( date instanceof Date ) {
parsedDate = date ;
parsedDate = date ;
} else if ( typeof date === 'string' ) {
} else if ( typeof date === 'string' ) {
@ -997,7 +1128,7 @@ c3_chart_internal_fn.parseDate = function (date) {
return parsedDate ;
return parsedDate ;
} ;
} ;
c3 _chart _internal _fn . isTabVisible = function ( ) {
ChartInternal . prototype . isTabVisible = function ( ) {
var hidden ;
var hidden ;
if ( typeof document . hidden !== "undefined" ) { // Opera 12.10 and Firefox 18 and later support
if ( typeof document . hidden !== "undefined" ) { // Opera 12.10 and Firefox 18 and later support
hidden = "hidden" ;
hidden = "hidden" ;
@ -1012,19 +1143,12 @@ c3_chart_internal_fn.isTabVisible = function () {
return document [ hidden ] ? false : true ;
return document [ hidden ] ? false : true ;
} ;
} ;
c3 _chart _internal _fn . isValue = isValue ;
ChartInternal . prototype . getPathBox = getPathBox ;
c3 _chart _internal _fn . isFunction = isFunction ;
ChartInternal . prototype . CLASS = CLASS ;
c3 _chart _internal _fn . isString = isString ;
c3 _chart _internal _fn . isUndefined = isUndefined ;
export {
c3 _chart _internal _fn . isDefined = isDefined ;
Chart
c3 _chart _internal _fn . ceil10 = ceil10 ;
} ;
c3 _chart _internal _fn . asHalfPixel = asHalfPixel ;
export {
c3 _chart _internal _fn . diffDomain = diffDomain ;
ChartInternal
c3 _chart _internal _fn . isEmpty = isEmpty ;
} ;
c3 _chart _internal _fn . notEmpty = notEmpty ;
c3 _chart _internal _fn . notEmpty = notEmpty ;
c3 _chart _internal _fn . getOption = getOption ;
c3 _chart _internal _fn . hasValue = hasValue ;
c3 _chart _internal _fn . sanitise = sanitise ;
c3 _chart _internal _fn . getPathBox = getPathBox ;
c3 _chart _internal _fn . CLASS = CLASS ;