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
e92b76f6
Commit
e92b76f6
authored
Oct 19, 2013
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add axis x default and remove subchart default
parent
f401ff4d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
c3.js
c3.js
+7
-8
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 @
e92b76f6
...
@@ -51,8 +51,7 @@
...
@@ -51,8 +51,7 @@
// subchart
// subchart
var
__subchart_show
=
getConfig
([
'subchart'
,
'show'
],
false
),
var
__subchart_show
=
getConfig
([
'subchart'
,
'show'
],
false
),
__subchart_size_height
=
__subchart_show
?
getConfig
([
'subchart'
,
'size'
,
'height'
],
60
)
:
0
,
__subchart_size_height
=
__subchart_show
?
getConfig
([
'subchart'
,
'size'
,
'height'
],
60
)
:
0
;
__subchart_default
=
getConfig
([
'subchart'
,
'default'
],
null
);
// color
// color
var
__color_pattern
=
getConfig
([
'color'
,
'pattern'
],
null
);
var
__color_pattern
=
getConfig
([
'color'
,
'pattern'
],
null
);
...
@@ -66,6 +65,7 @@
...
@@ -66,6 +65,7 @@
var
__axis_x_type
=
getConfig
([
'axis'
,
'x'
,
'type'
],
'indexed'
),
var
__axis_x_type
=
getConfig
([
'axis'
,
'x'
,
'type'
],
'indexed'
),
__axis_x_categories
=
getConfig
([
'axis'
,
'x'
,
'categories'
],
[]),
__axis_x_categories
=
getConfig
([
'axis'
,
'x'
,
'categories'
],
[]),
__axis_x_tick_centered
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'centered'
],
false
),
__axis_x_tick_centered
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'centered'
],
false
),
__axis_x_default
=
getConfig
([
'axis'
,
'x'
,
'default'
],
null
),
__axis_y_max
=
getConfig
([
'axis'
,
'y'
,
'max'
],
null
),
__axis_y_max
=
getConfig
([
'axis'
,
'y'
,
'max'
],
null
),
__axis_y_min
=
getConfig
([
'axis'
,
'y'
,
'min'
],
null
),
__axis_y_min
=
getConfig
([
'axis'
,
'y'
,
'min'
],
null
),
__axis_y_center
=
getConfig
([
'axis'
,
'y'
,
'center'
],
null
),
__axis_y_center
=
getConfig
([
'axis'
,
'y'
,
'center'
],
null
),
...
@@ -1156,6 +1156,11 @@
...
@@ -1156,6 +1156,11 @@
main
.
select
(
".chart"
).
append
(
"g"
)
main
.
select
(
".chart"
).
append
(
"g"
)
.
attr
(
"class"
,
"chart-lines"
);
.
attr
(
"class"
,
"chart-lines"
);
// Set default extent if defined
if
(
__axis_x_default
!==
null
)
{
brush
.
extent
(
typeof
__axis_x_default
!==
'function'
?
__axis_x_default
:
(
isTimeSeries
?
__axis_x_default
(
firstDate
,
lastDate
)
:
__axis_x_default
(
0
,
maxDataCount
()
-
1
)));
}
/*-- Context Region --*/
/*-- Context Region --*/
if
(
__subchart_show
)
{
if
(
__subchart_show
)
{
...
@@ -1172,12 +1177,6 @@
...
@@ -1172,12 +1177,6 @@
context
.
select
(
".chart"
).
append
(
"g"
)
context
.
select
(
".chart"
).
append
(
"g"
)
.
attr
(
"class"
,
"chart-lines"
);
.
attr
(
"class"
,
"chart-lines"
);
// ATTENTION: This must be called AFTER chart rendered and BEFORE brush called.
// Update extetn for Brush
if
(
__subchart_default
!==
null
)
{
brush
.
extent
((
isTimeSeries
)
?
__subchart_default
(
firstDate
,
lastDate
)
:
__subchart_default
(
0
,
maxDataCount
()
-
1
));
}
// Add extent rect for Brush
// Add extent rect for Brush
context
.
append
(
"g"
)
context
.
append
(
"g"
)
.
attr
(
"class"
,
"x brush"
)
.
attr
(
"class"
,
"x brush"
)
...
...
c3.min.js
View file @
e92b76f6
This diff is collapsed.
Click to expand it.
htdocs/js/c3.min.js
View file @
e92b76f6
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