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
93348c05
Commit
93348c05
authored
Oct 24, 2013
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix resize and zoom when categorized axis
parent
afefe29a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
26 deletions
+26
-26
c3.js
c3.js
+26
-26
c3.min.js
c3.min.js
+0
-0
c3.min.js
htdocs/js/c3.min.js
+0
-0
No files found.
c3.js
View file @
93348c05
...
@@ -214,9 +214,35 @@
...
@@ -214,9 +214,35 @@
yAxis
.
scale
(
y
).
orient
(
__axis_rotated
?
(
__axis_y_inner
?
"top"
:
"bottom"
)
:
(
__axis_y_inner
?
"right"
:
"left"
));
yAxis
.
scale
(
y
).
orient
(
__axis_rotated
?
(
__axis_y_inner
?
"top"
:
"bottom"
)
:
(
__axis_y_inner
?
"right"
:
"left"
));
yAxis2
.
scale
(
y2
).
orient
(
__axis_rotated
?
(
__axis_y2_inner
?
"bottom"
:
"top"
)
:
(
__axis_y2_inner
?
"left"
:
"right"
));
yAxis2
.
scale
(
y2
).
orient
(
__axis_rotated
?
(
__axis_y2_inner
?
"bottom"
:
"top"
)
:
(
__axis_y2_inner
?
"left"
:
"right"
));
subXAxis
.
scale
(
subX
).
orient
(
"bottom"
);
subXAxis
.
scale
(
subX
).
orient
(
"bottom"
);
// Use custom scale if needed
if
(
isCategorized
)
{
// TODO: fix this
// TODO: fix x_grid
(
function
()
{
var
_x
=
x
,
_subX
=
subX
;
var
keys
=
Object
.
keys
(
x
),
key
,
i
;
x
=
function
(
d
){
return
_x
(
d
)
+
xAxis
.
tickOffset
();
};
subX
=
function
(
d
){
return
_subX
(
d
)
+
subXAxis
.
tickOffset
();
};
for
(
i
=
0
;
i
<
keys
.
length
;
i
++
)
{
key
=
keys
[
i
];
x
[
key
]
=
_x
[
key
];
subX
[
key
]
=
_subX
[
key
];
}
x
.
domain
=
function
(
domain
)
{
if
(
!
arguments
.
length
)
{
var
domain
=
_x
.
domain
();
domain
[
1
]
++
;
return
domain
;
}
_x
.
domain
(
domain
);
return
x
;
};
})();
}
};
};
updateScales
();
updateScales
();
// Set up axies
if
(
isTimeSeries
)
{
if
(
isTimeSeries
)
{
xAxis
.
tickFormat
(
customTimeFormat
);
xAxis
.
tickFormat
(
customTimeFormat
);
}
}
...
@@ -234,32 +260,6 @@
...
@@ -234,32 +260,6 @@
};
};
}
}
// Use custom scale if needed
if
(
isCategorized
)
{
// TODO: fix this
// TODO: fix x_grid
(
function
()
{
var
_x
=
x
,
_subX
=
subX
;
var
keys
=
Object
.
keys
(
x
),
key
,
i
;
x
=
function
(
d
){
return
_x
(
d
)
+
xAxis
.
tickOffset
();
};
subX
=
function
(
d
){
return
_subX
(
d
)
+
subXAxis
.
tickOffset
();
};
for
(
i
=
0
;
i
<
keys
.
length
;
i
++
)
{
key
=
keys
[
i
];
x
[
key
]
=
_x
[
key
];
subX
[
key
]
=
_subX
[
key
];
}
x
.
domain
=
function
(
domain
)
{
if
(
!
arguments
.
length
)
{
var
domain
=
_x
.
domain
();
domain
[
1
]
++
;
return
domain
;
}
_x
.
domain
(
domain
);
return
x
;
};
})();
}
// For main region
// For main region
var
lineOnMain
=
(
function
()
{
var
lineOnMain
=
(
function
()
{
var
line
=
d3
.
svg
.
line
()
var
line
=
d3
.
svg
.
line
()
...
...
c3.min.js
View file @
93348c05
This diff is collapsed.
Click to expand it.
htdocs/js/c3.min.js
View file @
93348c05
This diff is collapsed.
Click to expand it.
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