How to reduce the height of custom ruler

Hi Team,

I have a requirement where I need to reduce the height of custom ruler and make it fit within the graph area.
Is there any option to achieve the same?

When I tried to reduce the x and y values the custom ruler does get shorten but its draggable all over the graph which I am unable to avoid.

Need your suggestions on this

Hey @Sharath How did you create the ruler?

Hi @AIMPED I am using a custom function called custom ruler which has the following code:
drawLineShape(initialX, initialX, 5000, -5000, “x”, “paper”); //function call

//function body
const drawLineShape = (
x0: number,
x1: number,
y0: number,
y1: number,
xref: any,
yref: any
): LineShape => {
return {
type: “line”,
x0,
x1,
y0,
y1,
xref,
yref,
line: {
color: “#333”,
width: 1
}
};
};

You can change the reference for your coordinates to something different than paper.

Maybe helpful: