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
35b7bdf4
Commit
35b7bdf4
authored
Oct 09, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify step chart interpolation - #566
parent
29157e71
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
6 deletions
+10
-6
c3.js
c3.js
+5
-3
c3.min.js
c3.min.js
+0
-0
config.js
src/config.js
+2
-0
interaction.js
src/interaction.js
+2
-2
shape.js
src/shape.js
+1
-1
No files found.
c3.js
View file @
35b7bdf4
...
@@ -1013,7 +1013,9 @@
...
@@ -1013,7 +1013,9 @@
point_focus_expand_enabled
:
true
,
point_focus_expand_enabled
:
true
,
point_focus_expand_r
:
undefined
,
point_focus_expand_r
:
undefined
,
point_select_r
:
undefined
,
point_select_r
:
undefined
,
// line
line_connectNull
:
false
,
line_connectNull
:
false
,
line_step_type
:
'step'
,
// bar
// bar
bar_width
:
undefined
,
bar_width
:
undefined
,
bar_width_ratio
:
0.6
,
bar_width_ratio
:
0.6
,
...
@@ -2164,7 +2166,7 @@
...
@@ -2164,7 +2166,7 @@
if
(
$$
.
dragging
||
$$
.
flowing
)
{
return
;
}
// do nothing while dragging/flowing
if
(
$$
.
dragging
||
$$
.
flowing
)
{
return
;
}
// do nothing while dragging/flowing
if
(
$$
.
hasArcType
())
{
return
;
}
if
(
$$
.
hasArcType
())
{
return
;
}
if
(
$$
.
isStepType
(
d
)
&&
d3
.
mouse
(
this
)[
0
]
<
$$
.
x
(
$$
.
getXValue
(
d
.
id
,
index
)))
{
if
(
$$
.
isStepType
(
d
)
&&
$$
.
config
.
line_step_type
===
'step-after'
&&
d3
.
mouse
(
this
)[
0
]
<
$$
.
x
(
$$
.
getXValue
(
d
.
id
,
index
)))
{
index
-=
1
;
index
-=
1
;
}
}
...
@@ -2224,7 +2226,7 @@
...
@@ -2224,7 +2226,7 @@
$$
.
cancelClick
=
false
;
$$
.
cancelClick
=
false
;
return
;
return
;
}
}
if
(
$$
.
isStepType
(
d
)
&&
d3
.
mouse
(
this
)[
0
]
<
$$
.
x
(
$$
.
getXValue
(
d
.
id
,
index
)))
{
if
(
$$
.
isStepType
(
d
)
&&
config
.
line_step_type
===
'step-after'
&&
d3
.
mouse
(
this
)[
0
]
<
$$
.
x
(
$$
.
getXValue
(
d
.
id
,
index
)))
{
index
-=
1
;
index
-=
1
;
}
}
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
shape
+
'-'
+
index
).
each
(
function
(
d
)
{
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
shape
+
'-'
+
index
).
each
(
function
(
d
)
{
...
@@ -2511,7 +2513,7 @@
...
@@ -2511,7 +2513,7 @@
c3_chart_internal_fn
.
getInterpolate
=
function
(
d
)
{
c3_chart_internal_fn
.
getInterpolate
=
function
(
d
)
{
var
$$
=
this
;
var
$$
=
this
;
return
$$
.
isSplineType
(
d
)
?
"cardinal"
:
$$
.
isStepType
(
d
)
?
"step-after"
:
"linear"
;
return
$$
.
isSplineType
(
d
)
?
"cardinal"
:
$$
.
isStepType
(
d
)
?
$$
.
config
.
line_step_type
:
"linear"
;
};
};
c3_chart_internal_fn
.
initLine
=
function
()
{
c3_chart_internal_fn
.
initLine
=
function
()
{
...
...
c3.min.js
View file @
35b7bdf4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/config.js
View file @
35b7bdf4
...
@@ -134,7 +134,9 @@ c3_chart_internal_fn.getDefaultConfig = function () {
...
@@ -134,7 +134,9 @@ c3_chart_internal_fn.getDefaultConfig = function () {
point_focus_expand_enabled
:
true
,
point_focus_expand_enabled
:
true
,
point_focus_expand_r
:
undefined
,
point_focus_expand_r
:
undefined
,
point_select_r
:
undefined
,
point_select_r
:
undefined
,
// line
line_connectNull
:
false
,
line_connectNull
:
false
,
line_step_type
:
'step'
,
// bar
// bar
bar_width
:
undefined
,
bar_width
:
undefined
,
bar_width_ratio
:
0.6
,
bar_width_ratio
:
0.6
,
...
...
src/interaction.js
View file @
35b7bdf4
...
@@ -158,7 +158,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) {
...
@@ -158,7 +158,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) {
if
(
$$
.
dragging
||
$$
.
flowing
)
{
return
;
}
// do nothing while dragging/flowing
if
(
$$
.
dragging
||
$$
.
flowing
)
{
return
;
}
// do nothing while dragging/flowing
if
(
$$
.
hasArcType
())
{
return
;
}
if
(
$$
.
hasArcType
())
{
return
;
}
if
(
$$
.
isStepType
(
d
)
&&
d3
.
mouse
(
this
)[
0
]
<
$$
.
x
(
$$
.
getXValue
(
d
.
id
,
index
)))
{
if
(
$$
.
isStepType
(
d
)
&&
$$
.
config
.
line_step_type
===
'step-after'
&&
d3
.
mouse
(
this
)[
0
]
<
$$
.
x
(
$$
.
getXValue
(
d
.
id
,
index
)))
{
index
-=
1
;
index
-=
1
;
}
}
...
@@ -218,7 +218,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) {
...
@@ -218,7 +218,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) {
$$
.
cancelClick
=
false
;
$$
.
cancelClick
=
false
;
return
;
return
;
}
}
if
(
$$
.
isStepType
(
d
)
&&
d3
.
mouse
(
this
)[
0
]
<
$$
.
x
(
$$
.
getXValue
(
d
.
id
,
index
)))
{
if
(
$$
.
isStepType
(
d
)
&&
config
.
line_step_type
===
'step-after'
&&
d3
.
mouse
(
this
)[
0
]
<
$$
.
x
(
$$
.
getXValue
(
d
.
id
,
index
)))
{
index
-=
1
;
index
-=
1
;
}
}
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
shape
+
'-'
+
index
).
each
(
function
(
d
)
{
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
shape
+
'-'
+
index
).
each
(
function
(
d
)
{
...
...
src/shape.js
View file @
35b7bdf4
...
@@ -62,5 +62,5 @@ c3_chart_internal_fn.isWithinShape = function (that, d) {
...
@@ -62,5 +62,5 @@ c3_chart_internal_fn.isWithinShape = function (that, d) {
c3_chart_internal_fn
.
getInterpolate
=
function
(
d
)
{
c3_chart_internal_fn
.
getInterpolate
=
function
(
d
)
{
var
$$
=
this
;
var
$$
=
this
;
return
$$
.
isSplineType
(
d
)
?
"cardinal"
:
$$
.
isStepType
(
d
)
?
"step-after"
:
"linear"
;
return
$$
.
isSplineType
(
d
)
?
"cardinal"
:
$$
.
isStepType
(
d
)
?
$$
.
config
.
line_step_type
:
"linear"
;
};
};
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