Chart.js/test/fixtures/core.scale/label-align-inner-onlyX.js
Talla2XLC 7c14ab74aa
Add new align 'inner' for X axis (#10106)
* Add new align for X axis

new align 'left-right' for options.scales['x'].ticks namespace will allow users to aling ticks: 'start" for first (left) tick and 'end' for last (right) tick

* corrected name of aligment to "inner", documentation and add test for inner labels

* delete unnecessary changes

* corrected logic for reverse axis, add tests for reverse axis and withoutY axis

* corrected chart paddings for "inner" tick align

* code clearness

* Update types/index.esm.d.ts

Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>

Co-authored-by: Talla2XLC <alexey.ivanov@epc.com.ru>
Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
2022-02-12 10:07:00 -05:00

31 lines
462 B
JavaScript

module.exports = {
config: {
type: 'line',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Label1_long', 'Label2_long', 'Label3_long']
},
options: {
scales: {
x: {
ticks: {
align: 'inner',
},
},
y: {
display: false
}
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};