Is it possible to acess Maximum/Minimum Value of a Power Chart's pen?

I'm trying to personalize the range auto mode, using it on manual but adding a script to determine a min and max value (based on minimum and maximum values of each pen).

I wanna to do like:
Minimum range of graph equal to 10% less than the minimum value of the pen
Maximum range of graph equal to 10% more than the maximum value of the pen