shahinrostami / plotapi

Engaging visualisations, made easy.
https://plotapi.com
MIT License
268 stars 17 forks source link

Maybe wrong string in generated HTML? #39

Closed jkolom closed 3 years ago

jkolom commented 3 years ago

On a new installation, the chord plot is not showing (chord 1.0.0). After debugging the HTML, it seems that there was a credits = True entry that should be credits = true. After manually correcting the HTML, the HTML rendered correctly.

Excerpt of the surrounding HTML code below:

   <script>
      var script = document.createElement("script");
      script.type = "text/javascript";
      script.src = "https://d3js.org/d3.v5.min.js";

      script.onload = function () {

        var script2 = document.createElement("script");
        script2.type = "text/javascript";
        script2.src = "https://datacrayon.com/assets/chord/script.js";
        script2.onload = function () {
          margin = {
          left: 50.0,
          top: 50.0,
          right: 50.0,
          bottom: 50.0
        };
        width = Math.min(window.innerWidth, 700.0) - margin.left - margin.right;
        height = Math.min(window.innerWidth, 700.0) - margin.top - margin.bottom;
        innerRadius = Math.min(width, height) * 0.39;
        outerRadius = innerRadius * 1.1;

      tag_id = " <REMOVED> ";
      padding = 0.03;
      Names = [ <REMOVED> ];
      colors = d3.schemeSet1;
      opacityDefault = 0.8;
      matrix = [ <REMOVED> ];
      wrap_labels = false;
      credit = True

      ////////////////////////////////////////////////////////////
      /////////// Create scale and layout functions //////////////
      ////////////////////////////////////////////////////////////

      var colors = d3
        .scaleOrdinal()
        .domain(d3.range(Names.length))
        .range(colors);
shahinrostami commented 3 years ago

Hello @jkolom ! Are you on Chord Pro or Chord Free? I recall fixing this last week, but perhaps it was just for Pro

jkolom commented 3 years ago

I used the free version to be local (I have the pro one also). So maybe the local file with the Python package is not updated (?)

shahinrostami commented 3 years ago

I used the free version to be local (I have the pro one also). So maybe the local file with the Python package is not updated (?)

@jkolom All fixed now :) let me know if anything comes up.