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
e127fb0c
Commit
e127fb0c
authored
Jun 01, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update x scale on category axis when legend.show/hide - #286
parent
08e80f27
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
138 additions
and
2 deletions
+138
-2
c3.js
c3.js
+2
-2
c3.min.js
c3.min.js
+0
-0
api_legend.html
htdocs/samples/api_legend.html
+136
-0
No files found.
c3.js
View file @
e127fb0c
...
...
@@ -5149,11 +5149,11 @@
c3
.
legend
.
show
=
function
(
targetIds
)
{
showLegend
(
mapToTargetIds
(
targetIds
));
r
edraw
({
withLegend
:
true
});
updateAndR
edraw
({
withLegend
:
true
});
};
c3
.
legend
.
hide
=
function
(
targetIds
)
{
hideLegend
(
mapToTargetIds
(
targetIds
));
r
edraw
({
withLegend
:
true
});
updateAndR
edraw
({
withLegend
:
true
});
};
c3
.
resize
=
function
(
size
)
{
...
...
c3.min.js
View file @
e127fb0c
This diff is collapsed.
Click to expand it.
htdocs/samples/api_legend.html
0 → 100644
View file @
e127fb0c
<html>
<head>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/c3.css"
>
</head>
<body>
<div
id=
"chart"
></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
<
5
;
i
++
)
{
columns
[
i
]
=
[
'datahogehogeohgeohoge'
+
i
,
10
*
i
,
20
*
i
,
30
*
i
];
}
var
chart
=
c3
.
generate
({
data
:
{
columns
:
columns
,
},
axis
:
{
x
:
{
type
:
'category'
}
}
});
setTimeout
(
function
()
{
chart
.
legend
.
hide
();
},
1000
);
setTimeout
(
function
()
{
chart
=
c3
.
generate
({
data
:
{
columns
:
columns
,
},
axis
:
{
x
:
{
type
:
'category'
}
},
legend
:
{
position
:
'right'
}
});
},
2000
);
setTimeout
(
function
()
{
chart
.
legend
.
hide
();
},
3000
);
setTimeout
(
function
()
{
chart
=
c3
.
generate
({
data
:
{
columns
:
columns
,
},
axis
:
{
rotated
:
true
}
});
},
4000
);
setTimeout
(
function
()
{
chart
.
legend
.
hide
();
},
5000
);
setTimeout
(
function
()
{
chart
=
c3
.
generate
({
data
:
{
columns
:
columns
,
},
legend
:
{
position
:
'right'
},
axis
:
{
rotated
:
true
}
});
},
6000
);
setTimeout
(
function
()
{
chart
.
legend
.
hide
();
},
7000
);
setTimeout
(
function
()
{
chart
=
c3
.
generate
({
data
:
{
columns
:
columns
,
},
legend
:
{
show
:
false
}
});
},
8000
);
setTimeout
(
function
()
{
chart
.
legend
.
show
();
},
9000
);
setTimeout
(
function
()
{
chart
=
c3
.
generate
({
data
:
{
columns
:
columns
,
},
legend
:
{
show
:
false
},
axis
:
{
rotated
:
true
}
});
},
10000
);
setTimeout
(
function
()
{
chart
.
legend
.
show
();
},
11000
);
setTimeout
(
function
()
{
chart
=
c3
.
generate
({
data
:
{
columns
:
columns
,
},
legend
:
{
position
:
'right'
,
show
:
false
}
});
},
12000
);
setTimeout
(
function
()
{
chart
.
legend
.
show
();
},
13000
);
</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