GithubHelp home page GithubHelp logo

Comments (6)

beaugunderson avatar beaugunderson commented on July 16, 2024

Here's a simple reproduction; I linked to online versions of jquery and jit for ease of testing.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
 <head> 
  <title>Testcase - Broken Sunburst</title> 

  <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 

  <script type="text/javascript" language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 
  <script type="text/javascript" language="javascript" src="http://thejit.org/static/v20/Jit/jit.js"></script> 

  <style type="text/css"> 
   #infovis {
    width: 100%;
    background-color: #white;
    margin: auto;
    overflow: hidden;
    color: #ccc;
   }
  </style> 

  <script type="text/javascript" language="javascript"> 
   var burst, labelType, useGradients, nativeTextSupport, animate;

   $(function() {
    (function() {
     var ua = navigator.userAgent,
     iStuff = ua.match(/iPhone/i) || ua.match(/iPad/i),
     typeOfCanvas = typeof HTMLCanvasElement,
     nativeCanvasSupport = (typeOfCanvas == 'object' || typeOfCanvas == 'function'),
     textSupport = nativeCanvasSupport 
     && (typeof document.createElement('canvas').getContext('2d').fillText == 'function');
     //I'm setting this based on the fact that ExCanvas provides text support for IE
     //and that as of today iPhone/iPad current text support is lame
     labelType = (!nativeCanvasSupport || (textSupport && !iStuff))? 'Native' : 'HTML';
     nativeTextSupport = labelType == 'Native';
     useGradients = nativeCanvasSupport;
     animate = !(iStuff || !nativeCanvasSupport);
    })();

    $(window).resize(function() {
     $('#infovis').height($(window).height());

     if (burst) {
      burst.refresh();
     }
    }); 

    $('#infovis').height($(window).height());

    burst = new $jit.Sunburst({  
     injectInto: 'infovis',
     Label: {
      type: 'Native'
     },
     Node: {
      overridable: true,
      type: useGradients ? 'gradient-multipie' : 'multipie'
     },  
    });

    var json = { 
     'children' : [
      {
       'id': 'child-1',
       'name': 'child-1'
      }
      // Uncomment these lines to see the correct behavior
      //,{
      // 'id': 'child-2',
      // 'name': 'child-2'
      //}
     ],
     'id': 'parent',
     'name': 'parent',
     'data': {
      '$type': 'none'
     }
    };

    burst.loadJSON(json);
    burst.refresh();
   });  
  </script> 
 </head> 
 <body> 
  <div id="infovis"></div>    
 </body> 
</html> 

from jit.

philogb avatar philogb commented on July 16, 2024

Thanks a lot for reporting the issue. I'll fix this for the final version.

from jit.

philogb avatar philogb commented on July 16, 2024

Hi,

Thanks for providing the error. Could you provide an image with the error? I'm trying a similar dataset with just one child and everything is displayed as expected: http://i.imgur.com/DJX2E.png .

Also, what browser are you using?

Thanks,

from jit.

philogb avatar philogb commented on July 16, 2024

I tried this with FF4 beta, Opera, Safari and Chrome and everything seems to work fine. I'm closing the ticket, but please let me know if the error persists.

Thanks,

from jit.

beaugunderson avatar beaugunderson commented on July 16, 2024

Still an issue; this is what I see in Chrome dev 9.0.576.0 (the latest dev channel release as of today):

http://i.imgur.com/L4gCf.jpg

This was using a git clone from 5 minutes ago. :)

The test code I used is the code above, you can test here if you'd like:

http://reginald.beaugunderson.com/sunburst-bug/

I tried in Firefox as well and it worked but the text at the center that says 'parent' is unreadable (aliasing issues).

from jit.

philogb avatar philogb commented on July 16, 2024

Hi, thanks for the response, the example you provided works well in chrome in mac, must be a windows issue. I'll investigate further.

from jit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.