@carbon/charts 1.16.6 → 1.16.7

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +3 -4
  3. package/dist/angle-utils-BSzg7qin.mjs +1681 -0
  4. package/dist/angle-utils-BSzg7qin.mjs.map +1 -0
  5. package/dist/array-BRmw0x1E.mjs +32 -0
  6. package/dist/array-BRmw0x1E.mjs.map +1 -0
  7. package/dist/choropleth-BwaUZYh6.mjs +11722 -0
  8. package/dist/choropleth-BwaUZYh6.mjs.map +1 -0
  9. package/dist/color-scale-utils-DAbXVtf-.mjs +5722 -0
  10. package/dist/color-scale-utils-DAbXVtf-.mjs.map +1 -0
  11. package/dist/components/essentials/geo-projection.d.ts +7 -5
  12. package/dist/components/essentials/highlights.d.ts +1 -1
  13. package/dist/components/essentials/threshold.d.ts +1 -1
  14. package/dist/components/essentials/tooltip.d.ts +1 -1
  15. package/dist/components/index.mjs +3 -3
  16. package/dist/demo/index.mjs +244 -264
  17. package/dist/demo/index.mjs.map +1 -1
  18. package/dist/enums-DwsxZqjR.mjs.map +1 -1
  19. package/dist/index-DnyOi0rJ.mjs +1477 -0
  20. package/dist/index-DnyOi0rJ.mjs.map +1 -0
  21. package/dist/index.mjs +35 -35
  22. package/dist/interfaces/axis-scales.d.ts +3 -3
  23. package/dist/interfaces/charts.d.ts +5 -3
  24. package/dist/interfaces/components.d.ts +4 -3
  25. package/dist/interfaces/model.d.ts +30 -6
  26. package/dist/model/index.mjs +1321 -17
  27. package/dist/model/index.mjs.map +1 -1
  28. package/dist/services/index.mjs +16 -16
  29. package/dist/umd/bundle.umd.js +11 -11
  30. package/dist/umd/bundle.umd.js.map +1 -1
  31. package/package.json +2 -15
  32. package/dist/_baseEach-Bp7pBkX8.mjs +0 -20
  33. package/dist/_baseEach-Bp7pBkX8.mjs.map +0 -1
  34. package/dist/angle-utils-BCx3SRS2.mjs +0 -849
  35. package/dist/angle-utils-BCx3SRS2.mjs.map +0 -1
  36. package/dist/choropleth-B7eXF9sA.mjs +0 -8662
  37. package/dist/choropleth-B7eXF9sA.mjs.map +0 -1
  38. package/dist/color-scale-utils-BaTmNvWt.mjs +0 -3467
  39. package/dist/color-scale-utils-BaTmNvWt.mjs.map +0 -1
  40. package/dist/wordcloud-BsEQRUwL.mjs +0 -1169
  41. package/dist/wordcloud-BsEQRUwL.mjs.map +0 -1
  42. package/dist/zoom-E2POxw6n.mjs +0 -739
  43. package/dist/zoom-E2POxw6n.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,14 +1,14 @@
1
- import { B as Y, m as l, C as a, D as r, t as J, x as V } from "./color-scale-utils-BaTmNvWt.mjs";
2
- import { T as yt, F as Dt, G as Lt, H as Ft, I as Pt, J as Mt, K as kt, n as Bt, L as It, y as Ht, c as Gt, E as Vt, M as Ut, f as Nt, b as Zt, g as _t, a as zt, d as Wt, N as jt, u as $t, i as Kt, s as Jt, O as Xt, P as qt, Q as Qt, R as Yt, S as eo, U as so, V as to, Y as oo, W as no, X as io, Z as ro } from "./color-scale-utils-BaTmNvWt.mjs";
1
+ import { t as Y, g as l, m as a, o as r, c as J, a as V } from "./color-scale-utils-DAbXVtf-.mjs";
2
+ import { T as yt, e as Dt, f as Lt, h as Ft, j as Pt, l as Mt, n as kt, p as Bt, q as It, r as Ht, I as Gt, d as Vt, s as Nt, J as Ut, K as Zt, L as _t, M as zt, N as Wt, u as jt, v as $t, O as Kt, w as Jt, x as qt, y as Xt, z as Qt, A as Yt, B as eo, C as so, D as to, G as oo, E as no, F as io, H as ro } from "./color-scale-utils-DAbXVtf-.mjs";
3
3
  import { i as ho } from "./index-zSuueE1Q.mjs";
