From 343e23a9f9e4c33b9d461066917b351164d533bb Mon Sep 17 00:00:00 2001 From: navaneeth Date: Sat, 15 May 2021 18:13:36 +0530 Subject: [PATCH] Feature: Support for bar charts --- frontend/src/Editor/Components/Chart.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/Editor/Components/Chart.jsx b/frontend/src/Editor/Components/Chart.jsx index be3554d474..f92d9a2a86 100644 --- a/frontend/src/Editor/Components/Chart.jsx +++ b/frontend/src/Editor/Components/Chart.jsx @@ -29,9 +29,11 @@ export const Chart = function Chart({ const titleProperty = component.definition.properties.title; const title = titleProperty.value; + const typeProperty = component.definition.properties.type; + const chartType = typeProperty.value; const chartData = [{ - type: 'line', + type: chartType || 'line', x: data.map((item) => item["x"]), y: data.map((item) => item["y"]) }]