11'use strict' ;
22
33import * as Chart from 'chart.js' ;
4- import ArrayElementBase , { defaults } from './base' ;
4+ import ArrayElementBase , {
5+ defaults
6+ } from './base' ;
57
68
7- Chart . defaults . global . elements . boxandwhiskers = { ...defaults } ;
9+ Chart . defaults . global . elements . boxandwhiskers = {
10+ ...defaults
11+ } ;
812
913function transitionBoxPlot ( start , view , model , ease ) {
1014 const keys = Object . keys ( model ) ;
@@ -58,9 +62,6 @@ const BoxAndWiskers = Chart.elements.BoxAndWhiskers = ArrayElementBase.extend({
5862 const boxplot = vm . boxplot ;
5963 const vert = this . isVertical ( ) ;
6064
61-
62- this . _drawItems ( vm , boxplot , ctx , vert ) ;
63-
6465 ctx . save ( ) ;
6566
6667 ctx . fillStyle = vm . backgroundColor ;
@@ -72,6 +73,8 @@ const BoxAndWiskers = Chart.elements.BoxAndWhiskers = ArrayElementBase.extend({
7273
7374 ctx . restore ( ) ;
7475
76+ this . _drawItems ( vm , boxplot , ctx , vert ) ;
77+
7578 } ,
7679 _drawBoxPlot ( vm , boxplot , ctx , vert ) {
7780 if ( vert ) {
@@ -185,7 +188,10 @@ const BoxAndWiskers = Chart.elements.BoxAndWhiskers = ArrayElementBase.extend({
185188 }
186189
187190 if ( vert ) {
188- const { x, width} = vm ;
191+ const {
192+ x,
193+ width
194+ } = vm ;
189195 const x0 = x - width / 2 ;
190196 return {
191197 left : x0 ,
@@ -194,7 +200,10 @@ const BoxAndWiskers = Chart.elements.BoxAndWhiskers = ArrayElementBase.extend({
194200 bottom : boxplot . whiskerMin
195201 } ;
196202 }
197- const { y, height} = vm ;
203+ const {
204+ y,
205+ height
206+ } = vm ;
198207 const y0 = y - height / 2 ;
199208 return {
200209 left : boxplot . whiskerMin ,
0 commit comments