mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-04 23:44:05 +01:00
* scatter tooltip should be point by default * edited mode on better level and updated docs to be bit more clear
44 lines
625 B
JavaScript
44 lines
625 B
JavaScript
import LineController from './controller.line';
|
|
|
|
export default class ScatterController extends LineController {
|
|
|
|
}
|
|
|
|
ScatterController.id = 'scatter';
|
|
|
|
/**
|
|
* @type {any}
|
|
*/
|
|
ScatterController.defaults = {
|
|
scales: {
|
|
x: {
|
|
type: 'linear'
|
|
},
|
|
y: {
|
|
type: 'linear'
|
|
}
|
|
},
|
|
|
|
datasets: {
|
|
showLine: false,
|
|
fill: false
|
|
},
|
|
|
|
interaction: {
|
|
mode: 'point'
|
|
},
|
|
|
|
plugins: {
|
|
tooltip: {
|
|
callbacks: {
|
|
title() {
|
|
return ''; // doesn't make sense for scatter since data are formatted as a point
|
|
},
|
|
label(item) {
|
|
return '(' + item.label + ', ' + item.formattedValue + ')';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|