Skip to content

Commit

Permalink
feat($browser): Add y axis
Browse files Browse the repository at this point in the history
Each axis chart now has the ability to add y axis titles
  • Loading branch information
Justin Licari authored and Justin Licari committed Feb 16, 2019
1 parent 7e03ff7 commit 8e2a86b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/base-axis-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ export class BaseAxisChart extends BaseChart {
};

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

0 comments on commit 8e2a86b

Please sign in to comment.