python - Plotly.js connecting to Django Rest Framework API - is this possible and if so how? -


i testing use of plotly in our company's web application. know plotly has it's own api possible connect django rest framework api since python based?

if possible - syntax like? here have far:

div id="mydiv"></div>   <script>   var trace1 = {   x: [1, 2, 3, 4],   y: [10, 15, 13, 17],   type: 'scatter' };  var trace2 = {   x: [1, 2, 3, 4],   y: [16, 5, 11, 9],   type: 'scatter' };  var data = [trace1, trace2];  plotly.newplot('mydiv', data);   </script> 

instead of hard-coding data in 'x' , 'y' - want point json in django rest framework. database mysql. appreciated!!!

thanks!


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -