How can I achieve something like this in a widget?

Hello everyone, I don’t know if this is the right category but here it goes:

So I’m trying to achieve something similar to this Cities: Skylines UI. Does anyone know how you can do this?