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

[BUG] X-Axis not starting at 0, grid being squeezed as a result #4550

Closed
ProductOfAmerica opened this issue Jul 23, 2017 · 0 comments · Fixed by #4556
Closed

[BUG] X-Axis not starting at 0, grid being squeezed as a result #4550

ProductOfAmerica opened this issue Jul 23, 2017 · 0 comments · Fixed by #4556

Comments

@ProductOfAmerica
Copy link

ProductOfAmerica commented Jul 23, 2017

Settings:

const chartOpts = {
  maintainAspectRatio: false,
  responsive: true,
  legend: {display: true},
  scales: {
    xAxes: [{type: 'time', ticks: {beginAtZero: true}}],
    yAxes: [{ticks: {beginAtZero: true}}]
  }
}
<div className="chart-wrapper" style={{height: 500 + 'px', marginTop: 40 + 'px'}}>
  <Line data={this.state.dataset} options={chartOpts} height={500}/>
</div>

Image:
chrome_2017-07-23_04-23-19

Expected Behavior

Grids should fit into the pane, and X-Axis should start at 0.

Current Behavior

Grids do not fit perfectly in the pane, and end up being squashed at the end of the grid, which results in overlapping x-axis text. The X-Axis is also not starting at 0.

Environment

  • Chart.js version: 2.6.0 (on NPM)
  • Browser name and version: Google Chrome Version 59.0.3071.115 (Official Build) (64-bit)
@ProductOfAmerica ProductOfAmerica changed the title [BUG] [BUG] X-Axis not starting at 0, grid being squeezed as a result Jul 23, 2017
@simonbrunel simonbrunel added this to the Version 2.7 milestone Jul 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants