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
8532d2ed
Commit
8532d2ed
authored
Dec 09, 2015
by
Evgeny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more width if running in node
parent
1d722724
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
c3.js
c3.js
+5
-2
legend.js
src/legend.js
+2
-2
util.js
src/util.js
+3
-0
No files found.
c3.js
View file @
8532d2ed
...
...
@@ -4078,7 +4078,7 @@
this
.
legendStep
=
step
;
};
c3_chart_internal_fn
.
updateLegendItemWidth
=
function
(
w
)
{
this
.
legendItemWidth
=
w
;
this
.
legendItemWidth
=
w
+
(
isNode
()
?
10
:
0
)
;
};
c3_chart_internal_fn
.
updateLegendItemHeight
=
function
(
h
)
{
this
.
legendItemHeight
=
h
;
...
...
@@ -4166,7 +4166,7 @@
var
hasFocused
=
$$
.
legend
.
selectAll
(
'.'
+
CLASS
.
legendItemFocused
).
size
();
var
texts
,
rects
,
tiles
,
background
;
var
nodeOffset
=
typeof
process
===
'undefined'
?
1
:
5
;
var
nodeOffset
=
typeof
process
===
'undefined'
?
1
:
3
;
options
=
options
||
{};
withTransition
=
getOption
(
options
,
"withTransition"
,
true
);
...
...
@@ -6491,6 +6491,9 @@
temp
.
__clonedFrom
=
cloneObj
;
return
temp
;
},
isNode
=
function
(){
return
typeof
process
===
'undefined'
;
};
...
...
src/legend.js
View file @
8532d2ed
...
...
@@ -37,7 +37,7 @@ c3_chart_internal_fn.updateLegendStep = function (step) {
this
.
legendStep
=
step
;
};
c3_chart_internal_fn
.
updateLegendItemWidth
=
function
(
w
)
{
this
.
legendItemWidth
=
w
;
this
.
legendItemWidth
=
w
+
(
isNode
()
?
10
:
0
)
;
};
c3_chart_internal_fn
.
updateLegendItemHeight
=
function
(
h
)
{
this
.
legendItemHeight
=
h
;
...
...
@@ -125,7 +125,7 @@ c3_chart_internal_fn.updateLegend = function (targetIds, options, transitions) {
var
hasFocused
=
$$
.
legend
.
selectAll
(
'.'
+
CLASS
.
legendItemFocused
).
size
();
var
texts
,
rects
,
tiles
,
background
;
var
nodeOffset
=
typeof
process
===
'undefined'
?
1
:
5
;
var
nodeOffset
=
typeof
process
===
'undefined'
?
1
:
3
;
options
=
options
||
{};
withTransition
=
getOption
(
options
,
"withTransition"
,
true
);
...
...
src/util.js
View file @
8532d2ed
...
...
@@ -110,5 +110,8 @@ var isValue = c3_chart_internal_fn.isValue = function (v) {
temp
.
__clonedFrom
=
cloneObj
;
return
temp
;
},
isNode
=
function
(){
return
typeof
process
===
'undefined'
;
};
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