运行 ❯
获取您
自己
的网站
×
更改方向
保存代码
更改主题,深色/浅色
前往空间
<!DOCTYPE html> <html> <script src="https://cdn.plot.ly/plotly-latest.min.js"></script> <body> <div id="myPlot" style="width:100%;max-width:700px"></div> <script> const xArray = ["Italy", "France", "Spain", "USA", "Argentina"]; const yArray = [55, 49, 44, 24, 15]; const layout = {title:"World Wide Wine Production"}; const data = [{labels:xArray, values:yArray, type:"pie"}]; Plotly.newPlot("myPlot", data, layout); </script> </body> </html>