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
charts
c3-closed
Commits
05707358
Commit
05707358
authored
Jul 12, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce bar.width.max - #174
parent
c7288d84
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
c3.js
c3.js
+3
-1
c3.min.js
c3.min.js
+0
-0
chart_bar.html
htdocs/samples/chart_bar.html
+2
-1
No files found.
c3.js
View file @
05707358
...
...
@@ -257,6 +257,7 @@
// bar
var
__bar_width
=
getConfig
([
'bar'
,
'width'
]),
__bar_width_ratio
=
getConfig
([
'bar'
,
'width'
,
'ratio'
],
0.6
),
__bar_width_max
=
getConfig
([
'bar'
,
'width'
,
'max'
]),
__bar_zerobased
=
getConfig
([
'bar'
,
'zerobased'
],
true
);
// area
...
...
@@ -2166,7 +2167,8 @@
//-- Bar --//
function
getBarW
(
axis
,
barTargetsNum
)
{
return
typeof
__bar_width
===
'number'
?
__bar_width
:
barTargetsNum
?
(
axis
.
tickOffset
()
*
2
*
__bar_width_ratio
)
/
barTargetsNum
:
0
;
var
w
=
typeof
__bar_width
===
'number'
?
__bar_width
:
barTargetsNum
?
(
axis
.
tickOffset
()
*
2
*
__bar_width_ratio
)
/
barTargetsNum
:
0
;
return
__bar_width_ratio
&&
w
>
__bar_width_max
?
__bar_width_max
:
w
;
}
//-- Type --//
...
...
c3.min.js
View file @
05707358
This source diff could not be displayed because it is too large. You can
view the blob
instead.
htdocs/samples/chart_bar.html
View file @
05707358
...
...
@@ -28,7 +28,8 @@
},
bar
:
{
width
:
{
ratio
:
0.3
ratio
:
0.3
,
// max: 30
},
}
});
...
...
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