Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

y-axis labels #62

Open
eckara opened this issue Oct 12, 2015 · 2 comments
Open

y-axis labels #62

eckara opened this issue Oct 12, 2015 · 2 comments

Comments

@eckara
Copy link

eckara commented Oct 12, 2015

Thanks for the great wrapper!
Is there a way to add y-axis labels to lineCharts?
Could not find any documentation.

@eckara
Copy link
Author

eckara commented Oct 24, 2015

Here is a temporary hack for the above:

var plot=d3.select('#linechart_container'); 
plot.append("text")
      .attr("x", x2_loc)
          .attr("y", y2_loc)
      .attr("dy", ".35em")
      .attr("dx", "-1em")
      .style("fill", "black")
      .style("text-anchor", "center")
      .attr("transform", function(d) {
                return "rotate(-90)" 
                })
      .text('YLABEL');

plot.append("text")
  .attr("x", x1_loc)
  .attr("y", y1_loc)
  .attr("dy", ".35em")
  .attr("dx", "-1em")
  .style("fill", "black")
  .text('XLABEL');

@harrelm
Copy link

harrelm commented Dec 12, 2015

What is x1_loc etc.?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants