mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Replace the old style canvas "mock" context checks by image based unit tests which are easier to maintain and allow more flexibility in the drawing logic since we are not testing the context calls but the final painted result.
130 lines
3.7 KiB
JSON
130 lines
3.7 KiB
JSON
{
|
|
"config": {
|
|
"type": "bubble",
|
|
"data": {
|
|
"datasets": [{
|
|
"data": [
|
|
{"x": 0, "y": 3},
|
|
{"x": 1, "y": 3},
|
|
{"x": 2, "y": 3},
|
|
{"x": 3, "y": 3},
|
|
{"x": 4, "y": 3},
|
|
{"x": 5, "y": 3},
|
|
{"x": 6, "y": 3},
|
|
{"x": 7, "y": 3},
|
|
{"x": 8, "y": 3},
|
|
{"x": 9, "y": 3}
|
|
],
|
|
"backgroundColor": "#00ff00",
|
|
"borderColor": "transparent",
|
|
"borderWidth": 0,
|
|
"pointStyle": [
|
|
"circle",
|
|
"cross",
|
|
"crossRot",
|
|
"dash",
|
|
"line",
|
|
"rect",
|
|
"rectRounded",
|
|
"rectRot",
|
|
"star",
|
|
"triangle"
|
|
]
|
|
}, {
|
|
"data": [
|
|
{"x": 0, "y": 2},
|
|
{"x": 1, "y": 2},
|
|
{"x": 2, "y": 2},
|
|
{"x": 3, "y": 2},
|
|
{"x": 4, "y": 2},
|
|
{"x": 5, "y": 2},
|
|
{"x": 6, "y": 2},
|
|
{"x": 7, "y": 2},
|
|
{"x": 8, "y": 2},
|
|
{"x": 9, "y": 2}
|
|
],
|
|
"backgroundColor": "transparent",
|
|
"borderColor": "0000ff",
|
|
"borderWidth": 0,
|
|
"pointStyle": [
|
|
"circle",
|
|
"cross",
|
|
"crossRot",
|
|
"dash",
|
|
"line",
|
|
"rect",
|
|
"rectRounded",
|
|
"rectRot",
|
|
"star",
|
|
"triangle"
|
|
]
|
|
}, {
|
|
"data": [
|
|
{"x": 0, "y": 1},
|
|
{"x": 1, "y": 1},
|
|
{"x": 2, "y": 1},
|
|
{"x": 3, "y": 1},
|
|
{"x": 4, "y": 1},
|
|
{"x": 5, "y": 1},
|
|
{"x": 6, "y": 1},
|
|
{"x": 7, "y": 1},
|
|
{"x": 8, "y": 1},
|
|
{"x": 9, "y": 1}
|
|
],
|
|
"backgroundColor": "#00ff00",
|
|
"borderColor": "#0000ff",
|
|
"borderWidth": 0,
|
|
"pointStyle": [
|
|
"circle",
|
|
"cross",
|
|
"crossRot",
|
|
"dash",
|
|
"line",
|
|
"rect",
|
|
"rectRounded",
|
|
"rectRot",
|
|
"star",
|
|
"triangle"
|
|
]
|
|
}]
|
|
},
|
|
"options": {
|
|
"responsive": false,
|
|
"legend": false,
|
|
"title": false,
|
|
"scales": {
|
|
"xAxes": [{"display": false}],
|
|
"yAxes": [{
|
|
"display": false,
|
|
"ticks": {
|
|
"min": 0,
|
|
"max": 4
|
|
}
|
|
}]
|
|
},
|
|
"elements": {
|
|
"line": {
|
|
"borderColor": "transparent",
|
|
"borderWidth": 0,
|
|
"fill": false
|
|
},
|
|
"point": {
|
|
"radius": 16
|
|
}
|
|
},
|
|
"layout": {
|
|
"padding": {
|
|
"left": 24,
|
|
"right": 24
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"options": {
|
|
"canvas": {
|
|
"height": 256,
|
|
"width": 512
|
|
}
|
|
}
|
|
}
|