From 5147e7294193e8068118140da3efe11e1682f67a Mon Sep 17 00:00:00 2001 From: Sachinn-64 Date: Tue, 8 Sep 2026 02:08:53 +0530 Subject: [PATCH] feat: add plot/charts/area/ctor --- 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_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../plot/charts/area/ctor/examples/index.js | 44 + .../plot/charts/area/ctor/lib/change_event.js | 41 + .../plot/charts/area/ctor/lib/colors/get.js | 44 + .../charts/area/ctor/lib/colors/properties.js | 33 + .../plot/charts/area/ctor/lib/colors/set.js | 75 ++ .../plot/charts/area/ctor/lib/defaults.js | 54 ++ .../charts/area/ctor/lib/fill-opacity/get.js | 44 + .../area/ctor/lib/fill-opacity/properties.js | 33 + .../charts/area/ctor/lib/fill-opacity/set.js | 75 ++ .../plot/charts/area/ctor/lib/index.js | 42 + .../plot/charts/area/ctor/lib/legend/get.js | 43 + .../charts/area/ctor/lib/legend/properties.js | 33 + .../plot/charts/area/ctor/lib/legend/set.js | 64 ++ .../@stdlib/plot/charts/area/ctor/lib/main.js | 752 ++++++++++++++++++ .../plot/charts/area/ctor/lib/properties.json | 5 + .../plot/charts/area/ctor/package.json | 67 ++ 16 files changed, 1449 insertions(+) create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/examples/index.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/change_event.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/colors/get.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/colors/properties.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/colors/set.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/defaults.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/fill-opacity/get.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/fill-opacity/properties.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/fill-opacity/set.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/index.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/legend/get.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/legend/properties.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/legend/set.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/main.js create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/lib/properties.json create mode 100644 lib/node_modules/@stdlib/plot/charts/area/ctor/package.json diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/examples/index.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/examples/index.js new file mode 100644 index 000000000000..c2e5bde02a83 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/examples/index.js @@ -0,0 +1,44 @@ +/** +* @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'; + +var linspace = require( '@stdlib/array/linspace' ); +var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); +var map = require( '@stdlib/ndarray/map' ); +var pdf = require( '@stdlib/stats/base/dists/normal/pdf' ); +var AreaChart = require( './../lib' ); + +// Generate linearly spaced values over the support of interest: +var x = new Float64Vector( linspace( -5.0, 10.0, 100 ) ); + +// Evaluate the PDF of several normal distributions: +var y = [ + map( x, pdf.factory( 0.0, 1.0 ) ), + map( x, pdf.factory( 2.0, 2.0 ) ), + map( x, pdf.factory( 5.0, 0.5 ) ) +]; + +// Overlay the distributions: +var chart = new AreaChart( x, y, { + 'labels': [ 'N(0,1)', 'N(2,2)', 'N(5,0.5)' ], + 'fillOpacity': [ 0.5 ], + 'legend': true, + 'yTitle': 'f(x)' +}); +console.log( chart.toJSON() ); diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/change_event.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/change_event.js new file mode 100644 index 000000000000..269fa636e9cb --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/change_event.js @@ -0,0 +1,41 @@ +/** +* @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'; + +// MAIN // + +/** +* Returns a new change event object. +* +* @private +* @param {string} property - property name +* @returns {Object} event object +*/ +function event( property ) { // eslint-disable-line stdlib/no-redeclare + return { + 'type': 'update', + 'source': 'visualization', + 'property': property + }; +} + + +// EXPORTS // + +module.exports = event; diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/colors/get.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/colors/get.js new file mode 100644 index 000000000000..8e0cec79bf27 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/colors/get.js @@ -0,0 +1,44 @@ +/** +* @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. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var copy = require( '@stdlib/array/base/copy' ); +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns the area colors. +* +* @private +* @returns {Array} colors +*/ +function get() { + return copy( this[ prop.private ] ); +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/colors/properties.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/colors/properties.js new file mode 100644 index 000000000000..2790499a9a07 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/colors/properties.js @@ -0,0 +1,33 @@ +/** +* @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 property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'colors' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/colors/set.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/colors/set.js new file mode 100644 index 000000000000..83544ebed046 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/colors/set.js @@ -0,0 +1,75 @@ +/** +* @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. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isStringArray = require( '@stdlib/assert/is-string-array' ).primitives; +var isString = require( '@stdlib/assert/is-string' ).isPrimitive; +var hasEqualValues = require( '@stdlib/array/base/assert/has-equal-values' ); +var copy = require( '@stdlib/array/base/copy' ); +var join = require( '@stdlib/array/base/join' ); +var format = require( '@stdlib/string/format' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'area-chart:set:'+prop.name ); + + +// MAIN // + +/** +* Sets area colors. +* +* @private +* @param {(Array|string)} value - input value +* @throws {TypeError} must be a string or an array of strings +* @returns {void} +*/ +function set( value ) { + var isStr = isString( value ); + if ( !isStr && !isStringArray( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a string or an array of strings. Value: `%s`.', prop.name, value ) ); + } + if ( isStr ) { + value = [ value ]; + } + if ( !hasEqualValues( value, this[ prop.private ] ) ) { + debug( 'Current value: [%s]. New value: [%s].', join( this[ prop.private ], ', ' ), join( value, ', ' ) ); + + // Perform a defensive copy as we will be caching the specified area colors: + value = copy( value ); + + // Cache the value before updating the scale to ensure consistent state: + this[ prop.private ] = value; + + // Update the color range: + this.colorScale.range = value; + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/defaults.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/defaults.js new file mode 100644 index 000000000000..72867fa8b0ed --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/defaults.js @@ -0,0 +1,54 @@ +/** +* @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 category10 = require( '@stdlib/plot/color-schemes/category10' ); + + +// MAIN // + +/** +* Returns defaults. +* +* @private +* @returns {Object} defaults +* +* @example +* var obj = defaults(); +* // returns {...} +*/ +function defaults() { + return { + // Area colors: + 'colors': category10(), + + // Area fill opacity: + 'fillOpacity': [ 0.5 ], + + // Boolean indicating whether to display a legend: + 'legend': false + }; +} + + +// EXPORTS // + +module.exports = defaults; diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/fill-opacity/get.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/fill-opacity/get.js new file mode 100644 index 000000000000..7bb80a72a23a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/fill-opacity/get.js @@ -0,0 +1,44 @@ +/** +* @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. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var copy = require( '@stdlib/array/base/copy' ); +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns the area fill opacities. +* +* @private +* @returns {Array} opacities +*/ +function get() { + return copy( this[ prop.private ] ); +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/fill-opacity/properties.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/fill-opacity/properties.js new file mode 100644 index 000000000000..0464b366824b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/fill-opacity/properties.js @@ -0,0 +1,33 @@ +/** +* @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 property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'fillOpacity' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/fill-opacity/set.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/fill-opacity/set.js new file mode 100644 index 000000000000..af9edc938118 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/fill-opacity/set.js @@ -0,0 +1,75 @@ +/** +* @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. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isProbabilityArray = require( '@stdlib/assert/is-probability-array' ).primitives; +var isProbability = require( '@stdlib/assert/is-probability' ).isPrimitive; +var hasEqualValues = require( '@stdlib/array/base/assert/has-equal-values' ); +var copy = require( '@stdlib/array/base/copy' ); +var join = require( '@stdlib/array/base/join' ); +var format = require( '@stdlib/string/format' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'area-chart:set:'+prop.name ); + + +// MAIN // + +/** +* Sets area fill opacities. +* +* @private +* @param {(Array|number)} value - input value +* @throws {TypeError} must be a number or an array of numbers +* @returns {void} +*/ +function set( value ) { + var isNum = isProbability( value ); + if ( !isNum && !isProbabilityArray( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a number or an array of numbers on the interval [0,1]. Value: `%s`.', prop.name, value ) ); + } + if ( isNum ) { + value = [ value ]; + } + if ( !hasEqualValues( value, this[ prop.private ] ) ) { + debug( 'Current value: [%s]. New value: [%s].', join( this[ prop.private ], ', ' ), join( value, ', ' ) ); + + // Perform a defensive copy as we will be caching the specified area fill opacities: + value = copy( value ); + + // Cache the value before updating the scale to ensure consistent state: + this[ prop.private ] = value; + + // Update the fill opacity range: + this.fillOpacityScale.range = value; + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/index.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/index.js new file mode 100644 index 000000000000..7d5a5f397e39 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/index.js @@ -0,0 +1,42 @@ +/** +* @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'; + +/** +* Area chart constructor. +* +* @module @stdlib/plot/charts/area/ctor +* +* @example +* var AreaChart = require( '@stdlib/plot/charts/area/ctor' ); +* +* var chart = new AreaChart(); +* // returns +* +* // TODO: update example +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/legend/get.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/legend/get.js new file mode 100644 index 000000000000..a54c76188171 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/legend/get.js @@ -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. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a boolean indicating whether to display a chart legend. +* +* @private +* @returns {boolean} boolean flag +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/legend/properties.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/legend/properties.js new file mode 100644 index 000000000000..2d94c431aafa --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/legend/properties.js @@ -0,0 +1,33 @@ +/** +* @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 property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'legend' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/legend/set.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/legend/set.js new file mode 100644 index 000000000000..b1e5c08845a3 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/legend/set.js @@ -0,0 +1,64 @@ +/** +* @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. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; +var format = require( '@stdlib/string/format' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'area-chart:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a boolean flag indicating whether to display a chart legend. +* +* @private +* @param {boolean} value - input value +* @throws {TypeError} must be a boolean +* @returns {void} +*/ +function set( value ) { + if ( !isBoolean( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a boolean. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + if ( value ) { + this.config.legends = [ this._chartLegend ]; + return; + } + this.config.legends = []; + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/main.js b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/main.js new file mode 100644 index 000000000000..77c2c1e1153b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/main.js @@ -0,0 +1,752 @@ +/** +* @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. +*/ + +/* eslint-disable max-lines, no-restricted-syntax, no-invalid-this, stdlib/no-empty-lines-between-requires */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isFunction = require( '@stdlib/assert/is-function' ); +var isndarrayLike = require( '@stdlib/assert/is-ndarray-like' ); +var isCollection = require( '@stdlib/assert/is-collection' ); +var isObject = require( '@stdlib/assert/is-object' ); +var setNonEnumerableReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var setNonEnumerableReadOnlyAccessor = require( '@stdlib/utils/define-nonenumerable-read-only-accessor' ); // eslint-disable-line id-length +var setReadOnlyAccessor = require( '@stdlib/utils/define-read-only-accessor' ); +var setReadWriteAccessor = require( '@stdlib/utils/define-read-write-accessor' ); +var hasProp = require( '@stdlib/assert/has-property' ); +var inherit = require( '@stdlib/utils/inherit' ); +var objectAssignIn = require( '@stdlib/object/assign-in' ); +var slice = require( '@stdlib/array/base/slice' ); +var transformErrorMessage = require( '@stdlib/plot/vega/base/transform-validation-message' ); +var QuantitativeChart = require( '@stdlib/plot/charts/base/quantitative' ); +var DataSource = require( '@stdlib/plot/vega/mark/data-source' ); +var Value = require( '@stdlib/plot/vega/value/ctor' ); +var OrdinalScale = require( '@stdlib/plot/vega/scale/ordinal' ); +var AreaEncodingSet = require( '@stdlib/plot/vega/mark/area/encoding-set' ); +var AreaEncoding = require( '@stdlib/plot/vega/mark/area/encoding' ); +var AreaMark = require( '@stdlib/plot/vega/mark/area/ctor' ); +var Legend = require( '@stdlib/plot/vega/legend/ctor' ); +var spec2svg = require( '@stdlib/plot/vega/base/spec2svg' ); +var format = require( '@stdlib/string/format' ); +var properties = require( './properties.json' ); +var defaults = require( './defaults.js' ); + +// Note: keep the following in alphabetical order according to the `require` path... +var getColors = require( './colors/get.js' ); +var setColors = require( './colors/set.js' ); + +var getFillOpacity = require( './fill-opacity/get.js' ); +var setFillOpacity = require( './fill-opacity/set.js' ); + +var getLegend = require( './legend/get.js' ); +var setLegend = require( './legend/set.js' ); + + +// VARIABLES // + +var debug = logger( 'area-chart:main' ); + +var SCALE_TO_INDEX = { + 'x': 0, + 'y': 1, + 'color': 2, + 'opacity': 3 +}; +var SCALE_TO_DEFAULT_NAME = { + 'color': 'colorScale', + 'opacity': 'fillOpacityScale' +}; +var SCALE_TO_ENCODING = { + 'color': 'fill', + 'opacity': 'fillOpacity' +}; +var INTERNAL_ORDINAL_SCALES = [ + 'color', + 'opacity' +]; +var UPDATE_ORDINAL_SCALES = [ + 'color', + 'opacity' +]; + + +// FUNCTIONS // + +/** +* Extract a property value from each element of an object array. +* +* @private +* @param {Array} arr - input array +* @param {string} prop - property name +* @returns {Array} output array +*/ +function pluck( arr, prop ) { // TODO: use `array/base/pluck` once implemented (ref: https://github.com/stdlib-js/stdlib/pull/5376) + var out; + var i; + + out = []; + for ( i = 0; i < arr.length; i++ ) { + out.push( arr[ i ][ prop ] ); + } + return out; +} + +/** +* Returns the scale data associated with the provided scale identifier. +* +* @private +* @param {Array} data - scale data +* @param {string} id - identifier +* @returns {*} scale data +*/ +function getScale( data, id ) { + return data[ SCALE_TO_INDEX[ id ] ]; +} + +/** +* Returns the default name for a specified scale identifier. +* +* @private +* @param {string} id - identifier +* @returns {string} default name +*/ +function scale2default( id ) { + return SCALE_TO_DEFAULT_NAME[ id ]; +} + +/** +* Returns the encoding name for a specified scale identifier. +* +* @private +* @param {string} id - identifier +* @returns {string} encoding name +*/ +function scale2encoding( id ) { + return SCALE_TO_ENCODING[ id ]; +} + +/** +* Returns a field value reference. +* +* @private +* @param {string} scale - scale name +* @param {string} field - field name +* @returns {Value} value reference +*/ +function fieldValue( scale, field ) { + return new Value({ + 'scale': scale, + 'field': field + }); +} + +/** +* Returns an ordinal value reference. +* +* @private +* @param {string} scale - scale name +* @param {*} value - value +* @returns {Value} value reference +*/ +function ordinalValue( scale, value ) { + return new Value({ + 'scale': scale, + 'value': value + }); +} + +/** +* Returns a value reference corresponding to an area baseline. +* +* @private +* @returns {Value} value reference +*/ +function baselineSignalValue() { + return new Value({ + 'signal': 'height' + }); +} + +/** +* Returns a value reference indicating whether a value is defined. +* +* @private +* @returns {Value} value reference +*/ +function definedSignalValue() { + return new Value({ + 'signal': 'isValid(datum.y)' + }); +} + +/** +* Returns an area mark encoding for a specified dataset. +* +* @private +* @param {string} name - dataset name +* @param {Array} scales - scale names +* @returns {AreaEncoding} area mark encoding +*/ +function encoding( name, scales ) { + return new AreaEncoding({ + 'update': new AreaEncodingSet({ + 'fill': ordinalValue( getScale( scales, 'color' ), name ), + 'fillOpacity': ordinalValue( getScale( scales, 'opacity' ), name ), + 'x': fieldValue( getScale( scales, 'x' ), 'x' ), + 'y': fieldValue( getScale( scales, 'y' ), 'y' ), + 'y2': baselineSignalValue(), + 'defined': definedSignalValue() + }) + }); +} + +/** +* Returns an area mark for a specified dataset. +* +* @private +* @param {string} name - dataset name +* @param {Array} scales - scale names +* @returns {AreaMark} area mark +*/ +function areaMark( name, scales ) { + return new AreaMark({ + 'from': new DataSource({ + 'data': name + }), + 'encode': encoding( name, scales ) + }); +} + +/** +* Updates an area mark. +* +* @private +* @param {AreaMark} mark - area mark +* @param {string} name - dataset name +* @param {Array} scales - scale names +* @returns {AreaMark} area mark +*/ +function updateAreaMark( mark, name, scales ) { + var encoding; + var id; + var v; + var i; + + mark.from.data = name; + + encoding = mark.encode.update; + encoding.x.scale = getScale( scales, 'x' ); + encoding.y.scale = getScale( scales, 'y' ); + + for ( i = 0; i < UPDATE_ORDINAL_SCALES.length; i++ ) { + id = UPDATE_ORDINAL_SCALES[ i ]; + v = encoding[ scale2encoding( id ) ]; + v.scale = getScale( scales, id ); + v.value = name; + } + return mark; +} + + +// MAIN // + +/** +* Area chart constructor. +* +* @constructor +* @param {(ndarrayLike|Collection)} [x] - x-values +* @param {(ndarrayLike|Collection)} [y] - y-values +* @param {Options} [options] - constructor options +* @param {string} [options.background] - background color +* @param {Object} [options.channels={'x':'x','y':'y'}] - object mapping chart data field names to encoding channels ('x', 'y', and 'z') +* @param {(string|Array)} [options.colors] - area colors +* @param {ArrayLikeObject} [options.data=[]] - chart data +* @param {string} [options.description=''] - chart description +* @param {(number|Array)} [options.fillOpacity=[0.5]] - area fill opacity +* @param {number} [options.height=480] - chart height (in pixels) +* @param {Array} [options.labels=[]] - data labels +* @param {Object} [options.padding] - chart padding +* @param {number} [options.padding.bottom=0] - chart bottom padding (in pixels) +* @param {number} [options.padding.left=0] - chart left padding (in pixels) +* @param {number} [options.padding.right=0] - chart right padding (in pixels) +* @param {number} [options.padding.top=0] - chart top padding (in pixels) +* @param {Object} [options.theme] - chart theme +* @param {(string|Array)} [options.title=''] - chart title +* @param {string} [options.viewer] - default chart viewer +* @param {number} [options.width=600] - chart width (in pixels) +* @param {(string|Array)} [options.xTitle='x'] - x-axis label +* @param {(string|Object)} [options.xFormat] - x-axis tick format +* @param {number} [options.xMax] - maximum value of the x-axis domain +* @param {number} [options.xMin] - minimum value of the x-axis domain +* @param {string} [options.xScaleType='linear'] - x-axis scale type +* @param {(number|string|Object)} [options.xTickCount] - number of x-axis tick marks +* @param {(string|Object)} [options.yFormat] - y-axis tick format +* @param {number} [options.yMax] - maximum value of the y-axis domain +* @param {number} [options.yMin] - minimum value of the y-axis domain +* @param {string} [options.yScaleType='linear'] - y-axis scale type +* @param {(number|string|Object)} [options.yTickCount] - number of y-axis tick marks +* @param {(string|Array)} [options.yTitle='y'] - y-axis label +* @throws {TypeError} must provide a valid first argument +* @throws {TypeError} must provide a valid second argument +* @throws {TypeError} options argument must be an object +* @throws {Error} must provide valid options +* @returns {AreaChart} area chart instance +* +* @example +* var plot = new AreaChart(); +* // returns +*/ +function AreaChart( x, y, options ) { + var scales; + var nargs; + var opts; + var k; + var v; + var s; + var i; + + nargs = arguments.length; + if ( !( this instanceof AreaChart ) ) { + if ( nargs < 1 ) { + return new AreaChart(); + } + if ( nargs === 1 ) { + return new AreaChart( x ); + } + if ( nargs === 2 ) { + return new AreaChart( x, y ); + } + return new AreaChart( x, y, options ); + } + opts = defaults(); + + // Set internal properties according to the default configuration... + for ( i = 0; i < properties.length; i++ ) { + k = properties[ i ]; + if ( hasProp( opts, k ) ) { + this[ '_'+k ] = opts[ k ]; + } + } + // Case: new AreaChart( arg ) + if ( nargs === 1 ) { + // Case: new AreaChart( ndarray ) + if ( isndarrayLike( x ) ) { + opts.data = [ x ]; + } + // Case: new AreaChart( collection ) + else if ( isCollection( x ) ) { + opts.data = [ x ]; + } + // Case: new AreaChart( options ) + else if ( isObject( x ) ) { + opts = objectAssignIn( opts, x ); + } + // Case: new AreaChart( ??? ) + else { + throw new TypeError( format( 'invalid argument. First argument must be either an array-like object, an ndarray, or an options argument. Value: `%s`.', x ) ); + } + } + // Case: new AreaChart( arg1, arg2 ) + else if ( nargs === 2 ) { + // Case: new AreaChart( ndarray, ??? ) + if ( isndarrayLike( x ) ) { + // Case: new AreaChart( ndarray, ndarray ) + if ( isndarrayLike( y ) ) { + opts.data = [ x, y ]; + } + // Case: new AreaChart( ndarray, collection ) + else if ( isCollection( y ) ) { + for ( i = 0; i < y.length; i++ ) { + if ( !isndarrayLike( y[ i ] ) ) { + throw new TypeError( 'invalid argument. Second argument must be an ndarray or an array of ndarrays.' ); + } + } + opts.data = [ x, y ]; + } + // Case: new AreaChart( ndarray, options ) + else if ( isObject( y ) ) { + opts = objectAssignIn( opts, y ); + opts.data = [ x ]; // always override `opts.data` if it exists + } + // Case: new AreaChart( ndarray, ??? ) + else { + throw new TypeError( format( 'invalid argument. Second argument must be either an ndarray, an array of ndarrays, or an options argument. Value: `%s`.', y ) ); + } + } + // Case: new AreaChart( collection, ??? ) + else if ( isCollection( x ) ) { + // Case: new AreaChart( collection, ndarray ) + if ( isndarrayLike( y ) ) { + for ( i = 0; i < x.length; i++ ) { + if ( !isndarrayLike( x[ i ] ) ) { + throw new TypeError( 'invalid argument. First argument must be an ndarray or an array of ndarrays.' ); + } + } + opts.data = [ x, y ]; + } + // Case: new AreaChart( collection, collection ) + else if ( isCollection( y ) ) { + opts.data = [ x, y ]; + } + // Case: new AreaChart( collection, options ) + else if ( isObject( y ) ) { + opts = objectAssignIn( opts, y ); + opts.data = [ x ]; // always override `opts.data` if it exists + } + // Case: new AreaChart( collection, ??? ) + else { + throw new TypeError( format( 'invalid argument. First argument must be either an array-like object, an ndarray, or an options argument. Value: `%s`.', y ) ); + } + } + // Case: new AreaChart( ???, ??? ) + else { + throw new TypeError( format( 'invalid argument. First argument must be either an array-like object or an ndarray. Value: `%s`.', x ) ); + } + } + // Case: new AreaChart( x, y, options ) + else if ( nargs > 2 ) { + if ( !isObject( options ) ) { + throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) ); + } + opts = objectAssignIn( opts, options ); + + // Case: new AreaChart( ndarray, ???, options ) + if ( isndarrayLike( x ) ) { + // Case: new AreaChart( ndarray, ndarray, options ) + if ( isndarrayLike( y ) ) { + opts.data = [ x, y ]; // always override `opts.data` if it exists + } + // Case: new AreaChart( ndarray, collection, options ) + else if ( isCollection( y ) ) { + for ( i = 0; i < y.length; i++ ) { + if ( !isndarrayLike( y[ i ] ) ) { + throw new TypeError( 'invalid argument. Second argument must be an ndarray or an array of ndarrays.' ); + } + } + opts.data = [ x, y ]; // always override `opts.data` if it exists + } + // Case: new AreaChart( ndarray, ???, options ) + else { + throw new TypeError( format( 'invalid argument. Second argument must be an ndarray or an array of ndarrays.' ) ); + } + } + // Case: new AreaChart( collection, ???, options ) + else if ( isCollection( x ) ) { + // Case: new AreaChart( collection, ndarray, options ) + if ( isndarrayLike( y ) ) { + for ( i = 0; i < x.length; i++ ) { + if ( !isndarrayLike( x[ i ] ) ) { + throw new TypeError( 'invalid argument. First argument must be an ndarray or an array of ndarrays.' ); + } + } + opts.data = [ x, y ]; // always override `opts.data` if it exists + } + // Case: new AreaChart( collection, collection, options ) + else if ( isCollection( y ) ) { + opts.data = [ x, y ]; // always override `opts.data` if it exists + } + // Case: new AreaChart( collection, ???, options ) + else { + throw new TypeError( format( 'invalid argument. Second argument must be an array-like object or an ndarray.' ) ); + } + } + // Case: new AreaChart( ???, ???, options ) + else { + throw new TypeError( format( 'invalid argument. First argument must be an array-like object or an ndarray. Value: `%s`.', x ) ); + } + } + QuantitativeChart.call( this, opts ); + + // Initialize internal encoding scales... + scales = this.config.scales; + for ( i = 0; i < INTERNAL_ORDINAL_SCALES.length; i++ ) { + s = new OrdinalScale({ + 'name': scale2default( INTERNAL_ORDINAL_SCALES[ i ] ) + }); + scales.push( s ); + } + this.config.scales = scales; + + // Initialize a legend instance: + this._chartLegend = new Legend({ + 'fill': 'colorScale', + 'opacity': 'fillOpacityScale', + + // FIXME: rather than hardcode defaults, create a default area chart theme which inherits from the quantitative chart theme + 'orient': 'bottom', + 'direction': 'horizontal', + 'offset': 10, // px + 'padding': 5, // px + 'columnPadding': 20 // px + }); + + // Validate provided options by attempting to assign option values to corresponding fields... + for ( i = 0; i < properties.length; i++ ) { + k = properties[ i ]; + if ( !hasProp( opts, k ) ) { + continue; + } + v = opts[ k ]; + try { + this[ k ] = v; + } catch ( err ) { + debug( 'Encountered an error. Error: %s', err.message ); + + // FIXME: retain thrown error type + throw new Error( transformErrorMessage( err.message ) ); + } + } + return this; +} + +/* +* Inherit from the `QuantitativeChart` prototype. +*/ +inherit( AreaChart, QuantitativeChart ); + +/** +* Constructor name. +* +* @private +* @name name +* @memberof AreaChart +* @readonly +* @type {string} +*/ +setNonEnumerableReadOnly( AreaChart, 'name', 'AreaChart' ); + +/** +* Generates a list of mark objects. +* +* @private +* @name _marks +* @memberof AreaChart.prototype +* @type {Array} +*/ +setNonEnumerableReadOnlyAccessor( AreaChart.prototype, '_marks', function getMarks() { + var scaleNames; + var dataNames; + var scales; + var marks; + var data; + var M; + var N; + var i; + + // Resolve visualization datasets: + data = this.config.data; + N = data.length; + + // If no data, no marks to generate... + if ( N === 0 ) { + return []; + } + // Resolve the list of dataset names: + dataNames = pluck( data, 'name' ); + + // Resolve the visualization scales: + scales = this.config.scales; + scaleNames = pluck( scales, 'name' ); + + // Resolve existing visualization marks: + marks = this.config.marks; + M = marks.length; + + // If we have fewer datasets than marks, prune the marks array... + if ( M > N ) { + // Note that, by pruning the marks array, we effectively invalidate the removed mark encoding instances, as any changes to them will no longer propagate back to the chart; the pruned mark encodings can, however, be explicitly rebound... + marks = slice( marks, 0, N ); + M = N; + } + // Update internal encoding scales: + this._updateScales( dataNames, scales ); + + // Update existing marks (note: reusing existing marks is important in order to avoid triggering an infinite loop of "change" events)... + for ( i = 0; i < M; i++ ) { + updateAreaMark( marks[ i ], dataNames[ i ], scaleNames ); + } + // Create new marks... + for ( i = M; i < N; i++ ) { + marks.push( areaMark( dataNames[ i ], scaleNames ) ); + } + return marks; +}); + +/** +* Updates internal encoding scales. +* +* @private +* @name _updateScales +* @memberof AreaChart.prototype +* @type {Function} +* @param {Array} names - data set names +* @param {Array} scales - list of scales +*/ +setNonEnumerableReadOnly( AreaChart.prototype, '_updateScales', function updateScales( names, scales ) { + var s; + + s = getScale( scales, 'color' ); + s.domain = names; + s.range = this._colors; + + s = getScale( scales, 'opacity' ); + s.domain = names; + s.range = this._fillOpacity; +}); + +/** +* Area colors. +* +* @name colors +* @memberof AreaChart.prototype +* @type {Array} +* +* @example +* var chart = new AreaChart({ +* 'colors': [ '#000', 'steelblue' ] +* }); +* // returns +* +* var v = chart.colors; +* // returns [ '#000', 'steelblue' ] +*/ +setReadWriteAccessor( AreaChart.prototype, 'colors', getColors, setColors ); + +/** +* Area color scale. +* +* @name colorScale +* @memberof AreaChart.prototype +* @type {Scale} +* +* @example +* var chart = new AreaChart(); +* // returns +* +* var v = chart.colorScale; +* // returns +*/ +setReadOnlyAccessor( AreaChart.prototype, 'colorScale', function getColorScale() { + return getScale( this.config.scales, 'color' ); +}); + +/** +* Area fill opacity. +* +* @name fillOpacity +* @memberof AreaChart.prototype +* @type {Array} +* @default [ 0.5 ] +* +* @example +* var chart = new AreaChart({ +* 'fillOpacity': [ 0.5, 0.3 ] +* }); +* // returns +* +* var v = chart.fillOpacity; +* // returns [ 0.5, 0.3 ] +*/ +setReadWriteAccessor( AreaChart.prototype, 'fillOpacity', getFillOpacity, setFillOpacity ); + +/** +* Area fill opacity scale. +* +* @name fillOpacityScale +* @memberof AreaChart.prototype +* @type {Scale} +* +* @example +* var chart = new AreaChart(); +* // returns +* +* var v = chart.fillOpacityScale; +* // returns +*/ +setReadOnlyAccessor( AreaChart.prototype, 'fillOpacityScale', function getFillOpacityScale() { + return getScale( this.config.scales, 'opacity' ); +}); + +/** +* Boolean indicating whether to display a chart legend. +* +* @name legend +* @memberof AreaChart.prototype +* @type {boolean} +* @default false +* +* @example +* var chart = new AreaChart({ +* 'legend': true +* }); +* // returns +* +* var v = chart.legend; +* // returns true +*/ +setReadWriteAccessor( AreaChart.prototype, 'legend', getLegend, setLegend ); + +/** +* Renders a chart. +* +* @name render +* @memberof AreaChart.prototype +* @type {Function} +* @param {Function} clbk - callback to invoke after rendering the chart +* @throws {TypeError} must provide a function +* +* @example +* // TODO: add example +*/ +setNonEnumerableReadOnly( AreaChart.prototype, 'render', function render( clbk ) { + if ( !isFunction( clbk ) ) { + throw new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', clbk ) ); + } + spec2svg( this.toJSON(), this.config.config, clbk ); +}); + +/** +* Serializes a chart to a JSON object. +* +* ## Notes +* +* - This method is implicitly invoked by `JSON.stringify`. +* +* @name toJSON +* @memberof AreaChart.prototype +* @type {Function} +* @returns {Object} JSON object +* +* @example +* var chart = new AreaChart(); +* +* var v = chart.toJSON(); +* // returns {...} +*/ +setNonEnumerableReadOnly( AreaChart.prototype, 'toJSON', function toJSON() { + this.config.marks = this._marks; + return QuantitativeChart.prototype.toJSON.call( this ); +}); + + +// EXPORTS // + +module.exports = AreaChart; diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/properties.json b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/properties.json new file mode 100644 index 000000000000..c5eeefd52565 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/lib/properties.json @@ -0,0 +1,5 @@ +[ + "colors", + "fillOpacity", + "legend" +] diff --git a/lib/node_modules/@stdlib/plot/charts/area/ctor/package.json b/lib/node_modules/@stdlib/plot/charts/area/ctor/package.json new file mode 100644 index 000000000000..894e5b884f29 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/charts/area/ctor/package.json @@ -0,0 +1,67 @@ +{ + "name": "@stdlib/plot/charts/area", + "version": "0.0.0", + "description": "Area chart constructor.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "plot", + "figure", + "fig", + "graph", + "chart", + "diagram", + "data", + "visualize", + "visualization", + "dataviz", + "explore", + "exploratory", + "analysis", + "quantitative", + "area" + ] +}