├── .github ├── dependabot.yml └── workflows │ ├── check-pr.yml │ ├── merge-dependabot.yml │ └── test.yml ├── .gitignore ├── .prettierignore ├── .release-it.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── eslint.config.js ├── examples ├── area.vl.json ├── bars.vg.json ├── diverging.vl.json ├── heatmap.vl.json ├── index.html ├── lines.vg.json ├── ramp.vl.json ├── scatter.vg.json └── stacked.vl.json ├── package-lock.json ├── package.json ├── prettier.config.js ├── rollup.config.js ├── src ├── carbongen.ts ├── config.ts ├── index.ts ├── theme-carbong10.ts ├── theme-carbong100.ts ├── theme-carbong90.ts ├── theme-carbonwhite.ts ├── theme-dark.ts ├── theme-excel.ts ├── theme-fivethirtyeight.ts ├── theme-ggplot2.ts ├── theme-googlecharts.ts ├── theme-latimes.ts ├── theme-powerbi.ts ├── theme-quartz.ts ├── theme-urbaninstitute.ts └── theme-vox.ts └── tsconfig.json /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: '/' 5 | schedule: 6 | interval: monthly 7 | day: sunday 8 | time: '23:00' 9 | timezone: PST8PDT 10 | open-pull-requests-limit: 10 11 | - package-ecosystem: github-actions 12 | directory: '/' 13 | schedule: 14 | interval: monthly 15 | day: sunday 16 | time: '23:00' 17 | timezone: PST8PDT 18 | open-pull-requests-limit: 10 19 | -------------------------------------------------------------------------------- /.github/workflows/check-pr.yml: -------------------------------------------------------------------------------- 1 | name: 'Lint PR' 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - opened 7 | - edited 8 | - synchronize 9 | 10 | permissions: 11 | pull-requests: read 12 | 13 | jobs: 14 | main: 15 | name: Validate PR title 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: amannn/action-semantic-pull-request@v6 19 | env: 20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 | -------------------------------------------------------------------------------- /.github/workflows/merge-dependabot.yml: -------------------------------------------------------------------------------- 1 | name: Auto-merge Dependabot PRs 2 | on: 3 | schedule: 4 | - cron: '0 * * * *' 5 | jobs: 6 | auto_merge: 7 | name: Auto-merge Dependabot PRs 8 | 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - uses: akheron/dependabot-cron-action@v1 13 | with: 14 | token: ${{ secrets.GITHUB_TOKEN }} 15 | auto-merge: 'minor' 16 | merge-method: 'squash' 17 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: [push] 4 | 5 | jobs: 6 | test: 7 | runs-on: ubuntu-latest 8 | 9 | name: Test 10 | 11 | steps: 12 | - uses: actions/checkout@v5 13 | 14 | - uses: actions/setup-node@v5 15 | with: 16 | cache: 'npm' 17 | 18 | - name: Install Node dependencies 19 | run: npm ci 20 | 21 | - run: npm run lint 22 | - run: npm run build 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | examples/dist 3 | coverage/ 4 | node_modules 5 | npm-debug.log* 6 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | CHANGELOG.md 2 | -------------------------------------------------------------------------------- /.release-it.json: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "commitMessage": "chore: release v${version}" 4 | }, 5 | "github": { 6 | "release": true 7 | }, 8 | "hooks": { 9 | "after:bump": "npm run build" 10 | }, 11 | "plugins": { 12 | "@release-it/conventional-changelog": { 13 | "preset": "angular", 14 | "infile": "CHANGELOG.md" 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | # [3.0.0](https://github.com/vega/vega-themes/compare/v2.15.0...v3.0.0) (2025-03-27) 4 | 5 | 6 | ### Bug Fixes 7 | 8 | * fix demo site ([b55f081](https://github.com/vega/vega-themes/commit/b55f08174f1587c6398c056a3d6e7f3272fc5927)) 9 | 10 | # [2.15.0](https://github.com/vega/vega-themes/compare/v2.14.0...v2.15.0) (2024-05-29) 11 | 12 | 13 | ### Features 14 | 15 | * add all 4 carbon themes ([#587](https://github.com/vega/vega-themes/issues/587)) ([c82b2b0](https://github.com/vega/vega-themes/commit/c82b2b0347bf04769a7709f7114aaebb634b00bc)) 16 | 17 | # [2.14.0](https://github.com/vega/vega-themes/compare/v2.13.0...v2.14.0) (2023-07-14) 18 | 19 | 20 | ### Features 21 | 22 | * add carbon themes ([#479](https://github.com/vega/vega-themes/issues/479)) ([fad4705](https://github.com/vega/vega-themes/commit/fad47050a84d6ececcbb0197955edd277409d0d4)) 23 | 24 | # [2.13.0](https://github.com/vega/vega-themes/compare/v2.12.1...v2.13.0) (2023-04-20) 25 | 26 | 27 | ### Features 28 | 29 | * remove beemo ([#444](https://github.com/vega/vega-themes/issues/444)) ([732aa95](https://github.com/vega/vega-themes/commit/732aa95ea8b70f81643be9b07ce218d25ff46bd4)) 30 | 31 | ## 2.12.1 (2023-02-13) 32 | 33 | * chorer: switch to release-it, update rollup ([46a2fed](https://github.com/vega/vega-themes/commit/46a2fed)) 34 | * chore(deps-dev): bump @rollup/plugin-json from 4.1.0 to 5.0.1 (#418) ([ed35c26](https://github.com/vega/vega-themes/commit/ed35c26)), closes [#418](https://github.com/vega/vega-themes/issues/418) 35 | * chore(deps-dev): bump @rollup/plugin-json from 5.0.1 to 5.0.2 (#420) ([8e91ba5](https://github.com/vega/vega-themes/commit/8e91ba5)), closes [#420](https://github.com/vega/vega-themes/issues/420) [#1332](https://github.com/vega/vega-themes/issues/1332) [#1332](https://github.com/vega/vega-themes/issues/1332) [#1291](https://github.com/vega/vega-themes/issues/1291) [#1270](https://github.com/vega/vega-themes/issues/1270) [#1115](https://github.com/vega/vega-themes/issues/1115) [#940](https://github.com/vega/vega-themes/issues/940) 36 | * chore(deps-dev): bump @rollup/plugin-json from 5.0.2 to 6.0.0 (#423) ([c631e43](https://github.com/vega/vega-themes/commit/c631e43)), closes [#423](https://github.com/vega/vega-themes/issues/423) 37 | * chore(deps-dev): bump @rollup/plugin-node-resolve from 14.1.0 to 15.0.1 (#415) ([d397ba6](https://github.com/vega/vega-themes/commit/d397ba6)), closes [#415](https://github.com/vega/vega-themes/issues/415) 38 | * chore(deps-dev): bump browser-sync from 2.27.10 to 2.27.11 (#424) ([3f5af78](https://github.com/vega/vega-themes/commit/3f5af78)), closes [#424](https://github.com/vega/vega-themes/issues/424) [#1598](https://github.com/vega/vega-themes/issues/1598) [#1615](https://github.com/vega/vega-themes/issues/1615) [#1618](https://github.com/vega/vega-themes/issues/1618) [#1995](https://github.com/vega/vega-themes/issues/1995) [#1972](https://github.com/vega/vega-themes/issues/1972) 39 | * chore(deps-dev): bump concurrently from 7.4.0 to 7.5.0 (#417) ([c4d13a0](https://github.com/vega/vega-themes/commit/c4d13a0)), closes [#417](https://github.com/vega/vega-themes/issues/417) [open-cli-tools/concurrently#296](https://github.com/open-cli-tools/concurrently/issues/296) [open-cli-tools/concurrently#372](https://github.com/open-cli-tools/concurrently/issues/372) [#372](https://github.com/vega/vega-themes/issues/372) [#371](https://github.com/vega/vega-themes/issues/371) [#296](https://github.com/vega/vega-themes/issues/296) [#369](https://github.com/vega/vega-themes/issues/369) [#367](https://github.com/vega/vega-themes/issues/367) 40 | * chore(deps-dev): bump concurrently from 7.5.0 to 7.6.0 (#422) ([d12b204](https://github.com/vega/vega-themes/commit/d12b204)), closes [#422](https://github.com/vega/vega-themes/issues/422) [open-cli-tools/concurrently#375](https://github.com/open-cli-tools/concurrently/issues/375) [open-cli-tools/concurrently#374](https://github.com/open-cli-tools/concurrently/issues/374) [open-cli-tools/concurrently#376](https://github.com/open-cli-tools/concurrently/issues/376) [open-cli-tools/concurrently#385](https://github.com/open-cli-tools/concurrently/issues/385) [open-cli-tools/concurrently#375](https://github.com/open-cli-tools/concurrently/issues/375) [open-cli-tools/concurrently#376](https://github.com/open-cli-tools/concurrently/issues/376) [#388](https://github.com/vega/vega-themes/issues/388) [#386](https://github.com/vega/vega-themes/issues/386) 41 | * chore(deps-dev): bump gh-pages from 4.0.0 to 5.0.0 (#429) ([3a8c2ef](https://github.com/vega/vega-themes/commit/3a8c2ef)), closes [#429](https://github.com/vega/vega-themes/issues/429) 42 | * chore(deps-dev): bump typescript from 4.8.4 to 4.9.3 (#421) ([209cd53](https://github.com/vega/vega-themes/commit/209cd53)), closes [#421](https://github.com/vega/vega-themes/issues/421) [#50977](https://github.com/vega/vega-themes/issues/50977) [#51363](https://github.com/vega/vega-themes/issues/51363) [#50872](https://github.com/vega/vega-themes/issues/50872) [#51297](https://github.com/vega/vega-themes/issues/51297) [#51345](https://github.com/vega/vega-themes/issues/51345) [#51295](https://github.com/vega/vega-themes/issues/51295) [#51324](https://github.com/vega/vega-themes/issues/51324) [#51320](https://github.com/vega/vega-themes/issues/51320) [#51263](https://github.com/vega/vega-themes/issues/51263) [#51256](https://github.com/vega/vega-themes/issues/51256) [#50681](https://github.com/vega/vega-themes/issues/50681) [#51300](https://github.com/vega/vega-themes/issues/51300) [#51311](https://github.com/vega/vega-themes/issues/51311) [#51299](https://github.com/vega/vega-themes/issues/51299) [#51294](https://github.com/vega/vega-themes/issues/51294) [#51271](https://github.com/vega/vega-themes/issues/51271) [#51248](https://github.com/vega/vega-themes/issues/51248) [#51244](https://github.com/vega/vega-themes/issues/51244) [#51262](https://github.com/vega/vega-themes/issues/51262) [#51230](https://github.com/vega/vega-themes/issues/51230) [#51240](https://github.com/vega/vega-themes/issues/51240) [#51247](https://github.com/vega/vega-themes/issues/51247) [#50560](https://github.com/vega/vega-themes/issues/50560) [#51076](https://github.com/vega/vega-themes/issues/51076) [#51231](https://github.com/vega/vega-themes/issues/51231) [#51227](https://github.com/vega/vega-themes/issues/51227) [#51219](https://github.com/vega/vega-themes/issues/51219) [#50977](https://github.com/vega/vega-themes/issues/50977) [#51363](https://github.com/vega/vega-themes/issues/51363) [#51297](https://github.com/vega/vega-themes/issues/51297) [#51345](https://github.com/vega/vega-themes/issues/51345) [#51295](https://github.com/vega/vega-themes/issues/51295) 43 | * chore(deps-dev): bump typescript from 4.9.3 to 4.9.4 (#425) ([32bc1c8](https://github.com/vega/vega-themes/commit/32bc1c8)), closes [#425](https://github.com/vega/vega-themes/issues/425) [#51704](https://github.com/vega/vega-themes/issues/51704) [#51712](https://github.com/vega/vega-themes/issues/51712) [#51626](https://github.com/vega/vega-themes/issues/51626) [#51689](https://github.com/vega/vega-themes/issues/51689) [#51627](https://github.com/vega/vega-themes/issues/51627) [#51544](https://github.com/vega/vega-themes/issues/51544) [#51704](https://github.com/vega/vega-themes/issues/51704) [#51712](https://github.com/vega/vega-themes/issues/51712) [#51626](https://github.com/vega/vega-themes/issues/51626) [#51689](https://github.com/vega/vega-themes/issues/51689) [#51627](https://github.com/vega/vega-themes/issues/51627) [#51544](https://github.com/vega/vega-themes/issues/51544) 44 | * chore(deps-dev): bump typescript from 4.9.4 to 4.9.5 (#427) ([1c74e31](https://github.com/vega/vega-themes/commit/1c74e31)), closes [#427](https://github.com/vega/vega-themes/issues/427) [#52419](https://github.com/vega/vega-themes/issues/52419) [#52426](https://github.com/vega/vega-themes/issues/52426) [#52419](https://github.com/vega/vega-themes/issues/52419) [#52426](https://github.com/vega/vega-themes/issues/52426) 45 | * chore(deps-dev): bump vega-lite from 5.5.0 to 5.6.0 (#416) ([6dad191](https://github.com/vega/vega-themes/commit/6dad191)), closes [#416](https://github.com/vega/vega-themes/issues/416) [#8434](https://github.com/vega/vega-themes/issues/8434) [#8354](https://github.com/vega/vega-themes/issues/8354) [#8475](https://github.com/vega/vega-themes/issues/8475) [#8472](https://github.com/vega/vega-themes/issues/8472) [#8455](https://github.com/vega/vega-themes/issues/8455) [#8470](https://github.com/vega/vega-themes/issues/8470) [#8451](https://github.com/vega/vega-themes/issues/8451) [#8468](https://github.com/vega/vega-themes/issues/8468) [#8456](https://github.com/vega/vega-themes/issues/8456) [#8462](https://github.com/vega/vega-themes/issues/8462) [#8463](https://github.com/vega/vega-themes/issues/8463) [#8445](https://github.com/vega/vega-themes/issues/8445) [#8464](https://github.com/vega/vega-themes/issues/8464) [#8457](https://github.com/vega/vega-themes/issues/8457) [#8458](https://github.com/vega/vega-themes/issues/8458) [#8459](https://github.com/vega/vega-themes/issues/8459) [#8460](https://github.com/vega/vega-themes/issues/8460) [#8437](https://github.com/vega/vega-themes/issues/8437) [#8439](https://github.com/vega/vega-themes/issues/8439) [#8436](https://github.com/vega/vega-themes/issues/8436) [#8438](https://github.com/vega/vega-themes/issues/8438) [#8440](https://github.com/vega/vega-themes/issues/8440) [#8442](https://github.com/vega/vega-themes/issues/8442) [#8443](https://github.com/vega/vega-themes/issues/8443) [#8444](https://github.com/vega/vega-themes/issues/8444) [#8391](https://github.com/vega/vega-themes/issues/8391) [#8428](https://github.com/vega/vega-themes/issues/8428) [#8429](https://github.com/vega/vega-themes/issues/8429) [#8430](https://github.com/vega/vega-themes/issues/8430) [#8426](https://github.com/vega/vega-themes/issues/8426) [#8424](https://github.com/vega/vega-themes/issues/8424) [#8422](https://github.com/vega/vega-themes/issues/8422) [#8415](https://github.com/vega/vega-themes/issues/8415) [#8434](https://github.com/vega/vega-themes/issues/8434) [#8354](https://github.com/vega/vega-themes/issues/8354) [#8475](https://github.com/vega/vega-themes/issues/8475) [#8472](https://github.com/vega/vega-themes/issues/8472) [#8455](https://github.com/vega/vega-themes/issues/8455) [#8470](https://github.com/vega/vega-themes/issues/8470) [#8451](https://github.com/vega/vega-themes/issues/8451) [#8468](https://github.com/vega/vega-themes/issues/8468) [#8456](https://github.com/vega/vega-themes/issues/8456) [#8462](https://github.com/vega/vega-themes/issues/8462) [#8463](https://github.com/vega/vega-themes/issues/8463) [#8445](https://github.com/vega/vega-themes/issues/8445) [#8464](https://github.com/vega/vega-themes/issues/8464) [#8457](https://github.com/vega/vega-themes/issues/8457) [#8458](https://github.com/vega/vega-themes/issues/8458) [#8459](https://github.com/vega/vega-themes/issues/8459) [#8460](https://github.com/vega/vega-themes/issues/8460) [#8437](https://github.com/vega/vega-themes/issues/8437) [#8439](https://github.com/vega/vega-themes/issues/8439) [#8436](https://github.com/vega/vega-themes/issues/8436) [#8438](https://github.com/vega/vega-themes/issues/8438) [#8440](https://github.com/vega/vega-themes/issues/8440) [#8442](https://github.com/vega/vega-themes/issues/8442) [#8443](https://github.com/vega/vega-themes/issues/8443) [#8444](https://github.com/vega/vega-themes/issues/8444) [#8391](https://github.com/vega/vega-themes/issues/8391) [#8428](https://github.com/vega/vega-themes/issues/8428) [#8429](https://github.com/vega/vega-themes/issues/8429) [#8430](https://github.com/vega/vega-themes/issues/8430) [#8426](https://github.com/vega/vega-themes/issues/8426) [#8424](https://github.com/vega/vega-themes/issues/8424) [#8422](https://github.com/vega/vega-themes/issues/8422) [#8469](https://github.com/vega/vega-themes/issues/8469) [#8475](https://github.com/vega/vega-themes/issues/8475) [#8472](https://github.com/vega/vega-themes/issues/8472) [#8455](https://github.com/vega/vega-themes/issues/8455) [#8470](https://github.com/vega/vega-themes/issues/8470) [#8451](https://github.com/vega/vega-themes/issues/8451) [#8468](https://github.com/vega/vega-themes/issues/8468) [#6708](https://github.com/vega/vega-themes/issues/6708) [#8451](https://github.com/vega/vega-themes/issues/8451) [#8456](https://github.com/vega/vega-themes/issues/8456) 46 | * chore(deps): bump engine.io from 6.2.0 to 6.2.1 (#419) ([42b58d5](https://github.com/vega/vega-themes/commit/42b58d5)), closes [#419](https://github.com/vega/vega-themes/issues/419) [#658](https://github.com/vega/vega-themes/issues/658) [#658](https://github.com/vega/vega-themes/issues/658) [#608](https://github.com/vega/vega-themes/issues/608) [socketio/socket.io-client-swift#1309](https://github.com/socketio/socket.io-client-swift/issues/1309) [#658](https://github.com/vega/vega-themes/issues/658) [#660](https://github.com/vega/vega-themes/issues/660) [#659](https://github.com/vega/vega-themes/issues/659) [#656](https://github.com/vega/vega-themes/issues/656) [#646](https://github.com/vega/vega-themes/issues/646) [#643](https://github.com/vega/vega-themes/issues/643) 47 | * chore(deps): bump json5 from 2.2.1 to 2.2.3 (#426) ([6053ef7](https://github.com/vega/vega-themes/commit/6053ef7)), closes [#426](https://github.com/vega/vega-themes/issues/426) [#299](https://github.com/vega/vega-themes/issues/299) [#199](https://github.com/vega/vega-themes/issues/199) [#295](https://github.com/vega/vega-themes/issues/295) [#299](https://github.com/vega/vega-themes/issues/299) [#199](https://github.com/vega/vega-themes/issues/199) [#295](https://github.com/vega/vega-themes/issues/295) 48 | 49 | 50 | 51 | ## 2.12.0 (2022-08-12) 52 | 53 | * "Bump version to: 2.12.0 [skip ci]" ([5ba047e](https://github.com/vega/vega-themes/commit/5ba047e)) 54 | * Update CHANGELOG.md [skip ci] ([3f7341d](https://github.com/vega/vega-themes/commit/3f7341d)) 55 | 56 | 57 | 58 | ## 2.11.0 (2022-08-12) 59 | 60 | * v2.11.0 ([a7ae432](https://github.com/vega/vega-themes/commit/a7ae432)) 61 | 62 | # v2.11.0 (Thu Aug 11 2022) 63 | 64 | :tada: This release contains work from new contributors! :tada: 65 | 66 | Thanks for all your work! 67 | 68 | :heart: Daniel Marsh-Patrick ([@dm-p](https://github.com/dm-p)) 69 | 70 | :heart: Cameron Yick ([@hydrosquall](https://github.com/hydrosquall)) 71 | 72 | #### 🚀 Enhancement 73 | 74 | - feat: add powerbi theme [#320](https://github.com/vega/vega-themes/pull/320) ([@dm-p](https://github.com/dm-p)) 75 | 76 | #### 🐛 Bug Fix 77 | 78 | - refactor: one const per declaration [#327](https://github.com/vega/vega-themes/pull/327) ([@domoritz](https://github.com/domoritz)) 79 | - ci: use same release process as vega embed [#325](https://github.com/vega/vega-themes/pull/325) ([@domoritz](https://github.com/domoritz)) 80 | - chore: upgrade deps [#323](https://github.com/vega/vega-themes/pull/323) ([@domoritz](https://github.com/domoritz)) 81 | - ci: don't set node version [#322](https://github.com/vega/vega-themes/pull/322) ([@domoritz](https://github.com/domoritz)) 82 | - chore: upgrade deps and format [#321](https://github.com/vega/vega-themes/pull/321) ([@domoritz](https://github.com/domoritz)) 83 | - chore: set up auto for versioning/release management [#293](https://github.com/vega/vega-themes/pull/293) ([@hydrosquall](https://github.com/hydrosquall)) 84 | - ci: fix akheron/dependabot-cron-action to use v0.2 [#295](https://github.com/vega/vega-themes/pull/295) ([@domoritz](https://github.com/domoritz)) 85 | - ci: update to akheron/dependabot-cron-action@v2 [#295](https://github.com/vega/vega-themes/pull/295) ([@domoritz](https://github.com/domoritz)) 86 | - ci: auto merge dependabot PRs [#295](https://github.com/vega/vega-themes/pull/295) ([@domoritz](https://github.com/domoritz)) 87 | - ci: monthly updates [#295](https://github.com/vega/vega-themes/pull/295) ([@domoritz](https://github.com/domoritz)) 88 | 89 | #### ⚠️ Pushed to `stable` 90 | 91 | - v2.11.0 ([@domoritz](https://github.com/domoritz)) 92 | 93 | #### 🔩 Dependency Updates 94 | 95 | - chore(deps-dev): bump vega-lite-dev-config from 0.18.0 to 0.19.0 [#312](https://github.com/vega/vega-themes/pull/312) ([@dependabot[bot]](https://github.com/dependabot[bot])) 96 | - chore(deps-dev): bump @rollup/plugin-node-resolve from 13.0.5 to 13.0.6 [#313](https://github.com/vega/vega-themes/pull/313) ([@dependabot[bot]](https://github.com/dependabot[bot])) 97 | - chore(deps-dev): bump auto from 10.32.1 to 10.32.2 [#314](https://github.com/vega/vega-themes/pull/314) ([@dependabot[bot]](https://github.com/dependabot[bot])) 98 | - chore(deps-dev): bump rollup from 2.58.0 to 2.59.0 [#315](https://github.com/vega/vega-themes/pull/315) ([@dependabot[bot]](https://github.com/dependabot[bot])) 99 | - chore(deps-dev): bump @auto-it/first-time-contributor from 10.32.1 to 10.32.2 [#316](https://github.com/vega/vega-themes/pull/316) ([@dependabot[bot]](https://github.com/dependabot[bot])) 100 | - chore(deps-dev): bump @auto-it/conventional-commits from 10.32.1 to 10.32.2 [#317](https://github.com/vega/vega-themes/pull/317) ([@dependabot[bot]](https://github.com/dependabot[bot])) 101 | - chore(deps-dev): bump typescript from 4.4.3 to 4.4.4 [#318](https://github.com/vega/vega-themes/pull/318) ([@dependabot[bot]](https://github.com/dependabot[bot])) 102 | - chore(deps-dev): bump browser-sync from 2.27.5 to 2.27.7 [#319](https://github.com/vega/vega-themes/pull/319) ([@dependabot[bot]](https://github.com/dependabot[bot])) 103 | - chore(deps): bump actions/setup-node from 2.4.0 to 2.4.1 [#302](https://github.com/vega/vega-themes/pull/302) ([@dependabot[bot]](https://github.com/dependabot[bot])) 104 | - chore(deps-dev): bump vega-lite from 5.1.0 to 5.1.1 [#304](https://github.com/vega/vega-themes/pull/304) ([@dependabot[bot]](https://github.com/dependabot[bot])) 105 | - chore(deps-dev): bump @rollup/plugin-node-resolve from 13.0.4 to 13.0.5 [#303](https://github.com/vega/vega-themes/pull/303) ([@dependabot[bot]](https://github.com/dependabot[bot])) 106 | - chore(deps-dev): bump concurrently from 6.2.1 to 6.3.0 [#305](https://github.com/vega/vega-themes/pull/305) ([@dependabot[bot]](https://github.com/dependabot[bot])) 107 | - chore(deps-dev): bump rollup from 2.56.3 to 2.58.0 [#306](https://github.com/vega/vega-themes/pull/306) ([@dependabot[bot]](https://github.com/dependabot[bot])) 108 | - chore(deps-dev): bump @auto-it/conventional-commits from 10.31.0 to 10.32.1 [#307](https://github.com/vega/vega-themes/pull/307) ([@dependabot[bot]](https://github.com/dependabot[bot])) 109 | - chore(deps-dev): bump typescript from 4.4.2 to 4.4.3 [#308](https://github.com/vega/vega-themes/pull/308) ([@dependabot[bot]](https://github.com/dependabot[bot])) 110 | - chore(deps-dev): bump vega from 5.20.2 to 5.21.0 [#309](https://github.com/vega/vega-themes/pull/309) ([@dependabot[bot]](https://github.com/dependabot[bot])) 111 | - chore(deps-dev): bump auto from 10.31.0 to 10.32.1 [#310](https://github.com/vega/vega-themes/pull/310) ([@dependabot[bot]](https://github.com/dependabot[bot])) 112 | - chore(deps-dev): bump @auto-it/first-time-contributor from 10.31.0 to 10.32.1 [#311](https://github.com/vega/vega-themes/pull/311) ([@dependabot[bot]](https://github.com/dependabot[bot])) 113 | - chore(deps): bump tmpl from 1.0.4 to 1.0.5 [#301](https://github.com/vega/vega-themes/pull/301) ([@dependabot[bot]](https://github.com/dependabot[bot])) 114 | - chore(deps): bump object-path from 0.11.7 to 0.11.8 [#300](https://github.com/vega/vega-themes/pull/300) ([@dependabot[bot]](https://github.com/dependabot[bot])) 115 | - chore(deps-dev): bump typescript from 4.3.5 to 4.4.2 [#299](https://github.com/vega/vega-themes/pull/299) ([@dependabot[bot]](https://github.com/dependabot[bot])) 116 | - chore(deps): bump object-path from 0.11.5 to 0.11.7 [#298](https://github.com/vega/vega-themes/pull/298) ([@dependabot[bot]](https://github.com/dependabot[bot])) 117 | - chore(deps): bump actions/setup-node from 2.3.0 to 2.4.0 [#294](https://github.com/vega/vega-themes/pull/294) ([@dependabot[bot]](https://github.com/dependabot[bot])) 118 | - chore(deps-dev): bump concurrently from 6.2.0 to 6.2.1 [#296](https://github.com/vega/vega-themes/pull/296) ([@dependabot[bot]](https://github.com/dependabot[bot])) 119 | - chore(deps-dev): bump rollup from 2.55.1 to 2.56.3 [#297](https://github.com/vega/vega-themes/pull/297) ([@dependabot[bot]](https://github.com/dependabot[bot])) 120 | - chore(deps): bump path-parse from 1.0.6 to 1.0.7 [#292](https://github.com/vega/vega-themes/pull/292) ([@dependabot[bot]](https://github.com/dependabot[bot])) 121 | - chore(deps): bump actions/setup-node from 2.2.0 to 2.3.0 [#287](https://github.com/vega/vega-themes/pull/287) ([@dependabot[bot]](https://github.com/dependabot[bot])) 122 | - chore(deps-dev): bump browser-sync from 2.27.4 to 2.27.5 [#288](https://github.com/vega/vega-themes/pull/288) ([@dependabot[bot]](https://github.com/dependabot[bot])) 123 | - chore(deps-dev): bump vega-lite-dev-config from 0.17.3 to 0.18.0 [#289](https://github.com/vega/vega-themes/pull/289) ([@dependabot[bot]](https://github.com/dependabot[bot])) 124 | - chore(deps-dev): bump @rollup/plugin-node-resolve from 13.0.0 to 13.0.4 [#290](https://github.com/vega/vega-themes/pull/290) ([@dependabot[bot]](https://github.com/dependabot[bot])) 125 | - chore(deps-dev): bump rollup from 2.52.7 to 2.55.1 [#291](https://github.com/vega/vega-themes/pull/291) ([@dependabot[bot]](https://github.com/dependabot[bot])) 126 | - chore(deps): bump akheron/dependabot-cron-action from 0.2 to 1 [#281](https://github.com/vega/vega-themes/pull/281) ([@dependabot[bot]](https://github.com/dependabot[bot])) 127 | - chore(deps): bump actions/setup-node from 2.1.5 to 2.2.0 [#282](https://github.com/vega/vega-themes/pull/282) ([@dependabot[bot]](https://github.com/dependabot[bot])) 128 | - chore(deps-dev): bump rollup from 2.50.5 to 2.52.7 [#283](https://github.com/vega/vega-themes/pull/283) ([@dependabot[bot]](https://github.com/dependabot[bot])) 129 | - chore(deps-dev): bump gh-pages from 3.2.0 to 3.2.3 [#284](https://github.com/vega/vega-themes/pull/284) ([@dependabot[bot]](https://github.com/dependabot[bot])) 130 | - chore(deps-dev): bump browser-sync from 2.26.14 to 2.27.4 [#285](https://github.com/vega/vega-themes/pull/285) ([@dependabot[bot]](https://github.com/dependabot[bot])) 131 | - chore(deps-dev): bump typescript from 4.3.2 to 4.3.5 [#286](https://github.com/vega/vega-themes/pull/286) ([@dependabot[bot]](https://github.com/dependabot[bot])) 132 | - chore(deps): bump glob-parent from 5.1.1 to 5.1.2 [#280](https://github.com/vega/vega-themes/pull/280) ([@dependabot[bot]](https://github.com/dependabot[bot])) 133 | - chore(deps-dev): bump rollup from 2.47.0 to 2.50.5 [#277](https://github.com/vega/vega-themes/pull/277) ([@dependabot[bot]](https://github.com/dependabot[bot])) 134 | - chore(deps-dev): bump typescript from 4.2.4 to 4.3.2 [#276](https://github.com/vega/vega-themes/pull/276) ([@dependabot[bot]](https://github.com/dependabot[bot])) 135 | - chore(deps-dev): bump gh-pages from 3.1.0 to 3.2.0 [#278](https://github.com/vega/vega-themes/pull/278) ([@dependabot[bot]](https://github.com/dependabot[bot])) 136 | - chore(deps-dev): bump concurrently from 6.1.0 to 6.2.0 [#279](https://github.com/vega/vega-themes/pull/279) ([@dependabot[bot]](https://github.com/dependabot[bot])) 137 | - chore(deps): bump ws from 7.4.3 to 7.4.6 [#275](https://github.com/vega/vega-themes/pull/275) ([@dependabot[bot]](https://github.com/dependabot[bot])) 138 | - chore(deps-dev): bump rollup from 2.46.0 to 2.47.0 [#274](https://github.com/vega/vega-themes/pull/274) ([@dependabot[bot]](https://github.com/dependabot[bot])) 139 | - chore(deps-dev): bump concurrently from 6.0.2 to 6.1.0 [#273](https://github.com/vega/vega-themes/pull/273) ([@dependabot[bot]](https://github.com/dependabot[bot])) 140 | - chore(deps-dev): bump @rollup/plugin-node-resolve from 11.2.1 to 13.0.0 [#272](https://github.com/vega/vega-themes/pull/272) ([@dependabot[bot]](https://github.com/dependabot[bot])) 141 | - chore(deps): bump hosted-git-info from 2.8.8 to 2.8.9 [#271](https://github.com/vega/vega-themes/pull/271) ([@dependabot[bot]](https://github.com/dependabot[bot])) 142 | - chore(deps): bump actions/setup-node from v1 to v2.1.5 [#269](https://github.com/vega/vega-themes/pull/269) ([@dependabot[bot]](https://github.com/dependabot[bot])) 143 | - chore(deps-dev): bump rollup from 2.45.2 to 2.46.0 [#270](https://github.com/vega/vega-themes/pull/270) ([@dependabot[bot]](https://github.com/dependabot[bot])) 144 | - ci: upgrade to GitHub-native Dependabot [#268](https://github.com/vega/vega-themes/pull/268) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 145 | - chore(deps-dev): bump vega-lite-dev-config from 0.17.2 to 0.17.3 [#266](https://github.com/vega/vega-themes/pull/266) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 146 | - chore(deps-dev): bump @wessberg/rollup-plugin-ts from 1.3.11 to 1.3.14 [#267](https://github.com/vega/vega-themes/pull/267) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 147 | - chore(deps-dev): bump concurrently from 6.0.1 to 6.0.2 [#265](https://github.com/vega/vega-themes/pull/265) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 148 | - chore(deps-dev): bump vega-lite from 5.0.0 to 5.1.0 [#264](https://github.com/vega/vega-themes/pull/264) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 149 | - chore(deps-dev): bump rollup from 2.45.1 to 2.45.2 [#263](https://github.com/vega/vega-themes/pull/263) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 150 | - chore(deps-dev): bump vega-lite-dev-config from 0.17.0 to 0.17.2 [#261](https://github.com/vega/vega-themes/pull/261) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 151 | - chore(deps-dev): bump concurrently from 6.0.0 to 6.0.1 [#258](https://github.com/vega/vega-themes/pull/258) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 152 | - chore(deps-dev): bump rollup from 2.44.0 to 2.45.1 [#260](https://github.com/vega/vega-themes/pull/260) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 153 | - chore(deps-dev): bump typescript from 4.2.3 to 4.2.4 [#259](https://github.com/vega/vega-themes/pull/259) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 154 | - chore(deps-dev): bump rollup from 2.43.1 to 2.44.0 [#257](https://github.com/vega/vega-themes/pull/257) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 155 | - chore(deps-dev): bump vega from 5.20.0 to 5.20.2 [#256](https://github.com/vega/vega-themes/pull/256) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 156 | - chore(deps-dev): bump rollup from 2.42.2 to 2.43.1 [#254](https://github.com/vega/vega-themes/pull/254) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 157 | - chore(deps-dev): bump @wessberg/rollup-plugin-ts from 1.3.10 to 1.3.11 [#255](https://github.com/vega/vega-themes/pull/255) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 158 | - chore(deps-dev): bump @rollup/plugin-node-resolve from 11.2.0 to 11.2.1 [#253](https://github.com/vega/vega-themes/pull/253) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 159 | - chore(deps-dev): bump vega from 5.19.1 to 5.20.0 [#251](https://github.com/vega/vega-themes/pull/251) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 160 | - chore(deps-dev): bump @wessberg/rollup-plugin-ts from 1.3.8 to 1.3.10 [#250](https://github.com/vega/vega-themes/pull/250) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 161 | - chore(deps-dev): bump rollup from 2.41.2 to 2.42.2 [#252](https://github.com/vega/vega-themes/pull/252) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 162 | - chore(deps-dev): bump rollup from 2.40.0 to 2.41.2 [#249](https://github.com/vega/vega-themes/pull/249) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 163 | - chore(deps-dev): bump vega-lite-dev-config from 0.16.6 to 0.17.0 [#248](https://github.com/vega/vega-themes/pull/248) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 164 | - chore(deps-dev): bump typescript from 4.2.2 to 4.2.3 [#247](https://github.com/vega/vega-themes/pull/247) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 165 | - chore(deps-dev): bump rollup from 2.39.1 to 2.40.0 [#246](https://github.com/vega/vega-themes/pull/246) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 166 | - chore(deps-dev): bump vega-lite-dev-config from 0.16.1 to 0.16.6 [#245](https://github.com/vega/vega-themes/pull/245) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])) 167 | 168 | #### Authors: 5 169 | 170 | - [@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]) 171 | - [@dependabot[bot]](https://github.com/dependabot[bot]) 172 | - Cameron Yick ([@hydrosquall](https://github.com/hydrosquall)) 173 | - Daniel Marsh-Patrick ([@dm-p](https://github.com/dm-p)) 174 | - Dominik Moritz ([@domoritz](https://github.com/domoritz)) 175 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, University of Washington Interactive Data Lab 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of its contributors 15 | may be used to endorse or promote products derived from this software 16 | without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vega Themes 2 | 3 | [](https://www.npmjs.com/package/vega-themes) [](https://github.com/vega/vega-themes/actions/workflows/test.yml) [](https://www.jsdelivr.com/package/npm/vega-themes) 4 | 5 | Themes for stylized [Vega](https://vega.github.io/vega/) and [Vega-Lite](https://vega.github.io/vega-lite/) visualizations. For Vega version 3+ and Vega-Lite 2+. 6 | 7 | A Vega _theme_ is a [configuration object](https://vega.github.io/vega/docs/config/) with default settings for a variety of visual properties such as colors, typefaces, line widths and spacing. This module exports a set of named themes, which can be passed as input to the Vega or Vega-Lite with [Vega-Embed](https://github.com/vega/vega-embed) or directly as a configuration object to the [Vega parser](https://vega.github.io/vega/docs/api/parser/). 8 | 9 | Try Vega-Themes in our [Observable Demo](https://beta.observablehq.com/@domoritz/vega-themes-demo). 10 | 11 | Vega Themes comes with Vega-Embed: 12 | 13 | ```js 14 | vegaEmbed(el, spec, {theme: 'quartz'}); 15 | ``` 16 | 17 | If you want to use a different version, pass the theme as a configuration: 18 | 19 | ```js 20 | vegaEmbed(el, spec, {config: vegaThemes.quartz}); 21 | ``` 22 | 23 | Once instantiated, a visualization theme can not be changed. Instead, the input specification must be re-parsed with a new theme. 24 | 25 | ## Included Themes 26 | 27 | # vega.themes.excel [<>](https://github.com/vega/vega-themes/blob/main/src/theme-excel.ts 'Source') 28 | 29 | Chart theme modeled after Microsoft Excel. [Try it here](https://vega.github.io/vega-themes/?theme=excel). 30 | 31 | # vega.themes.ggplot2 [<>](https://github.com/vega/vega-themes/blob/main/src/theme-ggplot2.ts 'Source') 32 | 33 | Chart theme modeled after ggplot2. [Try it here](https://vega.github.io/vega-themes/?theme=ggplot2). 34 | 35 | # vega.themes.quartz [<>](https://github.com/vega/vega-themes/blob/main/src/theme-quartz.ts 'Source') 36 | 37 | Chart theme modeled after Quartz. [Try it here](https://vega.github.io/vega-themes/?theme=quartz). 38 | 39 | # vega.themes.vox [<>](https://github.com/vega/vega-themes/blob/main/src/theme-vox.ts 'Source') 40 | 41 | Chart theme modeled after Vox. [Try it here](https://vega.github.io/vega-themes/?theme=vox). 42 | 43 | # vega.themes.fivethirtyeight [<>](https://github.com/vega/vega-themes/blob/main/src/theme-fivethirtyeight.ts 'Source') 44 | 45 | Chart theme modeled after FiveThirtyEight. [Try it here](https://vega.github.io/vega-themes/?theme=fivethirtyeight). 46 | 47 | # vega.themes.dark [<>](https://github.com/vega/vega-themes/blob/main/src/theme-dark.ts 'Source') 48 | 49 | A dark theme. [Try it here](https://vega.github.io/vega-themes/?theme=dark). 50 | 51 | # vega.themes.latimes [<>](https://github.com/vega/vega-themes/blob/main/src/theme-latimes.ts 'Source') 52 | 53 | Chart theme modeled after the Los Angeles Times. [Try it here](https://vega.github.io/vega-themes/?theme=latimes). 54 | 55 | # vega.themes.urbaninstitute [<>](https://github.com/vega/vega-themes/blob/main/src/theme-urbaninstitute.ts 'Source') 56 | 57 | Chart theme modeled after the Urban Institute. [Try it here](https://vega.github.io/vega-themes/?theme=urbaninstitute). 58 | 59 | # vega.themes.googlecharts [<>](https://github.com/vega/vega-themes/blob/main/src/theme-googlecharts.ts 'Source') 60 | 61 | Chart theme modeled after Google Charts. [Try it here](https://vega.github.io/vega-themes/?theme=googlecharts). 62 | 63 | # vega.themes.powerbi [<>](https://github.com/vega/vega-themes/blob/main/src/theme-powerbi.ts 'Source') 64 | 65 | Chart theme modeled after Power BI Desktop default theme. [Try it here](https://vega.github.io/vega-themes/?theme=powerbi). 66 | 67 | # vega.themes.carbonwhite [<>](https://github.com/vega/vega-themes/blob/main/src/theme-carbonwhite.ts 'Source') 68 | 69 | Chart theme modeled after IBM Carbon Charts - white theme. [Try it here](https://vega.github.io/vega-themes/?theme=carbonwhite). 70 | 71 | # vega.themes.carbong10 [<>](https://github.com/vega/vega-themes/blob/main/src/theme-carbong10.ts 'Source') 72 | 73 | Chart theme modeled after IBM Carbon Charts - grey 10 theme. This is the white theme with a slightly darker background. [Try it here](https://vega.github.io/vega-themes/?theme=carbong10). 74 | 75 | # vega.themes.carbong90 [<>](https://github.com/vega/vega-themes/blob/main/src/theme-carbong90.ts 'Source') 76 | 77 | Chart theme modeled after IBM Carbon Charts - grey 90 theme. [Try it here](https://vega.github.io/vega-themes/?theme=carbong90). 78 | 79 | # vega.themes.carbong100 [<>](https://github.com/vega/vega-themes/blob/main/src/theme-carbong100.ts 'Source') 80 | 81 | Chart theme modeled after IBM Carbon Charts - grey 100 theme. This is the grey 90 theme with a slightly darker background. [Try it here](https://vega.github.io/vega-themes/?theme=carbong100). 82 | 83 | ## Instructions for Developers 84 | 85 | To view and test different themes, follow these steps: 86 | 87 | 1. Install dependencies via `npm install`. 88 | 2. Launch a local web server in the top-level directory with `npm start`. 89 | 3. Make changes. The website will automatically reload. 90 | 91 | ## Publishing 92 | 93 | To make a release, run `npm run release`. To deploy the examples, run `npm run deploy:gh`. 94 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import eslint from '@eslint/js'; 2 | import tseslint from 'typescript-eslint'; 3 | import tsParser from '@typescript-eslint/parser'; 4 | import prettierConfig from 'eslint-plugin-prettier/recommended'; 5 | import globals from 'globals'; 6 | 7 | delete globals.browser['AudioWorkletGlobalScope ']; 8 | 9 | /** 10 | * @type {import('eslint').Linter.Config[]} 11 | */ 12 | export default [ 13 | { 14 | ignores: ['build/**', 'coverage/**', 'examples/dist/**'], 15 | }, 16 | eslint.configs.recommended, 17 | ...tseslint.configs.recommendedTypeChecked, 18 | { 19 | languageOptions: { 20 | parserOptions: { 21 | project: true, 22 | tsconfigRootDir: import.meta.dirname, 23 | }, 24 | }, 25 | }, 26 | { 27 | files: ['**/*.ts'], 28 | languageOptions: { 29 | parser: tsParser, 30 | globals: { 31 | ...globals.browser, 32 | }, 33 | }, 34 | rules: { 35 | 'prettier/prettier': 'warn', 36 | '@typescript-eslint/explicit-function-return-type': 'off', 37 | '@typescript-eslint/no-explicit-any': 'warn', 38 | '@typescript-eslint/prefer-for-of': 'error', 39 | '@typescript-eslint/no-for-in-array': 'error', 40 | '@typescript-eslint/no-require-imports': 'error', 41 | '@typescript-eslint/no-parameter-properties': 'off', 42 | '@typescript-eslint/no-unused-vars': [ 43 | 'error', 44 | { 45 | vars: 'all', 46 | args: 'after-used', 47 | ignoreRestSiblings: true, 48 | }, 49 | ], 50 | '@typescript-eslint/no-shadow': 'error', 51 | '@typescript-eslint/no-unsafe-member-access': 'warn', 52 | '@typescript-eslint/no-unsafe-argument': 'warn', 53 | '@typescript-eslint/no-unsafe-return': 'warn', 54 | '@typescript-eslint/no-unsafe-assignment': 'warn', 55 | '@typescript-eslint/no-unsafe-call': 'warn', 56 | '@typescript-eslint/no-object-literal-type-assertion': 'off', 57 | '@typescript-eslint/explicit-module-boundary-types': 'off', 58 | '@typescript-eslint/no-namespace': 'error', 59 | '@typescript-eslint/unbound-method': 'off', 60 | '@typescript-eslint/no-base-to-string': 'off', 61 | '@typescript-eslint/no-unnecessary-type-assertion': 'off', 62 | '@typescript-eslint/restrict-template-expressions': 'off', 63 | '@typescript-eslint/no-misused-promises': 'off', 64 | 'linebreak-style': ['error', 'unix'], 65 | 'no-irregular-whitespace': ['error', {skipComments: true}], 66 | 'no-alert': 'error', 67 | 'prefer-const': 'error', 68 | 'no-return-assign': 'error', 69 | 'no-useless-call': 'error', 70 | 'no-useless-concat': 'error', 71 | 'prefer-template': 'error', 72 | 'no-unused-vars': 'off', 73 | // "no-undef": "off", // typescript takes care of this for us 74 | 'no-unreachable': 'off', // typescript takes care of this for us 75 | }, 76 | }, 77 | prettierConfig, 78 | { 79 | files: ['**/*.js'], 80 | ...tseslint.configs.disableTypeChecked, 81 | }, 82 | ]; 83 | -------------------------------------------------------------------------------- /examples/area.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v4.json", 3 | "width": 400, 4 | "height": 300, 5 | "data": { 6 | "url": "https://vega.github.io/vega-datasets/data/iowa-electricity.csv", 7 | "format": {"type": "csv"} 8 | }, 9 | "title": "Iowa's renewable energy boom", 10 | "mark": { 11 | "type": "area", 12 | "tooltip": true 13 | }, 14 | "encoding": { 15 | "color": { 16 | "type": "nominal", 17 | "field": "source", 18 | "legend": {"title": "Electricity source"} 19 | }, 20 | "x": { 21 | "type": "temporal", 22 | "axis": {"title": "Year"}, 23 | "field": "year", 24 | "timeUnit": "year" 25 | }, 26 | "y": { 27 | "type": "quantitative", 28 | "axis": {"format": ".0%", "title": "Share of net generation"}, 29 | "field": "net_generation", 30 | "stack": "normalize" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /examples/bars.vg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega/v6.json", 3 | "width": 480, 4 | "height": 150, 5 | "padding": 5, 6 | 7 | "title": "Simple Bar Chart", 8 | 9 | "data": [ 10 | { 11 | "name": "table", 12 | "values": [ 13 | {"index": 1, "value": 28, "position": 1, "category": "A"}, 14 | {"index": 2, "value": 55, "position": 2, "category": "A"}, 15 | {"index": 3, "value": 43, "position": 3, "category": "A"}, 16 | {"index": 4, "value": 91, "position": 4, "category": "A"}, 17 | {"index": 5, "value": 81, "position": 5, "category": "A"}, 18 | {"index": 6, "value": 53, "position": 6, "category": "A"}, 19 | {"index": 7, "value": 19, "position": 1, "category": "B"}, 20 | {"index": 8, "value": 87, "position": 2, "category": "B"}, 21 | {"index": 9, "value": 52, "position": 3, "category": "B"}, 22 | {"index": 10, "value": 48, "position": 4, "category": "B"}, 23 | {"index": 11, "value": 24, "position": 5, "category": "B"}, 24 | {"index": 12, "value": 49, "position": 6, "category": "B"}, 25 | {"index": 13, "value": 87, "position": 1, "category": "C"}, 26 | {"index": 14, "value": 66, "position": 2, "category": "C"}, 27 | {"index": 15, "value": 17, "position": 3, "category": "C"}, 28 | {"index": 16, "value": 27, "position": 4, "category": "C"}, 29 | {"index": 17, "value": 68, "position": 5, "category": "C"}, 30 | {"index": 18, "value": 16, "position": 6, "category": "C"} 31 | ] 32 | } 33 | ], 34 | 35 | "scales": [ 36 | { 37 | "name": "scaleIndex", 38 | "type": "band", 39 | "range": "width", 40 | "domain": {"data": "table", "field": "index"} 41 | }, 42 | { 43 | "name": "scaleValue", 44 | "type": "linear", 45 | "range": "height", 46 | "domain": {"data": "table", "field": "value"}, 47 | "zero": true, 48 | "nice": true 49 | } 50 | ], 51 | 52 | "axes": [ 53 | {"orient": "left", "scale": "scaleValue", "title": "Value"}, 54 | {"orient": "bottom", "scale": "scaleIndex", "title": "Index"} 55 | ], 56 | 57 | "marks": [ 58 | { 59 | "type": "rect", 60 | "from": {"data": "table"}, 61 | "encode": { 62 | "enter": { 63 | "x": {"scale": "scaleIndex", "field": "index", "offset": 1}, 64 | "width": {"scale": "scaleIndex", "band": 1, "offset": -1}, 65 | "y": {"scale": "scaleValue", "field": "value"}, 66 | "y2": {"scale": "scaleValue", "value": 0}, 67 | "tooltip": {"scale": "scaleValue", "field": "value"} 68 | } 69 | } 70 | } 71 | ] 72 | } 73 | -------------------------------------------------------------------------------- /examples/diverging.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v6.json", 3 | "description": "A dot plot showing each movie in the database, and the difference from the average movie rating. The display is sorted by year to visualize everything in sequential order. The graph is for all Movies before 2019.", 4 | "data": { 5 | "url": "https://vega.github.io/vega-lite/data/movies.json" 6 | }, 7 | "transform": [ 8 | {"filter": "datum['IMDB Rating'] != null"}, 9 | {"filter": {"timeUnit": "year", "field": "Release Date", "range": [null, 2019]}}, 10 | { 11 | "joinaggregate": [ 12 | { 13 | "op": "mean", 14 | "field": "IMDB Rating", 15 | "as": "AverageRating" 16 | } 17 | ] 18 | }, 19 | { 20 | "calculate": "datum['IMDB Rating'] - datum.AverageRating", 21 | "as": "RatingDelta" 22 | } 23 | ], 24 | "mark": "point", 25 | "encoding": { 26 | "x": { 27 | "field": "Release Date", 28 | "type": "temporal" 29 | }, 30 | "y": { 31 | "field": "RatingDelta", 32 | "type": "quantitative", 33 | "title": "Rating Delta" 34 | }, 35 | "color": { 36 | "field": "RatingDelta", 37 | "type": "quantitative", 38 | "scale": {"domainMid": 0}, 39 | "title": "Rating Delta" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /examples/heatmap.vl.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://vega.github.io/schema/vega-lite/v4.json", 3 | "data": { 4 | "url": "https://vega.github.io/vega-datasets/data/seattle-weather.csv" 5 | }, 6 | "title": "2010 Daily Max Temperature in Seattle", 7 | "config": { 8 | "view": { 9 | "strokeWidth": 0 10 | }, 11 | "axis": { 12 | "domain": false 13 | } 14 | }, 15 | "mark": { 16 | "type": "rect", 17 | "tooltip": true 18 | }, 19 | "encoding": { 20 | "x": { 21 | "field": "date", 22 | "timeUnit": "date", 23 | "type": "ordinal", 24 | "title": "Day", 25 | "axis": { 26 | "labelAngle": 0, 27 | "format": "%e" 28 | } 29 | }, 30 | "y": { 31 | "field": "date", 32 | "timeUnit": "month", 33 | "type": "ordinal", 34 | "title": "Month" 35 | }, 36 | "color": { 37 | "field": "temp_max", 38 | "aggregate": "max", 39 | "type": "quantitative", 40 | "legend": { 41 | "title": null 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /examples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |Additional imports
119 | 120 |121 | Carbon themes require the Plex font to be imported, as well as an additional CSS file (to style overflow menu & 122 | tooltips). More instructions 123 | here 129 |
130 |