From 5751e92bbd27484d6d017fd030518c4e7cb606a5 Mon Sep 17 00:00:00 2001 From: Gerard Burns Date: Thu, 18 Apr 2024 08:32:36 +0100 Subject: [PATCH] refactor line area --- packages/client/manifest.json | 38 +++++++++++++++++++ .../components/app/charts/ApexChart.svelte | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 36bb026d96..008496a8e9 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -1777,6 +1777,7 @@ ] }, "line": { + "documentationLink": "https://docs.budibase.com/docs/line-chart", "name": "Line Chart", "description": "Line chart", "icon": "GraphTrend", @@ -1808,6 +1809,22 @@ "label": "Data columns", "key": "valueColumns", "dependsOn": "dataProvider", + "columnInfo": { + "typeSupport": { + "supported": ["number", "boolean"], + "partialSupport": [ + { "type": "longform", "message": "stringAsNumber" }, + { "type": "string", "message": "stringAsNumber" }, + { "type": "bigint", "message": "stringAsNumber" }, + { "type": "options", "message": "stringAsNumber" }, + { "type": "formula", "message": "stringAsNumber" }, + { "type": "datetime", "message": "dateAsNumber"} + ], + "unsupported": [ + { "type": "json", "message": "jsonPrimitivesOnly" } + ] + } + }, "required": true }, { @@ -1930,6 +1947,7 @@ ] }, "area": { + "documentationLink": "https://docs.budibase.com/docs/area-chart", "name": "Area Chart", "description": "Line chart", "icon": "GraphAreaStacked", @@ -1961,6 +1979,22 @@ "label": "Data columns", "key": "valueColumns", "dependsOn": "dataProvider", + "columnInfo": { + "typeSupport": { + "supported": ["number", "boolean"], + "partialSupport": [ + { "type": "longform", "message": "stringAsNumber" }, + { "type": "string", "message": "stringAsNumber" }, + { "type": "bigint", "message": "stringAsNumber" }, + { "type": "options", "message": "stringAsNumber" }, + { "type": "formula", "message": "stringAsNumber" }, + { "type": "datetime", "message": "dateAsNumber"} + ], + "unsupported": [ + { "type": "json", "message": "jsonPrimitivesOnly" } + ] + } + }, "required": true }, { @@ -2095,6 +2129,7 @@ ] }, "pie": { + "documentationLink": "https://docs.budibase.com/docs/pie-donut-chart", "name": "Pie Chart", "description": "Pie chart", "icon": "GraphPie", @@ -2224,6 +2259,7 @@ ] }, "donut": { + "documentationLink": "https://docs.budibase.com/docs/pie-donut-chart", "name": "Donut Chart", "description": "Donut chart", "icon": "GraphDonut", @@ -2353,6 +2389,7 @@ ] }, "candlestick": { + "documentationLink": "https://docs.budibase.com/docs/candlestick-chart", "name": "Candlestick Chart", "description": "Candlestick chart", "icon": "GraphBarVerticalStacked", @@ -2444,6 +2481,7 @@ ] }, "histogram": { + "documentationLink": "https://docs.budibase.com/docs/histogram-chart", "name": "Histogram Chart", "description": "Histogram chart", "icon": "Histogram", diff --git a/packages/client/src/components/app/charts/ApexChart.svelte b/packages/client/src/components/app/charts/ApexChart.svelte index 2765fa2370..55e37a44f2 100644 --- a/packages/client/src/components/app/charts/ApexChart.svelte +++ b/packages/client/src/components/app/charts/ApexChart.svelte @@ -9,7 +9,7 @@ export let options - // Apex charts directly modifies the options object with default properties and internal variables. These being present could unintentionally cause issues to the provider of this prop as the changes are reflected in that component as well. To prevent any issues we clone this here to provide a buffer. + // Apex charts directly modifies the options object with default properties and internal variables. These being present could unintentionally cause issues to the provider of this prop as the changes are reflected in that component as well. To prevent any issues we clone options here to provide a buffer. $: optionsCopy = cloneDeep(options); let chartElement;