@orbcharts/plugins-basic 3.0.0-alpha.30 → 3.0.0-alpha.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. package/dist/orbcharts-plugins-basic.es.js +15826 -15642
  2. package/dist/orbcharts-plugins-basic.umd.js +8 -8
  3. package/dist/src/base/BaseBarStack.d.ts +29 -0
  4. package/dist/src/base/BaseBars.d.ts +29 -0
  5. package/dist/src/base/BaseBarsTriangle.d.ts +28 -0
  6. package/dist/src/base/BaseLegend.d.ts +12 -3
  7. package/dist/src/base/BaseLines.d.ts +27 -0
  8. package/dist/src/base/types.d.ts +2 -2
  9. package/dist/src/grid/plugins/BarStack.d.ts +1 -3
  10. package/dist/src/grid/plugins/Bars.d.ts +1 -3
  11. package/dist/src/grid/plugins/BarsTriangle.d.ts +1 -3
  12. package/dist/src/grid/plugins/Lines.d.ts +1 -3
  13. package/dist/src/index.d.ts +1 -0
  14. package/dist/src/multiGrid/defaults.d.ts +3 -0
  15. package/dist/src/multiGrid/index.d.ts +3 -0
  16. package/dist/src/multiGrid/plugins/BarsAndLines.d.ts +1 -0
  17. package/dist/src/multiGrid/types.d.ts +7 -0
  18. package/package.json +2 -2
  19. package/src/base/BaseBarStack.ts +699 -0
  20. package/src/base/BaseBars.ts +639 -0
  21. package/src/base/BaseBarsTriangle.ts +626 -0
  22. package/src/base/BaseLegend.ts +9 -7
  23. package/src/base/BaseLines.ts +566 -0
  24. package/src/base/types.ts +2 -2
  25. package/src/grid/plugins/BarStack.ts +16 -643
  26. package/src/grid/plugins/Bars.ts +15 -586
  27. package/src/grid/plugins/BarsTriangle.ts +14 -577
  28. package/src/grid/plugins/Lines.ts +14 -508
  29. package/src/index.ts +1 -0
  30. package/src/multiGrid/defaults.ts +14 -0
  31. package/src/multiGrid/index.ts +3 -0
  32. package/src/multiGrid/plugins/BarStackAndLines.ts +0 -0
  33. package/src/multiGrid/plugins/BarsAndLines.ts +110 -0
  34. package/src/multiGrid/plugins/BarsTriangleAndLines.ts +0 -0
  35. package/src/multiGrid/plugins/DivergingValueAxes.ts +0 -0
  36. package/src/multiGrid/plugins/FirstGroupScaleAxis.ts +0 -0
  37. package/src/multiGrid/plugins/MultiGridLegend.ts +0 -0
  38. package/src/multiGrid/plugins/TwoValueScaleAxes.ts +0 -0
  39. package/src/multiGrid/types.ts +8 -0
  40. /package/dist/src/multiGrid/plugins/{DivergingAxes.d.ts → BarStackAndLines.d.ts} +0 -0
  41. /package/dist/src/multiGrid/plugins/{TwoScaleAxes.d.ts → BarsTriangleAndLines.d.ts} +0 -0
  42. /package/dist/src/multiGrid/plugins/{TwoScales.d.ts → DivergingValueAxes.d.ts} +0 -0
  43. /package/{src/multiGrid/plugins/DivergingAxes.ts → dist/src/multiGrid/plugins/FirstGroupScaleAxis.d.ts} +0 -0
  44. /package/{src/multiGrid/plugins/TwoScaleAxes.ts → dist/src/multiGrid/plugins/MultiGridLegend.d.ts} +0 -0
  45. /package/{src/multiGrid/plugins/TwoScales.ts → dist/src/multiGrid/plugins/TwoValueScaleAxes.d.ts} +0 -0
