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
782023e1
Commit
782023e1
authored
Aug 07, 2015
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix isInterpolationType to accept type
parent
bbb6d1c0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
c3.js
c3.js
+8
-2
c3.min.js
c3.min.js
+0
-0
shape.js
src/shape.js
+2
-2
type.js
src/type.js
+2
-2
No files found.
c3.js
View file @
782023e1
...
...
@@ -1251,6 +1251,8 @@
donut_title
:
""
,
donut_expand
:
{},
donut_expand_duration
:
50
,
// spline
spline_interpolation_type
:
'cardinal'
,
// region - region to change style
regions
:
[],
// tooltip - show when mouseover on each data
...
...
@@ -2819,8 +2821,9 @@
c3_chart_internal_fn
.
getInterpolate
=
function
(
d
)
{
var
$$
=
this
;
return
$$
.
isSplineType
(
d
)
?
"cardinal"
:
$$
.
isStepType
(
d
)
?
$$
.
config
.
line_step_type
:
"linear"
;
var
$$
=
this
,
interpolation
=
$$
.
isInterpolationType
(
$$
.
config
.
spline_interpolation_type
)
?
$$
.
config
.
spline_interpolation_type
:
'cardinal'
;
return
$$
.
isSplineType
(
d
)
?
interpolation
:
$$
.
isStepType
(
d
)
?
$$
.
config
.
line_step_type
:
"linear"
;
};
c3_chart_internal_fn
.
initLine
=
function
()
{
...
...
@@ -3548,6 +3551,9 @@
c3_chart_internal_fn
.
barOrLineData
=
function
(
d
)
{
return
this
.
isBarType
(
d
)
||
this
.
isLineType
(
d
)
?
d
.
values
:
[];
};
c3_chart_internal_fn
.
isInterpolationType
=
function
(
type
)
{
return
[
'linear'
,
'linear-closed'
,
'basis'
,
'basis-open'
,
'basis-closed'
,
'bundle'
,
'cardinal'
,
'cardinal-open'
,
'cardinal-closed'
,
'monotone'
].
indexOf
(
type
)
>=
0
;
};
c3_chart_internal_fn
.
initGrid
=
function
()
{
var
$$
=
this
,
config
=
$$
.
config
,
d3
=
$$
.
d3
;
...
...
c3.min.js
View file @
782023e1
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/shape.js
View file @
782023e1
...
...
@@ -66,7 +66,7 @@ c3_chart_internal_fn.isWithinShape = function (that, d) {
c3_chart_internal_fn
.
getInterpolate
=
function
(
d
)
{
var
$$
=
this
;
var
interpolation
=
$$
.
isInterpolationType
(
)
?
$$
.
config
.
spline_interpolation_type
:
'cardinal'
;
var
$$
=
this
,
interpolation
=
$$
.
isInterpolationType
(
$$
.
config
.
spline_interpolation_type
)
?
$$
.
config
.
spline_interpolation_type
:
'cardinal'
;
return
$$
.
isSplineType
(
d
)
?
interpolation
:
$$
.
isStepType
(
d
)
?
$$
.
config
.
line_step_type
:
"linear"
;
};
src/type.js
View file @
782023e1
...
...
@@ -89,6 +89,6 @@ c3_chart_internal_fn.lineOrScatterData = function (d) {
c3_chart_internal_fn
.
barOrLineData
=
function
(
d
)
{
return
this
.
isBarType
(
d
)
||
this
.
isLineType
(
d
)
?
d
.
values
:
[];
};
c3_chart_internal_fn
.
isInterpolationType
=
function
()
{
return
[
'linear'
,
'linear-closed'
,
'basis'
,
'basis-open'
,
'basis-closed'
,
'bundle'
,
'cardinal'
,
'cardinal-open'
,
'cardinal-closed'
,
'monotone'
].
indexOf
(
t
his
.
config
.
spline_interpolation_t
ype
)
>=
0
;
c3_chart_internal_fn
.
isInterpolationType
=
function
(
type
)
{
return
[
'linear'
,
'linear-closed'
,
'basis'
,
'basis-open'
,
'basis-closed'
,
'bundle'
,
'cardinal'
,
'cardinal-open'
,
'cardinal-closed'
,
'monotone'
].
indexOf
(
type
)
>=
0
;
};
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