Code Monkey home page Code Monkey logo

Comments (5)

syxolk avatar syxolk commented on May 16, 2024 2

Works great for my LineChart component, tested with the same CSP header in Chrome 55 and Firefox 50.

Thanks for fixing that so fast.

from vue-chartjs.

apertureless avatar apertureless commented on May 16, 2024 1

Should be fixed now in v2.3.1

Would be great if you could test it.

from vue-chartjs.

apertureless avatar apertureless commented on May 16, 2024

Hi @syxolk ,

well this is not really a bug in vue-chartjs.

With vue 2 there was a split into a runtime-only and standalone build. The standalone build got the template compiler included, which is needed for the template function / option.

If you're using *.vue files you can also use the runetime-only build because all template options get compiled into render functions. However I am utilizing the extend functions of vue and the base charts are *.js files.

That is why vue-chartjs is using the standalone build of vue. (alias for vue.common.js is set in webpack.conf)

Generally there is no issue with that, however if you are in a CSP environment like chrome apps the standalone build will not work.

https://vuejs.org/v2/guide/installation.html#CSP-environments

The only way to get around, would be to use render functions in the base charts instead template.
I will see if I can rewrite it on the weekend.

from vue-chartjs.

syxolk avatar syxolk commented on May 16, 2024

Thanks for your quick answer.

I'm using the runtime-only build of vue and precompile my *.vue files with webpack/vue-loader. Therefore I added a restrictive CSP header that disallows eval. It's a pity that vue-chartjs relies on the standalone build of vue.

Would be really nice if you can make it work with the runtime-only build as well.

However, I don't want to spoil your Christmas Eve 🎄 Enjoy your holidays 😄

from vue-chartjs.

apertureless avatar apertureless commented on May 16, 2024

Hey,

well its not a big deal I pushed the rewrite to https://github.com/apertureless/vue-chartjs/tree/feature/runtimebuild

Need only to rewrite the tests a bit and replace the template option with the render function. And do some testing in external projects, go be sure that I didn't break anything.

from vue-chartjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.