bezel-charts 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,7 +20,7 @@ Bezel Charts is a set of free, open-source web components: fourteen chart tiles
20
20
  - **Made for READMEs.** Every chart exports as a clean static SVG, so a GitHub README can show a real chart.
21
21
  - **Data science friendly.** Scatter plots with a least-squares trend line and Pearson's r, grouped series, goal lines and notes on key points.
22
22
  - **Speaks your language.** Numbers and dates follow any locale, including Persian.
23
- - **Light.** About 22 kB gzipped for all fourteen charts, or 7 to 11 kB for a page that loads just one. No dependencies and no build step.
23
+ - **Light.** About 24 kB gzipped for all fourteen charts, or 7 to 12 kB for a page that loads just one. No dependencies and no build step.
24
24
  - **Accessible.** Tab to any chart and step through its values with the arrow keys. Screen readers hear each value and get a hidden table of the data. Dashes, shapes and patterns tell series apart without relying on colour, and animation respects reduced-motion settings.
25
25
  - **Python too.** `pip install bezel-charts` draws the same charts straight from a pandas DataFrame, for notebooks, reports and READMEs.
26
26
 
@@ -49,7 +49,7 @@ A sibling of [Bezel](https://github.com/ShazMoghaddam/bezel), the clock, calenda
49
49
  <bezel-bars heading="Commits this week" values="4,9,6,3,8,5,3" labels="M,T,W,T,F,S,S" stat="total"></bezel-bars>
50
50
  ```
51
51
 
52
- `@1` always loads the latest 1.x release, so you get fixes without changing anything. To pin an exact version, use `@v1.7.0` instead.
52
+ `@1` always loads the latest 1.x release, so you get fixes without changing anything. To pin an exact version, use `@v1.8.0` instead.
53
53
 
54
54
  That's all. Charts fill the width of whatever they sit in and redraw when it changes, so they work in a sidebar, a card grid or a full-width section without extra CSS.
55
55
 
@@ -84,10 +84,10 @@ import { toSVG } from 'bezel-charts/line'; // render and toSVG work for every ch
84
84
  | Page | Gzipped |
85
85
  | --- | --- |
86
86
  | One sparkline, ring, donut, gauge, progress bar or heatmap | 7.2 to 7.4 kB |
87
- | One line, area, histogram, box plot, scatter or bar chart | 9.4 to 10.4 kB |
88
- | One bars-and-line combo | 11.1 kB |
89
- | A line and a bar chart | 12.6 kB |
90
- | Every chart: the full bundle | 22.1 kB |
87
+ | One histogram, box plot, scatter, bar or bars-and-line chart | 9.4 to 10.5 kB |
88
+ | One line or area chart | 12.0 to 12.3 kB |
89
+ | A line and a bar chart | 14.8 kB |
90
+ | Every chart: the full bundle | 23.8 kB |
91
91
 
92
92
  Once a page needs four or five different charts, load the full bundle instead. `<bezel-chart type="…">` works with whichever charts are loaded, and tells you which file to add if its type isn't one of them. The classic `iife.js` script always has every chart, because a classic script can't load the shared file.
93
93
 
@@ -164,6 +164,13 @@ One or more lines over time, with an axis, a legend and notes on key moments. Se
164
164
  | `straight` | boolean, straight lines instead of curves | off |
165
165
  | `dash` | a line style per series: `solid`, `dashed`, `dotted`, `dashdot`. On its own, gives each series the next style | off |
166
166
  | `markers` | a shape on each point, per series: `circle`, `square`, `triangle`, `diamond`, `none`. On its own, gives each series the next shape | off |
167
+ | `dates` | one date per point, `2026-01-05` or `2026-01-05T14:30`: points sit where they fall in time | evenly spaced |
168
+ | `min`, `max` | fix the value axis; anything beyond is clipped at the edge, and the tooltip keeps the true value | from the data |
169
+ | `log` | boolean, a log scale: each power of ten gets the same height | off |
170
+
171
+ **Dates.** With `dates`, a reading on 1 January, one on 2 January and one on 1 March sit where they fall, instead of evenly spaced. The axis picks its own step for the span and the width: hours (`14:00`), days or weeks (`5 Jan`), months (`Jan 2026`, then `Feb`, `Mar`), or years. Tooltips and the data table show the full date, and `labels`, if you give them, still name the points. Dates are read as written, with no time zone conversion.
172
+
173
+ **Log scale.** `log` suits values that grow fast, like users or prices over years: 100, 1,000, 10k and 100k sit evenly apart. Zero and negative values have no place on a log scale, so the line leaves a gap there, and the tooltip and data table still show them.
167
174
 
168
175
  ### `<bezel-area>`
169
176
 
@@ -184,6 +191,8 @@ Filled areas over time. Several series overlap as see-through fills, or add `sta
184
191
  | `straight` | boolean, straight edges instead of curves | off |
185
192
  | `dash`, `markers` | styles for each series' top edge, as on line charts | off |
186
193
  | `patterns` | a fill per series, as on bars | off |
194
+ | `dates` | one date per point, as on line charts | evenly spaced |
195
+ | `max`, `min` | fix the value axis, as on line charts; `min` only at or below zero, so areas keep their base | from the data |
187
196
 
188
197
  The tooltip lists every series, plus the total when stacked, and each series' share in a percent stack. `show-values` writes each value, or the total above each column of a stack. Negative values stack below zero, as stacked bars do, but stacks read best when every value is positive: bands that swing between positive and negative cross over each other.
189
198
 
@@ -558,7 +567,7 @@ docs/ the README image and social preview, with the pages that render t
558
567
  test/ node:test suites, plus a Playwright browser test
559
568
  ```
560
569
 
561
- Each chart is a pure function that takes its options and a theme and returns an SVG string, which keeps them easy to test and lets the same code run in Node. The full bundle has a 24 kB gzip budget and each chart file its own, checked in CI by `npm run size`. See [CONTRIBUTING.md](CONTRIBUTING.md).
570
+ Each chart is a pure function that takes its options and a theme and returns an SVG string, which keeps them easy to test and lets the same code run in Node. The full bundle has a 26 kB gzip budget and each chart file its own, checked in CI by `npm run size`. See [CONTRIBUTING.md](CONTRIBUTING.md).
562
571
 
563
572
  ## Security
564
573