Skip to content

Commit 8e2a86b

Browse files
Justin LicariJustin Licari
Justin Licari
authored and
Justin Licari
committed
feat($browser): Add y axis
Each axis chart now has the ability to add y axis titles
1 parent 7e03ff7 commit 8e2a86b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: packages/core/src/base-axis-chart.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ export class BaseAxisChart extends BaseChart {
391391
};
392392

393393
// Add y-axis title
394-
if (this.innerWrap.select(".axis-label.y").nodes().length === 0 || this.options.scales.y.title) {
394+
if (this.innerWrap.select(".axis-label.y").nodes().length === 0 && this.options.scales.y.title) {
395395
yAxisRef.append("text")
396396
.attr("class", "y axis-label")
397397
.attr("transform", `rotate(-90) translate(${yAxisTitleTranslate.x}, ${yAxisTitleTranslate.y})`)

0 commit comments

Comments
 (0)