C3.js | D3-based reusable chart library
Menu
Getting Started
Examples
Reference
Forum
Source
Style for Region
0
1
2
3
4
5
0
50
100
150
200
250
300
350
400
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
sample
# style_region.js
var
chart
=
c3
.
generate
({
data
:
{
columns
:
[
[
'sample'
,
30
,
200
,
100
,
400
,
150
,
250
]
]
}
,
regions
:
[
{
start
:
0
,
end
:
1
}
,
{
start
:
2
,
end
:
4
,
class
:
'foo'
}
]
})
;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# style_region.css
.c3-region-0 { fill: red; } .c3-region.foo { fill: green; }