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

Scrolling chart after setting lineChart.xAxis.axisMaximum = someValue #2879

Closed
CosmicYogi opened this issue Oct 14, 2017 · 2 comments
Closed

Comments

@CosmicYogi
Copy link

I want to set the maximum value for lineChart.xAxis.axisMaximum = 5
But when I do so the graph stops scrolling.

What I mean is suppose I am having dataset [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] for xAxis and [array or any 15 random numbers] for yAxis.

Then I achieve what I want i.e.., the chart should have max value of 5.
But what problem I face is that graph stops scrolling and I can't see values corresponding to values greater than 5 i.e.., 6,7,8,9... and so on.

@liuxuan30
Copy link
Member

liuxuan30 commented Oct 25, 2017

  1. you can scroll when your chart zooms in. You cannot scroll if it's scaled at 1.
  2. changing axisMaximum will limit your y max to 5. And you should not see any value beyond 5, that's what does axisMaximum mean, isn't it?

@29satnam
Copy link

29satnam commented Jul 6, 2018

Here's my two cents on the subject.
chart.setVisibleXRangeMaximum(5)
This however needs to be set after the data has been set in the chart.
This did the trick for me

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

3 participants