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.

Show all steps in axis y

See original GitHub issue

I’m trying to show all step in axis Y even if it enver reach them like in the sample, and somewhy it doesn’t work. How do I do that?

Axis axisY = Axis.generateAxisFromRange(50,100,5).setAutoGenerated(false).setHasLines(true).setTextColor(Color.WHITE);

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
lechocommented, Jan 16, 2015

Hi, by default chart will try to automatically adjust X and Y ranges to current chart’s data. If you want to change that, for example show more on Y axis like in LineChart sample you need to modify chart’s viewport. Look at resetViewport() method in samples.

//set chart data to initialize viewport, otherwise it will be[0,0;0,0]
//get initialized viewport and change if ranges according to your needs.
final Viewport v = new Viewport(chart.getMaximumViewport());
v.bottom = 0;
v.top = 100;
chart.setMaximumViewport(v);
chart.setCurrentViewport(v);

//Optional step: disable viewport recalculations, thanks to this animations will not change viewport automatically.
//chart.setViewportCalculationEnabled(false);
0reactions
windherdcommented, Jun 21, 2016

Hi,

I have the same problem too. @lecho i would be appreciate that if you can fix it .thanks!

screenshot_1_1466494765

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change the display of chart axes - Microsoft Support
Click anywhere in the chart for which you want to display or hide axes. · On the Design tab, click the down arrow...
Read more >
Our 611 Skincare Routine - AXIS-Y
Relax and let's go over a basic 3 step skincare routine to achieve healthy and glowing skin. Table showing the which products can...
Read more >
Learn Graphing, Coordinate Plane, Points, Lines, X-Axis, Y ...
Learn Graphing, Coordinate Plane, Points, Lines, X- Axis, Y -Axis & Ordered Pairs - [5-7-1] · Key moments. View all · Key moments...
Read more >
Adjust Y axis steps - grafana - Stack Overflow
My bad, I overlooked you are using the Time Series panel while I was checking on my Graph (old) panel. It seems there...
Read more >
Linear Axis - Chart.js
# Common options to all axes ; backgroundColor, Color ; border, object ; display, boolean | string, true ; grid, object ...
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