Skip to content

Commit dda48ee

Browse files
committed
fix: remove default for tickBand to avoid globbering other settings
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 26ac82c commit dda48ee

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

lib/node_modules/@stdlib/plot/vega/axis/ctor/lib/defaults.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ function defaults() {
8686
// Boolean indicating whether axis tick marks should be included as part of an axis:
8787
'ticks': true,
8888

89-
// Type of tick style to use in conjunction with an axis having a band scale:
90-
'tickBand': 'center',
91-
9289
// Stroke cap for axis tick marks:
9390
'tickCap': 'butt',
9491

lib/node_modules/@stdlib/plot/vega/axis/ctor/lib/main.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ var debug = logger( 'vega:axis:main' );
235235
* @param {(number|Object)} [options.offset] - orthogonal offset (in pixels) by which to displace an axis from its position along the edge of a chart
236236
* @param {(number|Object)} [options.position=0] - anchor position (in pixels) of an axis
237237
* @param {boolean} [options.ticks=true] - boolean indicating whether axis tick marks should be included as part of an axis
238-
* @param {string} [options.tickBand='center'] - type of axis tick style to use for an axis having a band scale
238+
* @param {string} [options.tickBand] - type of axis tick style to use for an axis having a band scale
239239
* @param {string} [options.tickCap='butt'] - stroke cap for axis tick marks
240240
* @param {string} [options.tickColor] - color of axis tick marks as a CSS color string (e.g., `'#f304d3'`, `'#ccc'`, `'rgb(253, 12, 134)'`, `'steelblue'`, etc)
241241
* @param {(number|string|Object)} [options.tickCount] - configuration for determining the number of axis tick marks
@@ -1240,8 +1240,7 @@ setReadWriteAccessor( Axis.prototype, 'scale', getScale, setScale );
12401240
*
12411241
* @name tickBand
12421242
* @memberof Axis.prototype
1243-
* @type {string}
1244-
* @default 'center'
1243+
* @type {(string|void)}
12451244
*
12461245
* @example
12471246
* var axis = new Axis({

lib/node_modules/@stdlib/plot/vega/axis/ctor/lib/tick-band/get.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var prop = require( './properties.js' );
3131
* Returns the axis tick style to use in conjunction with band scales.
3232
*
3333
* @private
34-
* @returns {string} value
34+
* @returns {(string|void)} value
3535
*/
3636
function get() {
3737
return this[ prop.private ];

lib/node_modules/@stdlib/plot/vega/axis/ctor/lib/tick-band/set.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
var logger = require( 'debug' );
2626
var contains = require( '@stdlib/array/base/assert/contains' ).factory;
27+
var isUndefined = require( '@stdlib/assert/is-undefined' );
2728
var join = require( '@stdlib/array/base/join' );
2829
var format = require( '@stdlib/string/format' );
2930
var changeEvent = require( './../change_event.js' );
@@ -45,13 +46,17 @@ var isStyle = contains( STYLES );
4546
/**
4647
* Sets the axis tick style to use in conjunction with band scales.
4748
*
49+
* ## Notes
50+
*
51+
* - Providing `undefined` "unsets" the configured value.
52+
*
4853
* @private
49-
* @param {string} value - input value
54+
* @param {(string|void)} value - input value
5055
* @throws {TypeError} must be a supported tick style
5156
* @returns {void}
5257
*/
5358
function set( value ) {
54-
if ( !isStyle( value ) ) {
59+
if ( !isStyle( value ) && !isUndefined( value ) ) {
5560
throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( STYLES, '", "' ), value ) );
5661
}
5762
if ( value !== this[ prop.private ] ) {

0 commit comments

Comments
 (0)