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.

Horizontal bar axis not showing last (max) label & tick

See original GitHub issue

https://codepen.io/vsync/pen/XvMPGq

When using horizontal bar chart, with data set such as [10,20,100], the xaxis last label (and tick) are missing. Expected to show the value 100 in the right-most side:

image

Options:

{
  chart: {
    height: 380,
    width: "100%",
    type: "bar"
  },
  plotOptions: {
      bar: {
          barHeight: '100%',
          horizontal: true   // ← "true" flip the axis, "100" is not shown anymore
      }
  },
  series: [
    {
      name: "Series 1",
      data: [10,20,100]
    }
  ]
}

When horizontal set to false and the axis flip, the max value is shown as expected & at the current position (although now on the Y axis)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

12reactions
junedchhipacommented, Aug 15, 2019

The last x-axis label is intentionally hidden to avoid overflowing in some cases. But, I think, in horizontal bar charts, this should be avoided.

I will change this behavior for horizontal bar charts.

2reactions
NickSuttoncommented, Jul 31, 2022

I see this remains unresolved

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change the scale of the horizontal (category) axis in a chart
To change the placement of the axis tick marks and labels, select any of the options that you want in the Major tick...
Read more >
Excel Chart not showing SOME X-axis labels - Super User
On the sidebar, click on "CHART OPTIONS" and select "Horizontal (Category) Axis" from the drop down menu. Four icons will appear below the...
Read more >
Min/max ticks of bar graph are not placed at the bottom/top of ...
I'm trying to set max/min for y-axis in my horizontal bar graph. ... and they are not shown at the bottom/top grid lines...
Read more >
Edit Axes - Tableau Help
Hide and reshow axes and headers ... If you have hidden an axis or a header in the view, you can show it...
Read more >
axis label options - Stata
Place x axis ticks and labels at 10, 20, 30, 40, and 50 ... Make y labels horizontal ... labels or ticks specified...
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