@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.
- package/dist/index.d.ts +26 -4
- package/dist/index.js +211 -125
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -4
- package/src/BarList.tsx +126 -0
- package/src/Visualization.tsx +13 -1
- package/src/index.ts +4 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,35 @@
|
|
|
1
1
|
import * as _opendata_ai_openchart_core from '@opendata-ai/openchart-core';
|
|
2
|
-
import { ChartEventHandlers, ChartSpec, LayerSpec, GraphSpec,
|
|
2
|
+
import { BarListSpec, ThemeConfig, DarkMode, ChartEventHandlers, ChartSpec, LayerSpec, GraphSpec, ElementRef, TableSpec, SortState, ChartLayout, SankeySpec, TileMapSpec, VizSpec } from '@opendata-ai/openchart-core';
|
|
3
3
|
export * from '@opendata-ai/openchart-core';
|
|
4
|
-
import { ChartInstance, GraphInstance, MountOptions, TableInstance, TableState, TableMountOptions, SankeyInstance, TileMapInstance } from '@opendata-ai/openchart-vanilla';
|
|
4
|
+
import { BarListInstance, ChartInstance, GraphInstance, MountOptions, TableInstance, TableState, TableMountOptions, SankeyInstance, TileMapInstance } from '@opendata-ai/openchart-vanilla';
|
|
5
5
|
export { JPGExportOptions, PNGExportOptions, SVGExportOptions, exportCSV, exportJPG, exportPNG, exportSVG, exportSVGWithFonts } from '@opendata-ai/openchart-vanilla';
|
|
6
|
-
export { ChartRenderer, CompileResult, CompiledGraphEdge, CompiledGraphNode, GraphCompilation, NormalizedChartSpec, NormalizedChrome, NormalizedGraphSpec, NormalizedSankeySpec, NormalizedSpec, NormalizedTableSpec, NormalizedTileMapSpec, SimulationConfig, ValidationError, ValidationErrorCode, ValidationResult, clearRenderers, compile, compileChart, compileGraph, compileSankey, compileTable, compileTileMap, getChartRenderer, normalizeSpec, registerChartRenderer, validateSpec } from '@opendata-ai/openchart-engine';
|
|
6
|
+
export { ChartRenderer, CompileResult, CompiledGraphEdge, CompiledGraphNode, GraphCompilation, NormalizedBarListSpec, NormalizedChartSpec, NormalizedChrome, NormalizedGraphSpec, NormalizedSankeySpec, NormalizedSpec, NormalizedTableSpec, NormalizedTileMapSpec, SimulationConfig, ValidationError, ValidationErrorCode, ValidationResult, clearRenderers, compile, compileBarList, compileChart, compileGraph, compileSankey, compileTable, compileTileMap, getChartRenderer, normalizeSpec, registerChartRenderer, validateSpec } from '@opendata-ai/openchart-engine';
|
|
7
7
|
import * as react from 'react';
|
|
8
8
|
import { CSSProperties, ReactNode } from 'react';
|
|
9
9
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
|
+
interface BarListProps {
|
|
12
|
+
spec: BarListSpec;
|
|
13
|
+
theme?: ThemeConfig;
|
|
14
|
+
darkMode?: DarkMode;
|
|
15
|
+
onRowClick?: (row: {
|
|
16
|
+
label: string;
|
|
17
|
+
value: number;
|
|
18
|
+
data: Record<string, unknown>;
|
|
19
|
+
}) => void;
|
|
20
|
+
onRowHover?: (row: {
|
|
21
|
+
label: string;
|
|
22
|
+
value: number;
|
|
23
|
+
data: Record<string, unknown>;
|
|
24
|
+
} | null) => void;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
interface BarListHandle {
|
|
29
|
+
readonly instance: BarListInstance | null;
|
|
30
|
+
}
|
|
31
|
+
declare const BarList: react.ForwardRefExoticComponent<BarListProps & react.RefAttributes<BarListHandle>>;
|
|
32
|
+
|
|
11
33
|
interface ChartHandle {
|
|
12
34
|
/** Get the currently selected element, or null if none. */
|
|
13
35
|
getSelectedElement(): ElementRef | null;
|
|
@@ -379,4 +401,4 @@ interface VisualizationProps {
|
|
|
379
401
|
*/
|
|
380
402
|
declare function Visualization({ spec, theme, darkMode, className, style }: VisualizationProps): react_jsx_runtime.JSX.Element;
|
|
381
403
|
|
|
382
|
-
export { Chart, type ChartHandle, type ChartProps, DataTable, type DataTableProps, Graph, type GraphHandle, type GraphProps, Sankey, type SankeyHandle, type SankeyProps, TileMap, type TileMapHandle, type TileMapProps, type UseChartOptions, type UseChartReturn, type UseGraphReturn, type UseTableReturn, type UseTableStateOptions, type UseTableStateReturn, Visualization, type VisualizationProps, VizThemeProvider, type VizThemeProviderProps, useChart, useDarkMode, useGraph, useTable, useTableState, useVizDarkMode, useVizTheme };
|
|
404
|
+
export { BarList, type BarListHandle, type BarListProps, Chart, type ChartHandle, type ChartProps, DataTable, type DataTableProps, Graph, type GraphHandle, type GraphProps, Sankey, type SankeyHandle, type SankeyProps, TileMap, type TileMapHandle, type TileMapProps, type UseChartOptions, type UseChartReturn, type UseGraphReturn, type UseTableReturn, type UseTableStateOptions, type UseTableStateReturn, Visualization, type VisualizationProps, VizThemeProvider, type VizThemeProviderProps, useChart, useDarkMode, useGraph, useTable, useTableState, useVizDarkMode, useVizTheme };
|