@opendata-ai/openchart-react 6.27.0 → 6.28.2

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.
@@ -6,8 +6,15 @@
6
6
  */
7
7
 
8
8
  import type { DarkMode, ThemeConfig, VizSpec } from '@opendata-ai/openchart-core';
9
- import { isGraphSpec, isSankeySpec, isTableSpec, isTileMapSpec } from '@opendata-ai/openchart-core';
9
+ import {
10
+ isBarListSpec,
11
+ isGraphSpec,
12
+ isSankeySpec,
13
+ isTableSpec,
14
+ isTileMapSpec,
15
+ } from '@opendata-ai/openchart-core';
10
16
  import type { CSSProperties } from 'react';
17
+ import { BarList } from './BarList';
11
18
  import { Chart } from './Chart';
12
19
  import { DataTable } from './DataTable';
13
20
  import { Graph } from './Graph';
@@ -60,6 +67,11 @@ export function Visualization({ spec, theme, darkMode, className, style }: Visua
60
67
  <TileMap spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />
61
68
  );
62
69
  }
70
+ if (isBarListSpec(spec)) {
71
+ return (
72
+ <BarList spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />
73
+ );
74
+ }
63
75
  return (
64
76
  <Chart spec={spec} theme={theme} darkMode={darkMode} className={className} style={style} />
65
77
  );
package/src/index.ts CHANGED
@@ -41,6 +41,7 @@ export type {
41
41
  CompiledGraphNode,
42
42
  CompileResult,
43
43
  GraphCompilation,
44
+ NormalizedBarListSpec,
44
45
  NormalizedChartSpec,
45
46
  NormalizedChrome,
46
47
  NormalizedGraphSpec,
@@ -56,6 +57,7 @@ export type {
56
57
  export {
57
58
  clearRenderers,
58
59
  compile,
60
+ compileBarList,
59
61
  compileChart,
60
62
  compileGraph,
61
63
  compileSankey,
@@ -66,7 +68,8 @@ export {
66
68
  registerChartRenderer,
67
69
  validateSpec,
68
70
  } from '@opendata-ai/openchart-engine';
69
-
71
+ export type { BarListHandle, BarListProps } from './BarList';
72
+ export { BarList } from './BarList';
70
73
  export type { ChartHandle, ChartProps } from './Chart';
71
74
  // Components
72
75
  export { Chart } from './Chart';