Skip to content

Commit

Permalink
ADD: new test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarbereder committed Sep 16, 2013
1 parent a0edb34 commit 829374d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions test/integration.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,23 @@
[[0.0, 0.0, 0.0], {label: 'D'}],
]

commonNegativeTestData = [
[1000, {label: 'A'}],
[-1300, {label: 'B'}],
[3600, {label: 'C'}],
[-4000, {label: 'D'}],
[5200, {label: 'E'}],
[-7000, {label: 'F', color: '#FFBE33'}],
[0, {label: 'G'}]
]

stackedNegativeTestData = [
[[-2.0, -1.0, -0.6], {label: 'A'}],
[[2.4, 0.9, 2.0], {label: 'B'}],
[[-1.5, -2.6, -1.4], {label: 'C', colors: $.fn.tufteBar.defaults.colors}],
[[0.0, 0.0, 0.0], {label: 'D'}],
]

$('#defaults-graph').tufteBar({
data: commonTestData
});
Expand All @@ -61,6 +78,10 @@
}
});

$('#negative-graph').tufteBar({
data: commonNegativeTestData
});

$('#stacked-defaults-graph').tufteBar({
data: [
[[2.0, 1.0, 0.6]],
Expand All @@ -79,6 +100,10 @@
}
});

$('#stacked-negative-graph').tufteBar({
data: stackedNegativeTestData
});

$('#legend-defaults-graph').tufteBar({
data: stackedTestData,
legend: {
Expand Down Expand Up @@ -190,6 +215,10 @@ <h3>Static properties</h3>
<h3>Dynamic properties</h3>
<div id='dynamic-properties-graph' class='graph' style='width:200px; height: 150px'></div>
</div>
<div class='test-case'>
<h3>Negative Values</h3>
<div id='negative-graph' class='graph' style='width:200px; height: 150px'></div>
</div>
<h2>Stacked Bar</h2>
<div class='test-case'>
<h3>Default</h3>
Expand All @@ -199,6 +228,10 @@ <h3>Default</h3>
<h3>Dynamic</h3>
<div id='stacked-dynamic-graph' class='graph' style='width:200px; height: 150px'></div>
</div>
<div class='test-case'>
<h3>Default</h3>
<div id='stacked-negative-graph' class='graph' style='width:200px; height: 150px'></div>
</div>
<h2>Legends</h2>
<div class='test-case'>
<h3>Default</h3>
Expand Down

0 comments on commit 829374d

Please sign in to comment.