如何从图表js图表中删除标题?
我的示例图表如下
<head>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>
<div id="myDiv" style="width: 800px; height: 400px;"></div>
<script>
var trace1 = {
x: [1, 2, 3, 4],
y: [10, 15, 13, 17],
mode: 'markers'
};
var trace2 = {
x: [2, 3, 4, 5],
y: [16, 5, 11, 9],
mode: 'lines'
};
var trace3 = {
x: [1, 2, 3, 4],
y: [12, 9, 15, 12],
mode: 'lines+markers'
};
var data = [ trace1, trace2, trace3 ];
var layout = {
title:false
};
Plotly.newPlot('myDiv', data, layout);
</script>
此图表将标题为&#34; false&#34;,我也尝试过 var layout = { showtitle:假 }
将标题设置为空:title:''
或只是删除标题行,不会显示标题,但标题区域高于标题保留的图表上方约50px高度,如何删除此标题区域?