Skip to content

Commit ee746d7

Browse files
authored
Merge branch 'refactor/plot' into refactor/plot-vega-base-assert-is-compare
2 parents 7491ec6 + 9f578f0 commit ee746d7

8 files changed

Lines changed: 151 additions & 1 deletion

File tree

lib/node_modules/@stdlib/plot/base/view/lib/browser/app/editor/config/axis.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ var resolveTextValue = require( './resolve_text_value.js' );
2828
// VARIABLES //
2929

3030
var PROPS = [
31+
'titleFont',
3132
'titleOpacity'
3233
];
3334
var TEXT_PROPS = [

lib/node_modules/@stdlib/plot/base/view/lib/browser/app/schema/transforms/axis.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ var signalName = require( './../../utils/signal_name.js' );
3030

3131
var PROPS = [
3232
'title',
33+
'titleFont',
3334
'titleOpacity'
3435
];
3536

lib/node_modules/@stdlib/plot/base/view/lib/browser/routes/app/bundle.js

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2026 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var schema = require( './schema.json' );
24+
var handler = require( './main.js' );
25+
26+
27+
// MAIN //
28+
29+
/**
30+
* Defines a route handler for receiving updating a plot configuration.
31+
*
32+
* @private
33+
* @returns {Object} route declaration
34+
*/
35+
function route() {
36+
schema.handler = handler;
37+
return schema;
38+
}
39+
40+
41+
// EXPORTS //
42+
43+
module.exports = route;
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2026 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var middleware = require( './../../../../middleware_sequence.js' );
24+
var allowCredentials = require( './../../../../middleware/allow-credentials' );
25+
var tryAssign = require( './../../../../middleware/plot-try-assign' );
26+
var body = require( './../../../../middleware/body' );
27+
var ok = require( './../../../../middleware/ok' );
28+
var onError = require( './../../../../middleware/error' );
29+
30+
31+
// VARIABLES //
32+
33+
var steps = [
34+
allowCredentials,
35+
body,
36+
tryAssign( [ 'config', 'axes', ':axis' ], 'titleFont' ),
37+
ok
38+
];
39+
40+
41+
// MAIN //
42+
43+
/**
44+
* Request handler for updating a plot configuration.
45+
*
46+
* @private
47+
* @name handler
48+
* @type {Function}
49+
* @param {Object} request - request object
50+
* @param {Object} response - response object
51+
*/
52+
var handler = middleware( steps, onError );
53+
54+
55+
// EXPORTS //
56+
57+
module.exports = handler;
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"method": "POST",
3+
"url": "/config/axes/:axis/titleFont",
4+
"schema": {
5+
"response": {
6+
"200": {
7+
"type": "string"
8+
},
9+
"400": {
10+
"type": "object",
11+
"properties": {
12+
"statusCode": {
13+
"type": "integer"
14+
},
15+
"error": {
16+
"type": "string"
17+
},
18+
"message": {
19+
"type": "string"
20+
}
21+
}
22+
},
23+
"413": {
24+
"type": "object",
25+
"properties": {
26+
"statusCode": {
27+
"type": "integer"
28+
},
29+
"error": {
30+
"type": "string"
31+
},
32+
"message": {
33+
"type": "string"
34+
}
35+
}
36+
}
37+
}
38+
},
39+
"handler": null
40+
}

lib/node_modules/@stdlib/plot/base/view/lib/browser/routes/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ var axesOrient = require( './config/axes/orient' );
4747
var axesTickColor = require( './config/axes/tick-color' );
4848
var axesTitle = require( './config/axes/title' );
4949
var axesTitleColor = require( './config/axes/title-color' );
50+
var axesTitleFont = require( './config/axes/title-font' );
5051
var axesTitleOpacity = require( './config/axes/title-opacity' );
5152
var background = require( './config/background' );
5253
var description = require( './config/description' );
@@ -129,6 +130,7 @@ function register( router ) {
129130
router.route( axesTickColor() ); // /config/axes/:axis/tickColor
130131
router.route( axesTitle() ); // /config/axes/:axis/title
131132
router.route( axesTitleColor() ); // /config/axes/:axis/titleColor
133+
router.route( axesTitleFont() ); // /config/axes/:axis/titleFont
132134
router.route( axesTitleOpacity() ); // /config/axes/:axis/titleOpacity
133135

134136
router.route( background() ); // /config/background

lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ function config() {
3737
'default': '',
3838
'type': 'string'
3939
},
40+
'titleFont': {
41+
'description': 'font of the title',
42+
'property': 'titleFont',
43+
'default': '',
44+
'type': 'string'
45+
},
4046
'titleOpacity': {
4147
'description': 'opacity of the title',
4248
'property': 'titleOpacity',

0 commit comments

Comments
 (0)