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
a82f0b75
Commit
a82f0b75
authored
Oct 14, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Plain Diff
Fix conflict
parents
de17e33e
822cfdcc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
4 deletions
+37
-4
c3.js
c3.js
+2
-2
c3.min.js
c3.min.js
+0
-0
data-spec.js
spec/data-spec.js
+33
-0
data.js
src/data.js
+2
-2
No files found.
c3.js
View file @
a82f0b75
...
...
@@ -1630,11 +1630,11 @@
};
c3_chart_internal_fn
.
isOrderDesc
=
function
()
{
var
config
=
this
.
config
;
return
config
.
data_order
&&
config
.
data_order
.
toLowerCase
()
===
'desc'
;
return
typeof
(
config
.
data_order
)
===
'string'
&&
config
.
data_order
.
toLowerCase
()
===
'desc'
;
};
c3_chart_internal_fn
.
isOrderAsc
=
function
()
{
var
config
=
this
.
config
;
return
config
.
data_order
&&
config
.
data_order
.
toLowerCase
()
===
'asc'
;
return
typeof
(
config
.
data_order
)
===
'string'
&&
config
.
data_order
.
toLowerCase
()
===
'asc'
;
};
c3_chart_internal_fn
.
orderTargets
=
function
(
targets
)
{
var
$$
=
this
,
config
=
$$
.
config
,
orderAsc
=
$$
.
isOrderAsc
(),
orderDesc
=
$$
.
isOrderDesc
();
...
...
c3.min.js
View file @
a82f0b75
This source diff could not be displayed because it is too large. You can
view the blob
instead.
spec/data-spec.js
0 → 100644
View file @
a82f0b75
var
describe
=
window
.
describe
,
expect
=
window
.
expect
,
it
=
window
.
it
,
beforeEach
=
window
.
beforeEach
;
describe
(
'c3 chart data'
,
function
()
{
'use strict'
;
var
chart
,
d3
;
beforeEach
(
function
()
{
window
.
initDom
();
chart
=
window
.
c3
.
generate
({
data
:
{
columns
:
[
[
'data1'
,
30
,
200
,
100
,
400
,
150
,
250
],
[
'data2'
,
50
,
20
,
10
,
40
,
15
,
25
],
[
'data3'
,
150
,
120
,
110
,
140
,
115
,
125
]
],
order
:
function
()
{
return
0
;
}
}
});
d3
=
chart
.
internal
.
d3
;
});
describe
(
'function in data.order'
,
function
()
{
it
(
'should return false in isOrderAsc and isOrderDesc functions'
,
function
()
{
expect
(
chart
.
internal
.
isOrderAsc
()
||
chart
.
internal
.
isOrderDesc
()).
toBe
(
false
);
});
});
});
src/data.js
View file @
a82f0b75
...
...
@@ -206,11 +206,11 @@ c3_chart_internal_fn.hasPositiveValueInTargets = function (targets) {
};
c3_chart_internal_fn
.
isOrderDesc
=
function
()
{
var
config
=
this
.
config
;
return
config
.
data_order
&&
config
.
data_order
.
toLowerCase
()
===
'desc'
;
return
typeof
(
config
.
data_order
)
===
'string'
&&
config
.
data_order
.
toLowerCase
()
===
'desc'
;
};
c3_chart_internal_fn
.
isOrderAsc
=
function
()
{
var
config
=
this
.
config
;
return
config
.
data_order
&&
config
.
data_order
.
toLowerCase
()
===
'asc'
;
return
typeof
(
config
.
data_order
)
===
'string'
&&
config
.
data_order
.
toLowerCase
()
===
'asc'
;
};
c3_chart_internal_fn
.
orderTargets
=
function
(
targets
)
{
var
$$
=
this
,
config
=
$$
.
config
,
orderAsc
=
$$
.
isOrderAsc
(),
orderDesc
=
$$
.
isOrderDesc
();
...
...
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