var xValue = ['1','2','3','4','5','6','7','8','9','10','11','12','13'];
var yValue = [10, 6, 8,9,1,17,3,7,13,2,12,4,13];
var wicket1 = ['W','','W','W','','','','W','','','','','W'];
var trace1 = {
x: xValue,
y: yValue,
type: 'bar',
text: wicket1,
textposition: 'outside',
};
var data1 = [trace1];
Plotly.newPlot('myDiv', data1);
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<div id="myDiv"></div>
你是什么意思与*徽章*? –
我需要用 W替换'W' –
它取决于您正在使用的特定图表库。你可能应该在他们的Github页面上提问。 – Nisarg