Skip to content

Commit

Permalink
Merge pull request #49 from jrjohnson/fix-click-data
Browse files Browse the repository at this point in the history
Fix data when clicking donut and pie
  • Loading branch information
dartajax authored Mar 28, 2018
2 parents 909d427 + 789f8a0 commit cd0d75d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions addon/components/simple-chart-donut.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ export default Component.extend(ChartProperties, {
.text(d => d.data.label);

if (isClickable) {
path.on('click', data => {
path.on('click', ({ data }) => {
click(data);
});
path.style("cursor", "pointer");
text.on('click', data => {
text.on('click', ({ data }) => {
click(data);
});
text.style("cursor", "pointer");
Expand Down
4 changes: 2 additions & 2 deletions addon/components/simple-chart-pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ export default Component.extend(ChartProperties, {
.text(d => d.data.label);

if (isClickable) {
path.on('click', data => {
path.on('click', ({ data }) => {
click(data);
});
path.style("cursor", "pointer");
text.on('click', data => {
text.on('click', ({ data }) => {
click(data);
});
text.style("cursor", "pointer");
Expand Down

0 comments on commit cd0d75d

Please sign in to comment.