@ -26,27 +26,29 @@ c3_chart_internal_fn.updateArc = function () {
c3 _chart _internal _fn . updateAngle = function ( d ) {
c3 _chart _internal _fn . updateAngle = function ( d ) {
var $$ = this , config = $$ . config ,
var $$ = this , config = $$ . config ,
found = false , index = 0 ,
found = false , index = 0 ;
gMin = config . gauge _min , gMax = config . gauge _max , gTic , gValue ;
if ( config ) {
$$ . pie ( $$ . filterTargetsToShow ( $$ . data . targets ) ) . forEach ( function ( t ) {
var gMin = config . gauge _min , gMax = config . gauge _max , gTic , gValue ;
if ( ! found && t . data . id === d . data . id ) {
$$ . pie ( $$ . filterTargetsToShow ( $$ . data . targets ) ) . forEach ( function ( t ) {
found = true ;
if ( ! found && t . data . id === d . data . id ) {
d = t ;
found = true ;
d . index = index ;
d = t ;
d . index = index ;
}
index ++ ;
} ) ;
if ( isNaN ( d . startAngle ) ) {
d . startAngle = 0 ;
}
if ( isNaN ( d . endAngle ) ) {
d . endAngle = d . startAngle ;
}
if ( $$ . isGaugeType ( d . data ) ) {
gTic = ( Math . PI ) / ( gMax - gMin ) ;
gValue = d . value < gMin ? 0 : d . value < gMax ? d . value - gMin : ( gMax - gMin ) ;
d . startAngle = - 1 * ( Math . PI / 2 ) ;
d . endAngle = d . startAngle + gTic * gValue ;
}
}
index ++ ;
} ) ;
if ( isNaN ( d . startAngle ) ) {
d . startAngle = 0 ;
}
if ( isNaN ( d . endAngle ) ) {
d . endAngle = d . startAngle ;
}
if ( $$ . isGaugeType ( d . data ) ) {
gTic = ( Math . PI ) / ( gMax - gMin ) ;
gValue = d . value < gMin ? 0 : d . value < gMax ? d . value - gMin : ( gMax - gMin ) ;
d . startAngle = - 1 * ( Math . PI / 2 ) ;
d . endAngle = d . startAngle + gTic * gValue ;
}
}
return found ? d : null ;
return found ? d : null ;
} ;
} ;