question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multibar Horizontal Chart - long labels are cut

See original GitHub issue

I wanted to do some charts and I noticed when I type long names/labels they are cut.

bez tytulu

This is my code: $scope.options = { chart: { type: 'multiBarHorizontalChart', height: 450, x: function(d) { return d.label; }, y: function(d) { return d.value; }, showControls: false, showValues: false, "showLegend": false, "showXAxis": true, "showYAxis": false, duration: 500, xAxis: { showMaxMin: false }, yAxis: { "showMaxMin": false, tickFormat: function(d) { return d3.format(',.2f')(d); } } } };

Can I make it working somehow?

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
cmorgantcommented, Jul 3, 2017

If you can compute the label width before the rendering then you could set the margin accordingly. I used that to compute min and max for X and Y axes regarding the fetched data.

1reaction
Arth95commented, Feb 4, 2016

Yes, I am dumb. Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

NVD3 Horizontal Bar Chart labels too long - Stack Overflow
Here is a jsfiddle to demonstrate the issue. Ideally I would like to set a custom width for the labels and/or make them...
Read more >
Wrapping and truncating chart labels in NVD3 horizontal bar ...
This post describes an algorithm that can be used with NVD3, and indeed any SVG-based display, to take a long string, wrap it...
Read more >
Bar charts with long category labels - Dave Paradi
The graph is a stacked bar graph. The labels on the horizontal and vertical axes are turned off so we can add our...
Read more >
Power BI Exercise 6 - How to Display Long Labels in Bar ...
Power BI Workout Wednesday Exercise no 6 where we'll look at how we can display the long labels on vertical bar chart as...
Read more >
[Solved]-How to break long axes labels in plotly chart-d3.js
DataFrame({'Concerns':['Health and economic<br> impact on the<br> country', 'A member of my<br> family might contract<br> COVID-19', 'Cost-cutting ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found