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
30194f6b
Commit
30194f6b
authored
Jul 12, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support json and rows on flow api - #424
parent
05707358
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
c3.js
c3.js
+15
-1
c3.min.js
c3.min.js
+0
-0
api_flow.html
htdocs/samples/api_flow.html
+5
-4
No files found.
c3.js
View file @
30194f6b
...
...
@@ -4942,9 +4942,23 @@
};
c3
.
flow
=
function
(
args
)
{
var
targets
=
convertDataToTargets
(
convertColumnsToData
(
args
.
columns
),
true
)
,
notfoundIds
=
[],
var
targets
,
data
,
notfoundIds
=
[],
orgDataCount
=
getMaxDataCount
(),
dataCount
,
domain
,
baseTarget
,
baseValue
,
length
=
0
,
tail
=
0
,
diff
,
to
;
if
(
args
.
json
)
{
data
=
convertJsonToData
(
args
.
json
,
args
.
keys
);
}
else
if
(
args
.
rows
)
{
data
=
convertRowsToData
(
args
.
rows
);
}
else
if
(
args
.
columns
)
{
data
=
convertColumnsToData
(
args
.
columns
);
}
else
{
return
;
}
targets
=
convertDataToTargets
(
data
,
true
);
// Update/Add data
c3
.
data
.
targets
.
forEach
(
function
(
t
)
{
var
found
=
false
,
i
,
j
;
...
...
c3.min.js
View file @
30194f6b
This source diff could not be displayed because it is too large. You can
view the blob
instead.
htdocs/samples/api_flow.html
View file @
30194f6b
...
...
@@ -61,10 +61,11 @@
setTimeout
(
function
()
{
// Load only one data
chart
.
flow
({
columns
:
[
[
'data1'
,
500
,
200
,
100
],
[
'data2'
,
100
,
null
,
50
],
[
'data3'
,
200
,
null
,
null
],
rows
:
[
[
'data1'
,
'data2'
,
'data3'
],
[
500
,
100
,
200
],
[
200
,
null
,
null
],
[
100
,
50
,
null
]
],
duration
:
1500
,
...
...
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