@@ -0,0 +1,29 @@
1
+ import { Observable, Subject } from 'rxjs';
2
+ import { BasePluginFn } from './types';
3
+ import { ComputedDatumGrid, ComputedDataGrid, DataFormatterGrid, EventGrid, ChartParams, TransformData } from '@orbcharts/core';
4
+ import * as d3 from 'd3';
5
+ export interface BaseBarStackParams {
6
+ barWidth: number;
7
+ barGroupPadding: number;
8
+ barRadius: number | boolean;
9
+ }
10
+ interface BaseBarStackContext {
11
+ selection: d3.Selection<any, unknown, any, unknown>;
12
+ computedData$: Observable<ComputedDataGrid>;
13
+ visibleComputedData$: Observable<ComputedDatumGrid[][]>;
14
+ SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
15
+ GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
16
+ fullParams$: Observable<BaseBarStackParams>;
17
+ fullDataFormatter$: Observable<DataFormatterGrid>;
18
+ fullChartParams$: Observable<ChartParams>;
19
+ gridAxesTransform$: Observable<TransformData>;
20
+ gridGraphicTransform$: Observable<TransformData>;
21
+ gridAxesSize$: Observable<{
22
+ width: number;
23
+ height: number;
24
+ }>;
25
+ gridHighlight$: Observable<string[]>;
26
+ event$: Subject<EventGrid>;
27
+ }
28
+ export declare const createBaseBarStack: BasePluginFn<BaseBarStackContext>;
29
+ export {};
@@ -0,0 +1,29 @@
1
+ import { Observable, Subject } from 'rxjs';
2
+ import { BasePluginFn } from './types';
3
+ import { ComputedDatumGrid, ComputedDataGrid, EventGrid, ChartParams, TransformData } from '@orbcharts/core';
4
+ import * as d3 from 'd3';
5
+ export interface BaseBarsParams {
6
+ barWidth: number;
7
+ barPadding: number;
8
+ barGroupPadding: number;
9
+ barRadius: number | boolean;
10
+ }
11
+ interface BaseBarsContext {
12
+ selection: d3.Selection<any, unknown, any, unknown>;
13
+ computedData$: Observable<ComputedDataGrid>;
14
+ visibleComputedData$: Observable<ComputedDatumGrid[][]>;
15
+ SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
16
+ GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
17
+ fullParams$: Observable<BaseBarsParams>;
18
+ fullChartParams$: Observable<ChartParams>;
19
+ gridAxesTransform$: Observable<TransformData>;
20
+ gridGraphicTransform$: Observable<TransformData>;
21
+ gridAxesSize$: Observable<{
22
+ width: number;
23
+ height: number;
24
+ }>;
25
+ gridHighlight$: Observable<string[]>;
26
+ event$: Subject<EventGrid>;
27
+ }
28
+ export declare const createBaseBars: BasePluginFn<BaseBarsContext>;
29
+ export {};
@@ -0,0 +1,28 @@
1
+ import { Observable, Subject } from 'rxjs';
2
+ import { BasePluginFn } from './types';
3
+ import { ComputedDatumGrid, ComputedDataGrid, EventGrid, ChartParams, TransformData } from '@orbcharts/core';
4
+ import * as d3 from 'd3';
5
+ export interface BaseBarsTriangleParams {
6
+ barWidth: number;
7
+ barPadding: number;
8
+ barGroupPadding: number;
9
+ linearGradientOpacity: [number, number];
10
+ }
11
+ interface BaseBarsContext {
12
+ selection: d3.Selection<any, unknown, any, unknown>;
13
+ computedData$: Observable<ComputedDataGrid>;
14
+ SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
15
+ GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
16
+ fullParams$: Observable<BaseBarsTriangleParams>;
17
+ fullChartParams$: Observable<ChartParams>;
18
+ gridAxesTransform$: Observable<TransformData>;
19
+ gridGraphicTransform$: Observable<TransformData>;
20
+ gridAxesSize$: Observable<{
21
+ width: number;
22
+ height: number;
23
+ }>;
24
+ gridHighlight$: Observable<string[]>;
25
+ event$: Subject<EventGrid>;
26
+ }
27
+ export declare const createBaseBarsTriangle: BasePluginFn<BaseBarsContext>;
28
+ export {};
@@ -1,6 +1,7 @@
1
+ import { Observable } from 'rxjs';
1
2
  import { BasePluginFn } from './types';
