Skip to content

Commit 8cf4774

Browse files
committed
fix: some fixes
--- 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: 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent d8acc41 commit 8cf4774

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

lib/node_modules/@stdlib/plot/unicode/base/examples/safe-area-example.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ var opt = {
3333
'yTicsLabelSpace': 1,
3434
'zTicsLabelSpace': 3,
3535
'wTicsLabelSpace': 4,
36+
'ticsLabelsBckColor': 'Byellow',
37+
'autoInitialization': true,
3638
'xAxisPos': 40,
3739
'yAxisPos': 5,
3840
'zAxisPos': 101,
@@ -71,6 +73,12 @@ instance.setString({
7173

7274
// Now it is going to be Visible
7375
instance.ticsLabelsBckColor = 'Bblue';
76+
77+
str = instance.render();
78+
console.log( str );
79+
80+
// This line require to reinitialization ( autoInitialization is on )
81+
instance.xTicsLabelSpace = 5;
7482
str = instance.render();
7583
console.log( str );
7684

@@ -84,6 +92,7 @@ instance.setBar({
8492
'glyph': 'block',
8593
'foregroundColor': 'Fred'
8694
});
95+
8796
str = instance.render();
8897
console.log( str );
8998

lib/node_modules/@stdlib/plot/unicode/base/lib/initialize.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ function initialize() {
9595
this._width = ( this.xTicsLabelSpace * this.xAxis ) + ( this.zTicsLabelSpace * this.zAxis ) + this._plotAreaWidth; // Axis tics space + plotAreaWidth
9696

9797
// Initializing the metrices
98+
this._glyphMatrix.length = this._height;
99+
this._backgroundColorMatrix.length = this._height;
100+
this._foregroundColorMatrix.length = this._height;
98101
for ( i = 0; i < this._height; i++ ) {
99102
bckColorArr = [];
100103
frdColorArr = [];
@@ -104,9 +107,9 @@ function initialize() {
104107
frdColorArr.push( this.foregroundColor );
105108
bckColorArr.push( this.backgroundColor );
106109
}
107-
this._glyphMatrix.push( glyphArr );
108-
this._backgroundColorMatrix.push( bckColorArr );
109-
this._foregroundColorMatrix.push( frdColorArr );
110+
this._glyphMatrix[ i ] = glyphArr;
111+
this._backgroundColorMatrix[ i ] = bckColorArr;
112+
this._foregroundColorMatrix[ i ] = frdColorArr;
110113
}
111114
}
112115

lib/node_modules/@stdlib/plot/unicode/base/lib/render.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ function render() {
123123
'startPos': bl,
124124
'height': height,
125125
'width': width,
126-
'backgroundColor': this.ticsLabelsBckColor
126+
'backgroundColor': this.ticsLabelsBckColor,
127+
'overwrite': true
127128
};
128129
this.setBar( opts );
129130
this._quite = tmpQuite;
@@ -174,7 +175,8 @@ function render() {
174175
'startPos': bl,
175176
'height': height,
176177
'width': width,
177-
'backgroundColor': this.ticsLabelsBckColor
178+
'backgroundColor': this.ticsLabelsBckColor,
179+
'overwrite': true
178180
};
179181
this.setBar( opts );
180182
this._quite = tmpQuite;
@@ -226,7 +228,8 @@ function render() {
226228
'startPos': bl,
227229
'height': height,
228230
'width': width,
229-
'backgroundColor': this.ticsLabelsBckColor
231+
'backgroundColor': this.ticsLabelsBckColor,
232+
'overwrite': true
230233
};
231234
this.setBar( opts );
232235
this._quite = tmpQuite;
@@ -275,7 +278,8 @@ function render() {
275278
'startPos': bl,
276279
'height': height,
277280
'width': width,
278-
'backgroundColor': this.ticsLabelsBckColor
281+
'backgroundColor': this.ticsLabelsBckColor,
282+
'overwrite': true
279283
};
280284
this.setBar( opts );
281285
this._quite = tmpQuite;

0 commit comments

Comments
 (0)