Feature: Support for bar charts

This commit is contained in:
navaneeth 2021-05-15 18:13:36 +05:30
parent f59a5dd618
commit 343e23a9f9

View file

@ -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"])
}]