@adecore/charts 0.62.1 → 0.63.0-untangle.1

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/src/series.tsx CHANGED
@@ -200,7 +200,7 @@ export function ChartLine<Row>({ value, label, tone, icon, curve = 'linear', das
200
200
  valueLabels: false
201
201
  });
202
202
 
203
- if (chart.horizontal) {
203
+ if (!chart.plane.draws('line')) {
204
204
  return null;
205
205
  }
206
206
 
@@ -261,7 +261,7 @@ export function ChartPoint<Row>({ value, label, tone, icon, className, ref }: Ch
261
261
 
262
262
  const fallback = chart.colors.get(id) ?? seriesColor(0);
263
263
 
264
- if (chart.horizontal) {
264
+ if (!chart.plane.draws('point')) {
265
265
  return null;
266
266
  }
267
267
 
@@ -322,7 +322,7 @@ export function ChartArea<Row>({
322
322
  valueLabels: false
323
323
  });
324
324
 
325
- if (chart.horizontal) {
325
+ if (!chart.plane.draws('area')) {
326
326
  return null;
327
327
  }
328
328
 
package/src/spark.ts CHANGED
@@ -2,7 +2,7 @@ const GAP = 2;
2
2
  /* The shortest column that still reads as a bar rather than a dot. */
3
3
  const MIN_HEIGHT = 4;
4
4
 
5
- export interface SparkColumn {
5
+ interface SparkColumn {
6
6
  readonly x: number;
7
7
  readonly y: number;
8
8
  readonly width: number;
package/src/store.ts CHANGED
@@ -43,17 +43,17 @@ export interface BandEntry {
43
43
  readonly color: string;
44
44
  }
45
45
 
46
- export interface AxisSizes {
46
+ interface AxisSizes {
47
47
  /* The room end labels take right of the plot, inside its svg. */
48
48
  readonly end: number | null;
49
49
  /* The room the row labels of a horizontal chart take left of the plot. */
50
50
  readonly start: number | null;
51
51
  }
52
52
 
53
- export type YAxisSide = 'left' | 'right';
53
+ type YAxisSide = 'left' | 'right';
54
54
 
55
55
  /* A y axis on one side. Both sides read the one value scale, so each keeps its own ticks, title and format. */
56
- export interface YAxisEntry {
56
+ interface YAxisEntry {
57
57
  /* Null before its labels have been measured. */
58
58
  readonly width: number | null;
59
59
  readonly ticks: number | null;
@@ -63,15 +63,14 @@ export interface YAxisEntry {
63
63
  }
64
64
 
65
65
  /* One row of labels under the plot; the rows stack in the order of the children. */
66
- export interface XAxisEntry {
67
- /* The height of the row. */
66
+ interface XAxisEntry {
68
67
  readonly room: number;
69
68
  /* The widest label, which decides how many fit; null before the row has been measured. */
70
69
  readonly widest: number | null;
71
70
  readonly format: ((x: ChartX) => string) | undefined;
72
71
  }
73
72
 
74
- export interface ChartFormats {
73
+ interface ChartFormats {
75
74
  /* The title of the x axis, which names the x where a point is read out. */
76
75
  readonly xTitle?: string;
77
76
  }
@@ -3,7 +3,7 @@ import { formatClock, formatDay, formatDayClock } from '@adecore/ui/format';
3
3
  const HOUR = 60 * 60 * 1000;
4
4
  const DAY = 24 * HOUR;
5
5
 
6
- export type TimeLabel = 'clock' | 'dayClock' | 'day';
6
+ type TimeLabel = 'clock' | 'dayClock' | 'day';
7
7
 
8
8
  /*
9
9
  * How a time axis writes its ticks: the clock within a day, the day once the ticks are a day apart, and
@@ -133,7 +133,7 @@ export function durationTicks(total: number, count = 5): number[] {
133
133
  return ticks;
134
134
  }
135
135
 
136
- export interface TimelineBar {
136
+ interface TimelineBar {
137
137
  /* Both in percent of the axis. */
138
138
  readonly left: number;
139
139
  readonly width: number;
@@ -172,7 +172,7 @@ export function kindTimes(rows: readonly TimelineTreeRow<TimelineSpan>[]): Map<s
172
172
  return times;
173
173
  }
174
174
 
175
- export type TimelineMove = { readonly focus: number } | { readonly expand: string } | { readonly collapse: string } | { readonly select: string };
175
+ type TimelineMove = { readonly focus: number } | { readonly expand: string } | { readonly collapse: string } | { readonly select: string };
176
176
 
177
177
  /*
178
178
  * What a key does in the tree of rows, as in a tree view: Up and Down step, Home and End go to the ends, Right