Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
c3-closed
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
charts
c3-closed
Commits
d81715b9
Commit
d81715b9
authored
Dec 07, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix interaction.enabled option for pie/donut/gauge chart - #801
parent
67d7ec16
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
26 deletions
+26
-26
c3.js
c3.js
+13
-13
c3.min.js
c3.min.js
+0
-0
arc.js
src/arc.js
+13
-13
No files found.
c3.js
View file @
d81715b9
...
...
@@ -4710,15 +4710,18 @@
mainArc
.
enter
().
append
(
'path'
)
.
attr
(
"class"
,
$$
.
classArc
.
bind
(
$$
))
.
style
(
"fill"
,
function
(
d
)
{
return
$$
.
color
(
d
.
data
);
})
.
style
(
"cursor"
,
function
(
d
)
{
return
config
.
data_selection_isselectable
(
d
)
?
"pointer"
:
null
;
})
.
style
(
"cursor"
,
function
(
d
)
{
return
config
.
interaction_enabled
&&
config
.
data_selection_isselectable
(
d
)
?
"pointer"
:
null
;
})
.
style
(
"opacity"
,
0
)
.
each
(
function
(
d
)
{
if
(
$$
.
isGaugeType
(
d
.
data
))
{
d
.
startAngle
=
d
.
endAngle
=
-
1
*
(
Math
.
PI
/
2
);
}
this
.
_current
=
d
;
})
.
on
(
'mouseover'
,
function
(
d
)
{
});
mainArc
.
attr
(
"transform"
,
function
(
d
)
{
return
!
$$
.
isGaugeType
(
d
.
data
)
&&
withTransform
?
"scale(0)"
:
""
;
})
.
style
(
"opacity"
,
function
(
d
)
{
return
d
===
this
.
_current
?
0
:
1
;
})
.
on
(
'mouseover'
,
config
.
interaction_enabled
?
function
(
d
)
{
var
updated
,
arcData
;
if
(
$$
.
transiting
)
{
// skip while transiting
return
;
...
...
@@ -4730,14 +4733,14 @@
$$
.
api
.
focus
(
updated
.
data
.
id
);
$$
.
toggleFocusLegend
(
updated
.
data
.
id
,
true
);
$$
.
config
.
data_onmouseover
(
arcData
,
this
);
})
.
on
(
'mousemove'
,
function
(
d
)
{
}
:
null
)
.
on
(
'mousemove'
,
config
.
interaction_enabled
?
function
(
d
)
{
var
updated
=
$$
.
updateAngle
(
d
),
arcData
=
$$
.
convertToArcData
(
updated
),
selectedData
=
[
arcData
];
$$
.
showTooltip
(
selectedData
,
d3
.
mouse
(
this
));
})
.
on
(
'mouseout'
,
function
(
d
)
{
}
:
null
)
.
on
(
'mouseout'
,
config
.
interaction_enabled
?
function
(
d
)
{
var
updated
,
arcData
;
if
(
$$
.
transiting
)
{
// skip while transiting
return
;
...
...
@@ -4750,16 +4753,13 @@
$$
.
revertLegend
();
$$
.
hideTooltip
();
$$
.
config
.
data_onmouseout
(
arcData
,
this
);
})
.
on
(
'click'
,
function
(
d
,
i
)
{
}
:
null
)
.
on
(
'click'
,
config
.
interaction_enabled
?
function
(
d
,
i
)
{
var
updated
=
$$
.
updateAngle
(
d
),
arcData
=
$$
.
convertToArcData
(
updated
);
if
(
$$
.
toggleShape
)
{
$$
.
toggleShape
(
this
,
arcData
,
i
);
}
$$
.
config
.
data_onclick
.
call
(
$$
.
api
,
arcData
,
this
);
});
mainArc
.
attr
(
"transform"
,
function
(
d
)
{
return
!
$$
.
isGaugeType
(
d
.
data
)
&&
withTransform
?
"scale(0)"
:
""
;
})
.
style
(
"opacity"
,
function
(
d
)
{
return
d
===
this
.
_current
?
0
:
1
;
})
}
:
null
)
.
each
(
function
()
{
$$
.
transiting
=
true
;
})
.
transition
().
duration
(
duration
)
.
attrTween
(
"d"
,
function
(
d
)
{
...
...
c3.min.js
View file @
d81715b9
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/arc.js
View file @
d81715b9
...
...
@@ -245,15 +245,18 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf
mainArc
.
enter
().
append
(
'path'
)
.
attr
(
"class"
,
$$
.
classArc
.
bind
(
$$
))
.
style
(
"fill"
,
function
(
d
)
{
return
$$
.
color
(
d
.
data
);
})
.
style
(
"cursor"
,
function
(
d
)
{
return
config
.
data_selection_isselectable
(
d
)
?
"pointer"
:
null
;
})
.
style
(
"cursor"
,
function
(
d
)
{
return
config
.
interaction_enabled
&&
config
.
data_selection_isselectable
(
d
)
?
"pointer"
:
null
;
})
.
style
(
"opacity"
,
0
)
.
each
(
function
(
d
)
{
if
(
$$
.
isGaugeType
(
d
.
data
))
{
d
.
startAngle
=
d
.
endAngle
=
-
1
*
(
Math
.
PI
/
2
);
}
this
.
_current
=
d
;
})
.
on
(
'mouseover'
,
function
(
d
)
{
});
mainArc
.
attr
(
"transform"
,
function
(
d
)
{
return
!
$$
.
isGaugeType
(
d
.
data
)
&&
withTransform
?
"scale(0)"
:
""
;
})
.
style
(
"opacity"
,
function
(
d
)
{
return
d
===
this
.
_current
?
0
:
1
;
})
.
on
(
'mouseover'
,
config
.
interaction_enabled
?
function
(
d
)
{
var
updated
,
arcData
;
if
(
$$
.
transiting
)
{
// skip while transiting
return
;
...
...
@@ -265,14 +268,14 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf
$$
.
api
.
focus
(
updated
.
data
.
id
);
$$
.
toggleFocusLegend
(
updated
.
data
.
id
,
true
);
$$
.
config
.
data_onmouseover
(
arcData
,
this
);
})
.
on
(
'mousemove'
,
function
(
d
)
{
}
:
null
)
.
on
(
'mousemove'
,
config
.
interaction_enabled
?
function
(
d
)
{
var
updated
=
$$
.
updateAngle
(
d
),
arcData
=
$$
.
convertToArcData
(
updated
),
selectedData
=
[
arcData
];
$$
.
showTooltip
(
selectedData
,
d3
.
mouse
(
this
));
})
.
on
(
'mouseout'
,
function
(
d
)
{
}
:
null
)
.
on
(
'mouseout'
,
config
.
interaction_enabled
?
function
(
d
)
{
var
updated
,
arcData
;
if
(
$$
.
transiting
)
{
// skip while transiting
return
;
...
...
@@ -285,16 +288,13 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf
$$
.
revertLegend
();
$$
.
hideTooltip
();
$$
.
config
.
data_onmouseout
(
arcData
,
this
);
})
.
on
(
'click'
,
function
(
d
,
i
)
{
}
:
null
)
.
on
(
'click'
,
config
.
interaction_enabled
?
function
(
d
,
i
)
{
var
updated
=
$$
.
updateAngle
(
d
),
arcData
=
$$
.
convertToArcData
(
updated
);
if
(
$$
.
toggleShape
)
{
$$
.
toggleShape
(
this
,
arcData
,
i
);
}
$$
.
config
.
data_onclick
.
call
(
$$
.
api
,
arcData
,
this
);
});
mainArc
.
attr
(
"transform"
,
function
(
d
)
{
return
!
$$
.
isGaugeType
(
d
.
data
)
&&
withTransform
?
"scale(0)"
:
""
;
})
.
style
(
"opacity"
,
function
(
d
)
{
return
d
===
this
.
_current
?
0
:
1
;
})
}
:
null
)
.
each
(
function
()
{
$$
.
transiting
=
true
;
})
.
transition
().
duration
(
duration
)
.
attrTween
(
"d"
,
function
(
d
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment