mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
7c14ab74aa
* 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>
31 lines
462 B
JavaScript
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
|
|
}
|
|
}
|
|
};
|