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
d17e6291
Commit
d17e6291
authored
Apr 24, 2014
by
Brandon Bernal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MAP-5822: 'No Data' text made more configurable.
parent
be3e107c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
c3.js
c3.js
+18
-3
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
d17e6291
...
...
@@ -143,6 +143,12 @@
__data_ondragstart
=
getConfig
([
'data'
,
'ondragstart'
],
function
()
{}),
__data_ondragend
=
getConfig
([
'data'
,
'ondragend'
],
function
()
{});
// configuration for no plot-able data supplied.
var
__data_empty_abort
=
getConfig
([
'data'
,
'empty'
,
'abort'
],
true
);
var
__data_empty_label_text
=
getConfig
([
'data'
,
'empty'
,
'label'
,
'text'
],
""
);
var
__data_empty_label_size
=
getConfig
([
'data'
,
'empty'
,
'label'
,
'size'
],
false
);
var
__data_empty_label_fill
=
getConfig
([
'data'
,
'empty'
,
'label'
,
'fill'
],
false
);
// subchart
var
__subchart_show
=
getConfig
([
'subchart'
,
'show'
],
false
),
__subchart_size_height
=
__subchart_show
?
getConfig
([
'subchart'
,
'size'
,
'height'
],
60
)
:
0
;
...
...
@@ -1213,8 +1219,8 @@
var
xDomain
=
[
getXDomainMin
(
targets
),
getXDomainMax
(
targets
)],
firstX
=
xDomain
[
0
],
lastX
=
xDomain
[
1
],
padding
=
getXDomainPadding
(
targets
,
xDomain
),
min
=
isTimeSeries
?
new
Date
(
firstX
.
getTime
()
-
padding
)
:
firstX
-
padding
,
max
=
isTimeSeries
?
new
Date
(
lastX
.
getTime
()
+
padding
)
:
lastX
+
padding
;
min
=
firstX
==
undefined
?
padding
:
(
isTimeSeries
?
new
Date
(
firstX
.
getTime
()
-
padding
)
:
firstX
-
padding
)
,
max
=
lastX
==
undefined
?
padding
:
(
isTimeSeries
?
new
Date
(
lastX
.
getTime
()
+
padding
)
:
lastX
+
padding
)
;
return
[
min
,
max
];
}
function
diffDomain
(
d
)
{
...
...
@@ -2595,6 +2601,15 @@
.
style
(
"display"
,
"none"
);
/*-- Main Region --*/
if
(
c3
.
data
.
targets
.
length
==
0
)
{
main
.
append
(
"text"
)
.
attr
(
"class"
,
CLASS
.
text
)
.
attr
(
"x"
,
(
main
[
0
][
0
].
parentNode
.
width
.
baseVal
.
value
/
2
)
-
margin
.
left
)
.
attr
(
"y"
,
(
main
[
0
][
0
].
parentNode
.
height
.
baseVal
.
value
/
2
)
-
margin
.
top
)
.
attr
(
"text-anchor"
,
"middle"
)
.
attr
(
"style"
,
(
__data_empty_label_fill
?
"fill:"
+
__data_empty_label_fill
+
"; "
:
""
)
+
(
__data_empty_label_size
?
"font-size:"
+
__data_empty_label_size
+
"; "
:
""
)
)
.
text
(
__data_empty_label_text
);
}
// Add Axis
main
.
append
(
"g"
)
...
...
@@ -3084,7 +3099,7 @@
var
targetsToShow
=
filterTargetsToShow
(
c3
.
data
.
targets
),
tickValues
,
i
,
intervalForCulling
;
// abort if no targets to show
if
(
targetsToShow
.
length
===
0
)
{
if
(
targetsToShow
.
length
===
0
&&
__data_empty_abort
)
{
return
;
}
...
...
c3.min.js
View file @
d17e6291
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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