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
c94899cf
Commit
c94899cf
authored
Nov 07, 2015
by
Evgeny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Partly fix bug with sub-charts in nodejs
parent
eab844af
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
32 deletions
+16
-32
c3.js
c3.js
+8
-16
c3.min.js
c3.min.js
+0
-0
arc.js
src/arc.js
+1
-1
axis.js
src/axis.js
+3
-3
callbacks.js
src/callbacks.js
+2
-2
lines.js
src/lines.js
+2
-10
No files found.
c3.js
View file @
c94899cf
...
...
@@ -4750,8 +4750,8 @@
if
(
sync
){
apply
();
}
else
{
$$
.
buffer
.
onlastfinish
(
"tune-axis"
,
apply
);
$$
.
buffer
.
onlastfinish
(
"cached-redraw"
,
function
(){});
$$
.
buffer
.
onlastfinish
(
"tune-axis"
+
$$
.
config
.
isSub
,
apply
);
$$
.
buffer
.
onlastfinish
(
"cached-redraw"
+
$$
.
config
.
isSub
,
function
(){});
}
};
...
...
@@ -4806,7 +4806,7 @@
axis
=
$$
.
getAxisData
(
min
,
max
,
true
);
break
;
default
:
throw
new
Error
(
"Unsupported type for axis
"
);
throw
new
Error
(
"Unsupported type for axis
"
+
type
);
}
return
axis
;
};
...
...
@@ -5401,7 +5401,7 @@
.
style
(
"opacity"
,
$$
.
hasType
(
'donut'
)
||
$$
.
hasType
(
'gauge'
)
?
1
:
0
);
if
(
$$
.
config
.
hasSubs
||
$$
.
config
.
isSub
){
$$
.
buffer
.
onlastfinish
(
"draw-lines"
,
function
(){
$$
.
buffer
.
onlastfinish
(
"draw-lines"
+
$$
.
config
.
isSub
,
function
(){
$$
.
ed3Internal
.
redrawLinesOnBoth
();
$$
.
ed3Internal
.
redrawLinesOnBoth
();
});
...
...
@@ -6143,8 +6143,8 @@
$$
.
pushCallback
(
callback
);
if
(
$$
.
config
.
shouldCache
){
if
(
!
$$
.
buffer
.
has
(
"tune-axis"
)){
$$
.
buffer
.
onlastfinish
(
"cached-redraw"
,
if
(
!
$$
.
buffer
.
has
(
"tune-axis"
+
$$
.
config
.
isSub
)){
$$
.
buffer
.
onlastfinish
(
"cached-redraw"
+
$$
.
config
.
isSub
,
function
(){
$$
.
resolveDraw
(
options
);
}
...
...
@@ -6492,7 +6492,7 @@
$$
.
ed3Config
.
subBox
=
$$
.
getBox
(
$$
.
main
.
selectAll
(
".sub-chart .c3-chart-bars"
));
if
(
!
$$
.
ed3Config
.
coords
[
order
]
)
return
;
if
(
isUndefined
(
$$
.
ed3Config
.
coords
[
order
])
)
return
;
var
coords
=
$$
.
ed3Config
.
coords
[
order
];
...
...
@@ -6526,10 +6526,6 @@
y1
=
center
.
y
+
$$
.
radius
*
(
small
?
Math
.
cos
(
$$
.
config
.
angle
)
:
1
);
}
if
(
!
$$
.
ed3Config
.
coords
){
$$
.
ed3Config
.
coords
=
{};
}
if
(
!
$$
.
ed3Config
.
subBox
)
return
;
x2
=
$$
.
ed3Config
.
subBox
.
x
+
$$
.
getCurrentWidth
();
...
...
@@ -6564,7 +6560,7 @@
if
(
isSub
(
$$
.
config
.
ed3Type
)){
if
(
!
$$
.
ed3Config
.
coords
)
return
;
if
(
!
$$
.
ed3Config
.
coords
[
order
]
)
return
;
var
coords
=
$$
.
ed3Config
.
coords
[
order
];
...
...
@@ -6600,10 +6596,6 @@
y2
=
center
.
y
+
$$
.
radius
;
}
if
(
!
$$
.
ed3Config
.
coords
){
$$
.
ed3Config
.
coords
=
{};
}
if
(
small
){
var
subCenter
=
{
x
:
center
.
x
+
$$
.
getCurrentWidth
(),
...
...
c3.min.js
View file @
c94899cf
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/arc.js
View file @
c94899cf
...
...
@@ -305,7 +305,7 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf
.
style
(
"opacity"
,
$$
.
hasType
(
'donut'
)
||
$$
.
hasType
(
'gauge'
)
?
1
:
0
);
if
(
$$
.
config
.
hasSubs
||
$$
.
config
.
isSub
){
$$
.
buffer
.
onlastfinish
(
"draw-lines"
,
function
(){
$$
.
buffer
.
onlastfinish
(
"draw-lines"
+
$$
.
config
.
isSub
,
function
(){
$$
.
ed3Internal
.
redrawLinesOnBoth
();
$$
.
ed3Internal
.
redrawLinesOnBoth
();
});
...
...
src/axis.js
View file @
c94899cf
...
...
@@ -411,8 +411,8 @@ c3_chart_internal_fn.tuneAxis = function(sync, callback){
if
(
sync
){
apply
();
}
else
{
$$
.
buffer
.
onlastfinish
(
"tune-axis"
,
apply
);
$$
.
buffer
.
onlastfinish
(
"cached-redraw"
,
function
(){});
$$
.
buffer
.
onlastfinish
(
"tune-axis"
+
$$
.
config
.
isSub
,
apply
);
$$
.
buffer
.
onlastfinish
(
"cached-redraw"
+
$$
.
config
.
isSub
,
function
(){});
}
};
...
...
@@ -467,7 +467,7 @@ c3_chart_internal_fn.getAbscissa = function(type, min, max) {
axis
=
$$
.
getAxisData
(
min
,
max
,
true
);
break
;
default
:
throw
new
Error
(
"Unsupported type for axis
"
);
throw
new
Error
(
"Unsupported type for axis
"
+
type
);
}
return
axis
;
};
...
...
src/callbacks.js
View file @
c94899cf
...
...
@@ -39,8 +39,8 @@ c3.chart.internal.fn.cachedRedraw = function(options, callback){
$$
.
pushCallback
(
callback
);
if
(
$$
.
config
.
shouldCache
){
if
(
!
$$
.
buffer
.
has
(
"tune-axis"
)){
$$
.
buffer
.
onlastfinish
(
"cached-redraw"
,
if
(
!
$$
.
buffer
.
has
(
"tune-axis"
+
$$
.
config
.
isSub
)){
$$
.
buffer
.
onlastfinish
(
"cached-redraw"
+
$$
.
config
.
isSub
,
function
(){
$$
.
resolveDraw
(
options
);
}
...
...
src/lines.js
View file @
c94899cf
...
...
@@ -35,7 +35,7 @@ c3.chart.internal.fn.getLineCoordsForBar = function(center, order){
$$
.
ed3Config
.
subBox
=
$$
.
getBox
(
$$
.
main
.
selectAll
(
".sub-chart .c3-chart-bars"
));
if
(
!
$$
.
ed3Config
.
coords
[
order
]
)
return
;
if
(
isUndefined
(
$$
.
ed3Config
.
coords
[
order
])
)
return
;
var
coords
=
$$
.
ed3Config
.
coords
[
order
];
...
...
@@ -69,10 +69,6 @@ c3.chart.internal.fn.getLineCoordsForBar = function(center, order){
y1
=
center
.
y
+
$$
.
radius
*
(
small
?
Math
.
cos
(
$$
.
config
.
angle
)
:
1
);
}
if
(
!
$$
.
ed3Config
.
coords
){
$$
.
ed3Config
.
coords
=
{};
}
if
(
!
$$
.
ed3Config
.
subBox
)
return
;
x2
=
$$
.
ed3Config
.
subBox
.
x
+
$$
.
getCurrentWidth
();
...
...
@@ -107,7 +103,7 @@ c3.chart.internal.fn.getLineCoordsForPie = function(center, order){
if
(
isSub
(
$$
.
config
.
ed3Type
)){
if
(
!
$$
.
ed3Config
.
coords
)
return
;
if
(
!
$$
.
ed3Config
.
coords
[
order
]
)
return
;
var
coords
=
$$
.
ed3Config
.
coords
[
order
];
...
...
@@ -143,10 +139,6 @@ c3.chart.internal.fn.getLineCoordsForPie = function(center, order){
y2
=
center
.
y
+
$$
.
radius
;
}
if
(
!
$$
.
ed3Config
.
coords
){
$$
.
ed3Config
.
coords
=
{};
}
if
(
small
){
var
subCenter
=
{
x
:
center
.
x
+
$$
.
getCurrentWidth
(),
...
...
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