我在角度应用程序中用plotly制作了一个图表,但跟踪的名称很长。
因此,当我将鼠标悬停在图表上时,名称会通过在其后面添加 ... 来缩短。我真的不想要这个。我怎样才能改变这个?
这是我的代码。
var text = "Plot_ForecastConfig";
var layout = {
showlegend: true,
legend: {"orientation": "h"},
yaxis: {
title: 'Sales',
titlefont: {
family: 'Courier New, monospace',
size: 18,
color: '#7f7f7f'
}
}
};
var options = {
scrollZoom: true,
showLink: false,
modeBarButtonsToAdd: [{
name: 'image',
title: 'Download plot as a png',
icon: Plotly.Icons.camera,
click: function () {
Plotly.downloadImage(document.getElementById('graph'), {
filename: text,
format: 'png',
height: 700,
width: 1000
});
}
}],
modeBarButtonsToRemove: ['toImage', 'zoom2d', 'pan', 'pan2d', 'sendDataToCloud', 'hoverClosestCartesian', 'autoScale2d'],
displaylogo: false,
displayModeBar: true,
};
Plotly.newPlot('graph', this.drawing, layout, options);