在我的laravel应用程序中,我使用这条线来绘制图表。
<div id="chart-container">FusionCharts will render here</div>
我需要连续放置两个图表,甚至可能更多,但它不适用于此图表生成器行。
我尝试过:
<div class="col-md-6" id="chart-container">FusionCharts will render here</div>
<div class="col-md-6" id="chart-container">FusionCharts will render here</div>
我尝试过:
<div class="col-md-12>
<div class="col-md-6>
<div id="chart-container">FusionCharts will render here</div>
</div>
<div class="col-md-6>
<div id="chart-container2">FusionCharts will render here</div>
</div>
</div>
答案 0 :(得分:0)
我从未使用过FusionCharts,但是从他们网站上的演示代码中,您需要在JavaScript中执行以下操作:
FusionCharts.ready(function() {
var myChart = new FusionCharts({
type: "stackedcolumn2d",
renderAt: "chart-container",
width: "100%",
height: "100%",
dataFormat: "json",
dataSource
}).render();
var myChart2 = new FusionCharts({
type: "stackedcolumn2d",
renderAt: "chart-container-2",
width: "100%",
height: "100%",
dataFormat: "json",
dataSource
}).render();
});
这样,您将呈现两个不同的图表。您的HTML必须如下所示:
<div class="col-md-6" id="chart-container">FusionCharts will render here</div>
<div class="col-md-6" id="chart-container-2">FusionCharts will render here</div>