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
cf4f5e95
Commit
cf4f5e95
authored
Mar 13, 2014
by
Tom Herold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added 'multiselected' option
parent
52e5c895
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
1 deletion
+34
-1
c3.js
c3.js
+8
-1
c3.min.js
c3.min.js
+0
-0
selection_line.html
htdocs/samples/selection_line.html
+26
-0
No files found.
c3.js
View file @
cf4f5e95
...
@@ -65,7 +65,9 @@
...
@@ -65,7 +65,9 @@
__data_colors
=
getConfig
([
'data'
,
'colors'
],
{}),
__data_colors
=
getConfig
([
'data'
,
'colors'
],
{}),
__data_selection_enabled
=
getConfig
([
'data'
,
'selection'
,
'enabled'
],
false
),
__data_selection_enabled
=
getConfig
([
'data'
,
'selection'
,
'enabled'
],
false
),
__data_selection_grouped
=
getConfig
([
'data'
,
'selection'
,
'grouped'
],
false
),
__data_selection_grouped
=
getConfig
([
'data'
,
'selection'
,
'grouped'
],
false
),
__data_selection_isselectable
=
getConfig
([
'data'
,
'selection'
,
'isselectable'
],
function
()
{
return
true
;
});
__data_selection_isselectable
=
getConfig
([
'data'
,
'selection'
,
'isselectable'
],
function
()
{
return
true
;
}),
__data_selection_multiselected
=
getConfig
([
'data'
,
'selection'
,
'multiselected'
],
true
);
// subchart
// subchart
var
__subchart_show
=
getConfig
([
'subchart'
,
'show'
],
false
),
var
__subchart_show
=
getConfig
([
'subchart'
,
'show'
],
false
),
...
@@ -2177,6 +2179,11 @@
...
@@ -2177,6 +2179,11 @@
}
}
if
(
__data_selection_grouped
||
isWithin
)
{
if
(
__data_selection_grouped
||
isWithin
)
{
if
(
__data_selection_enabled
&&
__data_selection_isselectable
(
d
))
{
if
(
__data_selection_enabled
&&
__data_selection_isselectable
(
d
))
{
if
(
!
__data_selection_multiselected
)
{
main
.
selectAll
(
target
.
nodeName
).
each
(
function
(
d
,
i
)
{
toggle
(
false
,
this
,
d
,
i
);
});
}
_this
.
classed
(
SELECTED
,
!
isSelected
);
_this
.
classed
(
SELECTED
,
!
isSelected
);
toggle
(
!
isSelected
,
_this
,
d
,
i
);
toggle
(
!
isSelected
,
_this
,
d
,
i
);
}
}
...
...
c3.min.js
View file @
cf4f5e95
This source diff could not be displayed because it is too large. You can
view the blob
instead.
htdocs/samples/selection_line.html
0 → 100644
View file @
cf4f5e95
<html>
<head>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/c3.css"
>
</head>
<body>
<div
id=
"chart"
></div>
<script
src=
"http://d3js.org/d3.v3.min.js"
charset=
"utf-8"
></script>
<script
src=
"/js/c3.js"
></script>
<script>
var
chart
=
c3
.
generate
({
bindto
:
'#chart'
,
data
:
{
columns
:
[
[
'sample'
,
30
,
200
,
100
,
400
,
150
,
250
]
],
selection
:
{
enabled
:
true
,
grouped
:
true
,
multiselected
:
false
}
}
});
</script>
</body>
</html>
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