Comments (10)
@osterland @efriandika Regarding Angular, if you are using this plugin with ng2-charts, it does not work because a color scheme is applied only when no colors are defined in a chart config but ng2-charts has default colors. In order to workaround this, I have added the override
option in 20c60e5, which enables to override the existing color settings with the specified color scheme. This change will be available in the next v0.4.0 release.
from chartjs-plugin-colorschemes.
🤔 answered my own question: If I add this at the top of my file, it works:
import * as name from "chartjs-plugin-colorschemes";
from chartjs-plugin-colorschemes.
I must be doing something wrong.. not importing something correctly etc. Are there any examples of how to use this in es6 with react?
from chartjs-plugin-colorschemes.
Good to know that you have already solved the issue. For React, just import 'chartjs-plugin-colorschemes';
is fine.
from chartjs-plugin-colorschemes.
do you know by any chance how to import colorschemes for an angular2+ project?
I got many errors every way i try
Thank you very much in advance
from chartjs-plugin-colorschemes.
import 'chartjs-plugin-colorschemes';
works in an Angular 2+ project as well.
from chartjs-plugin-colorschemes.
thank you for your answer - i tried this ofc but no luck.
Iam starting to think - is this maybe for linecharts only? ;)
from chartjs-plugin-colorschemes.
yes same here..
It does not works in angular 7.x
I use pie chart..
Any idea ?
from chartjs-plugin-colorschemes.
thanks @nagix
from chartjs-plugin-colorschemes.
Had the same issue when using with Vue.js. @blockjon 's solution works.
import * as name from "chartjs-plugin-colorschemes";
But I do not understand why the instruction import "chartjs-plugin-colorschemes"
doesn't work. It seems to be a difference in the mechanism of importing modules. I am still new to JS, I would love to hear if anyone have identified the reason.
from chartjs-plugin-colorschemes.
Related Issues (20)
- Having trouble getting this working HOT 2
- Including chartjs-plugin-colorschemes enables point labels HOT 4
- Custom color schemes HOT 1
- how add bordercolor? HOT 2
- override donsn't work as expected with type 'scatter' HOT 3
- Maintained alternative? HOT 2
- chartjs-plugin-colorschemes not working. HOT 1
- angular.js / angular-chart.js support
- Using colour scheme in HTML legend
- Error: Cannot find module 'rollup/bin/rollup' HOT 1
- Plugin doesn't work with Chart.js 3.x.x HOT 1
- Is it possible to get ECMAScript module (ESM) bundle in NPM? HOT 1
- New Release with compatibility Chart.js v3 HOT 19
- Is there any way to produce a Color Scale?
- Use color scheme outside angular? HOT 2
- Error during npm install HOT 1
- 0.4.0 Unable to Get Working HOT 9
- v4.x and Typescript compatibilities
- Error with chart js 3.9.1 HOT 1
- ChartJS Version 3: This NPM Package Appears to Work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chartjs-plugin-colorschemes.