-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid overriding highcharts default theme with theme customization (#308
- Loading branch information
1 parent
ff18633
commit a936e47
Showing
3 changed files
with
78 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!doctype html> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<title>vaadin-chart tests</title> | ||
<script src="../../web-component-tester/browser.js"></script> | ||
<link rel="import" href="../vaadin-chart.html"> | ||
</head> | ||
|
||
<body> | ||
<test-fixture id="empty-chart"> | ||
<template> | ||
<vaadin-chart> | ||
</vaadin-chart> | ||
</template> | ||
</test-fixture> | ||
|
||
<script> | ||
describe('Test defaults in theme', function() { | ||
var chart; | ||
|
||
beforeEach(done => { | ||
chart = fixture('empty-chart'); | ||
Polymer.flush(); | ||
setTimeout(() => { | ||
done(); | ||
}, 100); | ||
}); | ||
|
||
|
||
it('data label connectors should have no fill', function(done) { | ||
const check = () => { | ||
const chartContainer = chart.$.chart; | ||
const connectors = Array.from(chartContainer.querySelectorAll('.highcharts-data-label-connector')); | ||
expect(connectors).to.have.lengthOf(3); | ||
connectors.forEach(connector => expect(window.getComputedStyle(connector).fill).to.equal('none')); | ||
done(); | ||
}; | ||
chart.update({ | ||
series: [{ | ||
type: 'pie', | ||
data: [29.9, 71.5, 50], | ||
events: { | ||
afterAnimate: check | ||
} | ||
}] | ||
}); | ||
}); | ||
|
||
|
||
}); | ||
</script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters