Here's a trunk diff for the vnStat image output package, vnstati.
graphs-vnstat.sh provides the same output as http://humdi.net/vnstat/cgidemo/ for the webif. The vnStat subcategory is shown on 7.09 but not on the trunk so you will have to go to http://<OpenWrt>/cgi-bin/webif/graphs-vnstat.sh directly to see the image output.
Index: files/graphs-vnstat.sh
===================================================================
--- files/graphs-vnstat.sh (revision 0)
+++ files/graphs-vnstat.sh (revision 0)
@@ -0,0 +1,109 @@
+#!/usr/bin/webif-page
+<?
+
+. /usr/lib/webif/webif.sh
+. /www/cgi-bin/webif/graphs-subcategories.sh
+
+header_inject_head=$(cat <<EOF
+ <script type="text/javascript" src="/webif.js"></script>
+ <style type="text/css">
+ <!--
+ .monthly {
+ padding-top: 2px;
+ }
+ -->
+ </style>
+EOF
+)
+
+header "Graphs" "vnStat"
+has_pkgs vnstati
+
+LIB_D=${IPKG_INSTROOT}/var/lib/vnstat
+
+interfaces=$(ls $LIB_D)
+if [ -z "$interfaces" ]; then
+ echo "<pre>No database found, nothing to do. Use --help for help.</pre>"
+ echo "<br />"
+ echo "<pre>A new database can be created with the following command:</pre>"
+ echo "<pre> vnstat -u -i eth0</pre>"
+ echo "<br />"
+ echo "<pre>Replace 'eth0' with the interface that should be monitored. A list</pre>"
+ echo "<pre>of available interfaces can be seen with the 'ifconfig' command.</pre>"
+else
+ interfaces_count=$(ls $LIB_D | wc -l)
+ if [ $interfaces_count -eq 1 ]; then
+ multiple=false;
+ else
+ multiple=true;
+ fi
+
+ BIN=${IPKG_INSTROOT}/usr/bin/vnstati
+ VAR_D=${IPKG_INSTROOT}/var/vnstat
+ WWW_D=${IPKG_INSTROOT}/www/vnstat
+
+ [ -d $VAR_D ] || mkdir -p $VAR_D
+ [ -d $WWW_D ] || mkdir -p $WWW_D
+
+ for interface in $interfaces; do
+ for output in hs s h d t m; do
+ [ -L $WWW_D/vnstat_${interface}_${output}.png ] || ln -sf $VAR_D/vnstat_${interface}_${output}.png $WWW_D/vnstat_${interface}_${output}.png
+ $BIN -${output} -i $interface -c 15 -o $VAR_D/vnstat_${interface}_${output}.png
+ done
+cat <<EOF
+ <h2>Traffic of Interface $interface</h2>
+EOF
+ if $multiple; then
+cat <<EOF
+ <a href="#" title="Click to see ${interface}'s Details" onclick="set_visible('${interface}_summary', false); set_visible('${interface}_details', true);">
+ <img id="${interface}_summary" src="/vnstat/vnstat_${interface}_hs.png" alt="${interface} Summary" />
+ </a>
+ <a href="#" title="Click to see ${interface}'s Summary" onclick="set_visible('${interface}_details', false); set_visible('${interface}_summary', true);">
+ <table id="${interface}_details" summary="${interface} Details" style="display: none;">
+EOF
+ else
+cat <<EOF
+ <table id="${interface}_details" summary="${interface} Details">
+EOF
+ fi
+cat <<EOF
+ <tbody>
+ <tr>
+ <td>
+ <img src="/vnstat/vnstat_${interface}_s.png" alt="${interface} Summary" />
+ </td>
+ <td>
+ <img src="/vnstat/vnstat_${interface}_h.png" alt="${interface} Hourly" />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <img src="/vnstat/vnstat_${interface}_d.png" alt="${interface} Daily" />
+ </td>
+ <td valign="top">
+ <img src="/vnstat/vnstat_${interface}_t.png" alt="${interface} Top 10" />
+ <br />
+ <img class="monthly" src="/vnstat/vnstat_${interface}_m.png" alt="${interface} Monthly" />
+ </td>
+ </tr>
+ </tbody>
+EOF
+ if $multiple; then
+cat <<EOF
+ </table>
+ </a>
+
+EOF
+ else
+cat <<EOF
+ </table>
+
+EOF
+ fi
+ done
+fi
+
+footer ?>
+<!--
+##WEBIF:name:Graphs:0:vnStat
+-->
Property changes on: files/graphs-vnstat.sh
___________________________________________________________________
Name: svn:executable
+ *
Index: Makefile
===================================================================
--- Makefile (revision 0)
+++ Makefile (revision 0)
@@ -0,0 +1,66 @@
+#
+# Copyright (C) 2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=vnstati
+PKG_VERSION:=beta3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://humdi.net/vnstat
+PKG_MD5SUM:=5652b955e16716cec48da464b083c76f
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/vnstati
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+vnstat +libgd +webif
+ TITLE:=vnStat image output - png image output support for vnStat
+ URL:=http://humdi.net/vnstat/
+endef
+
+define Package/vnstati/description
+ The purpose of vnstati is to provide image output support for statistics
+ collected using vnstat(1). However, the image file format is limited to
+ png. All basic outputs of vnStat are supported excluding live traffic
+ features. The image can be outputted either to a file or to standard
+ output.
+endef
+
+define Package/vnstati/conffiles
+/etc/vnstat.conf
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS+="-I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib -Wl,-rpath-link,$(STAGING_DIR)/usr/lib"
+endef
+
+define Package/vnstati/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/vnstati $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/etc
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/cfg/vnstat.conf $(1)/etc/
+ $(INSTALL_DIR) $(1)/www/cgi-bin/webif
+ $(INSTALL_BIN) ./files/graphs-vnstat.sh $(1)/www/cgi-bin/webif/
+endef
+
+define Package/vnstati/postrm
+#!/bin/sh
+VAR_D=$${IPKG_INSTROOT}/var/vnstat
+WWW_D=$${IPKG_INSTROOT}/www/vnstat
+
+rm -rf $$VAR_D
+rm -f $$WWW_D/vnstat_*.png
+endef
+
+$(eval $(call BuildPackage,vnstati))