added support for instantiating charts with options