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
e2a8c352
You need to sign in or sign up before continuing.
Commit
e2a8c352
authored
Nov 18, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix class suffix - #665
parent
735d5b10
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
c3.js
c3.js
+1
-1
c3.min.js
c3.min.js
+0
-0
class-spec.js
spec/class-spec.js
+2
-2
class.js
src/class.js
+1
-1
No files found.
c3.js
View file @
e2a8c352
...
@@ -5544,7 +5544,7 @@
...
@@ -5544,7 +5544,7 @@
return
CLASS
.
chartArc
+
this
.
classTarget
(
d
.
data
.
id
);
return
CLASS
.
chartArc
+
this
.
classTarget
(
d
.
data
.
id
);
};
};
c3_chart_internal_fn
.
getTargetSelectorSuffix
=
function
(
targetId
)
{
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
)
{
c3_chart_internal_fn
.
selectorTarget
=
function
(
id
,
prefix
)
{
return
(
prefix
||
''
)
+
'.'
+
CLASS
.
target
+
this
.
getTargetSelectorSuffix
(
id
);
return
(
prefix
||
''
)
+
'.'
+
CLASS
.
target
+
this
.
getTargetSelectorSuffix
(
id
);
...
...
c3.min.js
View file @
e2a8c352
This source diff could not be displayed because it is too large. You can
view the blob
instead.
spec/class-spec.js
View file @
e2a8c352
...
@@ -47,8 +47,8 @@ describe('c3 chart class', function () {
...
@@ -47,8 +47,8 @@ describe('c3 chart class', function () {
});
});
it
(
'should replace special charactors to "-"'
,
function
()
{
it
(
'should replace special charactors to "-"'
,
function
()
{
var
input
=
'data1 !@#$%^&*()_=+,.<>"
\'
:;[]/|?'
,
var
input
=
'data1 !@#$%^&*()_=+,.<>"
\'
:;[]/|?
~`{}
\
\
'
,
expected
=
'-data1---------------------------'
,
expected = '
-
data1
---------------------------
-----
',
suffix = chart.internal.getTargetSelectorSuffix(input);
suffix = chart.internal.getTargetSelectorSuffix(input);
expect(suffix).toBe(expected);
expect(suffix).toBe(expected);
});
});
...
...
src/class.js
View file @
e2a8c352
...
@@ -155,7 +155,7 @@ c3_chart_internal_fn.classChartArc = function (d) {
...
@@ -155,7 +155,7 @@ c3_chart_internal_fn.classChartArc = function (d) {
return
CLASS
.
chartArc
+
this
.
classTarget
(
d
.
data
.
id
);
return
CLASS
.
chartArc
+
this
.
classTarget
(
d
.
data
.
id
);
};
};
c3_chart_internal_fn
.
getTargetSelectorSuffix
=
function
(
targetId
)
{
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
)
{
c3_chart_internal_fn
.
selectorTarget
=
function
(
id
,
prefix
)
{
return
(
prefix
||
''
)
+
'.'
+
CLASS
.
target
+
this
.
getTargetSelectorSuffix
(
id
);
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