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
01626ef5
Commit
01626ef5
authored
Jul 04, 2016
by
Evgeny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow adding markers after creating chart. Fixes #11182
parent
9062b962
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
0 deletions
+54
-0
c3.js
c3.js
+27
-0
c3.min.js
c3.min.js
+0
-0
config.js
src/config.js
+1
-0
marker.js
src/marker.js
+25
-0
shape.line.js
src/shape.line.js
+1
-0
No files found.
c3.js
View file @
01626ef5
...
...
@@ -1257,6 +1257,7 @@
line_connectNull
:
false
,
line_step_type
:
'step'
,
marker_types
:
undefined
,
allMarkersTypes
:
[],
// bar
bar_width
:
undefined
,
bar_width_ratio
:
0.6
,
...
...
@@ -3181,6 +3182,7 @@
c3_chart_internal_fn
.
updateCircle
=
function
()
{
var
$$
=
this
;
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
circles
).
selectAll
(
'.'
+
CLASS
.
circle
).
remove
();
$$
.
mainCircle
=
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
circles
).
selectAll
(
'.'
+
CLASS
.
circle
)
.
data
(
$$
.
lineOrScatterData
.
bind
(
$$
));
...
...
@@ -3378,6 +3380,31 @@
};
})();
c3_chart_internal_fn
.
setMarker
=
function
(
id
,
type
){
var
$$
=
this
;
if
(
$$
.
currentMarkerTypeId
===
undefined
){
var
length
=
0
;
for
(
var
_
in
$$
.
config
.
marker_types
){
length
++
;
}
$$
.
currentMarkerTypeId
=
length
%
$$
.
config
.
allMarkersTypes
.
length
;
}
if
(
type
===
undefined
){
type
=
$$
.
config
.
allMarkersTypes
[
$$
.
currentMarkerTypeId
];
$$
.
currentMarkerTypeId
++
;
$$
.
currentMarkerTypeId
%=
$$
.
config
.
allMarkersTypes
.
length
;
}
$$
.
config
.
point_show
[
id
]
=
true
;
$$
.
config
.
marker_types
[
id
]
=
type
;
}
c3_chart_internal_fn
.
getMarker
=
function
(
d
,
i
){
var
$$
=
this
;
...
...
c3.min.js
View file @
01626ef5
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/config.js
View file @
01626ef5
...
...
@@ -152,6 +152,7 @@ c3_chart_internal_fn.getDefaultConfig = function () {
line_connectNull
:
false
,
line_step_type
:
'step'
,
marker_types
:
undefined
,
allMarkersTypes
:
[],
// bar
bar_width
:
undefined
,
bar_width_ratio
:
0.6
,
...
...
src/marker.js
View file @
01626ef5
...
...
@@ -111,6 +111,31 @@ var marker_fn = (function() {
};
})();
c3_chart_internal_fn
.
setMarker
=
function
(
id
,
type
){
var
$$
=
this
;
if
(
$$
.
currentMarkerTypeId
===
undefined
){
var
length
=
0
;
for
(
var
_
in
$$
.
config
.
marker_types
){
length
++
;
}
$$
.
currentMarkerTypeId
=
length
%
$$
.
config
.
allMarkersTypes
.
length
;
}
if
(
type
===
undefined
){
type
=
$$
.
config
.
allMarkersTypes
[
$$
.
currentMarkerTypeId
];
$$
.
currentMarkerTypeId
++
;
$$
.
currentMarkerTypeId
%=
$$
.
config
.
allMarkersTypes
.
length
;
}
$$
.
config
.
point_show
[
id
]
=
true
;
$$
.
config
.
marker_types
[
id
]
=
type
;
}
c3_chart_internal_fn
.
getMarker
=
function
(
d
,
i
){
var
$$
=
this
;
...
...
src/shape.line.js
View file @
01626ef5
...
...
@@ -292,6 +292,7 @@ c3_chart_internal_fn.generateGetAreaPoints = function (areaIndices, isSub) { //
c3_chart_internal_fn
.
updateCircle
=
function
()
{
var
$$
=
this
;
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
circles
).
selectAll
(
'.'
+
CLASS
.
circle
).
remove
();
$$
.
mainCircle
=
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
circles
).
selectAll
(
'.'
+
CLASS
.
circle
)
.
data
(
$$
.
lineOrScatterData
.
bind
(
$$
));
...
...
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