File tree Expand file tree Collapse file tree 4 files changed +25
-17
lines changed Expand file tree Collapse file tree 4 files changed +25
-17
lines changed Original file line number Diff line number Diff line change 99'use strict' ;
1010
1111var ARROWPATHS = require ( './arrow_paths' ) ;
12- var Cartesian = require ( '../../plots/cartesian' ) ;
1312var fontAttrs = require ( '../../plots/font_attributes' ) ;
13+ var cartesianConstants = require ( '../../plots/cartesian/constants' ) ;
1414var extendFlat = require ( '../../lib/extend' ) . extendFlat ;
1515
1616
@@ -156,7 +156,7 @@ module.exports = {
156156 valType : 'enumerated' ,
157157 values : [
158158 'paper' ,
159- Cartesian . idRegex . x . toString ( )
159+ cartesianConstants . idRegex . x . toString ( )
160160 ] ,
161161 role : 'info' ,
162162 description : [
@@ -199,7 +199,7 @@ module.exports = {
199199 valType : 'enumerated' ,
200200 values : [
201201 'paper' ,
202- Cartesian . idRegex . y . toString ( )
202+ cartesianConstants . idRegex . y . toString ( )
203203 ] ,
204204 role : 'info' ,
205205 description : [
Original file line number Diff line number Diff line change 1010
1111
1212module . exports = {
13+
14+ idRegex : {
15+ x : / ^ x ( [ 2 - 9 ] | [ 1 - 9 ] [ 0 - 9 ] + ) ? $ / ,
16+ y : / ^ y ( [ 2 - 9 ] | [ 1 - 9 ] [ 0 - 9 ] + ) ? $ /
17+ } ,
18+
19+ attrRegex : {
20+ x : / ^ x a x i s ( [ 2 - 9 ] | [ 1 - 9 ] [ 0 - 9 ] + ) ? $ / ,
21+ y : / ^ y a x i s ( [ 2 - 9 ] | [ 1 - 9 ] [ 0 - 9 ] + ) ? $ /
22+ } ,
23+
1324 /**
1425 * standardize all missing data in calcdata to use undefined
1526 * never null or NaN.
Original file line number Diff line number Diff line change 1212var Lib = require ( '../../lib' ) ;
1313var Plots = require ( '../plots' ) ;
1414
15+ var constants = require ( './constants' ) ;
16+
1517exports . name = 'cartesian' ;
1618
1719exports . attr = [ 'xaxis' , 'yaxis' ] ;
1820
1921exports . idRoot = [ 'x' , 'y' ] ;
2022
21- exports . attributes = require ( './attributes' ) ;
23+ exports . idRegex = constants . idRegex ;
2224
23- exports . idRegex = {
24- x : / ^ x ( [ 2 - 9 ] | [ 1 - 9 ] [ 0 - 9 ] + ) ? $ / ,
25- y : / ^ y ( [ 2 - 9 ] | [ 1 - 9 ] [ 0 - 9 ] + ) ? $ /
26- } ;
25+ exports . attrRegex = constants . attrRegex ;
2726
28- exports . attrRegex = {
29- x : / ^ x a x i s ( [ 2 - 9 ] | [ 1 - 9 ] [ 0 - 9 ] + ) ? $ / ,
30- y : / ^ y a x i s ( [ 2 - 9 ] | [ 1 - 9 ] [ 0 - 9 ] + ) ? $ /
31- } ;
27+ exports . attributes = require ( './attributes' ) ;
3228
3329exports . plot = function ( gd ) {
3430 var fullLayout = gd . _fullLayout ,
Original file line number Diff line number Diff line change 88
99'use strict' ;
1010
11- var Cartesian = require ( './index' ) ;
1211var fontAttrs = require ( '../font_attributes' ) ;
1312var colorAttrs = require ( '../../components/color/attributes' ) ;
1413var extendFlat = require ( '../../lib/extend' ) . extendFlat ;
1514var rangeSliderAttrs = require ( '../../components/rangeslider/attributes' ) ;
1615var rangeSelectorAttrs = require ( '../../components/rangeselector/attributes' ) ;
1716
17+ var constants = require ( './constants' ) ;
18+
1819
1920module . exports = {
2021 color : {
@@ -402,8 +403,8 @@ module.exports = {
402403 valType : 'enumerated' ,
403404 values : [
404405 'free' ,
405- Cartesian . idRegex . x . toString ( ) ,
406- Cartesian . idRegex . y . toString ( )
406+ constants . idRegex . x . toString ( ) ,
407+ constants . idRegex . y . toString ( )
407408 ] ,
408409 role : 'info' ,
409410 description : [
@@ -431,8 +432,8 @@ module.exports = {
431432 valType : 'enumerated' ,
432433 values : [
433434 'free' ,
434- Cartesian . idRegex . x . toString ( ) ,
435- Cartesian . idRegex . y . toString ( )
435+ constants . idRegex . x . toString ( ) ,
436+ constants . idRegex . y . toString ( )
436437 ] ,
437438 role : 'info' ,
438439 description : [
You can’t perform that action at this time.
0 commit comments