Skip to content

Commit

Permalink
coffee -> es6
Browse files Browse the repository at this point in the history
  • Loading branch information
nicgirault committed Jan 28, 2017
1 parent 047a71c commit 2b6abe2
Show file tree
Hide file tree
Showing 51 changed files with 21,530 additions and 2,863 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Collision between ids
Rules => faire des callbacks à la place
8 changes: 2 additions & 6 deletions demo/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
<head>
<title>circosJS</title>
<meta charset='utf-8'></meta>
<link rel='stylesheet' href='../dist/colorBrewer.css'></link>
<link rel='stylesheet' href='../demo/style.css'></link>
</head>

<body>
<svg id='chart'></svg>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script src='../bower_components/d3-tip/index.js'></script>
<script src='../dist/circosJS.js'></script>
<div id='chart'></div>
<script src='../dist/circos.js'></script>
<script src='../demo/demo.js'></script>
</body>
</html>
27 changes: 12 additions & 15 deletions demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ scatter = [
['january', 7, 5],
['january', 8, 4],
['january', 9, 6],
['january', 31, 13],
['february', 1, 6],
['february', 2, 3],
['february', 3, 4],
Expand All @@ -509,7 +510,7 @@ stack = [
]

heatmap = [
['january', 'a', 2,3],
// ['january', 'a', 2,3],
['january', 1, 4,2],
['january', 5, 10,10],
['january', 11, 15,13],
Expand All @@ -528,14 +529,10 @@ highlight = [
['march', 1, 2,'black']
];

var circos = new circosJS({
var circos = new Circos({
container: '#chart'
});

var rules = [
{parameter: 'glyph_strokeColor', value: 'blue', condition: function(datum){ return datum.value > 5;}}
]

var backgrounds = [
{start: 0, end: 0.5, color: '#d3d3d3', opacity: 1},
{start: 0.5, end: 1, color: '#333333', opacity: 0.5, parent: ['february', 'april']}
Expand Down Expand Up @@ -568,26 +565,26 @@ circos
},
layout_data
)
// .text('text1', {innerRadius: 180, style: {'font-size': '50px', 'font-family': 'Arial'}}, text)
.text('text1', {innerRadius: 180, style: {'font-size': '50px', 'font-family': 'Arial'}}, text)
.heatmap('h1', {
tooltipContent: function(d){
return 'From ' + d.start + ' to ' + d.end + ' ' + d.block_id + ': ' + d.value;
}
}, heatmap)
// .histogram('hist1', {innerRadius: 200, outerRadius: 220, axes: {display: true}}, heatmap)
// .scatter('c1', {innerRadius: 150, outerRadius: 200, glyph: {shape: 'cross', size: 50, fill: true}}, scatter)
// .line('line1', {innerRadius: 150, outerRadius: 200, interpolation: 'cardinal'}, scatter)
.chord('l1', {usePalette: false, color: 'blue',
.histogram('hist1', {innerRadius: 200, outerRadius: 220, axes: {display: true}}, heatmap)
.scatter('c1', {innerRadius: 150, outerRadius: 200, glyph: {shape: 'circle', size: 50, fill: true}}, scatter)
.line('line1', {innerRadius: 150, outerRadius: 200, direction: 'in', fill: true}, scatter)
.chords('l1', {usePalette: false, color: 'blue',
tooltipContent: function(d){
return d.source.id + ' -> ' + d.target.id + ': ' + d.value;
}
}, links, linkRules)
// .stack('stack1', {thickness: 10, usePalette: true, margin: 0, direction: 'out', innerRadius: 150, outerRadius: 240, axes: {display: true}}, stack)
// .stack('stack1', {thickness: 10, usePalette: true, margin: 0, direction: 'center', innerRadius: 150, outerRadius: 240, axes: {display: true}}, stack)
// .stack('stack1', {thickness: 10, usePalette: true, margin: 0, direction: 'out', innerRadius: 150, outerRadius: 240}, stack)
// .line('line2', {innerRadius:100, outerRadius: 200}, [], {}, backgrounds2)
.highlight('highlight1', {
innerRadius: 100, outerRadius: 200, opacity: 1
}, highlight)
// .highlight('highlight1', {
// innerRadius: 100, outerRadius: 200, opacity: 1
// }, highlight)
.render();

// circos.removeTracks(['l1'])
Expand Down
16 changes: 16 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang='en'>

<head>
<title>Circos</title>
<meta charset='utf-8'></meta>
</head>

<body>
<svg id='chart'></svg>
<script src='../dist/circos.js'></script>
<script>
Circos();
</script>
</body>
</html>
12 changes: 0 additions & 12 deletions demo/style.css

This file was deleted.

Loading

0 comments on commit 2b6abe2

Please sign in to comment.