| [`borderWidth`](#line-styling) | `number` | Yes | - | `3`
| [`fill`](#line-styling) | <code>boolean|string</code> | Yes | - | `true`
| [`label`](#general) | `string` | - | - | `''`
-| [`lineTension`](#line-styling) | `number` | - | - | `0.4`
+| [`lineTension`](#line-styling) | `number` | - | - | `0`
| [`pointBackgroundColor`](#point-styling) | `Color` | Yes | Yes | `'rgba(0, 0, 0, 0.1)'`
| [`pointBorderColor`](#point-styling) | `Color` | Yes | Yes | `'rgba(0, 0, 0, 0.1)'`
| [`pointBorderWidth`](#point-styling) | `number` | Yes | Yes | `1`
var line = meta.dataset;
var points = meta.data || [];
var options = me.chart.options;
- var dataset = me.getDataset();
- var showLine = me._showLine = valueOrDefault(me._config.showLine, options.showLines);
+ var config = me._config;
+ var showLine = me._showLine = valueOrDefault(config.showLine, options.showLines);
var i, ilen;
me._xScale = me.getScaleForId(meta.xAxisID);
// Update Line
if (showLine) {
// Compatibility: If the properties are defined with only the old name, use those values
- if ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) {
- dataset.lineTension = dataset.tension;
+ if (config.tension !== undefined && config.lineTension === undefined) {
+ config.lineTension = config.tension;
}
// Utility
*/
_resolveDatasetElementOptions: function(element) {
var me = this;
- var datasetOpts = me._config;
+ var config = me._config;
var custom = element.custom || {};
var options = me.chart.options;
var lineOptions = options.elements.line;
// The default behavior of lines is to break at null values, according
// to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158
// This option gives lines the ability to span gaps
- values.spanGaps = valueOrDefault(datasetOpts.spanGaps, options.spanGaps);
- values.tension = valueOrDefault(datasetOpts.lineTension, lineOptions.tension);
- values.steppedLine = resolve([custom.steppedLine, datasetOpts.steppedLine, lineOptions.stepped]);
+ values.spanGaps = valueOrDefault(config.spanGaps, options.spanGaps);
+ values.tension = valueOrDefault(config.lineTension, lineOptions.tension);
+ values.steppedLine = resolve([custom.steppedLine, config.steppedLine, lineOptions.stepped]);
return values;
},
var line = meta.dataset;
var points = meta.data || [];
var scale = me.chart.scale;
- var dataset = me.getDataset();
+ var config = me._config;
var i, ilen;
// Compatibility: If the properties are defined with only the old name, use those values
- if ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) {
- dataset.lineTension = dataset.tension;
+ if (config.tension !== undefined && config.lineTension === undefined) {
+ config.lineTension = config.tension;
}
// Utility