Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/active elements on top (#9920)
* add flag to draw active items on top * add documentation and types * remove redundent check * added test * resolve linting errors * increase tollerance * remove axes for better test, hope no tolerance needed
- Loading branch information
1 parent
cd9d528
commit 6d3a1c5
Showing
7 changed files
with
53 additions
and
1 deletion.
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
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
41 changes: 41 additions & 0 deletions
41
test/fixtures/core.interaction/drawActiveElementsOnTop-false.js
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,41 @@ | ||
module.exports = { | ||
config: { | ||
type: 'bubble', | ||
data: { | ||
datasets: [{ | ||
data: [ | ||
{x: 1, y: 1, r: 80}, | ||
{x: 1, y: 1, r: 20} | ||
], | ||
drawActiveElementsOnTop: false, | ||
backgroundColor: (ctx) => (ctx.dataIndex === 1 ? 'red' : 'blue'), | ||
hoverBackgroundColor: 'yellow', | ||
hoverRadius: 0, | ||
}] | ||
}, | ||
options: { | ||
scales: { | ||
x: { | ||
display: false | ||
}, | ||
y: { | ||
display: false | ||
}, | ||
}, | ||
plugins: { | ||
tooltip: false, | ||
legend: false | ||
}, | ||
} | ||
}, | ||
options: { | ||
canvas: { | ||
width: 256, | ||
height: 256 | ||
}, | ||
async run(chart) { | ||
const point = chart.getDatasetMeta(0).data[0]; | ||
await jasmine.triggerMouseEvent(chart, 'click', {y: point.y, x: point.x + 25}); | ||
} | ||
} | ||
}; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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