以下是打字稿代码
`trace1 = { y:['性别','种族','颜色'], x:[40,24,73], 名称:“ SF Zoo”, 标记:{color:'#ffa038'}, 类型:“酒吧”, 方向:“ h” }; trace2 = { y:['性别','种族','颜色'], x:[20,14,23], 名称:“ LA Zoo”, 类型:“酒吧”, 标记:{color:'rgb(76,119,93)'}, 文字:23, 文字位置:“外部”, outsidetextfont:{size:100}, 方向:“ h” }; 图= { 数据:[this.trace1,this.trace2], 布局:{autosize:true,response:true,automargin:true,marker:0,showlegend:false,title:'Sample POC',barmode:'group',direction:'h',width:320,height:500, yaxis:{automargin:true},xaxis:{automargin:true,title:'Patient Count',showgrid:false},margin:{ l:60 r:15 b:0, t:80, 垫:4 }} //任何变化 };