fix loading and usage of preferences (avoid showing white chart)

Hi Hans,

Could you please pull my change into your master? If you continue to work on this feature, it will be easier for me to merge later.

Regards, Jörg