Skip to content

Commit 2016ae2

Browse files
committed
Tweak gridline code
1 parent 3199d70 commit 2016ae2

File tree

5 files changed

+253
-129
lines changed

5 files changed

+253
-129
lines changed

src/traces/carpet/axis_attributes.js

+12-5
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ var colorAttrs = require('../../components/color/attributes');
1414

1515
module.exports = {
1616
smoothing: {
17-
valType: 'number',
18-
dflt: 1.0,
17+
valType: 'boolean',
18+
dflt: true,
1919
role: 'info'
2020
},
2121
cheatertype: {
@@ -124,7 +124,7 @@ module.exports = {
124124
},
125125
gridcolor: {
126126
valType: 'color',
127-
dflt: colorAttrs.defaultLine,
127+
dflt: '#aaa',
128128
role: 'style',
129129
description: 'Sets the color of the grid lines.'
130130
},
@@ -147,7 +147,7 @@ module.exports = {
147147
},
148148
startlinecolor: {
149149
valType: 'color',
150-
dflt: colorAttrs.lightLine,
150+
dflt: colorAttrs.defaultLine,
151151
role: 'style',
152152
description: 'Sets the color of the grid lines.'
153153
},
@@ -160,10 +160,17 @@ module.exports = {
160160
},
161161
endlinecolor: {
162162
valType: 'color',
163-
dflt: colorAttrs.lightLine,
163+
dflt: colorAttrs.defaultLine,
164164
role: 'style',
165165
description: 'Sets the color of the grid lines.'
166166
},
167+
minorgridcount: {
168+
valType: 'integer',
169+
min: 0,
170+
dflt: 0,
171+
role: 'info',
172+
description: 'Sets the number of minor grid ticks per major grid tick'
173+
},
167174
minorgridwidth: {
168175
valType: 'number',
169176
min: 0,

src/traces/carpet/calc.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ module.exports = function calc(gd, trace) {
6666
// Create conversions from one coordinate system to another:
6767
setConvert(trace, xa, ya);
6868

69-
trace._agrid = calcGridlines(trace, 'a', 'b', xa, ya);
70-
trace._bgrid = calcGridlines(trace, 'b', 'a', xa, ya);
69+
calcGridlines(trace, 'a', 'b', xa, ya);
70+
calcGridlines(trace, 'b', 'a', xa, ya);
7171

7272
return [{
7373
x: x,

0 commit comments

Comments
 (0)