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
fe21f1e7
Commit
fe21f1e7
authored
May 01, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bar stack - #192
parent
b10fec74
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
c3.js
c3.js
+7
-7
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
fe21f1e7
...
...
@@ -193,7 +193,7 @@
__axis_y_label
=
getConfig
([
'axis'
,
'y'
,
'label'
],
{}),
__axis_y_inner
=
getConfig
([
'axis'
,
'y'
,
'inner'
],
false
),
__axis_y_tick_format
=
getConfig
([
'axis'
,
'y'
,
'tick'
,
'format'
]),
__axis_y_padding
=
getConfig
([
'axis'
,
'y'
,
'padding'
]
,
{}
),
__axis_y_padding
=
getConfig
([
'axis'
,
'y'
,
'padding'
]),
__axis_y_ticks
=
getConfig
([
'axis'
,
'y'
,
'ticks'
],
10
),
__axis_y2_show
=
getConfig
([
'axis'
,
'y2'
,
'show'
],
false
),
__axis_y2_max
=
getConfig
([
'axis'
,
'y2'
,
'max'
]),
...
...
@@ -202,7 +202,7 @@
__axis_y2_label
=
getConfig
([
'axis'
,
'y2'
,
'label'
],
{}),
__axis_y2_inner
=
getConfig
([
'axis'
,
'y2'
,
'inner'
],
false
),
__axis_y2_tick_format
=
getConfig
([
'axis'
,
'y2'
,
'tick'
,
'format'
]),
__axis_y2_padding
=
getConfig
([
'axis'
,
'y2'
,
'padding'
]
,
{}
),
__axis_y2_padding
=
getConfig
([
'axis'
,
'y2'
,
'padding'
]),
__axis_y2_ticks
=
getConfig
([
'axis'
,
'y2'
,
'ticks'
],
10
);
// grid
...
...
@@ -1781,7 +1781,7 @@
}
function
getDataLabelWidth
(
min
,
max
)
{
var
widths
=
[],
paddingCoef
=
1.3
;
d3
.
select
(
'svg'
).
selectAll
(
'.dummy'
)
selectChart
.
select
(
'svg'
).
selectAll
(
'.dummy'
)
.
data
([
min
,
max
])
.
enter
().
append
(
'text'
)
.
text
(
function
(
d
)
{
return
d
;
})
...
...
@@ -2408,17 +2408,17 @@
function
generateGetBarPoints
(
barIndices
,
isSub
)
{
var
barTargetsNum
=
barIndices
.
__max__
+
1
,
barW
=
getBarW
(
xAxis
,
barTargetsNum
),
x
=
getBarX
(
barW
,
barTargetsNum
,
barIndices
,
!!
isSub
),
y
=
getBarY
(
!!
isSub
),
barX
=
getBarX
(
barW
,
barTargetsNum
,
barIndices
,
!!
isSub
),
barY
=
getBarY
(
!!
isSub
),
barOffset
=
getBarOffset
(
barIndices
,
!!
isSub
),
yScale
=
isSub
?
getSubYScale
:
getYScale
;
return
function
(
d
,
i
)
{
var
y0
=
yScale
(
d
.
id
)(
0
),
offset
=
barOffset
(
d
,
i
)
||
y0
,
// offset is for stacked bar chart
posX
=
x
(
d
),
posY
=
y
(
d
);
posX
=
barX
(
d
),
posY
=
barY
(
d
);
// fix posY not to overflow opposite quadrant
if
(
__axis_rotated
)
{
if
((
d
.
value
>
0
&&
posY
<
offset
)
||
(
d
.
value
<
0
&&
posY
>
offset
))
{
posY
=
offset
;
}
if
((
0
<
d
.
value
&&
posY
<
y0
)
||
(
d
.
value
<
0
&&
y0
<
posY
))
{
posY
=
y0
;
}
}
// 4 points that make a bar
return
[
...
...
c3.min.js
View file @
fe21f1e7
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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