Hello !
I’m trying both Plot.ly and Javascript for the first time, in ASP.NET context, and i have a few difficulties.
I’m mostly using this exemple as reference.
Here is my try :
<div id="TestChart"></div>
<script type="text/javascript" src="https://cdn.plot.ly/plotly-laQueryList.min.js"></script>
<script type="text/javascript">
        var x = [];
        var y = [];
        var source = <%= SerializedRecords %>;
       var data = [
            {
               x: Object.keys(source),
               y: Object.values(source),
               name: 'number',
               histnorm: "count",
               type: 'histogram',
               marker: {
                 color: 'rgba(100,250,100,0.7)',
              }
          }
      ];
       Plotly.newPlot('TestChart', data);  
</script>
SerializedRecords is a code-behind string that received a JSON-serialized List.
I got many problems with this.
First, i got a syntax error on the third semi-colon, did i miss something in the JS syntax ??
Second, it warns me that global variable Plotly may be not assigned, how to be sure it is ?
Third, is it the correct way to make an histogram with plotly ??
Thank you in advance for your advice.
Thio.