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
5f100cb8
Commit
5f100cb8
authored
May 23, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix legend item width - #257
parent
aac27748
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
1 deletion
+62
-1
c3.js
c3.js
+1
-1
c3.min.js
c3.min.js
+0
-0
legend.html
htdocs/samples/legend.html
+61
-0
No files found.
c3.js
View file @
5f100cb8
...
@@ -4206,7 +4206,7 @@
...
@@ -4206,7 +4206,7 @@
function
updateLegend
(
targetIds
,
options
,
transitions
)
{
function
updateLegend
(
targetIds
,
options
,
transitions
)
{
var
xForLegend
,
xForLegendText
,
xForLegendRect
,
yForLegend
,
yForLegendText
,
yForLegendRect
;
var
xForLegend
,
xForLegendText
,
xForLegendRect
,
yForLegend
,
yForLegendText
,
yForLegendRect
;
var
paddingTop
=
4
,
paddingRight
=
2
6
,
maxWidth
=
0
,
maxHeight
=
0
,
posMin
=
10
;
var
paddingTop
=
4
,
paddingRight
=
3
6
,
maxWidth
=
0
,
maxHeight
=
0
,
posMin
=
10
;
var
l
,
totalLength
=
0
,
offsets
=
{},
widths
=
{},
heights
=
{},
margins
=
[
0
],
steps
=
{},
step
=
0
;
var
l
,
totalLength
=
0
,
offsets
=
{},
widths
=
{},
heights
=
{},
margins
=
[
0
],
steps
=
{},
step
=
0
;
var
withTransition
,
withTransitionForTransform
;
var
withTransition
,
withTransitionForTransform
;
var
hasFocused
=
legend
.
selectAll
(
'.'
+
CLASS
.
legendItemFocused
).
size
();
var
hasFocused
=
legend
.
selectAll
(
'.'
+
CLASS
.
legendItemFocused
).
size
();
...
...
c3.min.js
View file @
5f100cb8
This source diff could not be displayed because it is too large. You can
view the blob
instead.
htdocs/samples/legend.html
0 → 100644
View file @
5f100cb8
<html>
<head>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/c3.css"
>
</head>
<body>
<div
id=
"chart1"
></div>
<div
id=
"chart2"
></div>
<div
id=
"chart3"
></div>
<div
id=
"chart4"
></div>
<script
src=
"http://d3js.org/d3.v3.min.js"
charset=
"utf-8"
></script>
<script
src=
"/js/c3.js"
></script>
<script>
var
columns
=
[];
for
(
var
i
=
0
;
i
<
30
;
i
++
)
{
columns
[
i
]
=
[
'datahogehogeohgeohoge'
+
i
,
10
*
i
,
20
*
i
];
}
c3
.
generate
({
bindto
:
'#chart1'
,
data
:
{
columns
:
columns
,
},
});
c3
.
generate
({
bindto
:
'#chart2'
,
data
:
{
columns
:
columns
,
},
legend
:
{
position
:
'right'
},
});
c3
.
generate
({
bindto
:
'#chart3'
,
data
:
{
columns
:
columns
,
},
axis
:
{
rotated
:
true
,
},
});
c3
.
generate
({
bindto
:
'#chart4'
,
data
:
{
columns
:
columns
,
},
legend
:
{
position
:
'right'
},
axis
:
{
rotated
:
true
,
},
});
</script>
</body>
</html>
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