How to show all coordinates point in a component when coordinate exceeds the width of the component?

I made a coordinate system in a component, and now I want to show all coorsinates in the component. But the coordinates exceed the width of the component.
Should I change my component to show coordinates like using a scrollbar or other ways to show them?


I would appreciate it if anyone can give me some advice to show them appropriately.
Thanks in advance.:grinning: