It is not possible within the router at the moment.
When you want to write something yourself, you can use a firewall rule to count the traffic and use a program on another computer that retrieves the counters of the firewall rule and graphs it.
Unfortunately firewall counters are not readable via SNMP so you need to use API, which means writing a dedicated program using one of the available API libraries.
There is one way, but it’s quite cumbersome: Use one interface to Ipv4 traffic, and another one for IPv6. The easiest way is to give only IPv4 address to one, and only IPv6 address to another.
You will use two router ports for each link and two switches ports for each link. Now You have two independent interfaces, and can easily use SNMP to monitor them.