0

How can I remove chart y axis auto max line?

asked 2020-05-22 15:38:03 +0800

TheresaLiao gravatar image TheresaLiao
1

I use this chart : zkchartsdemo : dynamic_update But i want to remove the upper line/ max line. How can remove the background gray line?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-25 16:42:47 +0800

MDuchemin gravatar image MDuchemin
1688 1 5
ZK Team

Hi Theresa,

The chart background lines are based on the Chart's axis major ticks. The chart will generate one line for each major tick, so one way to handle this would be to defined your own ticks, skipping the max one. ex:

    chart.getYAxis().setTickPositions(Arrays.asList(0, 0.2, 0.4, 0.6, 0.8));
    /* start and end on tick disabled to allow the graph above the "last" tick*/
    chart.getYAxis().setStartOnTick(false);
    chart.getYAxis().setEndOnTick(false);

Another way to control the chart background lines is with the property the gridLine width or color property

chart.getYAxis().setGridLineWidth(0);

This will hide all the lines in the graph though. As far as I know, there

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2020-05-22 15:38:03 +0800

Seen: 5 times

Last updated: May 25

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More