Closed madeleineostoja closed 7 years ago
The best solution that comes to my mind is to remove Chart.js from bower dependencies. Remove chart-js-import.html
and make it clear in the README.md
that Chart.js needs to be installed and loaded manually. Probably the safest and most flexible way. What do you think @robdodson ?
@pkaske Hm... yeah I guess we can go with that approach. The Polymer team is working on npm support, I'll go bug them some more
In the meantime worth freezing the Chart.js bower dep at 2.1.x
I've frozen the dependency at version 2.1.6. That's the last one with included build files. Only a tmp fix but at least people can in the meantime expect that chart-elements works as expected.
👍
Hello, is there a stacked option in this wrapper for the bar-chart please? if yes, is there a way for you to give me an example it wound be very appreciated! Sorry if this isn't the place to ask such questions :p
@mahasaez I've never used it but Chart.js has a stacked
option. You can set options for your charts with the options
property of the element.
https://robdodson.github.io/chart-elements/components/chart-elements/#chart-bar:property-options
If you have more questions on how to configure your chart, your best bet is http://www.chartjs.org/docs/#bar-chart-chart-options
If you have more questions on chart-elements itself, please open a new issue.
I don't know how, but version 2.3.0 seems to come with dist folder again
$ ls app/bower_components/chart.js/dist/
ls: cannot access app/bower_components/chart.js/dist/: No such file or directory
$ bower install --save chart.js
bower chart.js#* not-cached https://github.com/chartjs/Chart.js.git#*
bower chart.js#* resolve https://github.com/chartjs/Chart.js.git#*
bower chart.js#* checkout v2.3.0
bower chart.js#* resolved https://github.com/chartjs/Chart.js.git#2.3.0
bower chart.js#^2.3.0 install chart.js#2.3.0
$ ls app/bower_components/chart.js/dist/
Chart.bundle.js Chart.bundle.min.js Chart.js Chart.min.js
Why I don't know? I don't see a bower.json file in that repository. But there seem some automatic building. But how does it work, so I understand...
Edit: Aaah, there are specific release commits and i'ts build for it (eg. see https://github.com/chartjs/Chart.js/tree/v2.3.0)
Yeah, they re-added the dist folder. I will soon update the dependencies.
Chart.js dropped support for Bower in 2.2.0 and no longer includes compiled files, which breaks everything (and on a minor version at that).
They recommend using
bower-npm-resolver
to install via Bower, though that would mean forcing an NPM dep for users of chart-elements.Alternatively could install Chart.js with NPM and inline the script in a buildstep, using something like
gulp-inline-source
.