diff --git a/.eslintrc.json b/.eslintrc.json index f5c9352e91..912bb7114f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -104,7 +104,6 @@ "ListCursor": false, "MessageListData": false, "MessageListView": false, - "Plotly": false, "UserSearch": false, "activity": false, "admin": false, diff --git a/static/js/stats/stats.js b/static/js/stats/stats.js index 7d827faf3e..17dd0c42ab 100644 --- a/static/js/stats/stats.js +++ b/static/js/stats/stats.js @@ -1,3 +1,7 @@ +const Plotly = require("plotly.js/lib/core"); + +Plotly.register([require("plotly.js/lib/bar"), require("plotly.js/lib/pie")]); + const font_14pt = { family: "Source Sans Pro", size: 14, diff --git a/tools/webpack.assets.json b/tools/webpack.assets.json index 90346c8738..d199fd4aa8 100644 --- a/tools/webpack.assets.json +++ b/tools/webpack.assets.json @@ -114,8 +114,7 @@ "stats": [ "./static/js/bundles/portico.js", "./static/styles/portico/stats.scss", - "./static/js/stats/stats.js", - "plotly.js/dist/plotly-basic.min.js" + "./static/js/stats/stats.js" ], "app": ["./static/js/bundles/app.js", "katex/dist/katex.min.js"], "digest": ["./static/js/bundles/portico.js"]