mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-04 15:34:04 +01:00
36 lines
607 B
JavaScript
36 lines
607 B
JavaScript
'use strict';
|
|
|
|
import LineController from './controller.line';
|
|
import defaults from '../core/core.defaults';
|
|
|
|
defaults._set('scatter', {
|
|
scales: {
|
|
x: {
|
|
type: 'linear',
|
|
position: 'bottom'
|
|
},
|
|
y: {
|
|
type: 'linear',
|
|
position: 'left'
|
|
}
|
|
},
|
|
|
|
datasets: {
|
|
showLine: false
|
|
},
|
|
|
|
tooltips: {
|
|
callbacks: {
|
|
title: function() {
|
|
return ''; // doesn't make sense for scatter since data are formatted as a point
|
|
},
|
|
label: function(item) {
|
|
return '(' + item.label + ', ' + item.value + ')';
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
// Scatter charts use line controllers
|
|
export default LineController;
|