Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

chartjs-colorful

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chartjs-colorful - npm Package Compare versions

Comparing version 1.0.0-RC.1 to 1.0.0

/*!
* chartjs-colorful v1.0.0-RC.1
* chartjs-colorful v1.0.0
* https://uk-taniyama.github.io/chartjs-colorful/

@@ -4,0 +4,0 @@ * (c) 2022 chartjs-colorful Contributors

@@ -5,3 +5,3 @@ {

"homepage": "https://uk-taniyama.github.io/chartjs-colorful/",
"version": "1.0.0-RC.1",
"version": "1.0.0",
"license": "MIT",

@@ -76,5 +76,7 @@ "jsdelivr": "dist/index.min.js",

"e2e": "jest -c jest.e2e.config.js",
"pree2e:video": "rimraf e2e",
"e2e:video": "E2E_VIDEO=true jest -c jest.e2e.config.js",
"coverage": "jest --coverage",
"start": "npm-run-all watch example",
"server": "mdserver .",
"server": "markserv dev.md",
"example": "cd example; yarn dev",

@@ -93,4 +95,4 @@ "clean-chartjs": "rimraf modules/chart.js",

"devDependencies": {
"@babel/core": "^7.19.0",
"@babel/preset-env": "^7.19.0",
"@babel/core": "^7.19.1",
"@babel/preset-env": "^7.19.1",
"@rollup/plugin-json": "^4.1.0",

@@ -100,3 +102,3 @@ "@rollup/plugin-node-resolve": "^14.1.0",

"@types/d3-scale-chromatic": "^3.0.0",
"@types/jest": "^29.0.1",
"@types/jest": "^29.0.3",
"@types/jest-image-snapshot": "^5.1.0",

@@ -118,3 +120,2 @@ "@types/lodash-es": "^4.17.6",

"expect-playwright": "^0.8.0",
"highlight.js": "^11.6.0",
"http-browser": "^0.1.31",

@@ -124,7 +125,7 @@ "jest": "^29.0.3",

"jest-extended": "^3.1.0",
"jest-html-reporters": "^3.0.11",
"jest-image-snapshot": "^5.2.0",
"jest-playwright-preset": "^2.0.0",
"jsdom": "^20.0.0",
"marked": "^4.1.0",
"mdserver": "^2.2.6",
"markserv": "^1.17.4",
"moment": "^2.29.4",

@@ -140,8 +141,8 @@ "moment-timezone": "^0.5.37",

"rollup-plugin-node-resolve": "^5.2.0",
"ts-jest": "^29.0.0",
"tslib": "^2.4.0",
"typedoc": "0.23.14",
"typedoc-plugin-markdown": "^3.13.6",
"typescript": "^4.8.3"
"typescript": "^4.8.3",
"yargs": "^17.5.1"
}
}

@@ -5,2 +5,6 @@ # chartjs-colorful

## Homepage
- https://uk-taniyama.github.io/chartjs-colorful/
## Example

@@ -12,3 +16,3 @@

* [Homepage](https://uk-taniyama.github.io/chartjs-colorful/)
- [Sample UMD](samples/sample1.html)

@@ -22,3 +26,3 @@ ## Install

- chartjs-plugin-colorschemes(included)
- chartjs-plugin-colorschemes
- d3-scale-chromatic

@@ -47,2 +51,8 @@

// add hue-rotate color.
// select key color and get 12 colors.
// NOTE createColors's 3rd argument is 'false' because rotateLinear(0) and rotateLinear(1) are the same color.
const rotateLinear = createRotateLinear('#ff7f7f');
schemes.add('rotate', createColors(rotateLinear, 12, false));
// get schemes and register.

@@ -66,2 +76,4 @@ const { namedColors: d3Schemes } = getD3Schemes();

colors: 'custom',
// or set scheme(=string[])
// colors: ['#F00', '#FF0', '#0F0', '#0FF', '#00F', '#F0F'],
// set converter. (alpha:0.5)

@@ -131,4 +143,31 @@ converter: defaultConverter,

### Use other color schemes packages.
### One by one
```js
import { schemes } from 'chartjs-colorful/registries';
import { schemeTableau10 } from 'd3-scale-chromatic';
// Add a scheme(=string[]) with a suitable name.
schemes.add('Tableau10', schemeTableau10);
```
#### All at once
```js
import { schemes } from 'chartjs-colorful/registries';
import { getBrewerSchemes, getD3Schemes, getOfficeSchemes, getTableauSchemes } from 'chartjs-colorful/schemes';
// from chartjs-plugin-colorschemes
schemes.addAll(getBrewerSchemes());
schemes.addAll(getOfficeSchemes());
schemes.addAll(getTableauSchemes());
// from d3-scale-chromatic
schemes.addAll(getD3Schemes().namedColors);
```
## License
[MIT license](https://opensource.org/licenses/MIT).

Sorry, the diff of this file is too big to display