Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: color info is not persissted

DarkPhoenix27040e5272016d66
diff --git a/packages/nocodb-sdk/src/lib/dashboard/charts.ts b/packages/nocodb-sdk/src/lib/dashboard/charts.ts
index 2514a0ed58..91fed7671a 100644
--- a/packages/nocodb-sdk/src/lib/dashboard/charts.ts
+++ b/packages/nocodb-sdk/src/lib/dashboard/charts.ts
@@ -84,16 +84,10 @@ export interface BarChartDataConfig {
export interface BarChartAppearanceConfig {
size: 'small' | 'medium' | 'large';
- smoothLines: boolean;
- plotDataPoints: boolean;
showCountInLegend: boolean;
showPercentageOnChart: boolean;
legendPosition: 'top' | 'right' | 'bottom' | 'left' | 'none';
colorSchema: 'default' | 'custom';
- customColorSchema: {
- color: string;
- label: string;
- }[];
}
export interface BarChartConfig extends BaseChartConfig {
@@ -104,14 +98,38 @@ export interface BarChartConfig extends BaseChartConfig {
appearance: BarChartAppearanceConfig;
}
+export interface LineChartAppearanceConfig {
+ size: 'small' | 'medium' | 'large';
+ smoothLines: boolean;
+ plotDataPoints: boolean;
+ showCountInLegend: boolean;
+ showPercentageOnChart: boolean;
+ legendPosition: 'top' | 'right' | 'bottom' | 'left' | 'none';
+ colorSchema: 'default' | 'custom';
+}
+
export interface LineChartConfig extends BaseChartConfig {
chartType: ChartTypes.LINE;
+ data: BarChartDataConfig;
+ permissions: ChartPermissionConfig;
dataSource?: WidgetDataSourceTypes;
+ appearance: LineChartAppearanceConfig;
+}
+
+export interface ScatterPlotAppearanceConfig {
+ size: 'small' | 'medium' | 'large';
+ showCountInLegend: boolean;
+ showPercentageOnChart: boolean;
+ legendPosition: 'top' | 'right' | 'bottom' | 'left' | 'none';
+ colorSchema: 'default' | 'custom';
}
export interface ScatterPlotConfig extends BaseChartConfig {
chartType: ChartTypes.SCATTER;
dataSource?: WidgetDataSourceTypes;
+ data: BarChartDataConfig;
+ permissions: ChartPermissionConfig;
+ appearance: ScatterPlotAppearanceConfig;
}
export type ChartWidgetConfig<T extends ChartTypes = ChartTypes> =