Skip to content

Commit 376c894

Browse files
committed
Update defaults
1 parent c04b9cf commit 376c894

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

lib/node_modules/@stdlib/plot/hist/lib/defaults.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var isNodeREPL = require( '@stdlib/assert/is-node-repl' );
24+
var isDefined = require( './accessors/is_defined.js' );
2425

2526

2627
// MAIN //
@@ -44,15 +45,39 @@ function defaults() {
4445
// Boolean indicating whether to generate an updated view on a render event:
4546
o.autoView = false;
4647

48+
// Bar face colors:
49+
o.barColors = 'category10';
50+
51+
// Bar face opacity:
52+
o.barOpacity = 0.9; // [0,1]
53+
54+
// Binning algorithm:
55+
o.binMethod = null;
56+
57+
// Bin width:
58+
o.binWidth = null;
59+
4760
// Histogram description:
4861
o.description = '';
4962

63+
// Maximum bin edge:
64+
o.edgeMax = null;
65+
66+
// Minimum bin edge:
67+
o.edgeMin = null;
68+
69+
// Bin edges:
70+
o.edges = [];
71+
5072
// Rendering engine:
5173
o.engine = 'svg';
5274

5375
// Histogram height:
5476
o.height = 400; // px
5577

78+
// Accessor indicating whether a datum is defined:
79+
o.isDefined = isDefined;
80+
5681
// Data labels:
5782
o.labels = [];
5883

@@ -68,6 +93,12 @@ function defaults() {
6893
// Data line width(s):
6994
o.lineWidth = 2; // px
7095

96+
// Histogram normalization:
97+
o.normalization = 'count';
98+
99+
// Histogram orientation:
100+
o.orientation = 'vertical';
101+
71102
// FIXME: padding props depend on orientation (may require using `null` to flag)
72103

73104
// Bottom padding:
@@ -97,6 +128,9 @@ function defaults() {
97128
// Histogram width:
98129
o.width = 400; // px
99130

131+
// Values to bin:
132+
o.x = [];
133+
100134
// x-axis orientation:
101135
o.xAxisOrient = 'bottom';
102136

lib/node_modules/@stdlib/plot/hist/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ var merge = mergeFcn({
8080
* @param {(string|StringArray)} [options.barColors='category10'] - bar face color(s)
8181
* @param {(number|NumberArray)} [options.barOpacity=0.9] - bar face opacity
8282
* @param {(null|string|Array)} [options.binMethod=null] - binning algorithm
83-
* @param {(number|NumberArray)} [options.binWidth] - bin width
83+
* @param {(null|number|NumberArray)} [options.binWidth=null] - bin width
8484
* @param {string} [options.description=''] - description
8585
* @param {(null|number|Array)} [options.edgeMax=null] - maximum bin edge value
8686
* @param {(null|number|Array)} [options.edgeMin=null] - minimum bin edge value

0 commit comments

Comments
 (0)