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