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

Line chart y-axis is dynamic instead of starting at Zero #407

Open
micahblu opened this issue Mar 22, 2023 · 1 comment
Open

Line chart y-axis is dynamic instead of starting at Zero #407

micahblu opened this issue Mar 22, 2023 · 1 comment

Comments

@micahblu
Copy link

Expected Behaviour

The line chart's y-axis should either start at zero or allow me to set it to zero. (I searched the docs and could not find a way of setting min/max y-axis values)

Actual Behaviour

The line chart's y-axis starts at the minimum value from the values charted

Steps to Reproduce:

const data = {
labels: ['Feb 12', '13', '14', '15', '16', '17', '18', '19'],
datasets: [
{
values: [250, 500, 100, 105, 180, 320, 270, 140]
}
],
min: 0
}

new Chart("#chart", {
  data: data,
  type: 'line', // or 'bar', 'line', 'scatter', 'pie', 'percentage'
  height: 350,
  colors: ['#7cd6fd'],
})

Screen Shot 2023-03-22 at 11 41 09 AM

Frappé Charts version:
1.6.2

Codepen / Codesandbox:
https://codesandbox.io/s/dry-water-hz7jcn?file=/src/index.js

@Sorizz
Copy link
Contributor

Sorizz commented Apr 20, 2023

Do you want the chart to render like this?

Chart Preview
Chart Code

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