added nvd3 serializer function