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
1790dc13
Commit
1790dc13
authored
Mar 28, 2016
by
Дмитрий Никулин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update c3.js and c3.min.js
parent
8f937523
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
9 deletions
+69
-9
c3.js
c3.js
+69
-9
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
1790dc13
...
...
@@ -3454,25 +3454,57 @@
}
function
buildPath
(
points
){
var
path
=
''
;
var
path
=
create
(
'path'
);
var
d
=
''
;
for
(
var
i
=
0
;
i
<
points
.
length
;
i
++
){
path
+=
(
points
[
i
].
action
||
'L'
)
+
pt
(
points
[
i
]);
d
+=
(
points
[
i
].
action
||
'L'
)
+
pt
(
points
[
i
]);
}
path
.
attr
(
'd'
,
d
);
return
path
;
}
var
serifThickness
=
3
;
return
{
asterisk
:
function
(
size
,
color
){
size
/=
2
;
return
buildPath
([
{
action
:
'M'
,
x
:
size
,
y
:
size
},
{
action
:
'L'
,
x
:
-
size
,
y
:
-
size
},
{
action
:
'M'
,
x
:
size
,
y
:
-
size
},
{
action
:
'L'
,
x
:
-
size
,
y
:
size
},
{
action
:
'M'
,
x
:
0
,
y
:
-
size
},
{
action
:
'L'
,
x
:
0
,
y
:
size
}
]).
style
(
'stroke'
,
color
);
},
circle
:
function
(
size
){
return
create
(
'circle'
).
attr
(
'r'
,
size
/
2
);
},
cross
:
function
(
size
,
color
){
size
/=
2
;
return
buildPath
([
{
action
:
'M'
,
x
:
size
,
y
:
size
},
{
action
:
'L'
,
x
:
-
size
,
y
:
-
size
},
{
action
:
'M'
,
x
:
size
,
y
:
-
size
},
{
action
:
'L'
,
x
:
-
size
,
y
:
size
}
]).
style
(
'stroke'
,
color
);
},
plus
:
function
(
size
,
color
){
size
/=
2
;
return
buildPath
([
{
action
:
'M'
,
x
:
0
,
y
:
size
},
{
action
:
'L'
,
x
:
0
,
y
:
-
size
},
{
action
:
'M'
,
x
:
size
,
y
:
0
},
{
action
:
'L'
,
x
:
-
size
,
y
:
0
}
]).
style
(
'stroke'
,
color
);
},
rhombus
:
function
(
size
){
var
marker
=
create
(
'path'
);
// height/width ratio
var
ratio
=
1
;
size
/=
2
;
var
path
=
buildPath
([
var
marker
=
buildPath
([
{
action
:
'M'
,
x
:
0
,
y
:
size
},
{
action
:
'L'
,
x
:
size
/
ratio
,
y
:
0
},
{
action
:
'L'
,
x
:
0
,
y
:
-
size
},
...
...
@@ -3480,19 +3512,46 @@
{
action
:
'Z'
}
]);
marker
.
attr
(
'd'
,
path
)
.
style
(
'stroke'
,
'none'
);
marker
.
style
(
'stroke'
,
'none'
);
return
marker
;
},
serif
:
function
(
size
){
var
marker
=
create
(
'rect'
);
marker
.
attr
(
'width'
,
size
)
.
attr
(
'height'
,
serifThickness
)
.
attr
(
'x'
,
-
size
/
2
)
.
attr
(
'y'
,
-
serifThickness
/
2
)
.
style
(
'shape-rendering'
,
'crispEdges'
);
return
marker
;
},
serifRight
:
function
(
size
){
var
marker
=
create
(
'rect'
);
marker
.
attr
(
'width'
,
size
/
2
)
.
attr
(
'height'
,
serifThickness
)
.
attr
(
'x'
,
0
)
.
attr
(
'y'
,
-
serifThickness
/
2
)
.
style
(
'shape-rendering'
,
'crispEdges'
);
return
marker
;
},
square
:
function
(
size
){
var
marker
=
create
(
'rect'
);
marker
.
attr
(
'width'
,
size
)
.
attr
(
'height'
,
size
)
.
attr
(
'x'
,
-
size
/
2
)
.
attr
(
'y'
,
-
size
/
2
);
.
attr
(
'y'
,
-
size
/
2
)
.
style
(
'shape-rendering'
,
'crispEdges'
);
return
marker
;
},
triangle
:
function
(
size
){
size
/=
2
;
return
buildPath
([
{
action
:
'M'
,
x
:
0
,
y
:
-
size
},
{
action
:
'L'
,
x
:
size
,
y
:
size
},
{
action
:
'L'
,
x
:
-
size
,
y
:
size
},
{
action
:
'Z'
}
]).
style
(
'stroke'
,
'none'
);
}
};
})();
...
...
@@ -3504,9 +3563,10 @@
return
marker_fn
.
circle
(
$$
.
pointR
(
d
,
i
)).
node
();
}
return
marker_fn
[
$$
.
config
.
marker_types
[
d
.
id
]](
$$
.
pointR
(
d
,
i
),
$$
.
color
(
d
,
i
)).
node
();
var
func
=
marker_fn
[
$$
.
config
.
marker_types
[
d
.
id
]];
return
func
(
$$
.
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 @
1790dc13
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