repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/segments/gradient.js | test/fixtures/controller.line/segments/gradient.js | const getGradient = (context) => {
const {chart, p0, p1} = context;
const ctx = chart.ctx;
const {x: x0} = p0.getProps(['x'], true);
const {x: x1} = p1.getProps(['x'], true);
const gradient = ctx.createLinearGradient(x0, 0, x1, 0);
gradient.addColorStop(0, p0.options.backgroundColor);
gradient.addColorStop(1, p1.options.backgroundColor);
return gradient;
};
module.exports = {
config: {
type: 'line',
data: {
datasets: [{
data: [{x: 0, y: 0}, {x: 1, y: 1}, {x: 2, y: 2}, {x: 3, y: 3}, {x: 4, y: 4}, {x: 5, y: 5}, {x: 6, y: 6}],
pointBackgroundColor: ['red', 'yellow', 'green', 'green', 'blue', 'pink', 'blue'],
pointBorderWidth: 0,
pointRadius: 10,
borderWidth: 5,
segment: {
borderColor: getGradient,
}
}]
},
options: {
scales: {
x: {type: 'linear', display: false},
y: {display: false}
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/segments/gap.js | test/fixtures/controller.line/segments/gap.js | module.exports = {
config: {
type: 'line',
data: {
labels: ['a', 'b', 'c', 'd', 'e', 'f'],
datasets: [{
data: [1, 3, NaN, NaN, 2, 1],
borderColor: 'black',
segment: {
borderColor: ctx => ctx.p0.skip || ctx.p1.skip ? 'red' : undefined,
borderDash: ctx => ctx.p0.skip || ctx.p1.skip ? [5, 5] : undefined
},
spanGaps: true
}]
},
options: {
scales: {
x: {display: false},
y: {display: false}
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/segments/slope.js | test/fixtures/controller.line/segments/slope.js | function slope({p0, p1}) {
return (p0.y - p1.y) / (p1.x - p0.x);
}
module.exports = {
config: {
type: 'line',
data: {
labels: ['a', 'b', 'c', 'd', 'e', 'f'],
datasets: [{
data: [1, 2, 3, 3, 2, 1],
borderColor: 'black',
segment: {
borderColor: ctx => slope(ctx) > 0 ? 'green' : slope(ctx) < 0 ? 'red' : undefined,
borderDash: ctx => slope(ctx) < 0 ? [5, 5] : undefined
}
}]
},
options: {
scales: {
x: {display: false},
y: {display: false}
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/segments/single.js | test/fixtures/controller.line/segments/single.js | module.exports = {
config: {
type: 'line',
data: {
labels: ['a', 'b', 'c', 'd', 'e', 'f'],
datasets: [{
data: [1, 2, 3, 3, 2, 1],
borderColor: 'black',
segment: {
borderColor: 'red',
}
}]
},
options: {
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
width: 256,
height: 256
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/pointBorderColor/value.js | test/fixtures/controller.line/pointBorderColor/value.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 5, 10, null, -10, -5],
pointBorderColor: '#ff0000'
},
{
// option in element (fallback)
data: [4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
fill: false,
},
point: {
borderColor: '#00ff00',
radius: 10,
}
},
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/pointBorderColor/indexable.js | test/fixtures/controller.line/pointBorderColor/indexable.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 5, 10, null, -10, -5],
pointBorderColor: [
'#ff0000',
'#00ff00',
'#0000ff',
'#ffff00',
'#ff00ff',
'#000000'
]
},
{
// option in element (fallback)
data: [4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
fill: false,
},
point: {
borderColor: [
'#ff88ff',
'#888888',
'#ff8800',
'#00ff88',
'#8800ff',
'#ffff88'
],
radius: 10
}
},
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/pointBorderColor/scriptable.js | test/fixtures/controller.line/pointBorderColor/scriptable.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 5, 10, null, -10, -5],
pointBorderColor: function(ctx) {
var value = ctx.dataset.data[ctx.dataIndex] || 0;
return value > 8 ? '#ff0000'
: value > 0 ? '#00ff00'
: value > -8 ? '#0000ff'
: '#ff00ff';
}
},
{
// option in element (fallback)
data: [4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
fill: false,
},
point: {
borderColor: function(ctx) {
var value = ctx.dataset.data[ctx.dataIndex] || 0;
return value > 8 ? '#ff00ff'
: value > 0 ? '#0000ff'
: value > -8 ? '#ff0000'
: '#00ff00';
},
radius: 10,
}
},
scales: {
x: {display: false},
y: {
display: false,
beginAtZero: true
}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/backgroundColor/value.js | test/fixtures/controller.line/backgroundColor/value.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 5, 10, null, -10, -5],
backgroundColor: '#ff0000'
},
{
// option in element (fallback)
data: [4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
fill: true,
backgroundColor: '#00ff00'
},
point: {
radius: 10
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {display: false}
},
plugins: {
legend: false,
title: false,
tooltip: false,
filler: true
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/backgroundColor/scriptable.js | test/fixtures/controller.line/backgroundColor/scriptable.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [4, 5, 10, null, -10, -5],
backgroundColor: function(ctx) {
var index = ctx.index;
return index === 0 ? '#ff0000'
: index === 1 ? '#00ff00'
: '#ff00ff';
}
},
{
// option in element (fallback)
data: [-4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
fill: true,
backgroundColor: function(ctx) {
var index = ctx.index;
return index === 0 ? '#ff0000'
: index === 1 ? '#00ff00'
: '#ff00ff';
}
},
point: {
backgroundColor: '#0000ff',
radius: 10
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {
display: false,
beginAtZero: true
}
},
plugins: {
legend: false,
title: false,
tooltip: false,
filler: true
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/fill/no-border.js | test/fixtures/controller.line/fill/no-border.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
data: [12, 19, 3, 5, 2, 3],
backgroundColor: '#ff0000',
borderWidth: 0,
tension: 0.4,
fill: true
},
]
},
options: {
animation: {
duration: 1
},
scales: {
x: {display: false},
y: {display: false}
},
plugins: {
legend: false,
title: false,
tooltip: false,
filler: true
}
}
},
options: {
canvas: {
height: 256,
width: 512
},
run() {
return new Promise(resolve => setTimeout(resolve, 50));
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/fill/order-default.js | test/fixtures/controller.line/fill/order-default.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [3, 1, 2, 0, 8, 1],
backgroundColor: '#ff0000'
},
{
// option in element (fallback)
data: [0, 4, 2, 6, 4, 8],
backgroundColor: '#00ff00'
}
]
},
options: {
elements: {
line: {
fill: true
},
point: {
radius: 0
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {display: false}
},
plugins: {
legend: false,
title: false,
tooltip: false,
filler: true
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/fill/order.js | test/fixtures/controller.line/fill/order.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
data: [3, 1, 2, 0, 8, 1],
backgroundColor: '#ff0000',
order: 2
},
{
data: [0, 4, 2, 6, 4, 8],
backgroundColor: '#00ff00',
order: 1
}
]
},
options: {
elements: {
line: {
fill: true
},
point: {
radius: 0
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {display: false}
},
plugins: {
legend: false,
title: false,
tooltip: false,
filler: true
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/fill/value.js | test/fixtures/controller.line/fill/value.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [-2, -6, -4, -8, -6, -10],
backgroundColor: '#ff0000',
fill: false
},
{
// option in element (fallback)
data: [0, 4, 2, 6, 4, 8],
}
]
},
options: {
elements: {
line: {
backgroundColor: '#00ff00',
fill: true,
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {display: false}
},
plugins: {
legend: false,
title: false,
tooltip: false,
filler: true
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/fill/scriptable.js | test/fixtures/controller.line/fill/scriptable.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [-2, -6, -4, -8, -6, -10],
backgroundColor: '#ff0000',
fill: function(ctx) {
return ctx.datasetIndex === 0 ? true : false;
}
},
{
// option in element (fallback)
data: [0, 4, 2, 6, 4, 8],
}
]
},
options: {
elements: {
line: {
backgroundColor: '#00ff00',
fill: function(ctx) {
return ctx.datasetIndex === 0 ? true : false;
}
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {display: false}
},
plugins: {
legend: false,
title: false,
tooltip: false,
filler: true
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/borderCapStyle/value.js | test/fixtures/controller.line/borderCapStyle/value.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3],
datasets: [
{
// option in dataset
data: [null, 3, 3],
borderCapStyle: 'round',
},
{
// option in dataset
data: [null, 2, 2],
borderCapStyle: 'square',
},
{
// option in element (fallback)
data: [null, 1, 1],
}
]
},
options: {
elements: {
line: {
borderCapStyle: 'butt',
borderColor: '#00ff00',
borderWidth: 32,
fill: false,
},
point: {
radius: 10,
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/borderCapStyle/scriptable.js | test/fixtures/controller.line/borderCapStyle/scriptable.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3],
datasets: [
{
// option in dataset
data: [null, 3, 3],
borderCapStyle: function(ctx) {
var index = (ctx.datasetIndex % 2);
return index === 0 ? 'round'
: index === 1 ? 'square'
: 'butt';
}
},
{
// option in element (fallback)
data: [null, 2, 2],
},
{
// option in element (fallback)
data: [null, 1, 1],
}
]
},
options: {
elements: {
line: {
borderCapStyle: function(ctx) {
var index = (ctx.datasetIndex % 3);
return index === 0 ? 'round'
: index === 1 ? 'square'
: 'butt';
},
borderColor: '#ff0000',
borderWidth: 32,
fill: false
},
point: {
radius: 10,
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {
display: false,
beginAtZero: true
}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/showLine/dataset.js | test/fixtures/controller.line/showLine/dataset.js | module.exports = {
description: 'should draw all elements except lines turned off per dataset',
config: {
type: 'line',
data: {
datasets: [{
data: [10, 15, 0, -4],
label: 'dataset1',
borderColor: 'red',
backgroundColor: 'green',
showLine: false,
fill: false
}],
labels: ['label1', 'label2', 'label3', 'label4']
},
options: {
showLine: true,
scales: {
x: {
display: false
},
y: {
display: false
}
},
plugins: {
legend: false,
title: false,
tooltip: false,
filler: true
}
}
},
options: {
canvas: {
width: 512,
height: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/showLine/false.js | test/fixtures/controller.line/showLine/false.js | module.exports = {
description: 'should draw all elements except lines',
config: {
type: 'line',
data: {
datasets: [{
data: [10, 15, 0, -4],
label: 'dataset1',
borderColor: 'red',
backgroundColor: 'green',
fill: true
}],
labels: ['label1', 'label2', 'label3', 'label4']
},
options: {
showLine: false,
scales: {
x: {
display: false
},
y: {
display: false
}
},
plugins: {
legend: false,
title: false,
tooltip: false,
filler: true
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/borderWidth/zero.js | test/fixtures/controller.line/borderWidth/zero.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 5, 10, null, -10, -5],
backgroundColor: '#0000ff',
borderColor: '#0000ff',
borderWidth: 0
},
{
// option in element (fallback)
data: [4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
borderColor: '#00ff00',
borderWidth: 3,
fill: false,
},
point: {
backgroundColor: '#00ff00',
radius: 10,
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/borderWidth/value.js | test/fixtures/controller.line/borderWidth/value.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 5, 10, null, -10, -5],
borderColor: '#0000ff',
borderWidth: 6
},
{
// option in element (fallback)
data: [4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
borderColor: '#00ff00',
borderWidth: 3,
fill: false,
},
point: {
radius: 10,
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/borderWidth/scriptable.js | test/fixtures/controller.line/borderWidth/scriptable.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [4, 5, 10, null, -10, -5],
borderColor: '#0000ff',
borderWidth: function(ctx) {
var index = ctx.index;
return index % 2 ? 10 : 20;
},
pointBorderColor: '#00ff00'
},
{
// option in element (fallback)
data: [-4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
borderColor: '#ff0000',
borderWidth: function(ctx) {
var index = ctx.index;
return index % 2 ? 10 : 20;
},
fill: false,
},
point: {
borderColor: '#00ff00',
borderWidth: 5,
radius: 10
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {
display: false,
beginAtZero: true
}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/cubicInterpolationMode/value.js | test/fixtures/controller.line/cubicInterpolationMode/value.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 4, 2, 6, 4, 8],
borderColor: '#ff0000',
cubicInterpolationMode: 'monotone'
},
{
// option in element (fallback)
data: [2, 6, 4, 8, 6, 10]
}
]
},
options: {
elements: {
line: {
borderColor: '#00ff00',
borderWidth: 20,
cubicInterpolationMode: 'default',
fill: false,
tension: 0.4
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/cubicInterpolationMode/scriptable.js | test/fixtures/controller.line/cubicInterpolationMode/scriptable.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 4, 2, 6, 4, 8],
borderColor: '#ff0000',
cubicInterpolationMode: function(ctx) {
return ctx.datasetIndex === 0 ? 'monotone' : 'default';
}
},
{
// option in element (fallback)
data: [2, 6, 4, 8, 6, 10],
}
]
},
options: {
elements: {
line: {
borderColor: '#00ff00',
borderWidth: 20,
cubicInterpolationMode: function(ctx) {
return ctx.datasetIndex === 0 ? 'monotone' : 'default';
},
fill: false,
tension: 0.4
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/rotation/value.js | test/fixtures/controller.line/rotation/value.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 5, 10, null, -10, -5],
pointBorderColor: '#0000ff',
pointRotation: 90
},
{
// option in element (fallback)
data: [4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
fill: false,
},
point: {
borderColor: '#00ff00',
pointStyle: 'line',
radius: 10,
rotation: 0,
}
},
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/rotation/indexable.js | test/fixtures/controller.line/rotation/indexable.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 5, 10, null, -10, -5],
pointBorderColor: '#00ff00',
pointRotation: [
0, 30, 60, 90, 120, 150
]
},
{
// option in element (fallback)
data: [4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
fill: false,
},
point: {
borderColor: '#ff0000',
borderWidth: 10,
pointStyle: 'line',
rotation: [
150, 120, 90, 60, 30, 0
],
}
},
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/rotation/scriptable.js | test/fixtures/controller.line/rotation/scriptable.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 5, 10, null, -10, -5],
pointBorderColor: '#0000ff',
pointRotation: function(ctx) {
var value = ctx.dataset.data[ctx.dataIndex] || 0;
return value > 4 ? 120
: value > -4 ? 60
: 0;
}
},
{
// option in element (fallback)
data: [4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
fill: false,
},
point: {
borderColor: '#ff0000',
rotation: function(ctx) {
var value = ctx.dataset.data[ctx.dataIndex] || 0;
return value > 4 ? 0
: value > -4 ? 60
: 120;
},
pointStyle: 'line',
radius: 10,
}
},
scales: {
x: {display: false},
y: {
display: false,
beginAtZero: true
}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/borderJoinStyle/value.js | test/fixtures/controller.line/borderJoinStyle/value.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2],
datasets: [
{
// option in dataset
data: [6, 18, 6],
borderColor: '#ff0000',
borderJoinStyle: 'round',
},
{
// option in element (fallback)
data: [2, 14, 2],
borderColor: '#0000ff',
borderJoinStyle: 'bevel',
},
{
// option in element (fallback)
data: [-2, 10, -2]
}
]
},
options: {
elements: {
line: {
borderColor: '#00ff00',
borderJoinStyle: 'miter',
borderWidth: 25,
fill: false,
tension: 0
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/borderJoinStyle/scriptable.js | test/fixtures/controller.line/borderJoinStyle/scriptable.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2],
datasets: [
{
// option in dataset
data: [6, 18, 6],
borderColor: '#ff0000',
borderJoinStyle: function(ctx) {
var index = ctx.datasetIndex % 3;
return index === 0 ? 'round'
: index === 1 ? 'miter'
: 'bevel';
}
},
{
// option in element (fallback)
data: [2, 14, 2],
borderColor: '#0000ff',
},
{
// option in element (fallback)
data: [-2, 10, -2]
}
]
},
options: {
elements: {
line: {
borderColor: '#00ff00',
borderJoinStyle: function(ctx) {
var index = (ctx.datasetIndex % 3);
return index === 0 ? 'round'
: index === 1 ? 'miter'
: 'bevel';
},
borderWidth: 25,
fill: false,
tension: 0
}
},
layout: {
padding: 32
},
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/stacking/stacked-scatter.js | test/fixtures/controller.line/stacking/stacked-scatter.js | module.exports = {
config: {
type: 'scatter',
data: {
datasets: [{
label: 'label1',
data: [{
x: 0,
y: 30
}, {
x: 5,
y: 35
}, {
x: 10,
y: 20
}],
backgroundColor: '#42A8E4'
},
{
label: 'label2',
data: [{
x: 0,
y: 10
}, {
x: 5,
y: 15
}, {
x: 10,
y: 15
}],
backgroundColor: '#FC3F55'
},
{
label: 'label3',
data: [{
x: 0,
y: -15
}, {
x: 5,
y: -10
}, {
x: 10,
y: -20
}],
backgroundColor: '#FFBE3F'
}],
},
options: {
scales: {
x: {
display: false,
position: 'bottom',
},
y: {
stacked: true,
display: false,
position: 'left',
},
},
plugins: {
legend: false,
title: false,
tooltip: false,
filler: true
}
},
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/stacking/updates.js | test/fixtures/controller.line/stacking/updates.js | module.exports = {
description: 'https://github.com/chartjs/Chart.js/issues/9424',
config: {
type: 'line',
data: {
labels: [0, 1, 2],
datasets: [
{
data: [1, 1, 1],
stack: 's1',
borderColor: '#ff0000',
},
{
data: [2, 2, 2],
stack: 's1',
borderColor: '#00ff00',
},
{
data: [3, 3, 3],
stack: 's1',
borderColor: '#0000ff',
}
]
},
options: {
borderWidth: 5,
scales: {
x: {display: false},
y: {display: true, stacked: true}
}
}
},
options: {
spriteText: true,
run(chart) {
chart.data.datasets.splice(1, 0, {data: [1.5, 1.5, 1.5], stack: 's2', borderColor: '#000000'});
chart.update();
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/stacking/order-specified.js | test/fixtures/controller.line/stacking/order-specified.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [3, 1, 2, 0, 8, 1],
backgroundColor: '#ff0000',
order: 2
},
{
// option in element (fallback)
data: [0, 4, 2, 6, 4, 8],
backgroundColor: '#00ff00',
order: 1
}
]
},
options: {
elements: {
line: {
fill: true
},
point: {
radius: 0
}
},
layout: {
padding: 32
},
scales: {
x: {stacked: true, display: false},
y: {stacked: true, display: false}
},
plugins: {
legend: false,
title: false,
tooltip: false,
filler: true
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/stacking/bounds-data.js | test/fixtures/controller.line/stacking/bounds-data.js | module.exports = {
config: {
type: 'line',
data: {
labels: ['a', 'b'],
datasets: [{
borderColor: 'red',
data: [50, 75],
}, {
borderColor: 'blue',
data: [25, 50],
}]
},
options: {
scales: {
x: {
display: false
},
y: {
stacked: true,
bounds: 'data'
}
}
}
},
options: {
spriteText: true
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/stacking/order-default.js | test/fixtures/controller.line/stacking/order-default.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [3, 1, 2, 0, 8, 1],
backgroundColor: '#ff0000'
},
{
// option in element (fallback)
data: [0, 4, 2, 6, 4, 8],
backgroundColor: '#00ff00'
}
]
},
options: {
elements: {
line: {
fill: true
},
point: {
radius: 0
}
},
layout: {
padding: 32
},
scales: {
x: {stacked: true, display: false},
y: {stacked: true, display: false}
},
plugins: {
legend: false,
title: false,
tooltip: false,
filler: true
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/stacking/single.js | test/fixtures/controller.line/stacking/single.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2],
datasets: [
{
data: [0, -1, -1],
backgroundColor: '#ff0000',
},
{
data: [0, 2, 2],
backgroundColor: '#00ff00',
},
{
data: [0, 0, 1],
backgroundColor: '#0000ff',
}
]
},
options: {
elements: {
line: {
fill: '-1',
},
point: {
radius: 0
}
},
layout: {
padding: 32
},
plugins: {
legend: false,
title: false,
tooltip: false,
filler: true
},
scales: {
x: {display: false},
y: {display: false, stacked: 'single'}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/pointBorderWidth/value.js | test/fixtures/controller.line/pointBorderWidth/value.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 5, 10, null, -10, -5],
pointBorderColor: '#0000ff',
pointBorderWidth: 6
},
{
// option in element (fallback)
data: [4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
fill: false,
},
point: {
borderColor: '#00ff00',
borderWidth: 3,
radius: 10,
}
},
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/pointBorderWidth/indexable.js | test/fixtures/controller.line/pointBorderWidth/indexable.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 5, 10, null, -10, -5],
pointBorderColor: '#00ff00',
pointBorderWidth: [
1, 2, 3, 4, 5, 6
]
},
{
// option in element (fallback)
data: [4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
fill: false,
},
point: {
borderColor: '#ff0000',
borderWidth: [
6, 5, 4, 3, 2, 1
],
radius: 10
}
},
scales: {
x: {display: false},
y: {display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/controller.line/pointBorderWidth/scriptable.js | test/fixtures/controller.line/pointBorderWidth/scriptable.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [0, 5, 10, null, -10, -5],
pointBorderColor: '#0000ff',
pointBorderWidth: function(ctx) {
var value = ctx.dataset.data[ctx.dataIndex] || 0;
return value > 4 ? 10
: value > -4 ? 5
: 2;
}
},
{
// option in element (fallback)
data: [4, -5, -10, null, 10, 5],
}
]
},
options: {
elements: {
line: {
fill: false,
},
point: {
borderColor: '#ff0000',
borderWidth: function(ctx) {
var value = ctx.dataset.data[ctx.dataIndex] || 0;
return value > 4 ? 2
: value > -4 ? 5
: 10;
},
radius: 10,
}
},
scales: {
x: {display: false},
y: {
display: false,
beginAtZero: true
}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/plugin.subtitle/basic.js | test/fixtures/plugin.subtitle/basic.js |
module.exports = {
config: {
type: 'scatter',
data: {
datasets: [{
data: [{x: 0, y: 0}, {x: 1, y: 1}, {x: 2, y: 2}],
backgroundColor: 'red',
radius: 1,
hoverRadius: 0
}],
},
options: {
scales: {
x: {display: false},
y: {display: false}
},
plugins: {
legend: false,
title: {
display: true,
text: 'Title Text',
},
subtitle: {
display: true,
text: 'SubTitle Text',
},
filler: false,
tooltip: false
},
},
},
options: {
spriteText: true,
canvas: {
height: 400,
width: 400
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/plugin.colors/doughnut.js | test/fixtures/plugin.colors/doughnut.js | module.exports = {
config: {
type: 'doughnut',
data: {
datasets: [
{
data: [0, 2, 4, null, 6, 8]
},
{
data: [5, 1, 6, 2, null, 9]
}
]
},
options: {
plugins: {
legend: false,
colors: {
enabled: true
}
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/plugin.colors/pie.js | test/fixtures/plugin.colors/pie.js | module.exports = {
config: {
type: 'pie',
data: {
datasets: [
{
data: [0, 2, 4, null, 6, 8]
},
{
data: [5, 1, 6, 2, null, 9]
}
]
},
options: {
plugins: {
legend: false,
colors: {
enabled: true
}
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/plugin.colors/radar.js | test/fixtures/plugin.colors/radar.js | module.exports = {
config: {
type: 'radar',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
data: [0, 5, 10, null, -10, -5]
},
{
data: [4, -5, -10, null, 10, 5]
}
]
},
options: {
scales: {
r: {
ticks: {
display: false
},
pointLabels: {
display: false,
}
}
},
plugins: {
legend: false,
colors: {
enabled: true
}
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/plugin.colors/dynamic-datasets-default.js | test/fixtures/plugin.colors/dynamic-datasets-default.js | module.exports = {
config: {
type: 'bar',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
data: [5, 5, 5, 5, 5, 5]
}
]
},
options: {
scales: {
x: {
ticks: {
display: false,
}
},
y: {
ticks: {
display: false,
}
}
},
plugins: {
legend: false,
colors: {
enabled: true
}
}
}
},
options: {
run(chart) {
chart.data.datasets.push({
data: [5, 5, 5, 5, 5, 5]
});
chart.update();
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/plugin.colors/polarArea.js | test/fixtures/plugin.colors/polarArea.js | module.exports = {
config: {
type: 'polarArea',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
data: [0, 2, 4, null, 6, 8]
}
]
},
options: {
scales: {
r: {
ticks: {
display: false
}
}
},
plugins: {
legend: false,
colors: {
enabled: true
}
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/plugin.colors/dynamic-datasets-force-override.js | test/fixtures/plugin.colors/dynamic-datasets-force-override.js | module.exports = {
config: {
type: 'bar',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
data: [5, 5, 5, 5, 5, 5]
}
]
},
options: {
scales: {
x: {
ticks: {
display: false
}
},
y: {
ticks: {
display: false
}
}
},
plugins: {
legend: false,
colors: {
enabled: true,
forceOverride: true
}
}
}
},
options: {
run(chart) {
chart.data.datasets.push({
data: [5, 5, 5, 5, 5, 5]
});
chart.update();
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/plugin.colors/mixed.js | test/fixtures/plugin.colors/mixed.js | module.exports = {
config: {
data: {
labels: [0, 1, 2, 3],
datasets: [
{
type: 'line',
data: [5, 20, 1, 10],
},
{
type: 'bar',
data: [6, 16, 3, 19]
},
{
type: 'pie',
data: [5, 20, 1, 10],
}
]
},
options: {
scales: {
x: {
ticks: {
display: false,
}
},
y: {
ticks: {
display: false,
}
}
},
plugins: {
legend: false,
colors: {
enabled: true
}
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/plugin.colors/bar.js | test/fixtures/plugin.colors/bar.js | module.exports = {
config: {
type: 'bar',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
data: [0, 5, 10, null, -10, -5],
},
{
data: [10, 2, 3, null, 10, 5]
}
]
},
options: {
scales: {
x: {
ticks: {
display: false,
}
},
y: {
ticks: {
display: false,
}
}
},
plugins: {
legend: false,
colors: {
enabled: true
}
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/plugin.colors/scatter.js | test/fixtures/plugin.colors/scatter.js | module.exports = {
config: {
type: 'scatter',
data: {
datasets: [{
data: [{x: 10, y: 15}, {x: 15, y: 10}],
pointRadius: 10,
showLine: true,
label: 'dataset1'
}, {
data: [{x: 20, y: 45}, {x: 5, y: 15}],
pointRadius: 20,
label: 'dataset2'
}],
},
options: {
scales: {
x: {
ticks: {
display: false,
}
},
y: {
ticks: {
display: false,
}
}
},
plugins: {
legend: false,
colors: {
enabled: true
},
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/plugin.colors/line.js | test/fixtures/plugin.colors/line.js | module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
data: [0, 5, 10, null, -10, -5],
},
{
data: [10, 2, 3, null, 10, 5]
}
]
},
options: {
scales: {
x: {
ticks: {
display: false,
}
},
y: {
ticks: {
display: false,
}
}
},
plugins: {
legend: false,
colors: {
enabled: true
}
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/plugin.colors/chart-options-colors.js | test/fixtures/plugin.colors/chart-options-colors.js | module.exports = {
config: {
type: 'bar',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
data: [0, 5, 10, null, -10, -5],
},
{
data: [10, 2, 3, null, 10, 5]
}
]
},
options: {
backgroundColor: ['red', 'green'],
scales: {
x: {
ticks: {
display: false,
}
},
y: {
ticks: {
display: false,
}
}
},
plugins: {
legend: false,
colors: {
enabled: true
}
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/plugin.colors/bubble.js | test/fixtures/plugin.colors/bubble.js | module.exports = {
config: {
type: 'bubble',
data: {
datasets: [{
data: [{x: 12, y: 54, r: 22.4}]
}, {
data: [{x: 18, y: 38, r: 25}]
}]
},
options: {
scales: {
x: {
ticks: {
display: false,
}
},
y: {
ticks: {
display: false,
}
}
},
plugins: {
legend: false,
colors: {
enabled: true
}
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/scale.logarithmic/large-values-small-range.js | test/fixtures/scale.logarithmic/large-values-small-range.js | module.exports = {
config: {
type: 'line',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [{
backgroundColor: 'red',
borderColor: 'red',
fill: false,
data: [5000.002, 5000.012, 5000.01, 5000.03, 5000.04, 5000.004, 5000.032]
}]
},
options: {
responsive: true,
scales: {
x: {
display: false,
},
y: {
type: 'logarithmic',
ticks: {
autoSkip: false
}
}
}
}
},
options: {
spriteText: true
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/scale.logarithmic/large-range.js | test/fixtures/scale.logarithmic/large-range.js | module.exports = {
config: {
type: 'line',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [{
backgroundColor: 'red',
borderColor: 'red',
fill: false,
data: [23, 21, 34, 52, 115, 3333, 5116]
}]
},
options: {
responsive: true,
scales: {
x: {
display: false,
},
y: {
type: 'logarithmic',
ticks: {
autoSkip: false
}
}
}
}
},
options: {
spriteText: true
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/scale.logarithmic/small-range.js | test/fixtures/scale.logarithmic/small-range.js | module.exports = {
config: {
type: 'line',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [{
backgroundColor: 'red',
borderColor: 'red',
fill: false,
data: [3, 1, 4, 2, 5, 3, 16]
}]
},
options: {
responsive: true,
scales: {
x: {
display: false,
},
y: {
type: 'logarithmic',
ticks: {
autoSkip: false
}
}
}
}
},
options: {
spriteText: true
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/scale.logarithmic/null-values.js | test/fixtures/scale.logarithmic/null-values.js | module.exports = {
config: {
type: 'line',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [{
backgroundColor: 'red',
borderColor: 'red',
fill: false,
data: [
150,
null,
1500,
200,
9000,
3000,
8888
],
spanGaps: true
}, {
backgroundColor: 'blue',
borderColor: 'blue',
fill: false,
data: [
1000,
5500,
800,
7777,
null,
6666,
5555
],
spanGaps: false
}]
},
options: {
responsive: true,
scales: {
x: {
display: false,
},
y: {
display: false,
type: 'logarithmic',
}
}
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/scale.logarithmic/med-range.js | test/fixtures/scale.logarithmic/med-range.js | module.exports = {
config: {
type: 'line',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [{
backgroundColor: 'red',
borderColor: 'red',
fill: false,
data: [25, 24, 27, 32, 45, 30, 28]
}]
},
options: {
responsive: true,
scales: {
x: {
display: false,
},
y: {
type: 'logarithmic',
ticks: {
autoSkip: false
}
}
}
}
},
options: {
spriteText: true
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/scale.logarithmic/min-max.js | test/fixtures/scale.logarithmic/min-max.js | module.exports = {
config: {
type: 'line',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [{
backgroundColor: 'red',
borderColor: 'red',
fill: false,
data: [250, 240, 270, 320, 450, 300, 280]
}]
},
options: {
responsive: true,
scales: {
x: {
display: false,
},
y: {
type: 'logarithmic',
min: 233,
max: 471,
ticks: {
autoSkip: false
}
}
}
}
},
options: {
spriteText: true
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/label-align-inner-reverse.js | test/fixtures/core.scale/label-align-inner-reverse.js | module.exports = {
config: {
type: 'line',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Label1', 'Label2', 'Label3']
},
options: {
scales: {
x: {
ticks: {
align: 'inner'
},
reverse: true
}
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/x-axis-position-dynamic-margin.js | test/fixtures/core.scale/x-axis-position-dynamic-margin.js | module.exports = {
config: {
type: 'line',
options: {
scales: {
x: {
labels: ['Left Label', 'Center Label', 'Right Label'],
position: {
y: 30
},
},
y: {
display: false,
min: -100,
max: 100,
}
}
}
},
options: {
canvas: {
height: 256,
width: 512
},
spriteText: true
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/label-align-inner-onlyX.js | test/fixtures/core.scale/label-align-inner-onlyX.js | 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
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/tick-backdrop.js | test/fixtures/core.scale/tick-backdrop.js | const grid = {
display: false
};
const title = {
display: false,
};
module.exports = {
config: {
type: 'line',
options: {
events: [],
scales: {
top: {
type: 'linear',
position: 'top',
ticks: {
display: true,
showLabelBackdrop: true,
backdropColor: 'red',
backdropPadding: 5,
align: 'start',
crossAlign: 'near',
},
grid,
title
},
left: {
type: 'linear',
position: 'left',
ticks: {
display: true,
showLabelBackdrop: true,
backdropColor: 'green',
backdropPadding: 5,
crossAlign: 'center',
},
grid,
title
},
bottom: {
type: 'linear',
position: 'bottom',
ticks: {
display: true,
showLabelBackdrop: true,
backdropColor: 'blue',
backdropPadding: 5,
align: 'end',
crossAlign: 'far',
},
grid,
title
},
right: {
type: 'linear',
position: 'right',
ticks: {
display: true,
showLabelBackdrop: true,
backdropColor: 'gray',
backdropPadding: 5,
},
grid,
title
},
}
}
},
options: {
canvas: {
height: 256,
width: 256
},
spriteText: true,
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/backgroundColor.js | test/fixtures/core.scale/backgroundColor.js | const ticks = {
display: false
};
const grid = {
display: false
};
const title = {
display: true,
test: ''
};
module.exports = {
config: {
type: 'line',
options: {
events: [],
scales: {
top: {
type: 'linear',
backgroundColor: 'red',
position: 'top',
ticks,
grid,
title
},
left: {
type: 'linear',
backgroundColor: 'green',
position: 'left',
ticks,
grid,
title
},
bottom: {
type: 'linear',
backgroundColor: 'blue',
position: 'bottom',
ticks,
grid,
title
},
right: {
type: 'linear',
backgroundColor: 'gray',
position: 'right',
ticks,
grid,
title
},
}
}
},
options: {
canvas: {
height: 256,
width: 256
},
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/label-align-inner-rotate.js | test/fixtures/core.scale/label-align-inner-rotate.js | module.exports = {
config: {
type: 'line',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Label1', 'Label2', 'Label3']
},
options: {
scales: {
x: {
ticks: {
align: 'inner',
maxRotation: 45,
minRotation: 45
},
}
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/border-behind-elements.js | test/fixtures/core.scale/border-behind-elements.js | module.exports = {
config: {
type: 'bubble',
data: {
datasets: [
{
label: '# of Votes',
data: [{x: 19, y: 3, r: 3}, {x: 2, y: 2, r: 60}],
radius: 100,
backgroundColor: 'pink'
}
]
},
options: {
plugins: {
legend: {
display: false
}
},
scales: {
y: {
ticks: {
display: false
},
border: {
color: 'red',
width: 5
}
},
x: {
ticks: {
display: false
},
border: {
color: 'red',
width: 5
}
}
}
}
},
options: {
canvas: {
height: 512,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/ticks-mirror.js | test/fixtures/core.scale/ticks-mirror.js | module.exports = {
config: {
type: 'line',
data: {
datasets: [{
data: [1, -1, 3],
}],
labels: ['Label1', 'Label2', 'Label3']
},
options: {
scales: {
y: {
ticks: {
mirror: true
}
}
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/label-align-center.js | test/fixtures/core.scale/label-align-center.js | module.exports = {
config: {
type: 'line',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Label1', 'Label2', 'Label3']
},
options: {
scales: {
x: {
ticks: {
align: 'center',
},
},
y: {
ticks: {
align: 'center',
}
}
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/label-align-inner.js | test/fixtures/core.scale/label-align-inner.js | module.exports = {
config: {
type: 'line',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Label1', 'Label2', 'Label3']
},
options: {
scales: {
x: {
ticks: {
align: 'inner',
},
}
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/label-align-end.js | test/fixtures/core.scale/label-align-end.js | module.exports = {
config: {
type: 'line',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Label1', 'Label2', 'Label3']
},
options: {
scales: {
x: {
ticks: {
align: 'end',
},
},
y: {
ticks: {
align: 'end',
}
}
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/tick-backdrop-alignment-inner.js | test/fixtures/core.scale/tick-backdrop-alignment-inner.js | module.exports = {
config: {
type: 'line',
data: {
labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
datasets: [
{
label: '# of Votes',
data: [12, 19, 3, 5, 2, 3],
},
{
label: '# of Points',
data: [7, 11, 5, 8, 3, 7],
}
]
},
options: {
scales: {
y: {
ticks: {
display: false,
},
grid: {
lineWidth: 0
}
},
x: {
position: 'top',
ticks: {
color: 'transparent',
backdropColor: 'red',
showLabelBackdrop: true,
align: 'inner',
},
grid: {
lineWidth: 0
}
}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/ticks-mirror-x.js | test/fixtures/core.scale/ticks-mirror-x.js | module.exports = {
config: {
type: 'line',
data: {
datasets: [{
data: [1, -1, 3],
}],
labels: ['Label1', 'Label2', 'Label3']
},
options: {
scales: {
x: {
ticks: {
mirror: true
}
},
y: {
display: false
}
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/label-align-start.js | test/fixtures/core.scale/label-align-start.js | module.exports = {
config: {
type: 'line',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Label1', 'Label2', 'Label3']
},
options: {
scales: {
x: {
ticks: {
align: 'start',
},
},
y: {
ticks: {
align: 'start',
}
}
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/tick-backdrop-rotation.js | test/fixtures/core.scale/tick-backdrop-rotation.js | const grid = {
display: false
};
const title = {
display: false,
};
module.exports = {
tolerance: 0.0016,
config: {
type: 'line',
options: {
events: [],
scales: {
top: {
type: 'linear',
position: 'top',
ticks: {
display: true,
showLabelBackdrop: true,
minRotation: 45,
backdropColor: 'blue',
backdropPadding: 5,
align: 'start',
crossAlign: 'near',
},
grid,
title
},
left: {
type: 'linear',
position: 'left',
ticks: {
display: true,
showLabelBackdrop: true,
minRotation: 90,
backdropColor: 'green',
backdropPadding: {
x: 2,
y: 5
},
crossAlign: 'center',
},
grid,
title
},
bottom: {
type: 'linear',
position: 'bottom',
ticks: {
display: true,
showLabelBackdrop: true,
backdropColor: 'blue',
backdropPadding: {
x: 5,
y: 5
},
align: 'end',
crossAlign: 'far',
minRotation: 60,
},
grid,
title
},
right: {
type: 'linear',
position: 'right',
ticks: {
display: true,
showLabelBackdrop: true,
backdropColor: 'gray',
},
grid,
title
},
}
}
},
options: {
canvas: {
height: 256,
width: 256
},
spriteText: true,
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/ticks/rotated-multi-line.js | test/fixtures/core.scale/ticks/rotated-multi-line.js | module.exports = {
config: {
type: 'line',
data: {
labels: [['Red', 'Red', 'Red', 'Red'], ['Blue', 'Blue', 'Blue', 'Blue'], ['Black', 'Black', 'Black', 'Black'], ['Green', 'Green', 'Green', 'Green'], ['Purple', 'Purple', 'Purple', 'Purple'], ['Orange Orange', 'Orange', 'Orange', 'Orange', 'Orange Orange']],
datasets: [
{
data: [12, 19, 3, 5, 2, 3]
},
]
},
options: {
plugins: {
legend: false,
tooltip: false,
filler: false,
title: false
},
scales: {
x: {
type: 'category',
position: 'bottom'
},
x2: {
type: 'category',
position: 'top'
}
}
},
plugins: [{
afterDraw(chart) {
const ctx = chart.ctx;
ctx.save();
ctx.strokeStyle = 'red';
ctx.strokeRect(0, 0, chart.width, chart.height);
ctx.restore();
}
}]
},
options: {
spriteText: true,
canvas: {
width: 610,
height: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/ticks/rotated-long.js | test/fixtures/core.scale/ticks/rotated-long.js | module.exports = {
config: {
type: 'line',
data: {
labels: ['Red Red Red Red', 'Blue Blue Blue Blue', 'Black Black Black Black', 'Green Green Green Green', 'Purple Purple Purple Purple', 'Orange Orange Orange Orange Orange Orange'],
datasets: [
{
data: [12, 19, 3, 5, 2, 3]
},
]
},
options: {
plugins: {
legend: false,
tooltip: false,
filler: false,
title: false
},
scales: {
x: {
type: 'category',
position: 'bottom'
},
x2: {
type: 'category',
position: 'top'
}
}
},
plugins: [{
afterDraw(chart) {
const ctx = chart.ctx;
ctx.save();
ctx.strokeStyle = 'red';
ctx.strokeRect(0, 0, chart.width, chart.height);
ctx.restore();
}
}]
},
options: {
spriteText: true,
canvas: {
width: 1024,
height: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/ticks/skip-by-callback.js | test/fixtures/core.scale/ticks/skip-by-callback.js | module.exports = {
description: 'https://github.com/chartjs/Chart.js/issues/8892',
config: {
type: 'line',
data: {
labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
datasets: [
{
data: [12, 19, 3, 5, 2, 3],
},
{
data: [7, 11, 5, 8, 3, 7],
}
]
},
options: {
scales: {
x: {
ticks: {
callback: function(val, index) {
if (index === 1) {
return undefined;
}
if (index === 3) {
return null;
}
return this.getLabelForValue(val);
}
}
},
y: {
ticks: {
callback: function(val, index) {
return index % 2 === 0 ? '' + val : null;
}
}
}
},
}
},
options: {
spriteText: true
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/autoSkip/offset.js | test/fixtures/core.scale/autoSkip/offset.js | module.exports = {
description: 'https://github.com/chartjs/Chart.js/issues/8611',
config: {
type: 'bar',
data: {
labels: ['Red Red Red', 'Blue Blue Blue', 'Black Black Black', 'Pink Pink Pink'],
datasets: [
{
label: '# of Votes',
data: [12, 19, 3, 5]
},
]
},
},
options: {
spriteText: true,
canvas: {
width: 506,
height: 128
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/autoSkip/no-offset.js | test/fixtures/core.scale/autoSkip/no-offset.js | module.exports = {
description: 'https://github.com/chartjs/Chart.js/issues/8611',
config: {
type: 'line',
data: {
labels: ['Red Red Red', 'Blue Blue Blue', 'Black Black Black', 'Pink Pink Pink'],
datasets: [
{
label: '# of Votes',
data: [12, 19, 3, 5]
},
]
},
},
options: {
spriteText: true,
canvas: {
width: 470,
height: 128
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/autoSkip/fit-after.js | test/fixtures/core.scale/autoSkip/fit-after.js | module.exports = {
description: 'https://github.com/chartjs/Chart.js/issues/3694',
tolerance: 0.002,
config: {
type: 'line',
data: {
labels: [
'Aaron',
'Adam',
'Albert',
'Alex',
'Allan',
'Aman',
'Anthony',
'Autoenrolment',
'Avril',
'Bernard'
],
datasets: [{
backgroundColor: 'rgba(252,233,79,0.5)',
borderColor: 'rgba(252,233,79,1)',
borderWidth: 1,
data: [101,
185,
24,
311,
17,
21,
462,
340,
140,
24
]
}],
},
options: {
scales: {
x: {
backgroundColor: '#eee'
}
}
}
},
options: {
spriteText: true,
canvas: {
width: 185,
height: 185
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/mirror-cross-align-left-far.js | test/fixtures/core.scale/crossAlignment/mirror-cross-align-left-far.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Long long label 1', 'Label2', 'Label3']
},
options: {
indexAxis: 'y',
scales: {
y: {
position: 'left',
ticks: {
mirror: true,
crossAlign: 'far',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-right-far.js | test/fixtures/core.scale/crossAlignment/cross-align-right-far.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Long long label 1', 'Label2', 'Label3']
},
options: {
indexAxis: 'y',
scales: {
y: {
position: 'right',
ticks: {
crossAlign: 'far',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-top-far.js | test/fixtures/core.scale/crossAlignment/cross-align-top-far.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: [['Label1', 'line 2', 'line3'], 'Label2', 'Label3']
},
options: {
scales: {
x: {
position: 'top',
ticks: {
crossAlign: 'far',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/mirror-cross-align-left-near.js | test/fixtures/core.scale/crossAlignment/mirror-cross-align-left-near.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Long long label 1', 'Label2', 'Label3']
},
options: {
indexAxis: 'y',
scales: {
y: {
position: 'left',
ticks: {
mirror: true,
crossAlign: 'near',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-left-center.js | test/fixtures/core.scale/crossAlignment/cross-align-left-center.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Long long label 1', 'Label2', 'Label3']
},
options: {
indexAxis: 'y',
scales: {
y: {
position: 'left',
ticks: {
crossAlign: 'center',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-top-near.js | test/fixtures/core.scale/crossAlignment/cross-align-top-near.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: [['Label1', 'line 2', 'line3'], 'Label2', 'Label3']
},
options: {
scales: {
x: {
position: 'top',
ticks: {
crossAlign: 'near',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-left-far-clipped.js | test/fixtures/core.scale/crossAlignment/cross-align-left-far-clipped.js | 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: 'left',
ticks: {
crossAlign: 'far',
},
afterFit: axis => {
axis.width = 64;
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-top-center.js | test/fixtures/core.scale/crossAlignment/cross-align-top-center.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: [['Label1', 'line 2', 'line3'], 'Label2', 'Label3']
},
options: {
scales: {
x: {
position: 'top',
ticks: {
crossAlign: 'center',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-right-center.js | test/fixtures/core.scale/crossAlignment/cross-align-right-center.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Long long label 1', 'Label2', 'Label3']
},
options: {
indexAxis: 'y',
scales: {
y: {
position: 'right',
ticks: {
crossAlign: 'center',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-right-near.js | test/fixtures/core.scale/crossAlignment/cross-align-right-near.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Long long label 1', 'Label2', 'Label3']
},
options: {
indexAxis: 'y',
scales: {
y: {
position: 'right',
ticks: {
crossAlign: 'near',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-left-near.js | test/fixtures/core.scale/crossAlignment/cross-align-left-near.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Long long label 1', 'Label2', 'Label3']
},
options: {
indexAxis: 'y',
scales: {
y: {
position: 'left',
ticks: {
crossAlign: 'near',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-bottom-near.js | test/fixtures/core.scale/crossAlignment/cross-align-bottom-near.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: [['Label1', 'line 2', 'line3'], 'Label2', 'Label3']
},
options: {
scales: {
x: {
ticks: {
crossAlign: 'near',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/mirror-cross-align-left-center.js | test/fixtures/core.scale/crossAlignment/mirror-cross-align-left-center.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Long long label 1', 'Label2', 'Label3']
},
options: {
indexAxis: 'y',
scales: {
y: {
position: 'left',
ticks: {
mirror: true,
crossAlign: 'center',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-bottom-center.js | test/fixtures/core.scale/crossAlignment/cross-align-bottom-center.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: [['Label1', 'line 2', 'line3'], 'Label2', 'Label3']
},
options: {
scales: {
x: {
ticks: {
crossAlign: 'center',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/mirror-cross-align-right-far.js | test/fixtures/core.scale/crossAlignment/mirror-cross-align-right-far.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Long long label 1', 'Label2', 'Label3']
},
options: {
indexAxis: 'y',
scales: {
y: {
position: 'right',
ticks: {
mirror: true,
crossAlign: 'far',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-left-far.js | test/fixtures/core.scale/crossAlignment/cross-align-left-far.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Long long label 1', 'Label2', 'Label3']
},
options: {
indexAxis: 'y',
scales: {
y: {
position: 'left',
ticks: {
crossAlign: 'far',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/mirror-cross-align-right-center.js | test/fixtures/core.scale/crossAlignment/mirror-cross-align-right-center.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Long long label 1', 'Label2', 'Label3']
},
options: {
indexAxis: 'y',
scales: {
y: {
position: 'right',
ticks: {
mirror: true,
crossAlign: 'center',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-bottom-far.js | test/fixtures/core.scale/crossAlignment/cross-align-bottom-far.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: [['Label1', 'line 2', 'line3'], 'Label2', 'Label3']
},
options: {
scales: {
x: {
ticks: {
crossAlign: 'far',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/mirror-cross-align-right-near.js | test/fixtures/core.scale/crossAlignment/mirror-cross-align-right-near.js | module.exports = {
config: {
type: 'bar',
data: {
datasets: [{
data: [1, 2, 3],
}],
labels: ['Long long label 1', 'Label2', 'Label3']
},
options: {
indexAxis: 'y',
scales: {
y: {
position: 'right',
ticks: {
mirror: true,
crossAlign: 'near',
},
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 512
}
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/crossAlignment/cross-align-right-far-clipped.js | test/fixtures/core.scale/crossAlignment/cross-align-right-far-clipped.js | 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
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/title/horizontal-value.js | test/fixtures/core.scale/title/horizontal-value.js | module.exports = {
config: {
type: 'line',
options: {
events: [],
scales: {
y: {
type: 'linear',
position: 'left',
min: 0,
max: 100,
ticks: {
display: false
},
grid: {
display: false
},
title: {
display: true,
text: 'vertical'
}
},
x: {
type: 'linear',
position: {
y: 40,
},
min: 0,
max: 100,
ticks: {
display: false
},
grid: {
display: false
},
title: {
display: true,
text: 'horizontal'
}
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 256
},
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/title/align-start.js | test/fixtures/core.scale/title/align-start.js | module.exports = {
config: {
type: 'line',
options: {
events: [],
scales: {
top: {
type: 'linear',
position: 'top',
ticks: {
display: false
},
grid: {
display: false
},
title: {
display: true,
align: 'start',
text: 'top'
}
},
left: {
type: 'linear',
position: 'left',
ticks: {
display: false
},
grid: {
display: false
},
title: {
display: true,
align: 'start',
text: 'left'
}
},
bottom: {
type: 'linear',
position: 'bottom',
ticks: {
display: false
},
grid: {
display: false
},
title: {
display: true,
align: 'start',
text: 'bottom'
}
},
right: {
type: 'linear',
position: 'right',
ticks: {
display: false
},
grid: {
display: false
},
title: {
display: true,
align: 'start',
text: 'right'
}
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 256
},
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
chartjs/Chart.js | https://github.com/chartjs/Chart.js/blob/a153556861074e827358446ec937555ac58c3d11/test/fixtures/core.scale/title/default.js | test/fixtures/core.scale/title/default.js | module.exports = {
config: {
type: 'line',
options: {
events: [],
scales: {
top: {
type: 'linear',
position: 'top',
ticks: {
display: false
},
grid: {
display: false
},
title: {
display: true,
text: 'top'
}
},
left: {
type: 'linear',
position: 'left',
ticks: {
display: false
},
grid: {
display: false
},
title: {
display: true,
text: 'left'
}
},
bottom: {
type: 'linear',
position: 'bottom',
ticks: {
display: false
},
grid: {
display: false
},
title: {
display: true,
text: 'bottom'
}
},
right: {
type: 'linear',
position: 'right',
ticks: {
display: false
},
grid: {
display: false
},
title: {
display: true,
text: 'right'
}
},
}
}
},
options: {
spriteText: true,
canvas: {
height: 256,
width: 256
},
}
};
| javascript | MIT | a153556861074e827358446ec937555ac58c3d11 | 2026-01-04T14:56:49.667758Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.