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
a9b0e620
Commit
a9b0e620
authored
Nov 14, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix class selector for [] - #711
parent
2c5df2f6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
c3.js
c3.js
+1
-1
c3.min.js
c3.min.js
+0
-0
class-spec.js
spec/class-spec.js
+3
-3
class.js
src/class.js
+1
-1
No files found.
c3.js
View file @
a9b0e620
...
...
@@ -5511,7 +5511,7 @@
return
CLASS
.
chartArc
+
this
.
classTarget
(
d
.
data
.
id
);
};
c3_chart_internal_fn
.
getTargetSelectorSuffix
=
function
(
targetId
)
{
return
targetId
||
targetId
===
0
?
(
'-'
+
targetId
).
replace
(
/
[\s
!@#$%^&*()_+,.<>'":;
]
/g
,
'-'
)
:
''
;
return
targetId
||
targetId
===
0
?
(
'-'
+
targetId
).
replace
(
/
[\s
!@#$%^&*()_+,.<>'":;
\[\]
]
/g
,
'-'
)
:
''
;
};
c3_chart_internal_fn
.
selectorTarget
=
function
(
id
,
prefix
)
{
return
(
prefix
||
''
)
+
'.'
+
CLASS
.
target
+
this
.
getTargetSelectorSuffix
(
id
);
...
...
c3.min.js
View file @
a9b0e620
This source diff could not be displayed because it is too large. You can
view the blob
instead.
spec/class-spec.js
View file @
a9b0e620
...
...
@@ -11,7 +11,7 @@ describe('c3 chart class', function () {
var
args
=
{
data
:
{
columns
:
[
[
'data1'
,
30
,
200
,
100
,
400
,
150
,
250
],
[
'data1
[0]
'
,
30
,
200
,
100
,
400
,
150
,
250
],
[
'data2 prefix'
,
50
,
20
,
10
,
40
,
15
,
25
],
[
'data3 мужчины'
,
150
,
120
,
110
,
140
,
115
,
125
]
]
...
...
@@ -47,8 +47,8 @@ describe('c3 chart class', function () {
});
it
(
'should replace special charactors to "-"'
,
function
()
{
var
input
=
'data1 !@#$%^&*()_+,.<>"
\'
:;'
,
expected
=
'-data1---------------------'
,
var
input
=
'data1 !@#$%^&*()_+,.<>"
\'
:;
[]
'
,
expected
=
'-data1---------------------
--
'
,
suffix
=
chart
.
internal
.
getTargetSelectorSuffix
(
input
);
expect
(
suffix
).
toBe
(
expected
);
});
...
...
src/class.js
View file @
a9b0e620
...
...
@@ -155,7 +155,7 @@ c3_chart_internal_fn.classChartArc = function (d) {
return
CLASS
.
chartArc
+
this
.
classTarget
(
d
.
data
.
id
);
};
c3_chart_internal_fn
.
getTargetSelectorSuffix
=
function
(
targetId
)
{
return
targetId
||
targetId
===
0
?
(
'-'
+
targetId
).
replace
(
/
[\s
!@#$%^&*()_+,.<>'":;
]
/g
,
'-'
)
:
''
;
return
targetId
||
targetId
===
0
?
(
'-'
+
targetId
).
replace
(
/
[\s
!@#$%^&*()_+,.<>'":;
\[\]
]
/g
,
'-'
)
:
''
;
};
c3_chart_internal_fn
.
selectorTarget
=
function
(
id
,
prefix
)
{
return
(
prefix
||
''
)
+
'.'
+
CLASS
.
target
+
this
.
getTargetSelectorSuffix
(
id
);
...
...
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