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
78461b6c
Commit
78461b6c
authored
Mar 26, 2016
by
Дмитрий Никулин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update c3.js and c3.min.js
parent
a02c6757
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
6 deletions
+70
-6
c3.js
c3.js
+70
-6
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
78461b6c
...
...
@@ -1449,6 +1449,7 @@
// line
line_connectNull
:
false
,
line_step_type
:
'step'
,
marker_types
:
undefined
,
// bar
bar_width
:
undefined
,
bar_width_ratio
:
0.6
,
...
...
@@ -3361,9 +3362,8 @@
var
$$
=
this
;
$$
.
mainCircle
=
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
circles
).
selectAll
(
'.'
+
CLASS
.
circle
)
.
data
(
$$
.
lineOrScatterData
.
bind
(
$$
));
$$
.
mainCircle
.
enter
().
append
(
"circle"
)
$$
.
mainCircle
.
enter
().
append
(
$$
.
getMarker
.
bind
(
$$
)
)
.
attr
(
"class"
,
$$
.
classCircle
.
bind
(
$$
))
.
attr
(
"r"
,
$$
.
pointR
.
bind
(
$$
))
.
style
(
"fill"
,
$$
.
color
);
$$
.
mainCircle
.
style
(
"opacity"
,
$$
.
initialOpacityForCircle
.
bind
(
$$
));
...
...
@@ -3375,11 +3375,12 @@
(
withTransition
?
this
.
mainCircle
.
transition
()
:
this
.
mainCircle
)
.
style
(
'opacity'
,
this
.
opacityForCircle
.
bind
(
this
))
.
style
(
"fill"
,
this
.
color
)
.
attr
(
"cx"
,
cx
)
.
attr
(
"cy"
,
cy
),
.
attr
(
'transform'
,
function
(
d
,
i
){
return
'translate('
+
cx
(
d
,
i
)
+
' '
+
cy
(
d
,
i
)
+
')'
;
}),
(
withTransition
?
selectedCircles
.
transition
()
:
selectedCircles
)
.
attr
(
"
c
x"
,
cx
)
.
attr
(
"
c
y"
,
cy
)
.
attr
(
"x"
,
cx
)
.
attr
(
"y"
,
cy
)
];
};
c3_chart_internal_fn
.
circleX
=
function
(
d
)
{
...
...
@@ -3442,6 +3443,69 @@
return
Math
.
abs
(
y
-
this
.
d3
.
mouse
(
that
)[
1
])
<
30
;
};
var
marker_fn
=
(
function
()
{
function
create
(
name
){
return
d3
.
select
(
document
.
createElementNS
(
"http://www.w3.org/2000/svg"
,
name
));
}
function
pt
(
point
){
if
(
isNaN
(
point
.
x
+
point
.
y
))
return
''
;
return
point
.
x
+
','
+
point
.
y
;
}
function
buildPath
(
points
){
var
path
=
''
;
for
(
var
i
=
0
;
i
<
points
.
length
;
i
++
){
path
+=
(
points
[
i
].
action
||
'L'
)
+
pt
(
points
[
i
]);
}
return
path
;
}
return
{
circle
:
function
(
size
){
return
create
(
'circle'
).
attr
(
'r'
,
size
/
2
);
},
rhombus
:
function
(
size
){
var
marker
=
create
(
'path'
);
// height/width ratio
var
ratio
=
1
;
size
/=
2
;
var
path
=
buildPath
([
{
action
:
'M'
,
x
:
0
,
y
:
size
},
{
action
:
'L'
,
x
:
size
/
ratio
,
y
:
0
},
{
action
:
'L'
,
x
:
0
,
y
:
-
size
},
{
action
:
'L'
,
x
:
-
size
/
ratio
,
y
:
0
},
{
action
:
'Z'
}
]);
marker
.
attr
(
'd'
,
path
)
.
style
(
'stroke'
,
'none'
);
return
marker
;
},
square
:
function
(
size
){
var
marker
=
create
(
'rect'
);
marker
.
attr
(
'width'
,
size
)
.
attr
(
'height'
,
size
)
.
attr
(
'x'
,
-
size
/
2
)
.
attr
(
'y'
,
-
size
/
2
);
return
marker
;
}
};
})();
c3_chart_internal_fn
.
getMarker
=
function
(
d
,
i
){
var
$$
=
this
;
if
(
!
$$
.
config
.
marker_types
||
!
$$
.
config
.
marker_types
[
d
.
id
]){
return
marker_fn
.
circle
(
$$
.
pointR
(
d
,
i
));
}
return
marker_fn
[
$$
.
config
.
marker_types
[
d
.
id
]](
$$
.
pointR
(
d
,
i
),
$$
.
color
(
d
,
i
)).
node
();
};
c3_chart_internal_fn
.
initBar
=
function
()
{
var
$$
=
this
;
$$
.
main
.
select
(
'.'
+
CLASS
.
chart
).
append
(
"g"
)
...
...
c3.min.js
View file @
78461b6c
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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