@dpuse/dpuse-tool-d3 0.0.4 → 0.0.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.
@@ -0,0 +1,15 @@
1
+ import { Chart } from 'billboard.js';
2
+ export interface BarChartSeries {
3
+ name: string;
4
+ values: number[];
5
+ }
6
+ export interface BarChartData {
7
+ categories: string[];
8
+ series: BarChartSeries[];
9
+ }
10
+ export interface BarChartHandle {
11
+ chart: Chart;
12
+ destroy: () => void;
13
+ resize: () => void;
14
+ }
15
+ export declare function renderBarChart(data: BarChartData, renderTo: HTMLElement): BarChartHandle;
@@ -1,8 +1,11 @@
1
+ import { Chart } from 'billboard.js';
1
2
  import { PresentationView } from '@dpuse/dpuse-shared/component/presentation';
3
+ import { BarChartData } from './barChart';
2
4
  import { ErdDiagramData, ErdDiagramOptions } from './erdDiagram';
3
5
  import { NetworkDiagramData, NetworkDiagramOptions } from './networkDiagram';
4
6
  import { SankeyDiagramData, SankeyDiagramOptions } from './sankeyDiagram';
5
7
  import { TreeDiagramNode, TreeDiagramOptions } from './treeDiagram';
8
+ export type { BarChartData, BarChartSeries } from './barChart';
6
9
  export type { ErdDiagramData, ErdDiagramEdge, ErdDiagramNode, ErdDiagramNodeTypeId, ErdDiagramOptions } from './erdDiagram';
7
10
  export type { NetworkDiagramData, NetworkDiagramLink, NetworkDiagramNode, NetworkDiagramOptions } from './networkDiagram';
8
11
  export type { SankeyDiagramData, SankeyDiagramLink, SankeyDiagramNode, SankeyDiagramOptions } from './sankeyDiagram';
@@ -14,7 +17,12 @@ export interface D3NetworkView extends D3View {
14
17
  destroy: () => void;
15
18
  triggerAutoLayout: () => void;
16
19
  }
20
+ export interface D3BarChartView extends PresentationView {
21
+ chart: Chart;
22
+ destroy: () => void;
23
+ }
17
24
  export declare class D3Tool {
25
+ renderBarChart(data: BarChartData, renderTo: HTMLElement, callback?: () => void): D3BarChartView;
18
26
  renderErdDiagram(data: ErdDiagramData, renderTo: HTMLElement, options?: ErdDiagramOptions, callback?: () => void): D3View;
19
27
  renderNetworkDiagram(data: NetworkDiagramData, renderTo: HTMLElement, options?: NetworkDiagramOptions, callback?: () => void): D3NetworkView;
20
28
  renderSankeyDiagram(data: SankeyDiagramData, renderTo: HTMLElement, options?: SankeyDiagramOptions, callback?: () => void): D3View;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@dpuse/dpuse-tool-d3",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "private": false,
5
- "description": "A TypeScript wrapper for D3 that implements the Data Positioning chart-rendering interface, providing ERD (dagre), Sankey (d3-sankey), network (d3-force), and tree (d3-hierarchy) diagram renderers.",
5
+ "description": "A TypeScript wrapper for D3 and Billboard.js that implements the Data Positioning chart-rendering interface, providing ERD (dagre), Sankey (d3-sankey), network (d3-force), tree (d3-hierarchy), and bar chart (billboard.js) renderers.",
6
6
  "license": "MIT",
7
7
  "author": "Jonathan Terrell <terrell.jm@gmail.com>",
8
8
  "type": "module",
@@ -57,6 +57,7 @@
57
57
  "dependencies": {
58
58
  "@dagrejs/dagre": "^3.0.0",
59
59
  "@dpuse/dpuse-shared": "^0.3.758",
60
+ "billboard.js": "^4.0.3",
60
61
  "d3-drag": "^3.0.0",
61
62
  "d3-force": "^3.0.0",
62
63
  "d3-hierarchy": "^3.1.2",