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
00e33f1f
Commit
00e33f1f
authored
May 28, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix data.labels on flow
parent
b05ce00e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
13 deletions
+29
-13
c3.js
c3.js
+23
-10
c3.min.js
c3.min.js
+0
-0
api_flow.html
htdocs/samples/api_flow.html
+4
-2
api_flow_timeseries.html
htdocs/samples/api_flow_timeseries.html
+2
-1
No files found.
c3.js
View file @
00e33f1f
...
...
@@ -1703,7 +1703,7 @@
function
generateClass
(
prefix
,
targetId
)
{
return
" "
+
prefix
+
" "
+
prefix
+
getTargetSelectorSuffix
(
targetId
);
}
function
classText
(
d
)
{
return
generateClass
(
CLASS
.
text
,
d
.
i
d
);
}
function
classText
(
d
)
{
return
generateClass
(
CLASS
.
text
,
d
.
i
ndex
);
}
function
classTexts
(
d
)
{
return
generateClass
(
CLASS
.
texts
,
d
.
id
);
}
function
classShape
(
d
)
{
return
generateClass
(
CLASS
.
shape
,
d
.
index
);
}
function
classShapes
(
d
)
{
return
generateClass
(
CLASS
.
shapes
,
d
.
id
);
}
...
...
@@ -3497,6 +3497,8 @@
xgrid
.
attr
(
xgridAttr
)
.
style
(
"opacity"
,
function
()
{
return
+
d3
.
select
(
this
).
attr
(
__axis_rotated
?
'y1'
:
'x1'
)
===
(
__axis_rotated
?
height
:
0
)
?
0
:
1
;
});
xgrid
.
exit
().
remove
();
}
else
{
xgrid
=
d3
.
selectAll
([]);
}
if
(
notEmpty
(
__grid_x_lines
))
{
xgridLines
=
main
.
select
(
'.'
+
CLASS
.
xgridLines
).
selectAll
(
'.'
+
CLASS
.
xgridLine
)
...
...
@@ -3518,6 +3520,8 @@
xgridLines
.
exit
().
transition
().
duration
(
duration
)
.
style
(
"opacity"
,
0
)
.
remove
();
}
else
{
xgridLines
=
d3
.
selectAll
([]);
}
// Y-Grid
if
(
withY
&&
__grid_y_show
)
{
...
...
@@ -3647,16 +3651,13 @@
.
style
(
"fill-opacity"
,
0
);
mainText
.
text
(
function
(
d
)
{
return
formatByAxisId
(
d
.
id
)(
d
.
value
,
d
.
id
);
})
.
style
(
"fill-opacity"
,
initialOpacityForText
)
.
transition
().
duration
(
duration
)
.
attr
(
'x'
,
xForText
)
.
attr
(
'y'
,
yForText
)
.
style
(
"fill"
,
color
)
.
style
(
"fill-opacity"
,
opacityForText
);
.
style
(
"fill-opacity"
,
initialOpacityForText
);
mainText
.
exit
()
.
transition
().
duration
(
durationForExit
)
.
style
(
'fill-opacity'
,
0
)
.
remove
();
}
else
{
mainText
=
d3
.
selectAll
([]);
}
// arc
...
...
@@ -3918,6 +3919,11 @@
waitForDraw
.
add
(
main
.
selectAll
(
'.'
+
CLASS
.
selectedCircle
).
transition
()
.
attr
(
"cx"
,
__axis_rotated
?
circleY
:
circleX
)
.
attr
(
"cy"
,
__axis_rotated
?
circleX
:
circleY
));
waitForDraw
.
add
(
mainText
.
transition
()
.
attr
(
'x'
,
xForText
)
.
attr
(
'y'
,
yForText
)
.
style
(
"fill"
,
color
)
.
style
(
"fill-opacity"
,
opacityForText
));
waitForDraw
.
add
(
xgridLines
.
select
(
'line'
).
transition
()
.
attr
(
"x1"
,
__axis_rotated
?
0
:
xv
)
.
attr
(
"x2"
,
__axis_rotated
?
width
:
xv
)
...
...
@@ -3961,18 +3967,21 @@
wait
.
add
(
mainLine
.
transition
().
attr
(
'transform'
,
transform
));
wait
.
add
(
mainArea
.
transition
().
attr
(
'transform'
,
transform
));
wait
.
add
(
mainCircle
.
transition
().
attr
(
'transform'
,
transform
));
wait
.
add
(
mainText
.
transition
().
attr
(
'transform'
,
transform
));
wait
.
add
(
xgrid
.
transition
().
attr
(
'transform'
,
transform
));
wait
.
add
(
xgridLines
.
transition
().
attr
(
'transform'
,
transform
));
})
.
call
(
wait
,
function
()
{
var
i
,
targe
ts
=
[],
eventRects
=
[];
var
i
,
shapes
=
[],
tex
ts
=
[],
eventRects
=
[];
// remove flowed elements
for
(
i
=
0
;
i
<
flowLength
;
i
++
)
{
targets
.
push
(
'.'
+
CLASS
.
shape
+
'-'
+
(
flowIndex
+
i
));
shapes
.
push
(
'.'
+
CLASS
.
shape
+
'-'
+
(
flowIndex
+
i
));
texts
.
push
(
'.'
+
CLASS
.
text
+
'-'
+
(
flowIndex
+
i
));
eventRects
.
push
(
'.'
+
CLASS
.
eventRect
+
'-'
+
(
flowIndex
+
i
));
}
svg
.
selectAll
(
'.'
+
CLASS
.
shapes
).
selectAll
(
targets
).
remove
();
svg
.
selectAll
(
'.'
+
CLASS
.
shapes
).
selectAll
(
shapes
).
remove
();
svg
.
selectAll
(
'.'
+
CLASS
.
texts
).
selectAll
(
texts
).
remove
();
svg
.
selectAll
(
'.'
+
CLASS
.
eventRects
).
selectAll
(
eventRects
).
remove
();
svg
.
select
(
'.'
+
CLASS
.
xgrid
).
remove
();
...
...
@@ -4000,6 +4009,10 @@
.
attr
(
'transform'
,
null
)
.
attr
(
"cx"
,
__axis_rotated
?
circleY
:
circleX
)
.
attr
(
"cy"
,
__axis_rotated
?
circleX
:
circleY
);
mainText
.
attr
(
'transform'
,
null
)
.
attr
(
'x'
,
xForText
)
.
attr
(
'y'
,
yForText
);
eventRectUpdate
.
attr
(
"x"
,
__axis_rotated
?
0
:
rectX
)
.
attr
(
"y"
,
__axis_rotated
?
rectX
:
0
)
...
...
c3.min.js
View file @
00e33f1f
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 @
00e33f1f
...
...
@@ -19,7 +19,8 @@
types
:
{
data2
:
'area'
,
data3
:
'bar'
,
}
},
labels
:
true
},
bar
:
{
width
:
10
...
...
@@ -40,7 +41,8 @@
},
grid
:
{
x
:
{
show
:
true
show
:
true
,
lines
:
[{
value
:
3
,
text
:
'Label 3'
},
{
value
:
4.5
,
text
:
'Label 4.5'
}]
},
y
:
{
show
:
true
...
...
htdocs/samples/api_flow_timeseries.html
View file @
00e33f1f
...
...
@@ -21,7 +21,8 @@
types
:
{
data2
:
'area'
,
data3
:
'bar'
,
}
},
// labels: true
},
bar
:
{
width
:
10
...
...
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