4
- import { C as Re, c as Te, A as be, B as Oe, a as Se, d as fe, e as Ae, P as xe, G as ye, H as De, b as Le, M as Fe, R as Pe, T as Me, f as ke, W as Be } from "./wordcloud-BsEQRUwL.mjs";
5
- import { _ as j, r as i, q as h, L as Z, y as A, t as U, e as $, S as Ie, u as K, F as p, l as R } from "./enums-DwsxZqjR.mjs";
6
- import { A as mo, a as lo, b as po, c as Co, d as uo, f as vo, B as go, g as wo, C as Eo, h as Ro, i as To, j as bo, k as Oo, m as So, n as fo, D as Ao, o as xo, G as yo, p as Do, s as Lo, v as Fo, M as Po, w as Mo, P as ko, x as Bo, R as Io, z as Ho, H as Go, T as Vo, I as Uo, J as No, K as Zo, N as _o, O as zo, Q as Wo, U as jo, V as $o, W as Ko, Z as Jo, X as Xo, Y as qo } from "./enums-DwsxZqjR.mjs";
7
- import { a9 as He, L as ee, l as Ge, r as _, T as z, a6 as g, a7 as L, u as se, p as W, C as Ve, a as Ue, q as Ne, o as Ze, c as _e, k as te, v as ze, b as d, G as w, R as B, P as k, w as oe, X as M, _ as C, y as We, Z as I, z as je, D as $e, m as ne, E as Ke, F as Je, a0 as ie, a2 as re, S as N, Y as ae, K as he, a1 as ce, V as Xe, I as qe, J as Qe, N as Ye, B as es, O as ss, $ as ts, Q as os, M as ns, U as is, W as rs, a3 as as, a4 as hs, a5 as cs } from "./choropleth-B7eXF9sA.mjs";
8
- import { A as Yo, x as en, a8 as sn, n as tn, H as on, d as nn, e as rn, f as an, g as hn, h as cn, i as mn, j as ln, s as pn, t as dn } from "./choropleth-B7eXF9sA.mjs";
9
- import { c as ms, C as ls, E as ps, F as ds, T as Cs, b as us, a as vs, Z as gs, f as ws } from "./zoom-E2POxw6n.mjs";
10
- import { D as Es, G as Rs } from "./angle-utils-BCx3SRS2.mjs";
11
- import { S as un, d as vn, a as gn, p as wn, b as En, r as Rn } from "./angle-utils-BCx3SRS2.mjs";
4
+ import { ChartModel as Re, ChartModelCartesian as Te, AlluvialChartModel as be, BoxplotChartModel as Oe, BulletChartModel as Se, ChoroplethModel as fe, CirclePackChartModel as Ae, PieChartModel as xe, GaugeChartModel as ye, HeatmapModel as De, ChartModelBinned as Le, MeterChartModel as Fe, RadarChartModel as Pe, TreeChartModel as Me, TreemapChartModel as ke, WordCloudModel as Be } from "./model/index.mjs";
5
+ import { _ as j, r as i, q as h, L as Z, y as A, t as N, e as $, S as Ie, u as K, F as p, l as R } from "./enums-DwsxZqjR.mjs";
6
+ import { A as mo, a as lo, b as po, c as Co, d as uo, f as vo, B as go, g as wo, C as Eo, h as Ro, i as To, j as bo, k as Oo, m as So, n as fo, D as Ao, o as xo, G as yo, p as Do, s as Lo, v as Fo, M as Po, w as Mo, P as ko, x as Bo, R as Io, z as Ho, H as Go, T as Vo, I as No, J as Uo, K as Zo, N as _o, O as zo, Q as Wo, U as jo, V as $o, W as Ko, Z as Jo, X as qo, Y as Xo } from "./enums-DwsxZqjR.mjs";
7
+ import { c as He, L as ee, C as Ge, T as _, a as z, b as g, S as L, d as se, M as W, e as Ve, f as Ne, g as Ue, H as Ze, Z as _e, A as te, h as ze, i as d, G as w, R as B, j as k, k as oe, l as M, m as C, B as We, n as I, o as je, p as $e, q as ne, r as Ke, s as Je, t as ie, u as re, v as U, w as ae, x as he, y as ce, P as qe, D as Xe, z as Qe, E as Ye, F as es, I as ss, J as ts, K as os, N as ns, O as is, Q as rs, U as as, V as hs, W as cs } from "./choropleth-BwaUZYh6.mjs";
8
+ import { X as Yo, a8 as en, a9 as sn, a7 as tn, Y as on, _ as nn, $ as rn, a0 as an, a1 as hn, a2 as cn, a3 as mn, a4 as ln, a5 as pn, a6 as dn } from "./choropleth-BwaUZYh6.mjs";
9
+ import { b as ms, C as ls, E as ps, F as ds, T as Cs, a as us, c as vs, Z as gs, f as ws } from "./index-DnyOi0rJ.mjs";
10
+ import { D as Es, G as Rs } from "./angle-utils-BSzg7qin.mjs";
11
+ import { S as un, d as vn, a as gn, p as wn, b as En, r as Rn } from "./angle-utils-BSzg7qin.mjs";
12
12
  function Ts(t, s, e) {
13
13
  var n = t.length;
14
14
  return e = e === void 0 ? n : e, !s && e >= n ? t : ms(t, s, e);
@@ -20,7 +20,7 @@ function me(t) {
20
20
  function Ls(t) {
21
21
  return t.split("");
22
22
  }
23
- var le = "\\ud800-\\udfff", Fs = "\\u0300-\\u036f", Ps = "\\ufe20-\\ufe2f", Ms = "\\u20d0-\\u20ff", ks = Fs + Ps + Ms, Bs = "\\ufe0e\\ufe0f", Is = "[" + le + "]", X = "[" + ks + "]", q = "\\ud83c[\\udffb-\\udfff]", Hs = "(?:" + X + "|" + q + ")", pe = "[^" + le + "]", de = "(?:\\ud83c[\\udde6-\\uddff]){2}", Ce = "[\\ud800-\\udbff][\\udc00-\\udfff]", Gs = "\\u200d", ue = Hs + "?", ve = "[" + Bs + "]?", Vs = "(?:" + Gs + "(?:" + [pe, de, Ce].join("|") + ")" + ve + ue + ")*", Us = ve + ue + Vs, Ns = "(?:" + [pe + X + "?", X, de, Ce, Is].join("|") + ")", Zs = RegExp(q + "(?=" + q + ")|" + Ns + Us, "g");
23
+ var le = "\\ud800-\\udfff", Fs = "\\u0300-\\u036f", Ps = "\\ufe20-\\ufe2f", Ms = "\\u20d0-\\u20ff", ks = Fs + Ps + Ms, Bs = "\\ufe0e\\ufe0f", Is = "[" + le + "]", q = "[" + ks + "]", X = "\\ud83c[\\udffb-\\udfff]", Hs = "(?:" + q + "|" + X + ")", pe = "[^" + le + "]", de = "(?:\\ud83c[\\udde6-\\uddff]){2}", Ce = "[\\ud800-\\udbff][\\udc00-\\udfff]", Gs = "\\u200d", ue = Hs + "?", ve = "[" + Bs + "]?", Vs = "(?:" + Gs + "(?:" + [pe, de, Ce].join("|") + ")" + ve + ue + ")*", Ns = ve + ue + Vs, Us = "(?:" + [pe + q + "?", q, de, Ce, Is].join("|") + ")", Zs = RegExp(X + "(?=" + X + ")|" + Us + Ns, "g");
24
24
  function _s(t) {
25
25
  return t.match(Zs) || [];
26
26
  }
@@ -131,7 +131,7 @@ class T {
131
131
  let S = h.COLUMN;
132
132
  if (D) {
133
133
  const f = l(n, "legend", "position");
134
- f === "left" ? (S = h.ROW, n.legend.orientation || (n.legend.orientation = U.VERTICAL)) : f === "right" ? (S = h.ROW_REVERSE, n.legend.orientation || (n.legend.orientation = U.VERTICAL)) : f === "bottom" && (S = h.COLUMN_REVERSE);
134
+ f === "left" ? (S = h.ROW, n.legend.orientation || (n.legend.orientation = N.VERTICAL)) : f === "right" ? (S = h.ROW_REVERSE, n.legend.orientation || (n.legend.orientation = N.VERTICAL)) : f === "bottom" && (S = h.COLUMN_REVERSE);
135
135
  }
136
136
  const P = {
137
137
  id: "spacer",
@@ -219,8 +219,8 @@ class u extends T {
219
219
  };
220
220
  O && !x && s.push(
221
221
  new Ve(this.model, this.services),
222
- new Ue(this.model, this.services)
223
- ), s.push(new Ne(this.model, this.services)), s.push(new Ze(this.model, this.services));
222
+ new Ne(this.model, this.services)
223
+ ), s.push(new Ue(this.model, this.services)), s.push(new Ze(this.model, this.services));
224
224
  const v = {
225
225
  id: "graph-frame",
226
226
  components: s,
@@ -230,7 +230,7 @@ class u extends T {
230
230
  let f = h.COLUMN;
231
231
  if (E) {
232
232
  const G = l(this.model.getOptions(), "legend", "position");
233
- G === K.LEFT ? (f = h.ROW, this.model.getOptions().legend.orientation || (this.model.getOptions().legend.orientation = U.VERTICAL)) : G === K.RIGHT ? (f = h.ROW_REVERSE, this.model.getOptions().legend.orientation || (this.model.getOptions().legend.orientation = U.VERTICAL)) : G === K.BOTTOM && (f = h.COLUMN_REVERSE);
233
+ G === K.LEFT ? (f = h.ROW, this.model.getOptions().legend.orientation || (this.model.getOptions().legend.orientation = N.VERTICAL)) : G === K.RIGHT ? (f = h.ROW_REVERSE, this.model.getOptions().legend.orientation || (this.model.getOptions().legend.orientation = N.VERTICAL)) : G === K.BOTTOM && (f = h.COLUMN_REVERSE);
234
234
  }
235
235
  const ge = {
236
236
  id: "spacer",
@@ -511,10 +511,10 @@ const Q = {
511
511
  [R.LINE]: [k, M],
512
512
  [R.SCATTER]: [M],
513
513
  [R.AREA]: [oe, k, M],
514
- [R.STACKED_AREA]: [ie, k, re, N],
514
+ [R.STACKED_AREA]: [ie, k, re, U],
515
515
  [R.SIMPLE_BAR]: [ae],
516
516
  [R.GROUPED_BAR]: [he, I],
517
- [R.STACKED_BAR]: [ce, N]
517
+ [R.STACKED_BAR]: [ce, U]
518
518
  };
519
519
  class ct extends u {
520
520
  constructor(s, e) {
@@ -584,7 +584,7 @@ class Js extends T {
584
584
  */
585
585
  getComponents() {
586
586
  const s = [
587
- new Xe(this.model, this.services),
587
+ new qe(this.model, this.services),
588
588
  new C(this.model, this.services, {
589
589
  skeleton: p.PIE
590
590
  })
@@ -603,7 +603,7 @@ class mt extends Js {
603
603
  */
604
604
  getComponents() {
605
605
  const s = [
606
- new qe(this.model, this.services),
606
+ new Xe(this.model, this.services),
607
607
  new C(this.model, this.services, {
608
608
  skeleton: p.DONUT
609
609
  })
@@ -967,7 +967,7 @@ class Ot extends u {
967
967
  const s = [
968
968
  new d(this.model, this.services),
969
969
  new w(this.model, this.services),
970
- new N(this.model, this.services),
970
+ new U(this.model, this.services),
971
971
  new ie(this.model, this.services),
972
972
  new k(this.model, this.services, { stacked: !0 }),
973
973
  new re(this.model, this.services, {
@@ -995,7 +995,7 @@ class St extends u {
995
995
  const s = [
996
996
  new d(this.model, this.services),
997
997
  new w(this.model, this.services),
998
- new N(this.model, this.services),
998
+ new U(this.model, this.services),
999
999
  new ce(this.model, this.services),
1000
1000
  new C(this.model, this.services, {
1001
1001
  skeleton: p.VERT_OR_HORIZ
@@ -1059,7 +1059,7 @@ export {
1059
1059
  To as CartesianOrientations,
1060
1060
  us as CartesianScales,
1061
1061
  T as Chart,
1062
- Ue as ChartBrush,
1062
+ Ne as ChartBrush,
1063
1063
  Ve as ChartClip,
1064
1064
  bo as ChartEvent,
1065
1065
  Re as ChartModel,
@@ -1082,7 +1082,7 @@ export {
1082
1082
  Es as DOMUtils,
1083
1083
  Ao as DividerStatus,
1084
1084
  xo as DominantBaseline,
1085
- qe as Donut,
1085
+ Xe as Donut,
1086
1086
  mt as DonutChart,
1087
1087
  ps as Events,
1088
1088
  at as ExperimentalChoroplethChart,
@@ -1110,7 +1110,7 @@ export {
1110
1110
  i as LayoutGrowth,
1111
1111
  ee as Legend,
1112
1112
  Lo as LegendItemType,
1113
- U as LegendOrientations,
1113
+ N as LegendOrientations,
1114
1114
  K as LegendPositions,
1115
1115
  k as Line,
1116
1116
  ut as LineChart,
@@ -1124,7 +1124,7 @@ export {
1124
1124
  W as Modal,
1125
1125
  Po as ModalEvent,
1126
1126
  Mo as ModelEvent,
1127
- Xe as Pie,
1127
+ qe as Pie,
1128
1128
  Js as PieChart,
1129
1129
  xe as PieChartModel,
1130
1130
  ko as PieEvent,
@@ -1150,14 +1150,14 @@ export {
1150
1150
  Ot as StackedAreaChart,
1151
1151
  ce as StackedBar,
1152
1152
  St as StackedBarChart,
1153
- N as StackedRuler,
1153
+ U as StackedRuler,
1154
1154
  re as StackedScatter,
1155
1155
  Go as Statuses,
1156
1156
  yt as TIME_INTERVALS,
1157
1157
  Vo as TextAnchor,
1158
- Ne as Threshold,
1159
- Uo as ThresholdEvent,
1160
- No as TickRotations,
1158
+ Ue as Threshold,
1159
+ No as ThresholdEvent,
1160
+ Uo as TickRotations,
1161
1161
  _ as Title,
1162
1162
  z as Toolbar,
1163
1163
  Zo as ToolbarControlTypes,
@@ -1183,8 +1183,8 @@ export {
1183
1183
  gs as Zoom,
1184
1184
  _e as ZoomBar,
1185
1185
  Jo as ZoomBarTypes,
1186
- Xo as ZoomDomainEvent,
1187
- qo as ZoombarEvent,
1186
+ qo as ZoomDomainEvent,
1187
+ Xo as ZoombarEvent,
1188
1188
  Dt as alluvial,
1189
1189
  Lt as area,
1190
1190
  nn as arrowLeft,
@@ -1202,11 +1202,11 @@ export {
1202
1202
  Ht as color,
1203
1203
  Gt as computeTimeIntervalName,
1204
1204
  Vt as configurations,
1205
- Ut as defaultLegendAdditionalItems,
1205
+ Nt as defaultLegendAdditionalItems,
1206
1206
  vn as degToRad,
1207
1207
  ln as diamond,
1208
1208
  gn as distanceBetweenPointOnCircAndVerticalDiameter,
1209
- Nt as formatDateTillMilliSeconds,
1209
+ Ut as formatDateTillMilliSeconds,
1210
1210
  Zt as formatTick,
1211
1211
  _t as getColorScale,
1212
1212
  zt as getDomain,
@@ -1216,8 +1216,8 @@ export {
1216
1216
  ho as interfaces,
1217
1217
  Kt as isTickPrimary,
1218
1218
  Jt as legend,
1219
- Xt as lines,
1220
- qt as meter,
1219
+ qt as lines,
1220
+ Xt as meter,
1221
1221
  r as options,
1222
1222
  Qt as pie,
1223
1223
  wn as polarToCartesianCoords,
@@ -42,7 +42,7 @@ export interface BasedAxisOptions {
42
42
  * Override for the orientation of the title (for vertical axes).
43
43
  * The title string can be overrided to be rotated left or right.
44
44
  */
45
- titleOrientation?: AxisTitleOrientations;
45
+ titleOrientation?: AxisTitleOrientations | string;
46
46
  /**
47
47
  * thresholds
48
48
  * @example
@@ -81,9 +81,9 @@ export interface BasedAxisOptions {
81
81
  /**
82
82
  * function to format the ticks
83
83
  */
84
- formatter?: (tick: number | Date, i: number) => string;
84
+ formatter?: ((tick: number | Date, i: number) => string) | ((tick: number | Date) => string);
85
85
  /**
86
- * optional custom array of tick values that is within the domain of data
86
+ * optional array of tick values that is within the domain of data
87
87
  */
88
88
  values?: any[];
89
89
  };
@@ -1,3 +1,4 @@
1
+ import { Topology } from 'topojson-specification';
1
2
  import { Alignments, ArrowDirections, ChartTheme, ChartTypes, ColorLegendType, DividerStatus, GaugeTypes, Projection, Statuses, TreeTypes } from './enums';
2
3
  import { BarOptions, GridOptions, LegendOptions, StackedBarOptions, ToolbarOptions, TooltipOptions, ZoomBarsOptions, Locale, TabularRepCustomizationOptions } from './components';
3
4
  import { AxesOptions, AxisOptions, BinnedAxisOptions, ComboChartAxisOptions, TimeScaleOptions } from './axis-scales';
@@ -500,7 +501,7 @@ export interface HeatmapChartOptions extends BaseChartOptions {
500
501
  * Position is determined by text length
501
502
  */
502
503
  title?: string;
503
- type: ColorLegendType | string;
504
+ type?: ColorLegendType | string;
504
505
  };
505
506
  };
506
507
  }
@@ -508,7 +509,7 @@ export interface HeatmapChartOptions extends BaseChartOptions {
508
509
  * Options common to any thematic chart
509
510
  */
510
511
  export interface ThematicChartOptions extends BaseChartOptions {
511
- thematic: {
512
+ thematic?: {
512
513
  projection: Projection | string;
513
514
  };
514
515
  }
@@ -516,7 +517,7 @@ export interface ThematicChartOptions extends BaseChartOptions {
516
517
  * Options common to any thematic chart
517
518
  */
518
519
  export interface ChoroplethChartOptions extends ThematicChartOptions {
519
- choropleth: {
520
+ choropleth?: {
520
521
  /**
521
522
  * customize color legend
522
523
  * enabled by default on select charts
@@ -529,6 +530,7 @@ export interface ChoroplethChartOptions extends ThematicChartOptions {
529
530
  title?: string;
530
531
  type: ColorLegendType | string;
531
532
  };
533
+ geoData: Topology;
532
534
  };
533
535
  }
534
536
  export type WorldCloudChartOptions = WordCloudChartOptions;
@@ -1,4 +1,4 @@
1
- import { LayoutGrowth, LegendPositions, Alignments, ToolbarControlTypes, ZoomBarTypes } from './enums';
1
+ import { LayoutGrowth, LegendOrientations, LegendPositions, Alignments, ToolbarControlTypes, ZoomBarTypes } from './enums';
2
2
  import { Component } from '../components';
3
3
  import { TruncationOptions } from './truncation';
4
4
  /**
@@ -108,6 +108,7 @@ export interface LegendOptions {
108
108
  * customized legend items
109
109
  */
110
110
  additionalItems?: LegendItem[];
111
+ orientation?: LegendOrientations;
111
112
  }
112
113
  /**
113
114
  * customize the legend item
@@ -161,11 +162,11 @@ export interface ThresholdOptions {
161
162
  /**
162
163
  * hex threshold line color
163
164
  */
164
- fillColor: string;
165
+ fillColor?: string;
165
166
  /**
166
167
  * threshold label
167
168
  */
168
- label: string;
169
+ label?: string;
169
170
  }
170
171
  export interface GridOptions {
171
172
  y?: {
@@ -1,35 +1,59 @@
1
1
  import { AxisChartOptions } from './charts';
2
+ /**
3
+ * Represents tabular data for a chart.
4
+ * Each record is an object where keys are strings and values can be of any type.
5
+ * @type {Record<string, any>[]}
6
+ */
2
7
  export type ChartTabularData = Record<string, any>[];
3
8
  /**
4
9
  * Configuration passed to the chart.
5
10
  *
6
- * Includes options and data
11
+ * Includes options and data.
7
12
  */
8
13
  export interface ChartConfig<T extends AxisChartOptions> {
14
+ /**
15
+ * Chart options configuration.
16
+ * @type {T}
17
+ */
9
18
  options: T;
19
+ /**
20
+ * Data for the chart.
21
+ * @type {ChartTabularData}
22
+ */
10
23
  data: ChartTabularData;
11
24
  }
25
+ /**
26
+ * Represents a dataset used in a chart.
27
+ */
12
28
  export interface DataSet {
13
29
  /**
14
- * Label for the dataset
30
+ * Label for the dataset.
31
+ * @type {string}
15
32
  */
16
33
  label: string;
17
34
  /**
18
- * Array of hex background colors
35
+ * Array of hex background colors.
36
+ * @type {string[]}
19
37
  */
20
38
  fillColors: string[];
21
39
  /**
22
- * Array of data values
40
+ * Array of data values.
41
+ * @type {any[]}
23
42
  */
24
43
  data: any[];
25
44
  }
45
+ /**
46
+ * Represents the data structure for a chart.
47
+ */
26
48
  export interface ChartData {
27
49
  /**
28
- * Labels for the x (horizontal) axis. Should match the number of items in each dataset data array
50
+ * Labels for the x (horizontal) axis. Should match the number of items in each dataset data array.
51
+ * @type {string[]}
29
52
  */
30
53
  labels: string[];
31
54
  /**
32
- * Array of datasets to display in the chart
55
+ * Array of datasets to display in the chart.
56
+ * @type {DataSet[]}
33
57
  */
34
58
  datasets: DataSet[];
35
59
  }