x: xScale.getPixelForValue(this.getDataset().data[index], index, this.index, this.chart.isCombo),
y: reset ? scaleBase : this.calculatePointY(this.getDataset().data[index], index, this.index, this.chart.isCombo),
// Appearance
- tension: point.custom && point.custom.tension ? point.custom.tension : helpers.getValueOrDefault(this.getDataset().tension, this.chart.options.elements.line.tension),
radius: point.custom && point.custom.radius ? point.custom.radius : helpers.getValueAtIndexOrDefault(this.getDataset().radius, index, this.chart.options.elements.point.radius),
pointStyle: point.custom && point.custom.pointStyle ? point.custom.pointStyle : helpers.getValueAtIndexOrDefault(this.getDataset().pointStyle, index, this.chart.options.elements.point.pointStyle),
backgroundColor: this.getPointBackgroundColor(point, index),
helpers.previousItem(this.getDataset().metaData, index)._model,
point._model,
helpers.nextItem(this.getDataset().metaData, index)._model,
- point._model.tension
+ this.getDataset().metaDataset._model.tension
);
// Prevent the bezier going outside of the bounds of the graph
radius: 3,
pointStyle: 'circle',
skip: false,
- tension: 0.1,
// Point
x: 82,
expect(chart.data.datasets[0].metaData[1]._model).toEqual({
x: 132,
y: 15,
- tension: 0.1,
radius: 3,
pointStyle: 'circle',
backgroundColor: 'rgba(0,0,0,0.1)',
expect(chart.data.datasets[0].metaData[2]._model).toEqual({
x: 182,
y: 156,
- tension: 0.1,
radius: 3,
pointStyle: 'circle',
backgroundColor: 'rgba(0,0,0,0.1)',
radius: 3,
pointStyle: 'circle',
skip: false,
- tension: 0.1,
// Point
x: 232,
expect(chart.data.datasets[0].metaData[0]._model).toEqual({
x: 82,
y: 62,
- tension: 0,
radius: 22,
pointStyle: 'circle',
backgroundColor: 'rgb(128, 129, 130)',
expect(chart.data.datasets[0].metaData[1]._model).toEqual({
x: 132,
y: 15,
- tension: 0,
radius: 22,
pointStyle: 'circle',
backgroundColor: 'rgb(128, 129, 130)',
radius: 22,
pointStyle: 'circle',
skip: false,
- tension: 0,
// Point
x: 182,
radius: 22,
pointStyle: 'circle',
skip: false,
- tension: 0,
// Point
x: 232,
// Use custom styles for lines & first point
chart.data.datasets[0].metaDataset.custom = {
- tension: 0.25,
+ tension: 0.15,
backgroundColor: 'rgb(55, 55, 54)',
borderColor: 'rgb(8, 7, 6)',
borderWidth: 0.3,
backgroundColor: 'rgb(0, 1, 3)',
borderColor: 'rgb(4, 6, 8)',
borderWidth: 0.787,
- tension: 0.15,
skip: true,
hitRadius: 5,
};
borderJoinStyle: 'round',
borderWidth: 0.3,
fill: true,
- tension: 0.25,
+ tension: 0.15,
scaleTop: 0,
scaleBottom: 200,
expect(chart.data.datasets[0].metaData[0]._model).toEqual({
x: 82,
y: 62,
- tension: 0.15,
radius: 2.2,
pointStyle: 'circle',
backgroundColor: 'rgb(0, 1, 3)',