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.

Area Chart regression, the y axis is in the middle instead of being aligned to the bottom

See original GitHub issue

Describe the bug When using area-chart with the y axis = 0 (or any other const value), the line of the y axis is in the middle instead of being aligned to the bottom

It worked well in version 12.1.0: Screen Shot 2020-01-27 at 16 33 15

Issue started with upgrading to version 13.0.1 (as well 13.0.2, but I didn’t tried 13.0.0): Screen Shot 2020-01-27 at 16 41 29

To Reproduce Steps to reproduce the behavior:

  1. Create area-chart
  2. Use the same number for the y axis for all the points

Expected behavior The Y axis should be aligned to the bottom

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:14
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Minejimacommented, Apr 2, 2020

It seems to be due to upgrading d3-scale version.

d3-scale v2.0.0 later: When the domain value becomes [0, 0], the offset of axis-tick calculated by scaleLinear.range() is halved.

Can I downgrade the d3-scale version for fix ?

Please give me a review 😄

2reactions
Minejimacommented, Apr 1, 2020

Reverting commit d196e94deb54d910ee59567c5b96bab7fc607a36 , it works fine. Issue with the version of d3js?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Area chart options | Looker
This page describes the options for editing area charts in the visualization menu. Click the gear in the upper right corner of the...
Read more >
y-axis values on graph don't align with values in Plot Area
I'm making a graph in Word (where I edit the data in Excel), but the values on the y-axis don't correspond with the...
Read more >
Interpreting Residual Plots to Improve Your Regression
The most useful way to plot the residuals, though, is with your predicted values on the x-axis and your residuals on the y-axis....
Read more >
How to align Chart.JS line chart labels to the center
offsetGridLines (boolean) If true, labels are shifted to be between grid lines. type: 'line', data: data, options: { ... scales: { xAxes: [{...
Read more >
Customizing chart properties
Select the chart. Under Chart Annotations, set the Trendlines or Regression Line property. For more information, see Display Trendlines in charts.
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