@blueprint-chart/lib 0.1.27 → 0.1.28
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 +3 -1
- package/dist/index.js +1871 -1725
- package/dist/recommendations/decisionTable.d.ts +7 -0
- package/dist/recommendations/fixtures.d.ts +10 -0
- package/dist/recommendations/intent.d.ts +2 -0
- package/dist/recommendations/recommend.d.ts +4 -9
- package/dist/recommendations/shape.d.ts +2 -0
- package/dist/recommendations/types.d.ts +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Intent, RecommendationFitness, ShapeSignature } from './types';
|
|
2
|
+
export interface RawRec {
|
|
3
|
+
type: string;
|
|
4
|
+
fitness: RecommendationFitness;
|
|
5
|
+
reason: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function resolveCell(shape: ShapeSignature, intent: Intent, rowCount: number): RawRec[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ColumnType } from './types';
|
|
2
|
+
export interface RecommendFixture {
|
|
3
|
+
id: string;
|
|
4
|
+
columnTypes: ColumnType[];
|
|
5
|
+
rowCount: number;
|
|
6
|
+
goal: string;
|
|
7
|
+
expectedType: string;
|
|
8
|
+
allowedMiss?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const RECOMMEND_FIXTURES: RecommendFixture[];
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
label: string;
|
|
6
|
-
fitness: RecommendationFitness;
|
|
7
|
-
reason: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function recommendCharts(columnTypes: ColumnType[], rowCount: number): ChartRecommendation[];
|
|
1
|
+
import { ChartRecommendation, ColumnType } from './types';
|
|
2
|
+
export type { ChartRecommendation, ColumnType, RecommendationFitness } from './types';
|
|
3
|
+
export type { Intent, ShapeSignature } from './types';
|
|
4
|
+
export declare function recommendCharts(columnTypes: ColumnType[], rowCount: number, goal?: string): ChartRecommendation[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ColumnType = 'string' | 'number' | 'date';
|
|
2
|
+
export type RecommendationFitness = 'best' | 'good' | 'alternative';
|
|
3
|
+
export interface ChartRecommendation {
|
|
4
|
+
chartType: string;
|
|
5
|
+
label: string;
|
|
6
|
+
fitness: RecommendationFitness;
|
|
7
|
+
reason: string;
|
|
8
|
+
}
|
|
9
|
+
export type Intent = 'trend' | 'comparison' | 'ranking' | 'composition-over-time' | 'part-to-whole' | 'range' | 'none';
|
|
10
|
+
export type ShapeSignature = '1cat+1num' | '1cat+Nnum' | '1date+1num' | '1date+Nnum' | 'other';
|
|
11
|
+
export declare const CHART_LABELS: Record<string, string>;
|