1.2.0 • Published 2 years ago

@internetarchive/histogram-date-range v1.2.0

Weekly downloads
12
License
AGPL-3.0-only
Repository
-
Last release
2 years ago

\

Check out the interactive demo.

This webcomponent follows the open-wc recommendation.

Travis: Build Status CodeCov: codecov

Installation

npm i @internetarchive/histogram-date-range

Usage

<script type="module">
  import 'histogram-date-range/dist/src/histogram-date-range.js';
</script>
<histogram-date-range
  width="300"
  height="50"
  tooltipWidth="140"
  dateFormat="DD MMM YYYY"
  style="
    --histogramDateRangeTooltipFontSize: 1rem;
    --histogramDateRangeInputWidth: 85px;
  "
  minDate="1400"
  maxDate="2021"
  minSelectedDate="1800"
  maxSelectedDate="1900"
  bins="[ 74, 67, 17, 66, 49, 93, 47, 61, 32, 46, 53, 2,
          13, 45, 28, 1, 8, 70, 37, 74, 67, 17, 66, 49, 93,
          47, 61, 70, 37, 74, 67, 17, 66, 49, 93, 47, 61, 32,
          32, 70, 37, 74, 67, 17, 66, 49, 93, 47, 61, 32
        ]"
></histogram-date-range>

A slot named inputs-right-side is available for inserting elements to the right of the min/max date input fields, e.g.:

<histogram-date-range>
  <button slot="inputs-right-side">Apply</button>
</histogram-date-range>

Linting with ESLint, Prettier, and Types

To scan the project for linting errors, run

npm run lint

You can lint with ESLint and Prettier individually as well

npm run lint:eslint
npm run lint:prettier

To automatically fix many linting errors, run

npm run format

You can format using ESLint and Prettier individually as well

npm run format:eslint
npm run format:prettier

Testing with Web Test Runner

To run the suite of Web Test Runner tests, run

npm run test

To run the tests in watch mode (for <abbr title="test driven development">TDD</abbr>, for example), run

npm run test:watch

Tooling configs

For most of the tools, the configuration is in the package.json to reduce the amount of files in your project.

If you customize the configuration a lot, you can consider moving them to individual files.

Local Demo with web-dev-server

npm start

To run a local development server that serves the basic demo located in demo/index.html

1.2.0

2 years ago

1.1.1-alpha.4

2 years ago

1.1.1-alpha.3

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

1.0.1-alpha.1

2 years ago

0.1.10-alpha.2

2 years ago

0.1.12-alpha.3

2 years ago

0.1.12-alpha.1

2 years ago

0.1.12-alpha.2

2 years ago

1.1.1-alpha.2

2 years ago

0.1.10-alpha.3

2 years ago

1.1.1-alpha.1

2 years ago

0.1.10-alpha.1

2 years ago

0.1.8-alpha.2

3 years ago

0.1.8-alpha.3

3 years ago

0.1.8-alpha.1

3 years ago

0.1.8-alpha.4

3 years ago

0.1.8

3 years ago

0.1.9

3 years ago

0.1.7-a1

3 years ago

0.1.7

3 years ago

0.1.6-alpha1

3 years ago

0.1.4

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.3-alpha

3 years ago

0.1.1-alpha

3 years ago

0.1.2-alpha

3 years ago

0.1.0-beta

4 years ago

0.1.0

4 years ago

0.0.11-beta

4 years ago

0.0.8-beta

4 years ago

0.0.10-alpha

4 years ago

0.0.9-beta

4 years ago

0.0.6-alpha

4 years ago

0.0.7-beta

4 years ago

0.0.7-alpha

4 years ago

0.0.10-beta

4 years ago

0.0.8-alpha

4 years ago

0.0.4-alpha

4 years ago

0.0.5-alpha

4 years ago

0.0.5-beta

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago