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
d3e6f441
Commit
d3e6f441
authored
Jun 05, 2013
by
Masayuki Tanaka
Committed by
masayuki
Jun 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regions
parent
f9107767
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
c3.js
c3.js
+10
-11
No files found.
c3.js
View file @
d3e6f441
...
...
@@ -97,7 +97,7 @@
__point_onunselected
=
getConfig
([
'point'
,
'onunselected'
],
function
(){})
// region - region to change style
var
__regions
=
getConfig
([
'regions'
],
null
)
var
__regions
=
getConfig
([
'regions'
],
[]
)
// tooltip - show when mouseover on each data
var
__tooltip_contents
=
getConfig
([
'tooltip'
,
'contents'
],
function
(
d
)
{
...
...
@@ -802,14 +802,9 @@
}
// Area
if
(
__regions
!==
null
)
{
grid
.
append
(
'g'
)
.
attr
(
"class"
,
"regions"
)
.
selectAll
(
'rect.region'
)
.
data
(
__regions
)
.
enter
().
append
(
'rect'
)
.
attr
(
'class'
,
function
(
d
,
i
){
return
'region region-'
+
i
})
}
main
.
append
(
'g'
)
.
attr
(
"clip-path"
,
clipPath
)
.
attr
(
"class"
,
"regions"
)
// Define g for chart area
main
.
append
(
'g'
)
...
...
@@ -1250,12 +1245,16 @@
.
attr
(
"height"
,
__axis_rotated
?
rectW
:
height
)
// rect for regions
main
.
selectAll
(
'rect.region'
)
mainRegion
=
main
.
select
(
'.regions'
).
selectAll
(
'rect.region'
)
.
data
(
__regions
)
mainRegion
.
enter
().
append
(
'rect'
)
.
attr
(
'class'
,
function
(
d
,
i
){
return
'region region-'
+
i
})
// TODO: fix class
mainRegion
.
attr
(
"x"
,
__axis_rotated
?
0
:
regionStart
)
.
attr
(
"y"
,
__axis_rotated
?
regionStart
:
margin
.
top
)
.
attr
(
"width"
,
__axis_rotated
?
width
:
regionWidth
)
.
attr
(
"height"
,
__axis_rotated
?
regionWidth
:
height
)
// TODO: enter/exti section for data add/remove
mainRegion
.
exit
().
remove
()
}
function
updateTargets
(
targets
)
{
...
...
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