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
22e03ae3
Commit
22e03ae3
authored
Aug 22, 2016
by
Evgeny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Half-fix categories for xy
parent
8af0b900
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
101 additions
and
16 deletions
+101
-16
_SpecRunner.html
_SpecRunner.html
+85
-0
c3.js
c3.js
+8
-8
c3.min.js
c3.min.js
+0
-0
axis.js
src/axis.js
+5
-5
core.js
src/core.js
+1
-1
data.convert.js
src/data.convert.js
+1
-1
data.js
src/data.js
+1
-1
No files found.
_SpecRunner.html
0 → 100644
View file @
22e03ae3
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
Jasmine Spec Runner
</title>
<link
rel=
"shortcut icon"
type=
"image/png"
href=
".grunt/grunt-contrib-jasmine/jasmine_favicon.png"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
".grunt/grunt-contrib-jasmine/jasmine.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"c3.css"
>
</head>
<body>
<script
src=
".grunt/grunt-contrib-jasmine/es5-shim.js"
></script>
<script
src=
".grunt/grunt-contrib-jasmine/jasmine.js"
></script>
<script
src=
".grunt/grunt-contrib-jasmine/jasmine-html.js"
></script>
<script
src=
".grunt/grunt-contrib-jasmine/json2.js"
></script>
<script
src=
".grunt/grunt-contrib-jasmine/boot.js"
></script>
<script
src=
"bower_components/d3/d3.js"
></script>
<script
src=
"bower_components/async-buffer/index.js"
></script>
<script
src=
"spec/c3-helper.js"
></script>
<script
src=
"c3.js"
></script>
<script
src=
"spec/api.chart-spec.js"
></script>
<script
src=
"spec/api.color-spec.js"
></script>
<script
src=
"spec/api.data-spec.js"
></script>
<script
src=
"spec/api.grid-spec.js"
></script>
<script
src=
"spec/api.load-spec.js"
></script>
<script
src=
"spec/api.zoom-spec.js"
></script>
<script
src=
"spec/arc-spec.js"
></script>
<script
src=
"spec/axis-spec.js"
></script>
<script
src=
"spec/c3-spec.js"
></script>
<script
src=
"spec/class-spec.js"
></script>
<script
src=
"spec/core-spec.js"
></script>
<script
src=
"spec/data-spec.js"
></script>
<script
src=
"spec/domain-spec.js"
></script>
<script
src=
"spec/grid-spec.js"
></script>
<script
src=
"spec/interaction-spec.js"
></script>
<script
src=
"spec/legend-spec.js"
></script>
<script
src=
"spec/markers-spec.js"
></script>
<script
src=
"spec/shape.bar-spec.js"
></script>
<script
src=
"spec/shape.line-spec.js"
></script>
<script
src=
"spec/stacked-spec.js"
></script>
<script
src=
"spec/tooltip-spec.js"
></script>
<script
src=
"spec/type-spec.js"
></script>
<script
src=
"spec/zoom-spec.js"
></script>
<script
src=
".grunt/grunt-contrib-jasmine/reporter.js"
></script>
</body>
</html>
c3.js
View file @
22e03ae3
...
...
@@ -891,7 +891,7 @@
if
(
$$
.
isTimeSeries
())
{
value
=
$$
.
parseDate
(
d
.
value
);
}
else
if
(
$$
.
isCategorized
()
&&
typeof
d
.
value
===
'string'
)
{
else
if
(
$$
.
isCategorized
()
&&
typeof
d
.
value
===
'string'
&&
!
$$
.
config
.
is_xy
)
{
value
=
$$
.
config
.
axis_x_categories
.
indexOf
(
d
.
value
);
}
return
Math
.
ceil
(
$$
.
x
(
value
));
...
...
@@ -1799,7 +1799,7 @@
if
(
$$
.
isTimeSeries
())
{
x
=
rawX
?
$$
.
parseDate
(
rawX
)
:
$$
.
parseDate
(
$$
.
getXValue
(
id
,
index
));
}
else
if
(
$$
.
isCustomX
()
&&
!
$$
.
isCategorized
()
)
{
else
if
(
$$
.
isCustomX
())
{
x
=
isValue
(
rawX
)
?
+
rawX
:
$$
.
getXValue
(
id
,
index
);
}
else
{
...
...
@@ -2249,7 +2249,7 @@
targets
.
forEach
(
function
(
t
)
{
var
i
;
// sort values by its x
if
(
config
.
data_xSort
)
{
if
(
false
)
{
t
.
values
=
t
.
values
.
sort
(
function
(
v1
,
v2
)
{
var
x1
=
v1
.
x
||
v1
.
x
===
0
?
v1
.
x
:
Infinity
,
x2
=
v2
.
x
||
v2
.
x
===
0
?
v2
.
x
:
Infinity
;
...
...
@@ -5148,15 +5148,15 @@
};
c3_chart_internal_fn
.
getSizeCoef
=
function
(){
var
$$
=
this
;
var
$$
=
this
,
margin
=
$$
.
margin
;
// Excel shortens ticks the way so they don't take more than half of all chart
if
(
$$
.
config
.
axis_rotated
){
var
widthPadding
=
-
30
;
return
$$
.
getCurrentWidth
()
/
2
+
widthPadding
;
var
widthPadding
=
margin
.
left
+
margin
.
right
;
return
(
$$
.
getCurrentWidth
()
-
widthPadding
)
/
2
;
}
else
{
var
heightPadding
=
-
30
;
return
$$
.
getCurrentHeight
()
/
2
+
heightPadding
;
var
heightPadding
=
margin
.
top
+
margin
.
bottom
;
return
(
$$
.
getCurrentHeight
()
-
heightPadding
)
/
2
;
}
};
...
...
c3.min.js
View file @
22e03ae3
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/axis.js
View file @
22e03ae3
...
...
@@ -513,15 +513,15 @@ c3_chart_internal_fn.getTicksCoef = function(){
};
c3_chart_internal_fn
.
getSizeCoef
=
function
(){
var
$$
=
this
;
var
$$
=
this
,
margin
=
$$
.
margin
;
// Excel shortens ticks the way so they don't take more than half of all chart
if
(
$$
.
config
.
axis_rotated
){
var
widthPadding
=
-
30
;
return
$$
.
getCurrentWidth
()
/
2
+
widthPadding
;
var
widthPadding
=
margin
.
left
+
margin
.
right
;
return
(
$$
.
getCurrentWidth
()
-
widthPadding
)
/
2
;
}
else
{
var
heightPadding
=
-
30
;
return
$$
.
getCurrentHeight
()
/
2
+
heightPadding
;
var
heightPadding
=
margin
.
top
+
margin
.
bottom
;
return
(
$$
.
getCurrentHeight
()
-
heightPadding
)
/
2
;
}
};
...
...
src/core.js
View file @
22e03ae3
...
...
@@ -886,7 +886,7 @@ c3_chart_internal_fn.xv = function (d) {
if
(
$$
.
isTimeSeries
())
{
value
=
$$
.
parseDate
(
d
.
value
);
}
else
if
(
$$
.
isCategorized
()
&&
typeof
d
.
value
===
'string'
)
{
else
if
(
$$
.
isCategorized
()
&&
typeof
d
.
value
===
'string'
&&
!
$$
.
config
.
is_xy
)
{
value
=
$$
.
config
.
axis_x_categories
.
indexOf
(
d
.
value
);
}
return
Math
.
ceil
(
$$
.
x
(
value
));
...
...
src/data.convert.js
View file @
22e03ae3
...
...
@@ -162,7 +162,7 @@ c3_chart_internal_fn.convertDataToTargets = function (data, appendXs) {
targets
.
forEach
(
function
(
t
)
{
var
i
;
// sort values by its x
if
(
config
.
data_xSort
)
{
if
(
false
)
{
t
.
values
=
t
.
values
.
sort
(
function
(
v1
,
v2
)
{
var
x1
=
v1
.
x
||
v1
.
x
===
0
?
v1
.
x
:
Infinity
,
x2
=
v2
.
x
||
v2
.
x
===
0
?
v2
.
x
:
Infinity
;
...
...
src/data.js
View file @
22e03ae3
...
...
@@ -83,7 +83,7 @@ c3_chart_internal_fn.generateTargetX = function (rawX, id, index) {
if
(
$$
.
isTimeSeries
())
{
x
=
rawX
?
$$
.
parseDate
(
rawX
)
:
$$
.
parseDate
(
$$
.
getXValue
(
id
,
index
));
}
else
if
(
$$
.
isCustomX
()
&&
!
$$
.
isCategorized
()
)
{
else
if
(
$$
.
isCustomX
())
{
x
=
isValue
(
rawX
)
?
+
rawX
:
$$
.
getXValue
(
id
,
index
);
}
else
{
...
...
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