Comments (6)
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.
Thanks a lot for reporting the issue. I'll fix this for the final version.
from jit.
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.
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.
Still an issue; this is what I see in Chrome dev 9.0.576.0 (the latest dev channel release as of today):
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.
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)
- Too much recursion
- export e Json Data
- An extrenal file Json
- Add bidirectional and double line
- $jit.ForceDirected how can i specific each edge's length
- Bower.json version mismatch
- dynamically loading the tree
- Implement Cushioned Treemaps
- Stacked Bar Chart Show Labels for each stack in the Bar. HOT 1
- bower download is just text HOT 1
- How do I avoid the nodes to extend outside of the visible canvas
- How to make the root node and other nodes start displaying from left not center HOT 1
- Force Directed renders incorrectly? HOT 1
- "offsetY" setting doesn't work after "removeSubtree" call
- when click Node A , how to just show the children nodes belonging to the Node A
- voronoi treemap area
- Class.override doesn't give access to the overriden method
- Node overlapping
- click on children cant set canvas view to center !
- Jit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jit.