Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var resolveTextValue = require( './resolve_text_value.js' );
// VARIABLES //

var PROPS = [
'titleFont',
'titleOpacity'
];
var TEXT_PROPS = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var signalName = require( './../../utils/signal_name.js' );

var PROPS = [
'title',
'titleFont',
'titleOpacity'
];

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2026 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

// MODULES //

var schema = require( './schema.json' );
var handler = require( './main.js' );


// MAIN //

/**
* Defines a route handler for receiving updating a plot configuration.
*
* @private
* @returns {Object} route declaration
*/
function route() {
schema.handler = handler;
return schema;
}


// EXPORTS //

module.exports = route;
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2026 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

// MODULES //

var middleware = require( './../../../../middleware_sequence.js' );
var allowCredentials = require( './../../../../middleware/allow-credentials' );
var tryAssign = require( './../../../../middleware/plot-try-assign' );
var body = require( './../../../../middleware/body' );
var ok = require( './../../../../middleware/ok' );
var onError = require( './../../../../middleware/error' );


// VARIABLES //

var steps = [
allowCredentials,
body,
tryAssign( [ 'config', 'axes', ':axis' ], 'titleFont' ),
ok
];


// MAIN //

/**
* Request handler for updating a plot configuration.
*
* @private
* @name handler
* @type {Function}
* @param {Object} request - request object
* @param {Object} response - response object
*/
var handler = middleware( steps, onError );


// EXPORTS //

module.exports = handler;
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"method": "POST",
"url": "/config/axes/:axis/titleFont",
"schema": {
"response": {
"200": {
"type": "string"
},
"400": {
"type": "object",
"properties": {
"statusCode": {
"type": "integer"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
}
},
"413": {
"type": "object",
"properties": {
"statusCode": {
"type": "integer"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
},
"handler": null
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ var axesOrient = require( './config/axes/orient' );
var axesTickColor = require( './config/axes/tick-color' );
var axesTitle = require( './config/axes/title' );
var axesTitleColor = require( './config/axes/title-color' );
var axesTitleFont = require( './config/axes/title-font' );
var axesTitleOpacity = require( './config/axes/title-opacity' );
var background = require( './config/background' );
var description = require( './config/description' );
Expand Down Expand Up @@ -129,6 +130,7 @@ function register( router ) {
router.route( axesTickColor() ); // /config/axes/:axis/tickColor
router.route( axesTitle() ); // /config/axes/:axis/title
router.route( axesTitleColor() ); // /config/axes/:axis/titleColor
router.route( axesTitleFont() ); // /config/axes/:axis/titleFont
router.route( axesTitleOpacity() ); // /config/axes/:axis/titleOpacity

router.route( background() ); // /config/background
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ function config() {
'default': '',
'type': 'string'
},
'titleFont': {
'description': 'font of the title',
'property': 'titleFont',
'default': '',
'type': 'string'
},
'titleOpacity': {
'description': 'opacity of the title',
'property': 'titleOpacity',
Expand Down
Loading