简体   繁体   中英

change x-axis position in BarChart

How to change x-axis position from the bottom to 0th Y-axis value in BarChart ?

I have bar chart with some negative values right now, x axis is starting with lowest negative value of y axis. I want to change that position to Zero value of y-axis.

currently I have this

  • 10
  • 5
  • 0
  • -5
  • 10 ----Domain axis Here

I want

  • 10
  • 5
  • 0---- Domain axis here
  • -5
  • -10

    Please Help!

If I understand you correctly, try something like this:

NumberAxis yAxis = (NumberAxis) xyplot.getRangeAxis();
yAxis.setLowerBound(0);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM