Add an option for the choice of rendering the diagramm image via php or javascript