Skip to content

Commit

Permalink
Slight cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jakezatecky committed Apr 6, 2024
1 parent 30e91a1 commit 19552e5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default [
settings: {
// Account for webpack.resolve.module imports
'import/resolver': {
// "Fixes Node resolution issues in ESLint v6
// Fixes Node resolution issues in ESLint v6
// https://github.com/benmosher/eslint-plugin-import/issues/1396
node: {},
webpack: {
Expand Down
2 changes: 1 addition & 1 deletion examples/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h2 class="project-tagline">A JavaScript library for rendering funnel charts usi
<section class="main-content">
<p>
<strong>d3-funnel</strong> is an extensible, open-source JavaScript library for rendering
funnel charts using the <a href="http://d3js.org/">D3.js</a> library.
funnel charts using the <a href="https://d3js.org/">D3.js</a> library.
</p>
<p>
d3-funnel is focused on providing practical and visually appealing funnels through a variety
Expand Down
12 changes: 4 additions & 8 deletions examples/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,19 @@ const checkboxes = [...document.querySelectorAll('input')];
const color = document.querySelector('[value="color"]');

function onChange() {
let data = [];

if (color.checked === false) {
data = [
let data = !color.checked ?
[
{ label: 'Applicants', value: 12000 },
{ label: 'Pre-screened', value: 4000 },
{ label: 'Interviewed', value: 2500 },
{ label: 'Hired', value: 1500 },
];
} else {
data = [
] :
[
{ label: 'Teal', value: 12000, backgroundColor: '#008080' },
{ label: 'Byzantium', value: 4000, backgroundColor: '#702963' },
{ label: 'Persimmon', value: 2500, backgroundColor: '#ff634d' },
{ label: 'Azure', value: 1500, backgroundColor: '#007fff' },
];
}

let options = {
chart: {
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'node:path';
import webpack from 'webpack';
import { readFile } from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
import webpack from 'webpack';

const json = await readFile(new URL('./package.json', import.meta.url));
const pkg = JSON.parse(json.toString());
Expand Down

0 comments on commit 19552e5

Please sign in to comment.