plot: small dots, false by default

This commit is contained in:
bordun 2020-05-22 16:35:27 +02:00
parent 0e5edb76de
commit 90e2ee0850

View file

@ -23,7 +23,7 @@ module.exports = class Plot extends StaticProperties(Canvas, {bypass: true, inte
logScaleX: {type: 'boolean|number', value: false, help: 'Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm\'s base.'},
logScaleY: {type: 'boolean|number', value: false, help: 'Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm\'s base.'},
origin: {type: 'number', value: 'auto', help: 'Defines the y axis origin. Set to `false` to disable it.'},
dots: {type: 'boolean', value: true, help: 'Draw dots on the line'},
dots: {type: 'boolean', value: false, help: 'Draw dots on the line'},
bars: {type: 'boolean', value: false, help: 'Set to `true` to use draw bars instead (disables `logScaleX` and forces `x axis` even spacing)'},
pips:{type: 'boolean', value: true, help: 'Set to `false` to hide the scale'},
@ -186,7 +186,7 @@ module.exports = class Plot extends StaticProperties(Canvas, {bypass: true, inte
this.ctx.lineWidth = 2 * PXSCALE
for (var i = 0; i < points.length; i += 2) {
this.ctx.beginPath()
this.ctx.arc(points[i], points[i + 1], 3 * PXSCALE, 0, 2*Math.PI)
this.ctx.arc(points[i], points[i + 1], 2 * PXSCALE, 0, 2*Math.PI)
this.ctx.fill()
this.ctx.stroke()
}