How do I know which OID is for the graph?
You mean the interface oid? There are few ways, none from webui.
snmpwalk your device from shell
snmpwalk -v2c -c YOURCOMMUNITY YOURDEVICE . then search in the output.
There are too many oid. Maybe i can easily get the info from the database?
Not the oid but the index.
What OID(s) do you need exactly? The interface counters one?
As show on the picture. If from a Fortigate 80C firewall wan1 interface.