Commit 169da626 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix legend position when element appended - #334

parent bae6ab3f
......@@ -2956,7 +2956,7 @@
// MEMO: call here to update legend box and tranlate for all
// MEMO: translate will be upated by this, so transform not needed in updateLegend()
updateLegend(mapToIds(c3.data.targets), {withTransform: false, withTransitionForTransform: false});
updateLegend(mapToIds(c3.data.targets), {withTransform: false, withTransitionForTransform: false, withTransition: false});
/*-- Main Region --*/
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,26 +3,35 @@
<link rel="stylesheet" type="text/css" href="/css/c3.css">
</head>
<body>
<!-- <div id="chart"></div>-->
<div id="chart1"></div>
<div id="chart2"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="/js/c3.js"></script>
<script>
var chart = c3.generate({
var chart1 = c3.generate({
data: {
columns: [
['sample', 30, 200, 100, null, 150, 250]
],
},
// size: {
// width: 640,
// height: 320
// }
});
setTimeout(function () {
document.body.appendChild(chart.element);
}, 1000);
var chart2 = c3.generate({
data: {
columns: [
['sample', 30, 200, 100, null, 150, 250]
],
type: 'bar'
}
});
document.getElementById('chart1').appendChild(chart1.element);
$('#chart2').append(chart2.element);
</script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment