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
a1e3376f
Commit
a1e3376f
authored
Oct 12, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix onclick/onmouseover on bar chart as each - #390
parent
2a4ad296
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
14 deletions
+10
-14
c3.js
c3.js
+5
-7
c3.min.js
c3.min.js
+0
-0
interaction.js
src/interaction.js
+1
-6
shape.js
src/shape.js
+4
-1
No files found.
c3.js
View file @
a1e3376f
...
...
@@ -2202,12 +2202,7 @@
}
})
.
filter
(
function
(
d
)
{
if
(
this
.
nodeName
===
'circle'
)
{
return
$$
.
isWithinCircle
(
this
,
$$
.
pointSelectR
(
d
));
}
else
if
(
this
.
nodeName
===
'path'
)
{
return
$$
.
isWithinBar
(
this
);
}
return
$$
.
isWithinShape
(
this
,
d
);
})
.
each
(
function
(
d
)
{
if
(
config
.
data_selection_enabled
&&
(
config
.
data_selection_grouped
||
config
.
data_selection_isselectable
(
d
)))
{
...
...
@@ -2502,7 +2497,10 @@
c3_chart_internal_fn
.
isWithinShape
=
function
(
that
,
d
)
{
var
$$
=
this
,
shape
=
$$
.
d3
.
select
(
that
),
isWithin
;
if
(
that
.
nodeName
===
'circle'
)
{
if
(
!
$$
.
isTargetToShow
(
d
.
id
))
{
isWithin
=
false
;
}
else
if
(
that
.
nodeName
===
'circle'
)
{
// circle is hidden in step chart, so treat as within the click area
isWithin
=
$$
.
isStepType
(
d
)
?
true
:
$$
.
isWithinCircle
(
that
,
$$
.
pointSelectR
(
d
)
*
1.5
);
}
...
...
c3.min.js
View file @
a1e3376f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/interaction.js
View file @
a1e3376f
...
...
@@ -192,12 +192,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) {
}
})
.
filter
(
function
(
d
)
{
if
(
this
.
nodeName
===
'circle'
)
{
return
$$
.
isWithinCircle
(
this
,
$$
.
pointSelectR
(
d
));
}
else
if
(
this
.
nodeName
===
'path'
)
{
return
$$
.
isWithinBar
(
this
);
}
return
$$
.
isWithinShape
(
this
,
d
);
})
.
each
(
function
(
d
)
{
if
(
config
.
data_selection_enabled
&&
(
config
.
data_selection_grouped
||
config
.
data_selection_isselectable
(
d
)))
{
...
...
src/shape.js
View file @
a1e3376f
...
...
@@ -49,7 +49,10 @@ c3_chart_internal_fn.getShapeOffset = function (typeFilter, indices, isSub) {
c3_chart_internal_fn
.
isWithinShape
=
function
(
that
,
d
)
{
var
$$
=
this
,
shape
=
$$
.
d3
.
select
(
that
),
isWithin
;
if
(
that
.
nodeName
===
'circle'
)
{
if
(
!
$$
.
isTargetToShow
(
d
.
id
))
{
isWithin
=
false
;
}
else
if
(
that
.
nodeName
===
'circle'
)
{
// circle is hidden in step chart, so treat as within the click area
isWithin
=
$$
.
isStepType
(
d
)
?
true
:
$$
.
isWithinCircle
(
that
,
$$
.
pointSelectR
(
d
)
*
1.5
);
}
...
...
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