-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathtick_mark_defaults.js
More file actions
22 lines (17 loc) · 817 Bytes
/
tick_mark_defaults.js
File metadata and controls
22 lines (17 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
'use strict';
var Lib = require('../../lib');
var layoutAttributes = require('./layout_attributes');
/**
* options: inherits outerTicks from axes.handleAxisDefaults
*/
module.exports = function handleTickMarkDefaults(containerIn, containerOut, coerce, options) {
var tickLen = Lib.coerce2(containerIn, containerOut, layoutAttributes, 'ticklen');
var tickWidth = Lib.coerce2(containerIn, containerOut, layoutAttributes, 'tickwidth');
var tickColor = Lib.coerce2(containerIn, containerOut, layoutAttributes, 'tickcolor', containerOut.color);
var showTicks = coerce('ticks', (options.outerTicks || tickLen || tickWidth || tickColor) ? 'outside' : '');
if(!showTicks) {
delete containerOut.ticklen;
delete containerOut.tickwidth;
delete containerOut.tickcolor;
}
};