MCPcopy Create free account
hub / github.com/chartjs/Chart.js / LineElement

Class LineElement

src/elements/element.line.js:243–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243export default class LineElement extends Element {
244
245 static id = 'line';
246
247 /**
248 * @type {any}
249 */
250 static defaults = {
251 borderCapStyle: 'butt',
252 borderDash: [],
253 borderDashOffset: 0,
254 borderJoinStyle: 'miter',
255 borderWidth: 3,
256 capBezierPoints: true,
257 cubicInterpolationMode: 'default',
258 fill: false,
259 spanGaps: false,
260 stepped: false,
261 tension: 0,
262 };
263
264 /**
265 * @type {any}
266 */
267 static defaultRoutes = {
268 backgroundColor: 'backgroundColor',
269 borderColor: 'borderColor'
270 };
271
272
273 static descriptors = {
274 _scriptable: true,
275 _indexable: (name) => name !== 'borderDash' && name !== 'fill',
276 };
277
278
279 constructor(cfg) {
280 super();
281
282 this.animated = true;
283 this.options = undefined;
284 this._chart = undefined;
285 this._loop = undefined;
286 this._fullLoop = undefined;
287 this._path = undefined;
288 this._points = undefined;
289 this._segments = undefined;
290 this._decimated = false;
291 this._pointsUpdated = false;
292 this._datasetIndex = undefined;
293
294 if (cfg) {
295 Object.assign(this, cfg);
296 }
297 }
298
299 updateControlPoints(chartArea, indexAxis) {
300 const options = this.options;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected