HTML Canvas tag not working in widgets

  • I created a new widget that shows pie chart and stored the source in /usr/local/www/widgets/widgets. But in the browser when i add that widget, the widget is opening but pie chart is not visible or not created. When i use the same code in /usr/local/www/ or in any other file the pie chart is visible or created in the browser.

    Canvas tag is used to draw pie chart. What could be the issue?
    If you need further details please ask.