diff --git a/src/annotation.js b/src/annotation.js index 7efaa0591..9828f2187 100644 --- a/src/annotation.js +++ b/src/annotation.js @@ -89,8 +89,6 @@ export default { }, defaults: { - drawTime: 'afterDatasetsDraw', - dblClickSpeed: 350, // ms animations: { numbers: { properties: ['x', 'y', 'x2', 'y2', 'width', 'height', 'pointX', 'pointY', 'labelX', 'labelY', 'labelWidth', 'labelHeight', 'radius'], @@ -98,6 +96,8 @@ export default { }, }, clip: true, + dblClickSpeed: 350, // ms + drawTime: 'afterDatasetsDraw', label: { drawTime: null } diff --git a/src/types/box.js b/src/types/box.js index dd3cce3d1..ca0320f97 100644 --- a/src/types/box.js +++ b/src/types/box.js @@ -55,15 +55,9 @@ BoxAnnotation.defaults = { borderDashOffset: 0, borderJoinStyle: 'miter', borderRadius: 0, - cornerRadius: undefined, // TODO: v2 remove support for cornerRadius borderWidth: 1, + cornerRadius: undefined, // TODO: v2 remove support for cornerRadius display: true, - xMax: undefined, - xMin: undefined, - xScaleID: 'x', - yMax: undefined, - yMin: undefined, - yScaleID: 'y', label: { color: 'black', content: null, @@ -83,7 +77,13 @@ BoxAnnotation.defaults = { xAdjust: 0, yAdjust: 0, width: undefined - } + }, + xMax: undefined, + xMin: undefined, + xScaleID: 'x', + yMax: undefined, + yMin: undefined, + yScaleID: 'y' }; BoxAnnotation.defaultRoutes = { diff --git a/src/types/ellipse.js b/src/types/ellipse.js index d6508db48..30b97f058 100644 --- a/src/types/ellipse.js +++ b/src/types/ellipse.js @@ -49,18 +49,18 @@ export default class EllipseAnnotation extends Element { EllipseAnnotation.id = 'ellipseAnnotation'; EllipseAnnotation.defaults = { - display: true, adjustScaleRange: true, borderDash: [], borderDashOffset: 0, borderWidth: 1, + display: true, rotation: 0, - xScaleID: 'x', - xMin: undefined, xMax: undefined, - yScaleID: 'y', + xMin: undefined, + xScaleID: 'x', + yMax: undefined, yMin: undefined, - yMax: undefined + yScaleID: 'y' }; EllipseAnnotation.defaultRoutes = { diff --git a/src/types/line.js b/src/types/line.js index a27f974d9..dd375ca72 100644 --- a/src/types/line.js +++ b/src/types/line.js @@ -166,11 +166,12 @@ export default class LineAnnotation extends Element { LineAnnotation.id = 'lineAnnotation'; LineAnnotation.defaults = { - display: true, adjustScaleRange: true, - borderWidth: 2, borderDash: [], borderDashOffset: 0, + borderWidth: 2, + display: true, + endValue: undefined, label: { backgroundColor: 'rgba(0,0,0,0.8)', borderCapStyle: 'butt', @@ -194,24 +195,23 @@ LineAnnotation.defaults = { }, height: undefined, padding: 6, - xPadding: undefined, // TODO: v2 remove support for xPadding - yPadding: undefined, // TODO: v2 remove support for yPadding position: 'center', rotation: 0, textAlign: 'center', width: undefined, xAdjust: 0, - yAdjust: 0 + xPadding: undefined, // TODO: v2 remove support for xPadding + yAdjust: 0, + yPadding: undefined, // TODO: v2 remove support for yPadding }, - value: undefined, - endValue: undefined, scaleID: undefined, - xScaleID: 'x', - xMin: undefined, + value: undefined, xMax: undefined, - yScaleID: 'y', + xMin: undefined, + xScaleID: 'x', + yMax: undefined, yMin: undefined, - yMax: undefined + yScaleID: 'y' }; LineAnnotation.defaultRoutes = { diff --git a/src/types/point.js b/src/types/point.js index 8af975333..bdc3bcd06 100644 --- a/src/types/point.js +++ b/src/types/point.js @@ -24,11 +24,11 @@ export default class PointAnnotation extends Element { PointAnnotation.id = 'pointAnnotation'; PointAnnotation.defaults = { - display: true, adjustScaleRange: true, borderDash: [], borderDashOffset: 0, borderWidth: 1, + display: true, pointStyle: 'circle', radius: 10, rotation: 0, diff --git a/src/types/polygon.js b/src/types/polygon.js index 678f9c49d..1366a5ec1 100644 --- a/src/types/polygon.js +++ b/src/types/polygon.js @@ -47,13 +47,13 @@ export default class PolygonAnnotation extends Element { PolygonAnnotation.id = 'polygonAnnotation'; PolygonAnnotation.defaults = { - display: true, adjustScaleRange: true, borderCapStyle: 'butt', borderDash: [], borderDashOffset: 0, borderJoinStyle: 'miter', borderWidth: 1, + display: true, radius: 10, rotation: 0, sides: 3,