2
- import { ColorType } from '@orbcharts/core';
3
-
3
+ import { ChartParams, Layout, ColorType } from '@orbcharts/core';
4
+ import * as d3 from 'd3';
4
5
  export interface BaseLegendParams {
5
6
  position: 'top' | 'bottom' | 'left' | 'right';
6
7
  justify: 'start' | 'center' | 'end';
@@ -12,4 +13,12 @@ export interface BaseLegendParams {
12
13
  listRectHeight: number;
13
14
  listRectRadius: number;
14
15
  }
15
- export declare const createBaseLegend: BasePluginFn;
16
+ interface BaseLegendContext {
17
+ rootSelection: d3.Selection<any, unknown, any, unknown>;
18
+ seriesLabels$: Observable<string[]>;
19
+ fullParams$: Observable<BaseLegendParams>;
20
+ layout$: Observable<Layout>;
21
+ fullChartParams$: Observable<ChartParams>;
22
+ }
23
+ export declare const createBaseLegend: BasePluginFn<BaseLegendContext>;
24
+ export {};
@@ -0,0 +1,27 @@
1
+ import { Observable, Subject } from 'rxjs';
2
+ import { BasePluginFn } from './types';
3
+ import { ComputedDatumGrid, ComputedDataGrid, DataFormatterGrid, EventGrid, ChartParams, TransformData } from '@orbcharts/core';
4
+ import * as d3 from 'd3';
5
+ export interface BaseLinesParams {
6
+ lineCurve: string;
7
+ lineWidth: number;
8
+ }
9
+ interface BaseLinesContext {
10
+ selection: d3.Selection<any, unknown, any, unknown>;
11
+ computedData$: Observable<ComputedDataGrid>;
12
+ SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
13
+ GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>;
14
+ fullDataFormatter$: Observable<DataFormatterGrid>;
15
+ fullParams$: Observable<BaseLinesParams>;
16
+ fullChartParams$: Observable<ChartParams>;
17
+ gridAxesTransform$: Observable<TransformData>;
18
+ gridGraphicTransform$: Observable<TransformData>;
19
+ gridAxesSize$: Observable<{
20
+ width: number;
21
+ height: number;
22
+ }>;
23
+ gridHighlight$: Observable<string[]>;
24
+ event$: Subject<EventGrid>;
25
+ }
26
+ export declare const createBaseLines: BasePluginFn<BaseLinesContext>;
27
+ export {};
@@ -1,3 +1,3 @@
1
- export interface BasePluginFn {
2
- (pluginName: string, context: any): () => void;
1
+ export interface BasePluginFn<Context> {
2
+ (pluginName: string, context: Context): () => void;
3
3
  }
@@ -1,3 +1 @@
1
- import { BarStackParams } from '../types';
2
-
3
- export declare const BarStack: import('@orbcharts/core').PluginConstructor<"grid", string, BarStackParams>;
1
+ export declare const BarStack: import('@orbcharts/core').PluginConstructor<"grid", string, import('..').BarStackParams>;
@@ -1,3 +1 @@
1
- import { BarsParams } from '../types';
2
-
3
- export declare const Bars: import('@orbcharts/core').PluginConstructor<"grid", string, BarsParams>;
1
+ export declare const Bars: import('@orbcharts/core').PluginConstructor<"grid", string, import('..').BarsParams>;
@@ -1,3 +1 @@
1
- import { BarsTriangleParams } from '../types';
2
-
3
- export declare const BarsTriangle: import('@orbcharts/core').PluginConstructor<"grid", string, BarsTriangleParams>;
1
+ export declare const BarsTriangle: import('@orbcharts/core').PluginConstructor<"grid", string, import('..').BarsTriangleParams>;
@@ -1,3 +1 @@
1
- import { LinesParams } from '../types';
2
-
3
- export declare const Lines: import('@orbcharts/core').PluginConstructor<"grid", string, LinesParams>;
1
+ export declare const Lines: import('@orbcharts/core').PluginConstructor<"grid", string, import('..').LinesParams>;
@@ -1,3 +1,4 @@
1
1
  export * from './grid';
2
+ export * from './multiGrid';
2
3
  export * from './noneData';
3
4
  export * from './series';
@@ -0,0 +1,3 @@
1
+ import { BarsAndLinesParams } from './types';
2
+
3
+ export declare const DEFAULT_BARS_AND_LINES_PARAMS: BarsAndLinesParams;
@@ -0,0 +1,3 @@
1
+ export * from './defaults';
2
+ export * from './types';
3
+ export { BarsAndLines } from './plugins/BarsAndLines';
@@ -0,0 +1 @@
1
+ export declare const BarsAndLines: import('@orbcharts/core').PluginConstructor<"multiGrid", string, import('..').BarsAndLinesParams>;
@@ -0,0 +1,7 @@
1
+ import { BaseBarsParams } from '../base/BaseBars';
2
+ import { BaseLinesParams } from '../base/BaseLines';
3
+
4
+ export interface BarsAndLinesParams {
5
+ bars: BaseBarsParams;
6
+ lines: BaseLinesParams;
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbcharts/plugins-basic",
3
- "version": "3.0.0-alpha.30",
3
+ "version": "3.0.0-alpha.31",
4
4
  "description": "plugins for OrbCharts",
5
5
  "author": "Blue Planet Inc.",
6
6
  "license": "Apache-2.0",
@@ -35,7 +35,7 @@
35
35
  "vite-plugin-dts": "^3.7.3"
36
36
  },
37
37
  "dependencies": {
38
- "@orbcharts/core": "^3.0.0-alpha.26",
38
+ "@orbcharts/core": "^3.0.0-alpha.27",
39
39
  "d3": "^7.8.5",
40
40
  "rxjs": "^7.8.1"
41
41
  }