@vizzly/dashboard 0.15.0-dev-faa8583d678bfc9b3d4da564fbf074620ea48b15 → 0.15.0-dev-532824b8277b56794208595a2825194b1d110465
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/charts/src/v2/utils/buildMargin.d.ts +3 -2
- package/dist/dashboard/src/index.d.ts +1 -1
- package/dist/dashboard.cjs.development.js +283 -254
- package/dist/dashboard.cjs.production.min.js +1 -1
- package/dist/dashboard.esm.js +283 -254
- package/dist/shared-logic/src/ChartsV2/adjustTicks.d.ts +15 -7
- package/dist/shared-logic/src/Theme/Theme.d.ts +6 -0
- package/dist/shared-ui/src/contexts/ThemeProvider/default.theme.d.ts +0 -6
- package/package.json +1 -1
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
1
2
|
import { HorizontalBarChartRepresentation } from '../HorizontalBarChartV2/types';
|
|
2
3
|
import { Result } from '../Result/types';
|
|
3
4
|
import { BaseChartRepresentation, Tick } from './types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
declare type ChartLabelsTheme = {
|
|
6
|
+
fontSize?: CSSProperties['fontSize'];
|
|
7
|
+
};
|
|
8
|
+
declare type ChartTheme = {
|
|
9
|
+
labels?: ChartLabelsTheme;
|
|
10
|
+
};
|
|
11
|
+
export declare function getAverageCharSize(averageSize: number, theme?: ChartTheme): number;
|
|
12
|
+
export declare function getAverageCharWidth(theme?: ChartTheme): number;
|
|
13
|
+
export declare function getAverageCharHeight(theme?: ChartTheme): number;
|
|
14
|
+
export declare function howManyTicksFitInWidth(ticks: Tick<string | number | Date>[], maxWidth: number, theme?: ChartTheme): number;
|
|
15
|
+
export declare function determineYTicks(ticks: Tick<number>[], height: number, theme?: ChartTheme): Tick<number>[];
|
|
9
16
|
export declare function pickEquallySpaced<T>(arr: Tick<T>[], numPicks: number): Tick<T>[];
|
|
10
|
-
export declare function adjustTicks<T extends BaseChartRepresentation>(representation: T, width: number, height: number, xKeyField?: Result.Field): T;
|
|
11
|
-
export declare function adjustTicksForHorizontalChart(representation: HorizontalBarChartRepresentation, width: number, height: number, yKeyField?: Result.Field): HorizontalBarChartRepresentation;
|
|
17
|
+
export declare function adjustTicks<T extends BaseChartRepresentation>(representation: T, width: number, height: number, xKeyField?: Result.Field, theme?: ChartTheme): T;
|
|
18
|
+
export declare function adjustTicksForHorizontalChart(representation: HorizontalBarChartRepresentation, width: number, height: number, yKeyField?: Result.Field, theme?: ChartTheme): HorizontalBarChartRepresentation;
|
|
12
19
|
export declare function getEvenlySpacedTicks<DataType extends string | number | Date>(ticks: Tick<DataType>[], count: number, xKeyField: Result.Field | undefined): Tick<DataType>[];
|
|
20
|
+
export {};
|
|
@@ -13,3 +13,9 @@ export declare const toHex: (color: string) => string;
|
|
|
13
13
|
export declare const highestContrast: (baseColor: string, colorOptions: string[]) => string;
|
|
14
14
|
export declare const pickBestTextColor: (backgroundColour: string, possibleTextColours: string[]) => string;
|
|
15
15
|
export declare const shuffle: (array: any[], seed?: number) => any[];
|
|
16
|
+
export declare const DEFAULT_CHART_FONT_SIZES: {
|
|
17
|
+
title: number;
|
|
18
|
+
axisTitles: number;
|
|
19
|
+
subject: number;
|
|
20
|
+
labels: number;
|
|
21
|
+
};
|
|
@@ -3,10 +3,4 @@ import { VizzlyTheming } from '../../types';
|
|
|
3
3
|
export declare const DEFAULT_CHART_COLORS: string[];
|
|
4
4
|
export declare const loadDefaultTheme: (version: ThemeVersion) => VizzlyTheming.Base;
|
|
5
5
|
export declare const COMMON_BORDER_COLOR: string;
|
|
6
|
-
export declare const DEFAULT_CHART_FONT_SIZES: {
|
|
7
|
-
title: number;
|
|
8
|
-
axisTitles: number;
|
|
9
|
-
subject: number;
|
|
10
|
-
labels: number;
|
|
11
|
-
};
|
|
12
6
|
export declare const defaultThemeV2: VizzlyTheming.Base;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizzly/dashboard",
|
|
3
3
|
"author": "james@vizzly.co",
|
|
4
|
-
"version": "0.15.0-dev-
|
|
4
|
+
"version": "0.15.0-dev-532824b8277b56794208595a2825194b1d110465",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "./dist/dashboard/src/index.d.ts",
|
|
7
7
|
"module": "./dist/dashboard.esm.js",
|