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
Evgeny
c3-closed
Commits
fb515433
Commit
fb515433
authored
Jun 06, 2015
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix null data in arc event listener
parent
23f80e70
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
36 deletions
+56
-36
c3.js
c3.js
+28
-18
c3.min.js
c3.min.js
+0
-0
arc.js
src/arc.js
+28
-18
No files found.
c3.js
View file @
fb515433
...
@@ -4922,18 +4922,22 @@
...
@@ -4922,18 +4922,22 @@
return
;
return
;
}
}
updated
=
$$
.
updateAngle
(
d
);
updated
=
$$
.
updateAngle
(
d
);
arcData
=
$$
.
convertToArcData
(
updated
);
if
(
updated
)
{
// transitions
arcData
=
$$
.
convertToArcData
(
updated
);
$$
.
expandArc
(
updated
.
data
.
id
);
// transitions
$$
.
api
.
focus
(
updated
.
data
.
id
);
$$
.
expandArc
(
updated
.
data
.
id
);
$$
.
toggleFocusLegend
(
updated
.
data
.
id
,
true
);
$$
.
api
.
focus
(
updated
.
data
.
id
);
$$
.
config
.
data_onmouseover
(
arcData
,
this
);
$$
.
toggleFocusLegend
(
updated
.
data
.
id
,
true
);
$$
.
config
.
data_onmouseover
(
arcData
,
this
);
}
}
:
null
)
}
:
null
)
.
on
(
'mousemove'
,
config
.
interaction_enabled
?
function
(
d
)
{
.
on
(
'mousemove'
,
config
.
interaction_enabled
?
function
(
d
)
{
var
updated
=
$$
.
updateAngle
(
d
),
var
updated
=
$$
.
updateAngle
(
d
),
arcData
,
selectedData
;
if
(
updated
)
{
arcData
=
$$
.
convertToArcData
(
updated
),
arcData
=
$$
.
convertToArcData
(
updated
),
selectedData
=
[
arcData
];
selectedData
=
[
arcData
];
$$
.
showTooltip
(
selectedData
,
this
);
$$
.
showTooltip
(
selectedData
,
this
);
}
}
:
null
)
}
:
null
)
.
on
(
'mouseout'
,
config
.
interaction_enabled
?
function
(
d
)
{
.
on
(
'mouseout'
,
config
.
interaction_enabled
?
function
(
d
)
{
var
updated
,
arcData
;
var
updated
,
arcData
;
...
@@ -4941,19 +4945,25 @@
...
@@ -4941,19 +4945,25 @@
return
;
return
;
}
}
updated
=
$$
.
updateAngle
(
d
);
updated
=
$$
.
updateAngle
(
d
);
arcData
=
$$
.
convertToArcData
(
updated
);
if
(
updated
)
{
// transitions
arcData
=
$$
.
convertToArcData
(
updated
);
$$
.
unexpandArc
(
updated
.
data
.
id
);
// transitions
$$
.
api
.
revert
();
$$
.
unexpandArc
(
updated
.
data
.
id
);
$$
.
revertLegend
();
$$
.
api
.
revert
();
$$
.
hideTooltip
();
$$
.
revertLegend
();
$$
.
config
.
data_onmouseout
(
arcData
,
this
);
$$
.
hideTooltip
();
$$
.
config
.
data_onmouseout
(
arcData
,
this
);
}
}
:
null
)
}
:
null
)
.
on
(
'click'
,
config
.
interaction_enabled
?
function
(
d
,
i
)
{
.
on
(
'click'
,
config
.
interaction_enabled
?
function
(
d
,
i
)
{
var
updated
=
$$
.
updateAngle
(
d
),
var
updated
=
$$
.
updateAngle
(
d
),
arcData
;
if
(
updated
)
{
arcData
=
$$
.
convertToArcData
(
updated
);
arcData
=
$$
.
convertToArcData
(
updated
);
if
(
$$
.
toggleShape
)
{
$$
.
toggleShape
(
this
,
arcData
,
i
);
}
if
(
$$
.
toggleShape
)
{
$$
.
config
.
data_onclick
.
call
(
$$
.
api
,
arcData
,
this
);
$$
.
toggleShape
(
this
,
arcData
,
i
);
}
$$
.
config
.
data_onclick
.
call
(
$$
.
api
,
arcData
,
this
);
}
}
:
null
)
}
:
null
)
.
each
(
function
()
{
$$
.
transiting
=
true
;
})
.
each
(
function
()
{
$$
.
transiting
=
true
;
})
.
transition
().
duration
(
duration
)
.
transition
().
duration
(
duration
)
...
...
c3.min.js
View file @
fb515433
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/arc.js
View file @
fb515433
...
@@ -265,18 +265,22 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf
...
@@ -265,18 +265,22 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf
return
;
return
;
}
}
updated
=
$$
.
updateAngle
(
d
);
updated
=
$$
.
updateAngle
(
d
);
arcData
=
$$
.
convertToArcData
(
updated
);
if
(
updated
)
{
// transitions
arcData
=
$$
.
convertToArcData
(
updated
);
$$
.
expandArc
(
updated
.
data
.
id
);
// transitions
$$
.
api
.
focus
(
updated
.
data
.
id
);
$$
.
expandArc
(
updated
.
data
.
id
);
$$
.
toggleFocusLegend
(
updated
.
data
.
id
,
true
);
$$
.
api
.
focus
(
updated
.
data
.
id
);
$$
.
config
.
data_onmouseover
(
arcData
,
this
);
$$
.
toggleFocusLegend
(
updated
.
data
.
id
,
true
);
$$
.
config
.
data_onmouseover
(
arcData
,
this
);
}
}
:
null
)
}
:
null
)
.
on
(
'mousemove'
,
config
.
interaction_enabled
?
function
(
d
)
{
.
on
(
'mousemove'
,
config
.
interaction_enabled
?
function
(
d
)
{
var
updated
=
$$
.
updateAngle
(
d
),
var
updated
=
$$
.
updateAngle
(
d
),
arcData
,
selectedData
;
if
(
updated
)
{
arcData
=
$$
.
convertToArcData
(
updated
),
arcData
=
$$
.
convertToArcData
(
updated
),
selectedData
=
[
arcData
];
selectedData
=
[
arcData
];
$$
.
showTooltip
(
selectedData
,
this
);
$$
.
showTooltip
(
selectedData
,
this
);
}
}
:
null
)
}
:
null
)
.
on
(
'mouseout'
,
config
.
interaction_enabled
?
function
(
d
)
{
.
on
(
'mouseout'
,
config
.
interaction_enabled
?
function
(
d
)
{
var
updated
,
arcData
;
var
updated
,
arcData
;
...
@@ -284,19 +288,25 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf
...
@@ -284,19 +288,25 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf
return
;
return
;
}
}
updated
=
$$
.
updateAngle
(
d
);
updated
=
$$
.
updateAngle
(
d
);
arcData
=
$$
.
convertToArcData
(
updated
);
if
(
updated
)
{
// transitions
arcData
=
$$
.
convertToArcData
(
updated
);
$$
.
unexpandArc
(
updated
.
data
.
id
);
// transitions
$$
.
api
.
revert
();
$$
.
unexpandArc
(
updated
.
data
.
id
);
$$
.
revertLegend
();
$$
.
api
.
revert
();
$$
.
hideTooltip
();
$$
.
revertLegend
();
$$
.
config
.
data_onmouseout
(
arcData
,
this
);
$$
.
hideTooltip
();
$$
.
config
.
data_onmouseout
(
arcData
,
this
);
}
}
:
null
)
}
:
null
)
.
on
(
'click'
,
config
.
interaction_enabled
?
function
(
d
,
i
)
{
.
on
(
'click'
,
config
.
interaction_enabled
?
function
(
d
,
i
)
{
var
updated
=
$$
.
updateAngle
(
d
),
var
updated
=
$$
.
updateAngle
(
d
),
arcData
;
if
(
updated
)
{
arcData
=
$$
.
convertToArcData
(
updated
);
arcData
=
$$
.
convertToArcData
(
updated
);
if
(
$$
.
toggleShape
)
{
$$
.
toggleShape
(
this
,
arcData
,
i
);
}
if
(
$$
.
toggleShape
)
{
$$
.
config
.
data_onclick
.
call
(
$$
.
api
,
arcData
,
this
);
$$
.
toggleShape
(
this
,
arcData
,
i
);
}
$$
.
config
.
data_onclick
.
call
(
$$
.
api
,
arcData
,
this
);
}
}
:
null
)
}
:
null
)
.
each
(
function
()
{
$$
.
transiting
=
true
;
})
.
each
(
function
()
{
$$
.
transiting
=
true
;
})
.
transition
().
duration
(
duration
)
.
transition
().
duration
(
duration
)
...
...
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