@martinomagnifico/tablechart 1.2.3 → 1.2.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.2.5] - Unreleased
4
+
5
+ ### Added
6
+
7
+ - `--tablechart-bar-radius`, rounded ends on columns and bars.
8
+ - `--tablechart-slice-radius`, rounded corners on donut slices.
9
+ - `--tablechart-area-fade`, the opacity of an area at the baseline.
10
+
11
+ ### Changed
12
+
13
+ - Areas fade towards the baseline. Stacked areas stay flat.
14
+
15
+ ### Fixed
16
+
17
+ - A number on a stacked area no longer covers a point.
18
+
19
+ ## [1.2.4] - 2026-11-05
20
+
21
+ ### Added
22
+
23
+ - `lines` and `data-chart-lines`, the order of the points and dashes of lines.
24
+ - `data-line="dash-dot"`, a third line style.
25
+ - `marker: "none"` and `data-marker="none"`, a line without points.
26
+
27
+ ### Changed
28
+
29
+ - 24 different lines before they repeat.
30
+ - With a chosen set such as `data-chart-values="last"`, the last number of a line goes next to its name.
31
+
32
+ ### Fixed
33
+
34
+ - Columns and bars side by side follow `data-chart-labels="inside"`.
35
+ - Minimum build time for a line with few points.
36
+ - Contrast of names next to lines.
37
+ - Names at the ends of lines keep clear of the last numbers.
38
+ - The contrast check also measures text on the background.
39
+ - A chart measures its background again after a theme switch.
40
+ - Filled and open points have the same outer size.
41
+ - Points in the legend and the tooltip have the same size and shape as on the chart.
42
+ - The legend and the tooltip show `--tablechart-point-color`.
43
+ - A value of a chosen set that finds a place is shown.
44
+ - A value moved away from its point gets no other line in between.
45
+
3
46
  ## [1.2.3] - 2026-10-31
4
47
 
5
48
  ### Added
@@ -4,6 +4,12 @@ declare const SHOWN_CLASS = "is-shown";
4
4
  declare const PRINTING_CLASS = "is-printing";
5
5
  declare const AT_ONCE_CLASS = "is-at-once";
6
6
  declare const QUEUED_CLASS = "tablechart-queued";
7
+ /** One item of the `lines` option. */
8
+ interface LineStyle {
9
+ marker?: "circle" | "square" | "diamond" | "none";
10
+ open?: boolean;
11
+ line?: "dashed" | "dotted" | "dash-dot" | "solid";
12
+ }
7
13
  interface Config {
8
14
  /** Which elements Tablechart turns into charts. */
9
15
  selector: string;
@@ -46,6 +52,8 @@ interface Config {
46
52
  table: "never" | "auto" | "print" | "always";
47
53
  /** With `auto`, the table is printed only up to this many values, rows times value columns; a longer one prints the summary instead. */
48
54
  tablelimit: number;
55
+ /** The look of each next line, instead of the 24 default looks; after the last one it starts again. `data-chart-lines` on a figure or a parent, and `data-marker` and `data-line` on a column header, still win. */
56
+ lines: LineStyle[] | null;
49
57
  /** The summary of a chart, in a `.chart-summary`: `"always"`, only in `"print"`, in print when the table is not (`"auto"`), or `"never"`, for screen readers only. A figure overrides it with `data-chart-summary`. */
50
58
  summary: "never" | "auto" | "print" | "always";
51
59
  /** The name of the total that a donut without a total row works out, for screen readers. */
@@ -141,7 +149,7 @@ interface Series {
141
149
  focus: boolean;
142
150
  /** `data-marker` on the header, such as `square` or `diamond open`. */
143
151
  marker: string | null;
144
- line: "dashed" | "dotted" | null;
152
+ line: "dashed" | "dotted" | "dash-dot" | null;
145
153
  /** `data-group` on the header: the cells name a group, such as "Predefined". */
146
154
  group: boolean;
147
155
  /** `data-chart="line"` on the header, in a chart that takes it: a line over the other marks. */
@@ -176,6 +184,8 @@ interface Geometry {
176
184
  length: (name: string, fallback: string) => number | null;
177
185
  barWidth: number;
178
186
  barMax: number;
187
+ /** How round the end of a bar is, in viewBox units; 0 for square. */
188
+ barRadius: number;
179
189
  height: number;
180
190
  /** viewBox units per screen pixel. */
181
191
  unit: number;
@@ -202,6 +212,8 @@ interface Geometry {
202
212
  shape: Shape;
203
213
  /** Which values a line or an area shows. */
204
214
  pick: ValuePick;
215
+ /** The last number of each line goes next to its name. */
216
+ numbersAtEnd: boolean;
205
217
  /** Empty when the chart is not stacked or its kind shows no totals. */
206
218
  totals: HTMLElement[];
207
219
  svg: SVGSVGElement;
@@ -298,6 +310,7 @@ interface TooltipLine {
298
310
  open: boolean;
299
311
  line: string | null;
300
312
  box: boolean;
313
+ point?: string;
301
314
  };
302
315
  }
303
316
  interface HeadroomInput {
@@ -422,6 +435,6 @@ declare const readMarkdownRows: (figures: HTMLElement[]) => void;
422
435
  declare const assignKeys: (figures: HTMLElement[], langattribute: string | false) => void;
423
436
  /** Warns about each line, slice or bar that does not stand out enough from the background. Faint parts that are out of focus are left out. */
424
437
  declare const checkContrast: (figure: HTMLElement) => void;
425
- /** Warns about each number inside a bar whose colour does not stand out enough from that bar, once the chart is built. */
438
+ /** Warns about text that does not stand out enough: a number inside a bar from that bar, other text from the background, once the chart is built. */
426
439
  declare const checkTextContrast: (figure: HTMLElement) => void;
427
440
  export { PRINTING_CLASS as A, Series as C, Config as D, AT_ONCE_CLASS as E, SHOWN_CLASS as M, defaultConfig as N, PLACED_CLASS as O, Row as S, stepTo as T, setShown as _, loadSources as a, ChartState as b, TablechartInstance as c, init as d, prepare as f, relabel as g, layout as h, adoptTables as i, QUEUED_CLASS as j, PLOT_CLASS as k, create as l, build as m, checkTextContrast as n, readMarkdownRows as o, addType as p, assignKeys as r, TablechartChart as s, checkContrast as t, entranceOf as u, unbuild as v, StepPlan as w, ChartType as x, scatter as y };