Chartjs-Display some chart.js in the popup of chrome's extensions

1👍

I think you have some syntex error , try the following code:

popup.html

<html>
<head>     
    <script type='text/javascript' src='chart.js'></script>
    <script type='text/javascript' src='popup.js'></script>
</head>
<body>
    <div class="container">
        <div>
            <canvas id="chart"></canvas>
        </div>
    </div>
    <p id='test'></p>
</body>

manifest:

{
  "manifest_version": 2,
  "minimum_chrome_version": "23",
  "name": "test!",
  "description": "test",
  "version": "1.0",

  "browser_action": {
    "default_icon": "icon.png",
    "default_popup": "popup.html",
    "default_title": "Click here!"
    },
 "permissions": [],
 "background": {    }
}

popup.js is the same…

I test it and it’s show the chart in my pop-up

Good luck.

Leave a comment