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
bee04927
Commit
bee04927
authored
Nov 08, 2015
by
Evgeny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update fow
parent
db6b4ac3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
24 deletions
+24
-24
c3.js
c3.js
+12
-12
c3.min.js
c3.min.js
+0
-0
api.flow.js
src/api.flow.js
+4
-4
arc.js
src/arc.js
+1
-1
core.js
src/core.js
+3
-3
data.load.js
src/data.load.js
+4
-4
No files found.
c3.js
View file @
bee04927
...
...
@@ -670,11 +670,11 @@
withSubchart
=
getOption
(
options
,
"withSubchart"
,
true
);
withTransition
=
getOption
(
options
,
"withTransition"
,
true
);
withTransform
=
getOption
(
options
,
"withTransform"
,
false
);
withUpdateXDomain
=
getOption
(
options
,
"withUpdateXDomain"
,
fals
e
);
withUpdateOrgXDomain
=
getOption
(
options
,
"withUpdateOrgXDomain"
,
fals
e
);
withUpdateXDomain
=
getOption
(
options
,
"withUpdateXDomain"
,
tru
e
);
withUpdateOrgXDomain
=
getOption
(
options
,
"withUpdateOrgXDomain"
,
tru
e
);
withTrimXDomain
=
getOption
(
options
,
"withTrimXDomain"
,
true
);
withUpdateXAxis
=
getOption
(
options
,
"withUpdateXAxis"
,
withUpdateXDomain
);
withLegend
=
getOption
(
options
,
"withLegend"
,
fals
e
);
withLegend
=
getOption
(
options
,
"withLegend"
,
tru
e
);
withEventRect
=
getOption
(
options
,
"withEventRect"
,
true
);
withDimension
=
getOption
(
options
,
"withDimension"
,
true
);
withTransitionForExit
=
getOption
(
options
,
"withTransitionForExit"
,
withTransition
);
...
...
@@ -2310,7 +2310,7 @@
});
}
// Update/Add data
$$
.
data
.
targets
.
forEach
(
function
(
d
)
{
$$
.
data
.
_
targets
.
forEach
(
function
(
d
)
{
for
(
var
i
=
0
;
i
<
targets
.
length
;
i
++
)
{
if
(
d
.
id
===
targets
[
i
].
id
)
{
d
.
values
=
targets
[
i
].
values
;
...
...
@@ -2330,7 +2330,7 @@
// Redraw with new targets
$$
.
redraw
({
withUpdateOrgXDomain
:
true
,
withUpdateXDomain
:
true
,
withLegend
:
true
});
if
(
args
.
done
)
{
args
.
done
();
}
if
(
args
&&
args
.
done
)
{
args
.
done
();
}
};
c3_chart_internal_fn
.
loadFromArgs
=
function
(
args
)
{
var
$$
=
this
;
...
...
@@ -2361,7 +2361,7 @@
done
=
function
()
{};
}
// filter existing target
targetIds
=
targetIds
.
filter
(
function
(
id
)
{
return
$$
.
hasTarget
(
$$
.
data
.
targets
,
id
);
});
targetIds
=
targetIds
.
filter
(
function
(
id
)
{
return
$$
.
hasTarget
(
$$
.
data
.
_
targets
,
id
);
});
// If no target, call done and return
if
(
!
targetIds
||
targetIds
.
length
===
0
)
{
done
();
...
...
@@ -2380,7 +2380,7 @@
$$
.
legend
.
selectAll
(
'.'
+
CLASS
.
legendItem
+
$$
.
getTargetSelectorSuffix
(
id
)).
remove
();
}
// Remove target
$$
.
data
.
_targets
=
$$
.
data
.
targets
.
filter
(
function
(
t
)
{
$$
.
data
.
_targets
=
$$
.
data
.
_
targets
.
filter
(
function
(
t
)
{
return
t
.
id
!==
id
;
});
$$
.
data
.
targets
=
$$
.
normalize
(
$$
.
data
.
_targets
);
...
...
@@ -5400,7 +5400,7 @@
main
.
select
(
'.'
+
CLASS
.
chartArcsTitle
)
.
style
(
"opacity"
,
$$
.
hasType
(
'donut'
)
||
$$
.
hasType
(
'gauge'
)
?
1
:
0
);
if
(
$$
.
config
.
hasSubs
||
$$
.
config
.
isSub
){
if
(
typeof
process
!==
'object'
&&
(
$$
.
config
.
hasSubs
||
$$
.
config
.
isSub
)
){
$$
.
buffer
.
onlastfinish
(
"draw-lines"
+
$$
.
config
.
isSub
,
function
(){
$$
.
buffer
.
onlastfinish
(
"draw-lines"
+
$$
.
config
.
isSub
,
function
(){
$$
.
ed3Internal
.
redrawLinesOnBoth
();
...
...
@@ -7012,7 +7012,7 @@
targets
=
$$
.
convertDataToTargets
(
data
,
true
);
// Update/Add data
$$
.
data
.
targets
.
forEach
(
function
(
t
)
{
$$
.
data
.
_
targets
.
forEach
(
function
(
t
)
{
var
found
=
false
,
i
,
j
;
for
(
i
=
0
;
i
<
targets
.
length
;
i
++
)
{
if
(
t
.
id
===
targets
[
i
].
id
)
{
...
...
@@ -7039,7 +7039,7 @@
});
// Append null for not found targets
$$
.
data
.
targets
.
forEach
(
function
(
t
)
{
$$
.
data
.
_
targets
.
forEach
(
function
(
t
)
{
var
i
,
j
;
for
(
i
=
0
;
i
<
notfoundIds
.
length
;
i
++
)
{
if
(
t
.
id
===
notfoundIds
[
i
])
{
...
...
@@ -7057,10 +7057,10 @@
});
// Generate null values for new target
if
(
$$
.
data
.
targets
.
length
)
{
if
(
$$
.
data
.
_
targets
.
length
)
{
targets
.
forEach
(
function
(
t
)
{
var
i
,
missing
=
[];
for
(
i
=
$$
.
data
.
targets
[
0
].
values
[
0
].
index
;
i
<
tail
;
i
++
)
{
for
(
i
=
$$
.
data
.
_
targets
[
0
].
values
[
0
].
index
;
i
<
tail
;
i
++
)
{
missing
.
push
({
id
:
t
.
id
,
index
:
i
,
...
...
c3.min.js
View file @
bee04927
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/api.flow.js
View file @
bee04927
...
...
@@ -18,7 +18,7 @@ c3_chart_fn.flow = function (args) {
targets
=
$$
.
convertDataToTargets
(
data
,
true
);
// Update/Add data
$$
.
data
.
targets
.
forEach
(
function
(
t
)
{
$$
.
data
.
_
targets
.
forEach
(
function
(
t
)
{
var
found
=
false
,
i
,
j
;
for
(
i
=
0
;
i
<
targets
.
length
;
i
++
)
{
if
(
t
.
id
===
targets
[
i
].
id
)
{
...
...
@@ -45,7 +45,7 @@ c3_chart_fn.flow = function (args) {
});
// Append null for not found targets
$$
.
data
.
targets
.
forEach
(
function
(
t
)
{
$$
.
data
.
_
targets
.
forEach
(
function
(
t
)
{
var
i
,
j
;
for
(
i
=
0
;
i
<
notfoundIds
.
length
;
i
++
)
{
if
(
t
.
id
===
notfoundIds
[
i
])
{
...
...
@@ -63,10 +63,10 @@ c3_chart_fn.flow = function (args) {
});
// Generate null values for new target
if
(
$$
.
data
.
targets
.
length
)
{
if
(
$$
.
data
.
_
targets
.
length
)
{
targets
.
forEach
(
function
(
t
)
{
var
i
,
missing
=
[];
for
(
i
=
$$
.
data
.
targets
[
0
].
values
[
0
].
index
;
i
<
tail
;
i
++
)
{
for
(
i
=
$$
.
data
.
_
targets
[
0
].
values
[
0
].
index
;
i
<
tail
;
i
++
)
{
missing
.
push
({
id
:
t
.
id
,
index
:
i
,
...
...
src/arc.js
View file @
bee04927
...
...
@@ -304,7 +304,7 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf
main
.
select
(
'.'
+
CLASS
.
chartArcsTitle
)
.
style
(
"opacity"
,
$$
.
hasType
(
'donut'
)
||
$$
.
hasType
(
'gauge'
)
?
1
:
0
);
if
(
$$
.
config
.
hasSubs
||
$$
.
config
.
isSub
){
if
(
typeof
process
!==
'object'
&&
(
$$
.
config
.
hasSubs
||
$$
.
config
.
isSub
)
){
$$
.
buffer
.
onlastfinish
(
"draw-lines"
+
$$
.
config
.
isSub
,
function
(){
$$
.
buffer
.
onlastfinish
(
"draw-lines"
+
$$
.
config
.
isSub
,
function
(){
$$
.
ed3Internal
.
redrawLinesOnBoth
();
...
...
src/core.js
View file @
bee04927
...
...
@@ -449,11 +449,11 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
withSubchart
=
getOption
(
options
,
"withSubchart"
,
true
);
withTransition
=
getOption
(
options
,
"withTransition"
,
true
);
withTransform
=
getOption
(
options
,
"withTransform"
,
false
);
withUpdateXDomain
=
getOption
(
options
,
"withUpdateXDomain"
,
fals
e
);
withUpdateOrgXDomain
=
getOption
(
options
,
"withUpdateOrgXDomain"
,
fals
e
);
withUpdateXDomain
=
getOption
(
options
,
"withUpdateXDomain"
,
tru
e
);
withUpdateOrgXDomain
=
getOption
(
options
,
"withUpdateOrgXDomain"
,
tru
e
);
withTrimXDomain
=
getOption
(
options
,
"withTrimXDomain"
,
true
);
withUpdateXAxis
=
getOption
(
options
,
"withUpdateXAxis"
,
withUpdateXDomain
);
withLegend
=
getOption
(
options
,
"withLegend"
,
fals
e
);
withLegend
=
getOption
(
options
,
"withLegend"
,
tru
e
);
withEventRect
=
getOption
(
options
,
"withEventRect"
,
true
);
withDimension
=
getOption
(
options
,
"withDimension"
,
true
);
withTransitionForExit
=
getOption
(
options
,
"withTransitionForExit"
,
withTransition
);
...
...
src/data.load.js
View file @
bee04927
...
...
@@ -12,7 +12,7 @@ c3_chart_internal_fn.load = function (targets, args) {
});
}
// Update/Add data
$$
.
data
.
targets
.
forEach
(
function
(
d
)
{
$$
.
data
.
_
targets
.
forEach
(
function
(
d
)
{
for
(
var
i
=
0
;
i
<
targets
.
length
;
i
++
)
{
if
(
d
.
id
===
targets
[
i
].
id
)
{
d
.
values
=
targets
[
i
].
values
;
...
...
@@ -32,7 +32,7 @@ c3_chart_internal_fn.load = function (targets, args) {
// Redraw with new targets
$$
.
redraw
({
withUpdateOrgXDomain
:
true
,
withUpdateXDomain
:
true
,
withLegend
:
true
});
if
(
args
.
done
)
{
args
.
done
();
}
if
(
args
&&
args
.
done
)
{
args
.
done
();
}
};
c3_chart_internal_fn
.
loadFromArgs
=
function
(
args
)
{
var
$$
=
this
;
...
...
@@ -63,7 +63,7 @@ c3_chart_internal_fn.unload = function (targetIds, done) {
done
=
function
()
{};
}
// filter existing target
targetIds
=
targetIds
.
filter
(
function
(
id
)
{
return
$$
.
hasTarget
(
$$
.
data
.
targets
,
id
);
});
targetIds
=
targetIds
.
filter
(
function
(
id
)
{
return
$$
.
hasTarget
(
$$
.
data
.
_
targets
,
id
);
});
// If no target, call done and return
if
(
!
targetIds
||
targetIds
.
length
===
0
)
{
done
();
...
...
@@ -82,7 +82,7 @@ c3_chart_internal_fn.unload = function (targetIds, done) {
$$
.
legend
.
selectAll
(
'.'
+
CLASS
.
legendItem
+
$$
.
getTargetSelectorSuffix
(
id
)).
remove
();
}
// Remove target
$$
.
data
.
_targets
=
$$
.
data
.
targets
.
filter
(
function
(
t
)
{
$$
.
data
.
_targets
=
$$
.
data
.
_
targets
.
filter
(
function
(
t
)
{
return
t
.
id
!==
id
;
});
$$
.
data
.
targets
=
$$
.
normalize
(
$$
.
data
.
_targets
);
...
...
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