Chart.js/test/fixtures/core.scale/crossAlignment/cross-align-right-far-clipped.js
LeeLenaleee ae0c8dd457
align text inside chart for far-aligned labels passing test (#8359)
* align text inside chart for far-aligned labels

* added fix for failing test on suggestion of @kurkle

Co-authored-by: Marcel Samyn <marcel.samyn@lab900.com>
2021-01-31 15:19:40 -05:00

34 lines
488 B
JavaScript

module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Long long long long label 1', 'Label 2', 'Less more longer label 3']
},
options: {
indexAxis: 'y',
scales: {
y: {
position: 'right',
ticks: {
crossAlign: 'far',
},
afterFit: axis => {
axis.width = 64;
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
},
tolerance: 0.1
};