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
8f35e4ac
Commit
8f35e4ac
authored
Sep 05, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bar width on subchart when brush - #497
parent
bab6c75f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
c3.js
c3.js
+4
-2
c3.min.js
c3.min.js
+0
-0
axis.js
src/axis.js
+2
-1
shape.bar.js
src/shape.bar.js
+2
-1
No files found.
c3.js
View file @
8f35e4ac
...
...
@@ -2885,8 +2885,9 @@
};
c3_chart_internal_fn
.
generateGetBarPoints
=
function
(
barIndices
,
isSub
)
{
var
$$
=
this
,
axis
=
isSub
?
$$
.
subXAxis
:
$$
.
xAxis
,
barTargetsNum
=
barIndices
.
__max__
+
1
,
barW
=
$$
.
getBarW
(
$$
.
xA
xis
,
barTargetsNum
),
barW
=
$$
.
getBarW
(
a
xis
,
barTargetsNum
),
barX
=
$$
.
getShapeX
(
barW
,
barTargetsNum
,
barIndices
,
!!
isSub
),
barY
=
$$
.
getShapeY
(
!!
isSub
),
barOffset
=
$$
.
getShapeOffset
(
$$
.
isBarType
,
barIndices
,
!!
isSub
),
...
...
@@ -3758,7 +3759,8 @@
}
else
{
// TODO: move this to c3_axis
axis
.
tickOffset
=
function
()
{
var
edgeX
=
$$
.
getEdgeX
(
$$
.
data
.
targets
),
diff
=
$$
.
x
(
edgeX
[
1
])
-
$$
.
x
(
edgeX
[
0
]),
var
scale
=
this
.
scale
(),
edgeX
=
$$
.
getEdgeX
(
$$
.
data
.
targets
),
diff
=
scale
(
edgeX
[
1
])
-
scale
(
edgeX
[
0
]),
base
=
diff
?
diff
:
(
config
.
axis_rotated
?
$$
.
height
:
$$
.
width
);
return
(
base
/
$$
.
getMaxDataCount
())
/
2
;
};
...
...
c3.min.js
View file @
8f35e4ac
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/axis.js
View file @
8f35e4ac
...
...
@@ -48,7 +48,8 @@ c3_chart_internal_fn.getXAxis = function (scale, orient, tickFormat, tickValues)
}
else
{
// TODO: move this to c3_axis
axis
.
tickOffset
=
function
()
{
var
edgeX
=
$$
.
getEdgeX
(
$$
.
data
.
targets
),
diff
=
$$
.
x
(
edgeX
[
1
])
-
$$
.
x
(
edgeX
[
0
]),
var
scale
=
this
.
scale
(),
edgeX
=
$$
.
getEdgeX
(
$$
.
data
.
targets
),
diff
=
scale
(
edgeX
[
1
])
-
scale
(
edgeX
[
0
]),
base
=
diff
?
diff
:
(
config
.
axis_rotated
?
$$
.
height
:
$$
.
width
);
return
(
base
/
$$
.
getMaxDataCount
())
/
2
;
};
...
...
src/shape.bar.js
View file @
8f35e4ac
...
...
@@ -86,8 +86,9 @@ c3_chart_internal_fn.generateDrawBar = function (barIndices, isSub) {
};
c3_chart_internal_fn
.
generateGetBarPoints
=
function
(
barIndices
,
isSub
)
{
var
$$
=
this
,
axis
=
isSub
?
$$
.
subXAxis
:
$$
.
xAxis
,
barTargetsNum
=
barIndices
.
__max__
+
1
,
barW
=
$$
.
getBarW
(
$$
.
xA
xis
,
barTargetsNum
),
barW
=
$$
.
getBarW
(
a
xis
,
barTargetsNum
),
barX
=
$$
.
getShapeX
(
barW
,
barTargetsNum
,
barIndices
,
!!
isSub
),
barY
=
$$
.
getShapeY
(
!!
isSub
),
barOffset
=
$$
.
getShapeOffset
(
$$
.
isBarType
,
barIndices
,
!!
isSub
),
...
...
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