似乎plotly网站上的choropleth地图的示例代码已经过时了,不再起作用。PlotlyError: Invalid 'figure_or_data' argument.Plotly will not be able to properly parse the resulting JSON.If you want to send this 'figure_or_data' to Plotly anyway (not recommended), you can set
目前,我正在尝试使用Plotly来制作一个实时饼图,其中包含来自websocket连接的数据。然而,我似乎无法将数据从套接字获取到图形中。现在,我看到了两种方法。另一种方法是将Plotly代码放入onmessage函数中。这两种方法目前都不起作用。我不打算在这个线程中讨论从onmessage函数中获取数据,因为这个线程是用于Plotly的,而不是websocket的。JavaScript: Getting Values out of Websocket Functions 因此,关于我在将Plotly放入onmessage